doc/quicktour.dox
changeset 1511 d6b95a59da26
parent 1287 984723507b86
child 1514 c9b9bc63db4e
     1.1 --- a/doc/quicktour.dox	Fri Jun 24 07:58:18 2005 +0000
     1.2 +++ b/doc/quicktour.dox	Fri Jun 24 08:44:54 2005 +0000
     1.3 @@ -18,21 +18,16 @@
     1.4  graph: a very good description can be found in the page
     1.5  about \ref graphs "graphs".
     1.6  
     1.7 -You will also want to assign data to the edges or nodes of the graph, for example a length or capacity function defined on the edges. You can do this in LEMON using so called \ref maps "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 any type. Read more about maps \ref maps-page "here".
     1.8 +You will also want to assign data to the edges or nodes of the graph, for example a length or capacity function defined on the edges. You can do this in LEMON using so called \ref maps "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".
     1.9  
    1.10 -Some examples are the following (you will find links next to the code fragments that help to download full demo programs):
    1.11 +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):
    1.12  
    1.13  - First we give two examples that show how to instantiate a graph. The
    1.14  first one shows the methods that add nodes and edges, but one will
    1.15  usually use the second way which reads a graph from a stream (file).
    1.16 --# The following code fragment shows how to fill a graph with data. It creates a complete graph on 4 nodes. The type Listgraph is one of the LEMON graph types: the typedefs in the beginning are for convenience and we will supppose them later as well.
    1.17 +-# The following code fragment shows how to fill a graph with data. It creates a complete graph on 4 nodes. The type Listgraph is one of the LEMON graph types: the typedefs in the beginning are for convenience and we will suppose them later as well.
    1.18   \code
    1.19    typedef ListGraph Graph;
    1.20 -  typedef Graph::Edge Edge;
    1.21 -  typedef Graph::InEdgeIt InEdgeIt;
    1.22 -  typedef Graph::OutEdgeIt OutEdgeIt;
    1.23 -  typedef Graph::EdgeIt EdgeIt;
    1.24 -  typedef Graph::Node Node;
    1.25    typedef Graph::NodeIt NodeIt;
    1.26  
    1.27    Graph g;
    1.28 @@ -45,10 +40,12 @@
    1.29        if (i != j) g.addEdge(i, j);
    1.30   \endcode 
    1.31  
    1.32 +See the whole program in file \ref helloworld.cc.
    1.33 +
    1.34  If you want to read more on the LEMON graph structures and concepts, read the page about \ref graphs "graphs". 
    1.35  
    1.36  -# The following code shows how to read a graph from a stream (e.g. a file). LEMON supports the DIMACS file format: it can read a graph instance from a file 
    1.37 -in that format (find the documentation of the DIMECS file format on the web). 
    1.38 +in that format (find the documentation of the DIMACS file format on the web). 
    1.39  \code
    1.40  Graph g;
    1.41  std::ifstream f("graph.dim");
    1.42 @@ -101,7 +98,8 @@
    1.43      len.set(v4_t, 8);
    1.44      len.set(v5_t, 8);
    1.45  
    1.46 -    std::cout << "The id of s is " << g.id(s)<< ", the id of t is " << g.id(t)<<"."<<std::endl;
    1.47 +    std::cout << "The id of s is " << g.id(s)<< std::endl;
    1.48 +    std::cout <<"The id of t is " << g.id(t)<<"."<<std::endl;
    1.49  
    1.50      std::cout << "Dijkstra algorithm test..." << std::endl;
    1.51  
    1.52 @@ -112,7 +110,8 @@
    1.53      
    1.54      std::cout << "The distance of node t from node s: " << dijkstra_test.dist(t)<<std::endl;
    1.55  
    1.56 -    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;
    1.57 +    std::cout << "The shortest path from s to t goes through the following nodes" <<std::endl;
    1.58 + std::cout << " (the first one is t, the last one is s): "<<std::endl;
    1.59  
    1.60      for (Node v=t;v != s; v=dijkstra_test.predNode(v)){
    1.61  	std::cout << g.id(v) << "<-";
    1.62 @@ -136,6 +135,10 @@
    1.63  class \ref lemon::Kruskal "LEMON Kruskal class" does this job for you.
    1.64  The following code fragment shows an example:
    1.65  
    1.66 +Ide Zsuzska fog irni!
    1.67 +
    1.68 +- 
    1.69 +
    1.70  \code
    1.71  
    1.72  \endcode