home *** CD-ROM | disk | FTP | other *** search
- #include <LEDA/graph.h>
- #include <LEDA/graph_alg.h>
-
- declare2(GRAPH,int,int)
-
- main()
- {
- GRAPH(int,int) G;
-
- cout << "Give a planar graph.\n";
-
- test_graph(G);
-
- if ( ! PLANAR(G) )
- { cout << "Graph is not planar\n";
- exit(1);
- }
-
- if (Yes("print planar map ? ")) G.print();
-
-
- node v;
-
-
- node_array(int) x(G),y(G);
-
- STRAIGHT_LINE_EMBEDDING(G,x,y);
-
- forall_nodes(v,G) cout << form("x = %2d y = %2d\n",x[v],y[v]);
-
-
- }
-