aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_addresses_mlp.h
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-01-19 09:46:32 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-01-19 09:46:32 +0000
commitfccb457f37724b245c258bbc61145a8072705fe6 (patch)
tree76d65c4ea0e115313320480779b98d8db4fcecf7 /src/ats/gnunet-service-ats_addresses_mlp.h
parentd8cda8039015fe11760ae256c43094d046e08cac (diff)
downloadgnunet-fccb457f37724b245c258bbc61145a8072705fe6.tar.gz
gnunet-fccb457f37724b245c258bbc61145a8072705fe6.zip
- changes
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses_mlp.h')
-rw-r--r--src/ats/gnunet-service-ats_addresses_mlp.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/src/ats/gnunet-service-ats_addresses_mlp.h b/src/ats/gnunet-service-ats_addresses_mlp.h
index dd26aa837..4d55ff6e1 100644
--- a/src/ats/gnunet-service-ats_addresses_mlp.h
+++ b/src/ats/gnunet-service-ats_addresses_mlp.h
@@ -47,6 +47,9 @@ struct ATS_Peer
47 47
48 struct GNUNET_PeerIdentity id; 48 struct GNUNET_PeerIdentity id;
49 49
50 /* Array of quality preferences */
51 double f_q[GNUNET_ATS_QualityPropertiesCount];
52
50 struct ATS_Address *head; 53 struct ATS_Address *head;
51 struct ATS_Address *tail; 54 struct ATS_Address *tail;
52}; 55};
@@ -179,6 +182,7 @@ struct GAS_MLP_Handle
179 double co_R; 182 double co_R;
180 183
181 /* ATS Quality metrics 184 /* ATS Quality metrics
185 *
182 * array with GNUNET_ATS_QualityPropertiesCount elements 186 * array with GNUNET_ATS_QualityPropertiesCount elements
183 * contains mapping to GNUNET_ATS_Property*/ 187 * contains mapping to GNUNET_ATS_Property*/
184 int q[GNUNET_ATS_QualityPropertiesCount]; 188 int q[GNUNET_ATS_QualityPropertiesCount];
@@ -190,7 +194,22 @@ struct GAS_MLP_Handle
190 double co_Q[GNUNET_ATS_QualityPropertiesCount]; 194 double co_Q[GNUNET_ATS_QualityPropertiesCount];
191 195
192 /* number of quality metrics */ 196 /* number of quality metrics */
193 int m; 197 int m_q;
198
199 /* ATS ressource costs
200 *
201 * array with GNUNET_ATS_QualityPropertiesCount elements
202 * contains mapping to GNUNET_ATS_Property*/
203 int rc[GNUNET_ATS_QualityPropertiesCount];
204
205 /* column index ressource costs */
206 int c_rc[GNUNET_ATS_QualityPropertiesCount];
207
208 /* ressource costs coefficients*/
209 double co_RC[GNUNET_ATS_QualityPropertiesCount];
210
211 /* number of quality metrics */
212 int m_rc;
194 213
195 /* minimum bandwidth assigned to an address */ 214 /* minimum bandwidth assigned to an address */
196 unsigned int b_min; 215 unsigned int b_min;
@@ -270,14 +289,18 @@ GAS_mlp_address_delete (struct GAS_MLP_Handle *mlp, struct GNUNET_CONTAINER_Mult
270 289
271 290
272/** 291/**
273 * Deletes a single address in the MLP problem 292 * Changes the preferences for a peer in the MLP problem
274 * 293 *
275 * @param mlp the MLP Handle 294 * @param mlp the MLP Handle
276 * @param addresses the address hashmap 295 * @param peer the peer
277 * @param address the address to change the preference 296 * @param kind the kind to change the preference
297 * @param float the score
278 */ 298 */
279void 299void
280GAS_mlp_address_change_preference (struct GAS_MLP_Handle *mlp, struct GNUNET_CONTAINER_MultiHashMap * addresses, struct ATS_Address *address); 300GAS_mlp_address_change_preference (struct GAS_MLP_Handle *mlp,
301 const struct GNUNET_PeerIdentity *peer,
302 enum GNUNET_ATS_PreferenceKind kind,
303 float score);
281 304
282 305
283/** 306/**