test/graph_utils_test.cc
branch1.0
changeset 301 fafece417795
parent 220 a5d8c039f218
     1.1 --- a/test/graph_utils_test.cc	Wed Oct 08 10:33:42 2008 +0100
     1.2 +++ b/test/graph_utils_test.cc	Wed Oct 08 12:25:57 2008 +0100
     1.3 @@ -35,18 +35,18 @@
     1.4  
     1.5    {
     1.6      Digraph digraph;
     1.7 +    typename Digraph::template NodeMap<int> nodes(digraph);
     1.8 +    std::vector<Node> invNodes;
     1.9      for (int i = 0; i < 10; ++i) {
    1.10 -      digraph.addNode();
    1.11 +      invNodes.push_back(digraph.addNode());
    1.12 +      nodes[invNodes.back()]=invNodes.size()-1;
    1.13      }
    1.14 -    DescriptorMap<Digraph, Node> nodes(digraph);
    1.15 -    typename DescriptorMap<Digraph, Node>::InverseMap invNodes(nodes);
    1.16      for (int i = 0; i < 100; ++i) {
    1.17        int src = rnd[invNodes.size()];
    1.18        int trg = rnd[invNodes.size()];
    1.19        digraph.addArc(invNodes[src], invNodes[trg]);
    1.20      }
    1.21      typename Digraph::template ArcMap<bool> found(digraph, false);
    1.22 -    DescriptorMap<Digraph, Arc> arcs(digraph);
    1.23      for (NodeIt src(digraph); src != INVALID; ++src) {
    1.24        for (NodeIt trg(digraph); trg != INVALID; ++trg) {
    1.25          for (ConArcIt<Digraph> con(digraph, src, trg); con != INVALID; ++con) {
    1.26 @@ -110,18 +110,18 @@
    1.27  void checkFindEdges() {
    1.28    TEMPLATE_GRAPH_TYPEDEFS(Graph);
    1.29    Graph graph;
    1.30 +  typename Graph::template NodeMap<int> nodes(graph);
    1.31 +  std::vector<Node> invNodes;
    1.32    for (int i = 0; i < 10; ++i) {
    1.33 -    graph.addNode();
    1.34 +    invNodes.push_back(graph.addNode());
    1.35 +    nodes[invNodes.back()]=invNodes.size()-1;
    1.36    }
    1.37 -  DescriptorMap<Graph, Node> nodes(graph);
    1.38 -  typename DescriptorMap<Graph, Node>::InverseMap invNodes(nodes);
    1.39    for (int i = 0; i < 100; ++i) {
    1.40      int src = rnd[invNodes.size()];
    1.41      int trg = rnd[invNodes.size()];
    1.42      graph.addEdge(invNodes[src], invNodes[trg]);
    1.43    }
    1.44    typename Graph::template EdgeMap<int> found(graph, 0);
    1.45 -  DescriptorMap<Graph, Edge> edges(graph);
    1.46    for (NodeIt src(graph); src != INVALID; ++src) {
    1.47      for (NodeIt trg(graph); trg != INVALID; ++trg) {
    1.48        for (ConEdgeIt<Graph> con(graph, src, trg); con != INVALID; ++con) {