equal
deleted
inserted
replaced
1 #include "test_tools.h" |
1 #include "test_tools.h" |
2 #include <hugo/smart_graph.h> |
2 #include <hugo/smart_graph.h> |
3 #include <hugo/bfs.h> |
3 #include <hugo/bfs.h> |
|
4 #include<hugo/skeletons/graph.h> |
4 |
5 |
5 using namespace hugo; |
6 using namespace hugo; |
6 |
7 |
7 const int PET_SIZE =5; |
8 const int PET_SIZE =5; |
8 |
9 |
9 |
10 |
10 void check_Bfs_SmartGraph_Compile() |
11 void check_Bfs_Compile() |
11 { |
12 { |
12 typedef int VType; |
13 typedef skeleton::StaticGraphSkeleton Graph; |
13 typedef SmartGraph Graph; |
|
14 |
14 |
15 typedef Graph::Edge Edge; |
15 typedef Graph::Edge Edge; |
16 typedef Graph::Node Node; |
16 typedef Graph::Node Node; |
17 typedef Graph::EdgeIt EdgeIt; |
17 typedef Graph::EdgeIt EdgeIt; |
18 typedef Graph::NodeIt NodeIt; |
18 typedef Graph::NodeIt NodeIt; |
19 typedef Graph::EdgeMap<VType> LengthMap; |
|
20 |
19 |
21 typedef Bfs<Graph> BType; |
20 typedef Bfs<Graph> BType; |
22 |
21 |
23 Graph G; |
22 Graph G; |
24 Node n; |
23 Node n; |
25 Edge e; |
24 Edge e; |
26 VType l; |
25 int l; |
27 bool b; |
26 bool b; |
28 BType::DistMap d(G); |
27 BType::DistMap d(G); |
29 BType::PredMap p(G); |
28 BType::PredMap p(G); |
30 BType::PredNodeMap pn(G); |
29 BType::PredNodeMap pn(G); |
31 LengthMap cap(G); |
|
32 |
30 |
33 BType bfs_test(G); |
31 BType bfs_test(G); |
34 |
32 |
35 bfs_test.run(n); |
33 bfs_test.run(n); |
36 |
34 |