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

Private GIT Repository
Wip++...
[loba.git] / process.h
index 58024265d8b0ac06fb43755966f0eaff02d814f2..c148683bca8764e145344c98d8900563f80dac1f 100644 (file)
--- a/process.h
+++ b/process.h
@@ -22,10 +22,17 @@ public:
     ~process();
     int run();
 
+protected:
+    typedef std::vector<neighbor> neigh_type;
+    typedef std::vector<neighbor*> pneigh_type;
+
+    neigh_type neigh;
+    pneigh_type pneigh;
+
 private:
-    std::vector<neighbor> neigh;
-    MAP_TEMPLATE<m_host_t, neighbor*> rev_neigh;
-    std::vector<neighbor*> pneigh;
+    typedef MAP_TEMPLATE<m_host_t, neighbor*> rev_neigh_type;
+
+    rev_neigh_type rev_neigh;
 
     communicator comm;
     int ctrl_close_pending;
@@ -36,8 +43,10 @@ private:
     double load;
     double expected_load;
 
-    void compute();
+    double sum_of_to_send() const;
     virtual double load_balance(double my_load);
+
+    void compute();
     void send1_no_bookkeeping(neighbor& nb);
     void send1_bookkeeping(neighbor& nb);
     void send();