Changeset 793:9cd0aeea47b0 in lemon-0.x for src/test
- Timestamp:
- 09/03/04 11:41:50 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1087
- Location:
- src/test
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/test/bfs_test.cc
r780 r793 2 2 #include <hugo/smart_graph.h> 3 3 #include <hugo/bfs.h> 4 #include<hugo/skeletons/graph.h> 4 5 5 6 using namespace hugo; … … 8 9 9 10 10 void check_Bfs_ SmartGraph_Compile()11 void check_Bfs_Compile() 11 12 { 12 typedef int VType; 13 typedef SmartGraph Graph; 13 typedef skeleton::StaticGraphSkeleton Graph; 14 14 15 15 typedef Graph::Edge Edge; … … 17 17 typedef Graph::EdgeIt EdgeIt; 18 18 typedef Graph::NodeIt NodeIt; 19 typedef Graph::EdgeMap<VType> LengthMap;20 19 21 20 typedef Bfs<Graph> BType; … … 24 23 Node n; 25 24 Edge e; 26 VTypel;25 int l; 27 26 bool b; 28 27 BType::DistMap d(G); 29 28 BType::PredMap p(G); 30 29 BType::PredNodeMap pn(G); 31 LengthMap cap(G);32 30 33 31 BType bfs_test(G); -
src/test/dfs_test.cc
r780 r793 2 2 #include <hugo/smart_graph.h> 3 3 #include <hugo/dfs.h> 4 #include<hugo/skeletons/graph.h> 4 5 5 6 using namespace hugo; … … 10 11 void check_Dfs_SmartGraph_Compile() 11 12 { 12 typedef int VType; 13 typedef SmartGraph Graph; 13 typedef skeleton::StaticGraphSkeleton Graph; 14 14 15 15 typedef Graph::Edge Edge; … … 17 17 typedef Graph::EdgeIt EdgeIt; 18 18 typedef Graph::NodeIt NodeIt; 19 typedef Graph::EdgeMap<VType> LengthMap;20 19 21 typedef Dfs<Graph> BType;20 typedef Dfs<Graph> DType; 22 21 23 22 Graph G; 24 23 Node n; 25 24 Edge e; 26 VTypel;25 int l; 27 26 bool b; 28 BType::DistMap d(G); 29 BType::PredMap p(G); 30 BType::PredNodeMap pn(G); 31 LengthMap cap(G); 27 DType::DistMap d(G); 28 DType::PredMap p(G); 29 DType::PredNodeMap pn(G); 32 30 33 BType dfs_test(G);31 DType dfs_test(G); 34 32 35 33 dfs_test.run(n); -
src/test/dijkstra_test.cc
r780 r793 2 2 #include <hugo/smart_graph.h> 3 3 #include <hugo/dijkstra.h> 4 4 #include<hugo/skeletons/graph.h> 5 #include<hugo/skeletons/maps.h> 5 6 using namespace hugo; 6 7 … … 8 9 9 10 10 void check_Dijkstra_ SmartGraph_BinHeap_Compile()11 void check_Dijkstra_BinHeap_Compile() 11 12 { 12 13 typedef int VType; 13 typedef SmartGraphGraph;14 typedef skeleton::StaticGraphSkeleton Graph; 14 15 15 16 typedef Graph::Edge Edge; … … 17 18 typedef Graph::EdgeIt EdgeIt; 18 19 typedef Graph::NodeIt NodeIt; 19 typedef Graph::EdgeMap<VType> LengthMap;20 typedef skeleton::ReadMap<Edge,VType> LengthMap; 20 21 21 22 typedef Dijkstra<Graph, LengthMap> DType; … … 29 30 DType::PredMap p(G); 30 31 DType::PredNodeMap pn(G); 31 LengthMap cap (G);32 LengthMap cap; 32 33 33 34 DType dijkstra_test(G,cap); -
src/test/graph_test.cc
r787 r793 19 19 20 20 using namespace hugo; 21 using namespace hugo::skeleton;22 21 23 22 template<class Graph> void checkCompileStaticGraph(Graph &G) … … 342 341 343 342 //Compile GraphSkeleton 344 template 345 void checkCompileStaticGraph<StaticGraphSkeleton>(StaticGraphSkeleton &); 346 template void checkCompile<GraphSkeleton>(GraphSkeleton &); 347 template 348 void checkCompileErase<EraseableGraphSkeleton>(EraseableGraphSkeleton &); 343 template void checkCompileStaticGraph<skeleton::StaticGraphSkeleton> 344 (skeleton::StaticGraphSkeleton &); 345 346 template void checkCompile<skeleton::GraphSkeleton>(skeleton::GraphSkeleton &); 347 348 template void checkCompileErase<skeleton::EraseableGraphSkeleton> 349 (skeleton::EraseableGraphSkeleton &); 349 350 350 351 //Compile SmartGraph -
src/test/unionfind_test.cc
r774 r793 163 163 check(U.size(2) == 3,"Test failed."); 164 164 165 cout << " makeRep(4)..." << endl;165 cout << "Calling makeRep(4)..." << endl; 166 166 U.makeRep(4); 167 167 // print(U); 168 cout << " makeRep(3)..." << endl;168 cout << "Calling makeRep(3)..." << endl; 169 169 U.makeRep(3); 170 170 // print(U); 171 cout << " makeRep(2)..." << endl;171 cout << "Calling makeRep(2)..." << endl; 172 172 U.makeRep(2); 173 173 // print(U);
Note: See TracChangeset
for help on using the changeset viewer.