Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge maxmin_private.hpp into maxmin.hpp.
[simgrid.git] / src / surf / lagrange.cpp
index 2a25fdc..ad77731 100644 (file)
@@ -7,9 +7,9 @@
  * Modeling the proportional fairness using the Lagrangian Optimization Approach. For a detailed description see:
  * "ssh://username@scm.gforge.inria.fr/svn/memo/people/pvelho/lagrange/ppf.ps".
  */
+#include "surf/maxmin.hpp"
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
-#include "maxmin_private.hpp"
 
 #include <algorithm>
 #include <cstdlib>
@@ -179,7 +179,7 @@ void lagrange_solve(lmm_system_t sys)
   XBT_DEBUG("#### Minimum error tolerated (dichotomy) : %e", dichotomy_min_error);
 
   if (XBT_LOG_ISENABLED(surf_lagrange, xbt_log_priority_debug)) {
-    lmm_print(sys);
+    sys->print();
   }
 
   if (not sys->modified)
@@ -276,7 +276,7 @@ void lagrange_solve(lmm_system_t sys)
       else {
         tmp = new_value(var);
 
-        overall_modification = MAX(overall_modification, fabs(var->value - tmp));
+        overall_modification = std::max(overall_modification, fabs(var->value - tmp));
 
         var->value = tmp;
         XBT_DEBUG("New value of var (%p)  = %e, overall_modification = %e", var, var->value, overall_modification);
@@ -299,7 +299,7 @@ void lagrange_solve(lmm_system_t sys)
   }
 
   if (XBT_LOG_ISENABLED(surf_lagrange, xbt_log_priority_debug)) {
-    lmm_print(sys);
+    sys->print();
   }
 }