]> AND Private Git Repository - loba.git/blobdiff - deployment.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Remove usage of std::bind.
[loba.git] / deployment.cpp
index bbb47e5392a1b55d58d5bb16e1e4a31e9b9df2cd..0a5db8c014078d13c2d41374ce9b2058618d3e73 100644 (file)
@@ -1,7 +1,6 @@
 #include <algorithm>
 #include <cmath>
 #include <cstdlib>
 #include <algorithm>
 #include <cmath>
 #include <cstdlib>
-#include <functional>
 #include <iomanip>
 #include <numeric>
 #include <sstream>
 #include <iomanip>
 #include <numeric>
 #include <sstream>
@@ -51,8 +50,6 @@ void deployment_generator::set_link(int host1, int host2)
 
 void deployment_generator::distribute_load()
 {
 
 void deployment_generator::distribute_load()
 {
-    using std::placeholders::_1;
-
     if (!opt::auto_depl::random_distribution) {
         set_load(0, opt::auto_depl::load);
         return;
     if (!opt::auto_depl::random_distribution) {
         set_load(0, opt::auto_depl::load);
         return;
@@ -67,7 +64,7 @@ void deployment_generator::distribute_load()
     double factor = opt::auto_depl::load /
         std::accumulate(loads.begin(), loads.end(), 0.0);
     std::transform(loads.begin(), loads.end(), loads.begin(),
     double factor = opt::auto_depl::load /
         std::accumulate(loads.begin(), loads.end(), 0.0);
     std::transform(loads.begin(), loads.end(), loads.begin(),
-                   std::bind(std::multiplies<double>(), _1, factor));
+                   [&factor](double a) { return factor * a; });
     if (opt::integer_transfer) {
         double iload;
         double residue = 0.0;
     if (opt::integer_transfer) {
         double iload;
         double residue = 0.0;