X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/fc4b169f4e9a3b0e8c8ae807fdb4c7cf8d3e6507..41abcf0a2ff17ef20ab86d05a5e5f959bd5fd269:/deployment.cpp diff --git a/deployment.cpp b/deployment.cpp index bbb47e5..287ca4f 100644 --- a/deployment.cpp +++ b/deployment.cpp @@ -1,12 +1,11 @@ #include #include #include -#include #include #include #include #include -#include +#include #include #include @@ -51,8 +50,6 @@ void deployment_generator::set_link(int host1, int host2) void deployment_generator::distribute_load() { - using std::placeholders::_1; - 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(), - std::bind(std::multiplies(), _1, factor)); + [&factor](double a) { return factor * a; }); if (opt::integer_transfer) { double iload; double residue = 0.0;