From: Arnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Date: Tue, 25 Jan 2011 09:21:01 +0000 (+0100)
Subject: Delete process::sum_of_to_send().
X-Git-Tag: v0.1~188^2~16
X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/29d6013f6a85f43d958add37f8317cf038cf335b?hp=ea9e469b934dd81706ec3f727156b9057e4cf2bb

Delete process::sum_of_to_send().
---

diff --git a/README b/README
index ff8c438..37c51be 100644
--- a/README
+++ b/README
@@ -98,9 +98,7 @@ Pour ajouter un nouvel algorithme d'équilibrage
            pneigh[i]->get_load() ;
      - définit la charge à envoyer avec
            pneigh[i]->set_to_send(quantité) ;
-     - retourne la somme des quantités définies avec set_to_send, 
-       éventuellement à l'aide de la méthode process::sum_of_to_send()
-       qui clacule cette somme.
+     - retourne la somme des quantités définies avec set_to_send.
 
 2. Ajouter l'algorithme dans la liste des options.  Dans options.cpp :
    - faire le #include adéquat ;
diff --git a/process.cpp b/process.cpp
index a0447de..cd11433 100644
--- a/process.cpp
+++ b/process.cpp
@@ -1,7 +1,6 @@
 #include <algorithm>
 #include <tr1/functional>
 #include <iterator>
-#include <numeric>
 #include <stdexcept>
 #include <sstream>
 #include <xbt/log.h>
@@ -175,17 +174,6 @@ int process::run()
     return 0;
 }
 
-double process::sum_of_to_send() const
-{
-    using std::tr1::bind;
-    using std::tr1::placeholders::_1;
-    using std::tr1::placeholders::_2;
-
-    return std::accumulate(neigh.begin(), neigh.end(), 0.0,
-                           bind(std::plus<double>(),
-                                _1, bind(&neighbor::get_to_send, _2)));
-}
-
 double process::load_balance(double /*my_load*/)
 {
     if (lb_iter == 1)           // warn only once
diff --git a/process.h b/process.h
index a197e9a..3978e3a 100644
--- a/process.h
+++ b/process.h
@@ -39,9 +39,6 @@ protected:
     pneigh_type pneigh;         // list of pointers to neighbors that
                                 // we are free to reorder
 
-    // Returns the sum of "to_send" for all neighbors.
-    double sum_of_to_send() const;
-
     // Calls neighbor::print(verbose, logp, cat) for each member of neigh.
     void print_loads(bool verbose = false,
                      e_xbt_log_priority_t logp = xbt_log_priority_info,