beckerjc@350: #include beckerjc@350: #include beckerjc@350: #include beckerjc@350: #include beckerjc@350: beckerjc@350: #include beckerjc@350: #include beckerjc@350: beckerjc@350: beckerjc@350: using namespace std; beckerjc@350: using namespace hugo; beckerjc@350: beckerjc@350: int main() { beckerjc@350: beckerjc@350: typedef ListGraph::Node Node; beckerjc@350: typedef ListGraph::Edge Edge; beckerjc@350: typedef ListGraph::NodeIt NodeIt; beckerjc@350: typedef ListGraph::EdgeIt EdgeIt; beckerjc@350: beckerjc@350: ListGraph G; beckerjc@350: beckerjc@350: Node v3=G.addNode(); beckerjc@350: Node v5=G.addNode(); beckerjc@350: Node v2=G.addNode(); beckerjc@350: Node v0=G.addNode(); beckerjc@350: Node v4=G.addNode(); beckerjc@350: Node v1=G.addNode(); beckerjc@350: beckerjc@350: G.addEdge(v0, v1);G.addEdge(v0, v1);G.addEdge(v0, v1); beckerjc@350: G.addEdge(v0, v2); beckerjc@350: G.addEdge(v0, v3);G.addEdge(v0, v3); beckerjc@350: G.addEdge(v1, v2);G.addEdge(v1, v2); beckerjc@350: G.addEdge(v2, v4); beckerjc@350: G.addEdge(v3, v4); beckerjc@350: G.addEdge(v4, v5); beckerjc@350: beckerjc@350: G.addEdge(v1, v0);G.addEdge(v1, v0);G.addEdge(v1, v0); beckerjc@350: G.addEdge(v2, v0); beckerjc@350: G.addEdge(v3, v0);G.addEdge(v3, v0); beckerjc@350: G.addEdge(v2, v1);G.addEdge(v2, v1); beckerjc@350: G.addEdge(v4, v2); beckerjc@350: G.addEdge(v4, v3); beckerjc@350: G.addEdge(v5, v4); beckerjc@350: beckerjc@350: beckerjc@350: vector ma_order; beckerjc@350: MAOrder mao(G,ma_order); beckerjc@350: mao.run(v0); beckerjc@350: vector::iterator i; beckerjc@350: for (i = ma_order.begin(); i!=ma_order.end(); ++i) { beckerjc@350: cout << *i << " "; beckerjc@350: } beckerjc@350: cout << endl; beckerjc@350: cout << v0 << " " << v1 << " " << v2 << " " << v3 << " " << v4 << " " beckerjc@350: << v5 << endl; beckerjc@350: beckerjc@350: }