X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/281f8c29e177852dcb1591fc31e363e1176857c8..3203ed1f4fb6f4617e94d5351661ba07e8b8f833:/src/surf/surf_routing_dijkstra.hpp diff --git a/src/surf/surf_routing_dijkstra.hpp b/src/surf/surf_routing_dijkstra.hpp index ef683860d8..aa8400070d 100644 --- a/src/surf/surf_routing_dijkstra.hpp +++ b/src/surf/surf_routing_dijkstra.hpp @@ -1,3 +1,11 @@ +/* Copyright (c) 2013-2015. The SimGrid Team. + * All rights reserved. */ + +/* 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 + #include "surf_routing_generic.hpp" #ifndef SURF_ROUTING_DIJKSTRA_HPP_ @@ -20,8 +28,7 @@ typedef struct route_cache_element { /*********** * Classes * ***********/ -class AsDijkstra; -typedef AsDijkstra *AsDijkstraPtr; +class XBT_PRIVATE AsDijkstra; class AsDijkstra : public AsGeneric { public: @@ -31,8 +38,20 @@ public: xbt_node_t routeGraphNewNode(int id, int graph_id); graph_node_map_element_t nodeMapSearch(int id); void newRoute(int src_id, int dst_id, sg_platf_route_cbarg_t e_route); + /** + * For each vertex (node) already in the graph, + * make sure it also has a loopback link; this loopback + * can potentially already be in the graph, and in that + * case nothing will be done. + * + * If no loopback is specified for a node, we will use + * the loopback that is provided by the routing platform. + * + * After this function returns, any node in the graph + * will have a loopback attached to it. + */ void addLoopback(); - void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t route, double *lat); + void getRouteAndLatency(RoutingEdge *src, RoutingEdge *dst, sg_platf_route_cbarg_t route, double *lat); xbt_dynar_t getOnelinkRoutes(); void getRouteAndLatency(sg_platf_route_cbarg_t route, double *lat); void parseASroute(sg_platf_route_cbarg_t route);