# HG changeset patch # User alpar # Date 1124316455 0 # Node ID 77f6ab7ad66f5290839191699fae9f318c056b16 # Parent 9c7834ac5e64a64e60bc32db81794da9173a3be1 Demos' documentations include the source. diff -r 9c7834ac5e64 -r 77f6ab7ad66f demo/dijkstra_demo.cc --- a/demo/dijkstra_demo.cc Wed Aug 17 21:52:50 2005 +0000 +++ b/demo/dijkstra_demo.cc Wed Aug 17 22:07:35 2005 +0000 @@ -22,12 +22,13 @@ /// a graph with edge lengths. Here we only show some of the /// facilities supplied by our implementation: for the detailed /// documentation of the LEMON Dijkstra class read \ref lemon::Dijkstra "this". +/// +/// \include dijkstra_demo.cc #include #include #include -//#include using namespace lemon; @@ -69,39 +70,35 @@ len.set(v4_t, 8); len.set(v5_t, 8); - std::cout << "This program is a simple demo of the LEMON Dijkstra class."< dijkstra_test(g,len); dijkstra_test.run(s); + + std::cout << "The distance of node t from node s: " + << dijkstra_test.dist(t) << std::endl; + std::cout << "The shortest path from s to t goes through the following " + << "nodes (the first one is t, the last one is s): " + << std::endl; + + for (Node v=t;v != s; v=dijkstra_test.predNode(v)) { + std::cout << g.id(v) << "<-"; + } - std::cout << "The distance of node t from node s: " << dijkstra_test.dist(t)< #include diff -r 9c7834ac5e64 -r 77f6ab7ad66f demo/graph_to_eps_demo.cc --- a/demo/graph_to_eps_demo.cc Wed Aug 17 21:52:50 2005 +0000 +++ b/demo/graph_to_eps_demo.cc Wed Aug 17 22:07:35 2005 +0000 @@ -25,6 +25,8 @@ /// how to handle parallel egdes, how to change the properties (like /// color, shape, size, title etc.) of nodes and edges individually /// using appropriate \ref maps-page "graph maps". +/// +/// \include graph_to_eps_demo.cc #include diff -r 9c7834ac5e64 -r 77f6ab7ad66f demo/hello_lemon.cc --- a/demo/hello_lemon.cc Wed Aug 17 21:52:50 2005 +0000 +++ b/demo/hello_lemon.cc Wed Aug 17 22:07:35 2005 +0000 @@ -21,6 +21,8 @@ /// This program is intended to be a "Hello World!" program that shows /// the very basic notions of the LEMON library: \ref graphs "graphs" and /// \ref maps-page "maps". Click on the links to read more about these. +/// +/// \include hello_lemon.cc #include #include @@ -81,7 +83,8 @@ std::cout << "There is a map on the edges (length)!" << std::endl; std::cout << std::endl; for (EdgeIt i(g); i!=INVALID; ++i) - std::cout << "length(" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")="< diff -r 9c7834ac5e64 -r 77f6ab7ad66f demo/lp_maxflow_demo.cc --- a/demo/lp_maxflow_demo.cc Wed Aug 17 21:52:50 2005 +0000 +++ b/demo/lp_maxflow_demo.cc Wed Aug 17 22:07:35 2005 +0000 @@ -22,6 +22,8 @@ /// problem using the LEMON LP solver interface. We would like to lay /// the emphasis on the simplicity of the way one can formulate LP /// constraints that arise in graph theory in our library LEMON . +/// +/// \include lp_maxflow_demo.cc #include #include diff -r 9c7834ac5e64 -r 77f6ab7ad66f demo/reader_writer_demo.cc --- a/demo/reader_writer_demo.cc Wed Aug 17 21:52:50 2005 +0000 +++ b/demo/reader_writer_demo.cc Wed Aug 17 22:07:35 2005 +0000 @@ -22,7 +22,8 @@ /// This simple demo program gives an example of how to read and write /// a graph and additional maps (on the nodes or the edges) from/to a /// stream. - +/// +/// \include reader_writer_demo.cc #include #include diff -r 9c7834ac5e64 -r 77f6ab7ad66f demo/sub_graph_adaptor_demo.cc --- a/demo/sub_graph_adaptor_demo.cc Wed Aug 17 21:52:50 2005 +0000 +++ b/demo/sub_graph_adaptor_demo.cc Wed Aug 17 22:07:35 2005 +0000 @@ -21,7 +21,8 @@ /// /// This program computes a maximum number of edge-disjoint shortest paths /// between nodes \c s and \c t. - +/// +/// \include sub_graph_adaptor_demo.cc // Use a DIMACS max flow file as input. // sub_graph_adaptor_demo < dimacs_max_flow_file diff -r 9c7834ac5e64 -r 77f6ab7ad66f lemon/smart_graph.h --- a/lemon/smart_graph.h Wed Aug 17 21:52:50 2005 +0000 +++ b/lemon/smart_graph.h Wed Aug 17 22:07:35 2005 +0000 @@ -150,6 +150,8 @@ protected: int n; + ///\e + ///\todo It should be removed (or at least define a setToId() instead). /// Node(int nn) {n=nn;}