EXAMPLE_PATH is set to the demo dir.
2 #include<hugo/smart_graph.h>
3 #include<hugo/skeletons/graph.h>
4 #include<hugo/list_graph.h>
5 #include<hugo/full_graph.h>
12 This test makes consistency checks of list graph structures.
14 G.addNode(), G.addEdge(), G.tail(), G.head()
16 \todo Checks for empty graphs and isolated points.
22 template<class Graph> void bidirPetersen(Graph &G)
24 typedef typename Graph::Edge Edge;
25 typedef typename Graph::EdgeIt EdgeIt;
27 checkGraphEdgeList(G,15);
31 for(EdgeIt e(G);e!=INVALID;++e) ee.push_back(e);
33 for(typename std::vector<Edge>::iterator p=ee.begin();p!=ee.end();p++)
34 G.addEdge(G.head(*p),G.tail(*p));
37 template<class Graph> void checkPetersen(Graph &G)
39 typedef typename Graph::Node Node;
41 typedef typename Graph::EdgeIt EdgeIt;
42 typedef typename Graph::NodeIt NodeIt;
44 checkGraphNodeList(G,10);
45 checkGraphEdgeList(G,30);
47 for(NodeIt n(G);n!=INVALID;++n) {
48 checkGraphInEdgeList(G,n,3);
49 checkGraphOutEdgeList(G,n,3);
55 template void hugo::checkCompileStaticGraph<skeleton::StaticGraph>
56 (skeleton::StaticGraph &);
58 template void hugo::checkCompileGraph<skeleton::ExtendableGraph>
59 (skeleton::ExtendableGraph &);
61 template void hugo::checkCompileErasableGraph<skeleton::ErasableGraph>
62 (skeleton::ErasableGraph &);
65 template void hugo::checkCompileGraph<SmartGraph>(SmartGraph &);
66 template void hugo::checkCompileGraphFindEdge<SmartGraph>(SmartGraph &);
68 //Compile SymSmartGraph
69 template void hugo::checkCompileGraph<SymSmartGraph>(SymSmartGraph &);
70 template void hugo::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
73 template void hugo::checkCompileGraph<ListGraph>(ListGraph &);
74 template void hugo::checkCompileErasableGraph<ListGraph>(ListGraph &);
75 template void hugo::checkCompileGraphFindEdge<ListGraph>(ListGraph &);
78 //Compile SymListGraph
79 template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &);
80 template void hugo::checkCompileErasableGraph<SymListGraph>(SymListGraph &);
81 template void hugo::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
84 template void hugo::checkCompileStaticGraph<FullGraph>(FullGraph &);
85 template void hugo::checkCompileGraphFindEdge<FullGraph>(FullGraph &);
87 //Compile EdgeSet <ListGraph>
88 template void hugo::checkCompileGraph<EdgeSet <ListGraph> >
89 (EdgeSet <ListGraph> &);
90 template void hugo::checkCompileGraphEraseEdge<EdgeSet <ListGraph> >
91 (EdgeSet <ListGraph> &);
92 template void hugo::checkCompileGraphFindEdge<EdgeSet <ListGraph> >
93 (EdgeSet <ListGraph> &);
95 //Compile EdgeSet <NodeSet>
96 template void hugo::checkCompileGraph<EdgeSet <NodeSet> >(EdgeSet <NodeSet> &);
97 template void hugo::checkCompileGraphEraseEdge<EdgeSet <NodeSet> >
98 (EdgeSet <NodeSet> &);
99 template void hugo::checkCompileGraphFindEdge<EdgeSet <NodeSet> >
100 (EdgeSet <NodeSet> &);
130 ///\todo copy constr tests.
132 std::cout << __FILE__ ": All tests passed.\n";