Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do not use unsigned there, -1 is used to indicate there is no route between hosts
[simgrid.git] / include / simgrid / kernel / routing / FloydZone.hpp
index 7601328..990071a 100644 (file)
@@ -22,24 +22,22 @@ namespace routing {
  *  (somewhere between the one of @{DijkstraZone} and the one of @{FullZone}).
  */
 class XBT_PRIVATE FloydZone : public RoutedZone {
+  /* vars to compute the Floyd algorithm. */
+  std::vector<std::vector<long>> predecessor_table_;
+  std::vector<std::vector<unsigned long>> cost_table_;
+  std::vector<std::vector<std::unique_ptr<Route>>> link_table_;
+
+  void init_tables(unsigned int table_size);
+  void do_seal() override;
+
 public:
-  explicit FloydZone(const std::string& name);
+  using RoutedZone::RoutedZone;
   FloydZone(const FloydZone&) = delete;
   FloydZone& operator=(const FloydZone&) = delete;
-  ~FloydZone() override;
 
-  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void get_local_route(const NetPoint* src, const NetPoint* dst, Route* into, double* latency) override;
   void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
-                 std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
-
-private:
-  /* vars to compute the Floyd algorithm. */
-  std::vector<int> predecessor_table_;
-  std::vector<double> cost_table_;
-  std::vector<RouteCreationArgs*> link_table_;
-
-  void init_tables(unsigned int table_size);
-  void do_seal() override;
+                 const std::vector<s4u::LinkInRoute>& link_list, bool symmetrical) override;
 };
 } // namespace routing
 } // namespace kernel