- minor
authorMatthias Wachs <wachs@net.in.tum.de>
Mon, 16 Jan 2012 17:19:42 +0000 (17:19 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Mon, 16 Jan 2012 17:19:42 +0000 (17:19 +0000)
src/ats/gnunet-service-ats_addresses_mlp.c
src/ats/gnunet-service-ats_addresses_mlp.h

index c0d4dc08e6ee0d0950f94d8c72a1112b9813c12e..aa72b9d90849555b41260cb5dea10aa944e8a6bc 100644 (file)
@@ -63,7 +63,7 @@ mlp_create_problem (struct GAS_MLP_Handle *mlp)
   mlp->c_d = col;
   /* Column name */
   glp_set_col_name (mlp->prob, col, "d");
-  /* Column coffiecient */
+  /* Column objective function coefficient */
   glp_set_obj_coef (mlp->prob, col, mlp->co_D);
   /* Column lower bound = 0.0 */
   glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0);
@@ -74,7 +74,7 @@ mlp_create_problem (struct GAS_MLP_Handle *mlp)
   mlp->c_u = col;
   /* Column name */
   glp_set_col_name (mlp->prob, col, "u");
-  /* Column coffiecient */
+  /* Column objective function coefficient */
   glp_set_obj_coef (mlp->prob, col, mlp->co_U);
   /* Column lower bound = 0.0 */
   glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0);
@@ -85,17 +85,16 @@ mlp_create_problem (struct GAS_MLP_Handle *mlp)
   mlp->c_r = col;
   /* Column name */
   glp_set_col_name (mlp->prob, col, "r");
-  /* Column coffiecient */
+  /* Column objective function coefficient */
   glp_set_obj_coef (mlp->prob, col, mlp->co_R);
   /* Column lower bound = 0.0 */
   glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0);
 
   /* Quality metric columns */
   col = glp_add_cols(mlp->prob, mlp->m);
-  mlp->c_q_start = col;
-  mlp->c_q_end = col + mlp->m;
   for (c = 0; c < mlp->m; c++)
   {
+    mlp->c_q[c] = col + c;
     GNUNET_asprintf (&name, "q_%u", mlp->q[c]);
     glp_set_col_name (mlp->prob, col + c, name);
     glp_set_col_bnds (mlp->prob, col + c, GLP_LO, 0.0, 0.0);
index 62df7a7337e903b806e1b96f559cbca4fd6bb93c..4b4b933196c44f74d71b4515378fa312c208f707 100644 (file)
@@ -141,11 +141,8 @@ struct GAS_MLP_Handle
    * contains mapping to GNUNET_ATS_Property*/
   int q[GNUNET_ATS_QualityPropertiesCount];
 
-  /* column index first quality metric (q_1) column */
-  int c_q_start;
-
-  /* column index last quality metric (q_n) column */
-  int c_q_end;
+  /* column index quality metrics  */
+  int c_q[GNUNET_ATS_QualityPropertiesCount];
 
   /* quality metric coefficients*/
   double co_Q[GNUNET_ATS_QualityPropertiesCount];