X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/af35c0c75c52b0cf5d0518656473503f67a79613..1585b49c3b4c38379d8ebc955f0c86c8b3467aba:/loba_fairstrategy.cpp?ds=sidebyside diff --git a/loba_fairstrategy.cpp b/loba_fairstrategy.cpp index 552f060..4054729 100644 --- a/loba_fairstrategy.cpp +++ b/loba_fairstrategy.cpp @@ -1,4 +1,3 @@ -#include #include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(loba); @@ -7,14 +6,11 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(loba); void loba_fairstrategy::load_balance() { - const double delta = 0.001; - - std::sort(pneigh.begin(), pneigh.end(), pneigh_load_greater()); - + pneigh_sort_by_load(std::greater()); print_loads_p(false, xbt_log_priority_debug); + const double delta = 0.001; bool found = true; - while (found) { found = false; for (unsigned i = 0 ; i < pneigh.size() ; ++i) {