Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sed -i -e 's/\t/ /g' [sources] Please people, stop using tabs
[simgrid.git] / src / surf / surf_routing_dijkstra.cpp
index 31d603f..dbf3931 100644 (file)
@@ -4,8 +4,9 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "surf_routing_dijkstra.hpp"
-#include "network_interface.hpp"
+#include "src/surf/surf_routing_private.hpp"
+#include "src/surf/surf_routing_dijkstra.hpp"
+#include "src/surf/network_interface.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic");
 
@@ -92,7 +93,7 @@ xbt_node_t AsDijkstra::routeGraphNewNode(int id, int graph_id)
   elm = xbt_new0(struct graph_node_map_element, 1);
   elm->node = node;
   xbt_dict_set_ext(p_graphNodeMap, (char *) (&id), sizeof(int),
-      (xbt_set_elm_t) elm, NULL);
+      (xbt_dictelm_t) elm, NULL);
 
   return node;
 }
@@ -175,7 +176,7 @@ void AsDijkstra::addLoopback() {
   }
 }
 
-xbt_dynar_t AsDijkstra::getOnelinkRoutes()
+xbt_dynar_t AsDijkstra::getOneLinkRoutes()
 {
   xbt_dynar_t ret = xbt_dynar_new(sizeof(Onelink*), xbt_free_f);
   sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t,1);
@@ -390,7 +391,7 @@ void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_c
     elm->pred_arr = pred_arr;
     elm->size = size;
     xbt_dict_set_ext(p_routeCache, (char *) (&src_id), sizeof(int),
-        (xbt_set_elm_t) elm, NULL);
+        (xbt_dictelm_t) elm, NULL);
   }
 
   if (!m_cached)
@@ -408,13 +409,10 @@ AsDijkstra::~AsDijkstra()
 
 /* Creation routing model functions */
 
-AsDijkstra::AsDijkstra() : AsGeneric(), m_cached(0) {
-  p_routeGraph = NULL;
-  p_graphNodeMap = NULL;
-  p_routeCache = NULL;
+AsDijkstra::AsDijkstra() : AsGeneric() {
 }
 
-AsDijkstra::AsDijkstra(int cached) : AsGeneric(), m_cached(cached)
+AsDijkstra::AsDijkstra(bool cached) : AsGeneric(), m_cached(cached)
 {
   p_routeGraph = NULL;
   p_graphNodeMap = NULL;
@@ -437,7 +435,7 @@ void AsDijkstra::end()
 
   /* Create the topology graph */
   if(!p_routeGraph)
-       p_routeGraph = xbt_graph_new_graph(1, NULL);
+  p_routeGraph = xbt_graph_new_graph(1, NULL);
   if(!p_graphNodeMap)
     p_graphNodeMap = xbt_dict_new_homogeneous(&graph_node_map_elem_free);