home *** CD-ROM | disk | FTP | other *** search
- #include <LEDA/window.h>
- #include <LEDA/graph_alg.h>
- #include <LEDA/graph_edit.h>
-
-
- main()
- {
- GRAPH(point,int) G;
- edge e;
-
- window W;
-
- W.set_line_width(1);
-
- W.set_node_width(13);
-
-
- graph_edit(W,G,false);
-
- for(;;)
- {
- list(edge) L = MAX_CARD_MATCHING(G,true); // true: report blossoms on cout
-
- W.set_line_width(5);
- forall(e,L) W.draw_edge(G[source(e)],G[target(e)]); // show matching
-
- W.message("Press left button to continue.");
- if (W.read_mouse() != 1) break;
- W.del_message();
-
- forall(e,L) W.draw_edge(G[source(e)],G[target(e)],white); // restore picture
- W.set_line_width(1);
- forall(e,L) W.draw_edge(G[source(e)],G[target(e)]);
-
- graph_edit(W,G,false,false); // 2nd false: do not initialize window
-
- }
-
- }
-