test/dfs_test.cc
changeset 2301 eb378706bd3d
parent 2247 269a0dcee70b
child 2335 27aa03cd3121
equal deleted inserted replaced
6:a6e26d96c90a 7:87de77151745
    18 
    18 
    19 #include "test_tools.h"
    19 #include "test_tools.h"
    20 #include <lemon/smart_graph.h>
    20 #include <lemon/smart_graph.h>
    21 #include <lemon/dfs.h>
    21 #include <lemon/dfs.h>
    22 #include <lemon/path.h>
    22 #include <lemon/path.h>
    23 #include <lemon/concept/graph.h>
    23 #include <lemon/concepts/graph.h>
    24 
    24 
    25 using namespace lemon;
    25 using namespace lemon;
    26 
    26 
    27 const int PET_SIZE =5;
    27 const int PET_SIZE =5;
    28 
    28 
    29 
    29 
    30 void check_Dfs_SmartGraph_Compile() 
    30 void check_Dfs_SmartGraph_Compile() 
    31 {
    31 {
    32   typedef concept::Graph Graph;
    32   typedef concepts::Graph Graph;
    33 
    33 
    34   typedef Graph::Edge Edge;
    34   typedef Graph::Edge Edge;
    35   typedef Graph::Node Node;
    35   typedef Graph::Node Node;
    36   typedef Graph::EdgeIt EdgeIt;
    36   typedef Graph::EdgeIt EdgeIt;
    37   typedef Graph::NodeIt NodeIt;
    37   typedef Graph::NodeIt NodeIt;
    65 
    65 
    66 
    66 
    67 void check_Dfs_Function_Compile() 
    67 void check_Dfs_Function_Compile() 
    68 {
    68 {
    69   typedef int VType;
    69   typedef int VType;
    70   typedef concept::Graph Graph;
    70   typedef concepts::Graph Graph;
    71 
    71 
    72   typedef Graph::Edge Edge;
    72   typedef Graph::Edge Edge;
    73   typedef Graph::Node Node;
    73   typedef Graph::Node Node;
    74   typedef Graph::EdgeIt EdgeIt;
    74   typedef Graph::EdgeIt EdgeIt;
    75   typedef Graph::NodeIt NodeIt;
    75   typedef Graph::NodeIt NodeIt;
    76   typedef concept::ReadMap<Edge,VType> LengthMap;
    76   typedef concepts::ReadMap<Edge,VType> LengthMap;
    77    
    77    
    78   Graph g;
    78   Graph g;
    79   dfs(g,Node()).run();
    79   dfs(g,Node()).run();
    80   dfs(g).source(Node()).run();
    80   dfs(g).source(Node()).run();
    81   dfs(g)
    81   dfs(g)
    82     .predMap(concept::WriteMap<Node,Edge>())
    82     .predMap(concepts::WriteMap<Node,Edge>())
    83     .distMap(concept::WriteMap<Node,VType>())
    83     .distMap(concepts::WriteMap<Node,VType>())
    84     .reachedMap(concept::ReadWriteMap<Node,bool>())
    84     .reachedMap(concepts::ReadWriteMap<Node,bool>())
    85     .processedMap(concept::WriteMap<Node,bool>())
    85     .processedMap(concepts::WriteMap<Node,bool>())
    86     .run(Node());
    86     .run(Node());
    87   
    87   
    88 }
    88 }
    89 
    89 
    90 int main()
    90 int main()