Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanup in the Link field names
[simgrid.git] / src / kernel / routing / AsDijkstra.cpp
index 98b8719..3227eb0 100644 (file)
@@ -37,6 +37,7 @@ static void graph_edge_data_free(void *e) // FIXME: useless code duplication
 /* Utility functions */
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 void AsDijkstra::seal()
 {
@@ -170,7 +171,7 @@ void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_c
     for (auto link: *e_route->link_list) {
       route->link_list->insert(route->link_list->begin(), link);
       if (lat)
-        *lat += static_cast<Link*>(link)->getLatency();
+        *lat += static_cast<Link*>(link)->latency();
     }
 
   }
@@ -266,7 +267,7 @@ void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_c
       for (auto link : *e_route_as_to_as) {
         route->link_list->insert(pos, link);
         if (lat)
-          *lat += link->getLatency();
+          *lat += link->latency();
         pos++;
       }
     }
@@ -274,7 +275,7 @@ void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_c
     for (auto link: *e_route->link_list) {
       route->link_list->insert(route->link_list->begin(), link);
       if (lat)
-        *lat += static_cast<Link*>(link)->getLatency();
+        *lat += static_cast<Link*>(link)->latency();
     }
     size++;
   }
@@ -305,8 +306,7 @@ AsDijkstra::~AsDijkstra()
 
 /* Creation routing model functions */
 
-AsDijkstra::AsDijkstra(const char*name, bool cached)
-  : AsRoutedGraph(name)
+AsDijkstra::AsDijkstra(As* father, const char* name, bool cached) : AsRoutedGraph(father, name)
 {
   if (cached)
     routeCache_ = xbt_dict_new_homogeneous(&route_cache_elem_free);
@@ -358,5 +358,4 @@ void AsDijkstra::addRoute(sg_platf_route_cbarg_t route)
   }
 }
 
-}
-}
+}}} // namespace