COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/dfs_test.cc

    r278 r228  
    2121#include <lemon/list_graph.h>
    2222#include <lemon/lgf_reader.h>
     23
    2324#include <lemon/dfs.h>
    2425#include <lemon/path.h>
     
    8889
    8990  Digraph g;
    90   bool b;
    91   dfs(g).run(Node());
    92   b=dfs(g).run(Node(),Node());
    93   dfs(g).run();
     91  dfs(g,Node()).run();
     92  dfs(g).source(Node()).run();
    9493  dfs(g)
    95     .predMap(concepts::ReadWriteMap<Node,Arc>())
    96     .distMap(concepts::ReadWriteMap<Node,VType>())
     94    .predMap(concepts::WriteMap<Node,Arc>())
     95    .distMap(concepts::WriteMap<Node,VType>())
    9796    .reachedMap(concepts::ReadWriteMap<Node,bool>())
    9897    .processedMap(concepts::WriteMap<Node,bool>())
    9998    .run(Node());
    100   b=dfs(g)
    101     .predMap(concepts::ReadWriteMap<Node,Arc>())
    102     .distMap(concepts::ReadWriteMap<Node,VType>())
    103     .reachedMap(concepts::ReadWriteMap<Node,bool>())
    104     .processedMap(concepts::WriteMap<Node,bool>())
    105     .path(concepts::Path<Digraph>())
    106     .dist(VType())
    107     .run(Node(),Node());
    108   dfs(g)
    109     .predMap(concepts::ReadWriteMap<Node,Arc>())
    110     .distMap(concepts::ReadWriteMap<Node,VType>())
    111     .reachedMap(concepts::ReadWriteMap<Node,bool>())
    112     .processedMap(concepts::WriteMap<Node,bool>())
    113     .run();
    11499}
    115100
     
    145130        check(dfs_test.dist(v) - dfs_test.dist(u) == 1,
    146131              "Wrong distance. (" << dfs_test.dist(u) << "->"
    147               << dfs_test.dist(v) << ")");
     132              <<dfs_test.dist(v) << ')');
    148133      }
    149134    }
    150   }
    151 
    152   {
    153     NullMap<Node,Arc> myPredMap;
    154     dfs(G).predMap(myPredMap).run(s);
    155135  }
    156136}
Note: See TracChangeset for help on using the changeset viewer.