diff -r 7ceab500e1f6 -r 1aa71600000c doc/quicktour.dox
--- a/doc/quicktour.dox Fri Jul 01 10:33:27 2005 +0000
+++ b/doc/quicktour.dox Fri Jul 01 16:10:46 2005 +0000
@@ -22,7 +22,10 @@
example a length or capacity function defined on the edges. You can do this in
LEMON using so called \b maps. You can define a map on the nodes or on the edges of the graph and the value of the map (the range of the function) can be practically almost of any type. Read more about maps \ref maps-page "here".
-Some examples are the following (you will find links next to the code fragments that help to download full demo programs: save them on your computer and compile them according to the description in the page about \ref getsart How to start using LEMON):
+In this quick tour we want to show you some facilities LEMON library can provide through examples (simple demo programs). The examples will only show part of the functionality, but links will always be given to reach complete details.
+You will find links next to the code fragments that help to download full demo programs: save them on your computer and compile them according to the description in the page about \ref getstart "How to start using LEMON".
+
+Have fun!
- The first thing to discuss is the way one can create data structures
like graphs and maps in a program using LEMON.
@@ -79,56 +82,18 @@
(called \c coordinates_x and \c coordinates_y), several edges, an edge map
called \c length and two designated nodes (called \c source and \c target).
-\todo Maybe another example would be better here.
+\todo Maybe a shorter example would be better here.
-\code
-@nodeset
-id coordinates_x coordinates_y
-9 447.907 578.328
-8 79.2573 909.464
-7 878.677 960.04
-6 11.5504 938.413
-5 327.398 815.035
-4 427.002 954.002
-3 148.549 753.748
-2 903.889 326.476
-1 408.248 577.327
-0 189.239 92.5316
-@edgeset
- length
-2 3 901.074
-8 5 270.85
-6 9 601.553
-5 9 285.022
-9 4 408.091
-3 0 719.712
-7 5 612.836
-0 4 933.353
-5 0 778.871
-5 5 0
-7 1 664.049
-5 5 0
-0 9 560.464
-4 8 352.36
-4 9 399.625
-4 1 402.171
-1 2 591.688
-3 8 182.376
-4 5 180.254
-3 1 345.283
-5 4 184.511
-6 2 1112.45
-0 1 556.624
-@nodes
-source 1
-target 8
-@end
-\endcode
+\include route.lgf
Finally let us give a simple example that reads a graph from a file and writes
-it to another.
+it to the standard output.
-\todo This is to be done!
+\include reader_writer_demo.cc
+
+See the whole program in file \ref reader_writer_demo.cc.
+
+\todo This is still under construction!
- If you want to solve some transportation problems in a network then
@@ -139,62 +104,9 @@
\ref lemon::Dijkstra "LEMON Dijkstra class" and it also shows how to define a map on the edges (the length
function):
-\code
-
- typedef ListGraph Graph;
- typedef Graph::Node Node;
- typedef Graph::Edge Edge;
- typedef Graph::EdgeMap LengthMap;
-
- Graph g;
-
- //An example from Ahuja's book
-
- Node s=g.addNode();
- Node v2=g.addNode();
- Node v3=g.addNode();
- Node v4=g.addNode();
- Node v5=g.addNode();
- Node t=g.addNode();
-
- Edge s_v2=g.addEdge(s, v2);
- Edge s_v3=g.addEdge(s, v3);
- Edge v2_v4=g.addEdge(v2, v4);
- Edge v2_v5=g.addEdge(v2, v5);
- Edge v3_v5=g.addEdge(v3, v5);
- Edge v4_t=g.addEdge(v4, t);
- Edge v5_t=g.addEdge(v5, t);
-
- LengthMap len(g);
-
- len.set(s_v2, 10);
- len.set(s_v3, 10);
- len.set(v2_v4, 5);
- len.set(v2_v5, 8);
- len.set(v3_v5, 5);
- len.set(v4_t, 8);
- len.set(v5_t, 8);
-
- std::cout << "The id of s is " << g.id(s)<< std::endl;
- std::cout <<"The id of t is " << g.id(t)<<"."< dijkstra_test(g,len);
-
- dijkstra_test.run(s);
-
-
- std::cout << "The distance of node t from node s: " << dijkstra_test.dist(t)< If you want to design a network and want to minimize the total length
of wires then you might be looking for a minimum spanning tree in
an undirected graph. This can be found using the Kruskal algorithm: the
-class \ref lemon::Kruskal "LEMON Kruskal class" does this job for you.
+function \ref lemon::kruskal "LEMON Kruskal ..." does this job for you.
The following code fragment shows an example:
Ide Zsuzska fog irni!
@@ -336,9 +248,9 @@
The complete program can be found in file \ref lp_maxflow_demo.cc. After compiling run it in the form:
-./lp_maxflow_demo < ?????????.lgf
+./lp_maxflow_demo < sample.lgf
-where ?????????.lgf is a file in the lemon format containing a maxflow instance (designated "source", "target" nodes and "capacity" map on the edges).
+where sample.lgf is a file in the lemon format containing a maxflow instance (designated "source", "target" nodes and "capacity" map on the edges).