1 #include<smart_graph.h>
7 SmartGraph::OutEdgeIt safeFirstOut(const SmartGraph &G, SmartGraph::NodeIt n)
9 return G.valid(n) ? SmartGraph::OutEdgeIt(G,n):Invalid;
15 typedef SmartGraph::EdgeIt EdgeIt;
16 typedef SmartGraph::InEdgeIt InEdgeIt;
17 typedef SmartGraph::OutEdgeIt OutEdgeIt;
18 typedef SmartGraph::EachEdgeIt EachEdgeIt;
19 typedef SmartGraph::NodeIt NodeIt;
20 typedef SmartGraph::EachNodeIt EachNodeIt;
26 // std::cout.form("%s: %d\n","Sztring",15);
28 for(int i=0;i<10;i++) G.addNode();
29 for(G.getFirst(n);G.valid(n);G.next(n))
30 for(EachNodeIt m(G);m!=Invalid;G.next(m))
31 if(n!=m) G.addEdge(n,m);
33 OutEdgeIt e = safeFirstOut(G,n);
34 OutEdgeIt f = safeFirstOut(G,EachNodeIt(G));