test/graph_utils_test.h
changeset 2301 eb378706bd3d
parent 2229 4dbb6dd2dd4b
child 2391 14a343be7a5a
equal deleted inserted replaced
4:94b96190e3e6 5:93f464da5e7a
    54       graph.addNode();
    54       graph.addNode();
    55     }
    55     }
    56     DescriptorMap<Graph, Node> nodes(graph);
    56     DescriptorMap<Graph, Node> nodes(graph);
    57     typename DescriptorMap<Graph, Node>::InverseMap invNodes(nodes);
    57     typename DescriptorMap<Graph, Node>::InverseMap invNodes(nodes);
    58     for (int i = 0; i < 100; ++i) {
    58     for (int i = 0; i < 100; ++i) {
    59       int src = rnd.getInt(invNodes.size());
    59       int src = rnd[invNodes.size()];
    60       int trg = rnd.getInt(invNodes.size());
    60       int trg = rnd[invNodes.size()];
    61       graph.addEdge(invNodes[src], invNodes[trg]);
    61       graph.addEdge(invNodes[src], invNodes[trg]);
    62     }
    62     }
    63     typename Graph::template EdgeMap<bool> found(graph, false);
    63     typename Graph::template EdgeMap<bool> found(graph, false);
    64     DescriptorMap<Graph, Edge> edges(graph);
    64     DescriptorMap<Graph, Edge> edges(graph);
    65     for (NodeIt src(graph); src != INVALID; ++src) {
    65     for (NodeIt src(graph); src != INVALID; ++src) {