1 #include<smart_graph.h>
9 //typedef SmartGraph Graph;
10 typedef EmptyGraph Graph;
13 Graph::OutEdgeIt safeFirstOut(const Graph &G, Graph::Node n)
15 return G.valid(n) ? Graph::OutEdgeIt(G,n):INVALID;
21 typedef Graph::Edge Edge;
22 typedef Graph::InEdgeIt InEdgeIt;
23 typedef Graph::OutEdgeIt OutEdgeIt;
24 typedef Graph::EdgeIt EdgeIt;
25 typedef Graph::Node Node;
26 typedef Graph::NodeIt NodeIt;
32 for(int i=0;i<10;i++) G.addNode();
33 for(G.first(n);G.valid(n);G.next(n))
34 for(NodeIt m(G);m!=INVALID;G.next(m))
35 if(n!=m) G.addEdge(n,m);
37 OutEdgeIt e = safeFirstOut(G,n);
38 OutEdgeIt f = safeFirstOut(G,NodeIt(G));
41 InEdgeIt i(INVALID), j;
46 OutEdgeIt o(INVALID), oo;
51 EdgeIt ei(INVALID), eie;
62 tm = G.valid(n) && G.valid(i) && G.valid(o) && G.valid(ei);
64 std::vector<InEdgeIt> v(10);
65 std::vector<InEdgeIt> w(10,INVALID);