- xbt_graph_new_edge(p_routeGraph, src, dst, e_route);
-}
-
-void AsDijkstra::addLoopback() {
- xbt_dynar_t nodes = xbt_graph_get_nodes(p_routeGraph);
-
- xbt_node_t node = NULL;
- unsigned int cursor2;
- xbt_dynar_foreach(nodes, cursor2, node) {
- xbt_dynar_t out_edges = xbt_graph_node_get_outedges(node);
- xbt_edge_t edge = NULL;
- unsigned int cursor;
-
- int found = 0;
- xbt_dynar_foreach(out_edges, cursor, edge) {
- xbt_node_t other_node = xbt_graph_edge_get_target(edge);
- if (other_node == node) {
- found = 1;
- break;
- }
- }
-
- if (!found) {
- sg_platf_route_cbarg_t e_route = xbt_new0(s_sg_platf_route_cbarg_t, 1);
- e_route->link_list = xbt_dynar_new(sizeof(sg_routing_link_t), NULL);
- xbt_dynar_push(e_route->link_list, &routing_platf->p_loopback);
- xbt_graph_new_edge(p_routeGraph, node, node, e_route);
- }
- }