Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / surf / surf_routing_floyd.cpp
index 487460c..9601c1b 100644 (file)
@@ -18,7 +18,7 @@ namespace simgrid {
 namespace surf {
 
 AsFloyd::AsFloyd(const char*name)
-  : AsGeneric(name)
+  : AsRoutedGraph(name)
 {
   predecessorTable_ = NULL;
   costTable_ = NULL;
@@ -27,19 +27,15 @@ AsFloyd::AsFloyd(const char*name)
 
 AsFloyd::~AsFloyd(){
   int i, j;
-  int table_size;
-  table_size = (int)xbt_dynar_length(vertices_);
+  int table_size = (int)xbt_dynar_length(vertices_);
   if (linkTable_ == NULL) // Dealing with a parse error in the file?
     return;
   /* Delete link_table */
   for (i = 0; i < table_size; i++)
-    for (j = 0; j < table_size; j++) {
+    for (j = 0; j < table_size; j++)
       routing_route_free(TO_FLOYD_LINK(i, j));
-    }
   xbt_free(linkTable_);
-  /* Delete bypass dict */
-  xbt_dict_free(&bypassRoutes_);
-  /* Delete predecessor and cost table */
+
   xbt_free(predecessorTable_);
   xbt_free(costTable_);
 }
@@ -129,7 +125,7 @@ static int floyd_pointer_resource_cmp(const void *a, const void *b) {
   return a != b;
 }
 
-void AsFloyd::parseRoute(sg_platf_route_cbarg_t route)
+void AsFloyd::addRoute(sg_platf_route_cbarg_t route)
 {
   /* set the size of table routing */
   int table_size = (int)xbt_dynar_length(vertices_);
@@ -137,7 +133,7 @@ void AsFloyd::parseRoute(sg_platf_route_cbarg_t route)
   NetCard *src = sg_netcard_by_name_or_null(route->src);
   NetCard *dst = sg_netcard_by_name_or_null(route->dst);
 
-  parseRouteCheckParams(route);
+  addRouteCheckParams(route);
 
   if(!linkTable_) {
     /* Create Cost, Predecessor and Link tables */