- improved error logging
[oweals/gnunet.git] / src / ats / gnunet-service-ats_addresses_mlp.h
index 1a478cd00bff6ef3987ee202244cc05b0f778527..4b4b933196c44f74d71b4515378fa312c208f707 100644 (file)
@@ -136,18 +136,25 @@ struct GAS_MLP_Handle
   int c_r;
   double co_R;
 
-  /* column index first quality metric (q_1) column */
-  int c_q_start;
+  /* ATS Quality metrics
+   * array with GNUNET_ATS_QualityPropertiesCount elements
+   * contains mapping to GNUNET_ATS_Property*/
+  int q[GNUNET_ATS_QualityPropertiesCount];
 
-  /* column index last quality metric (q_n) column */
-  int c_q_end;
+  /* column index quality metrics  */
+  int c_q[GNUNET_ATS_QualityPropertiesCount];
 
-  /* Array of quality metric coefficients (m elements) */
-  double *co_Q;
+  /* quality metric coefficients*/
+  double co_Q[GNUNET_ATS_QualityPropertiesCount];
 
   /* number of quality metrics */
   int m;
 
+  /* minimum bandwidth assigned to an address */
+  unsigned int b_min;
+
+  /* minimum number of addresses with bandwidth assigned */
+  unsigned int n_min;
 };
 
 
@@ -167,13 +174,15 @@ struct MLP_information
 /**
  * Init the MLP problem solving component
  *
+ * @param cfg configuration handle
  * @param stats the GNUNET_STATISTICS handle
  * @param max_duration maximum numbers of iterations for the LP/MLP Solver
  * @param max_iterations maximum time limit for the LP/MLP Solver
  * @return struct GAS_MLP_Handle * on success, NULL on fail
  */
 struct GAS_MLP_Handle *
-GAS_mlp_init (const struct GNUNET_STATISTICS_Handle *stats,
+GAS_mlp_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
+              const struct GNUNET_STATISTICS_Handle *stats,
               struct GNUNET_TIME_Relative max_duration,
               unsigned int max_iterations);