COIN-OR::LEMON - Graph Library

Changeset 1511:d6b95a59da26 in lemon-0.x for doc/quicktour.dox


Ignore:
Timestamp:
06/24/05 10:44:54 (15 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1994
Message:

Half-done, but I want to continue from home.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/quicktour.dox

    r1287 r1511  
    1919about \ref graphs "graphs".
    2020
    21 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".
     21You 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".
    2222
    23 Some examples are the following (you will find links next to the code fragments that help to download full demo programs):
     23Some 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):
    2424
    2525- First we give two examples that show how to instantiate a graph. The
    2626first one shows the methods that add nodes and edges, but one will
    2727usually use the second way which reads a graph from a stream (file).
    28 -# 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.
     28-# 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.
    2929 \code
    3030  typedef ListGraph Graph;
    31   typedef Graph::Edge Edge;
    32   typedef Graph::InEdgeIt InEdgeIt;
    33   typedef Graph::OutEdgeIt OutEdgeIt;
    34   typedef Graph::EdgeIt EdgeIt;
    35   typedef Graph::Node Node;
    3631  typedef Graph::NodeIt NodeIt;
    3732
     
    4641 \endcode
    4742
     43See the whole program in file \ref helloworld.cc.
     44
    4845If you want to read more on the LEMON graph structures and concepts, read the page about \ref graphs "graphs".
    4946
    5047-# 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
    51 in that format (find the documentation of the DIMECS file format on the web).
     48in that format (find the documentation of the DIMACS file format on the web).
    5249\code
    5350Graph g;
     
    10299    len.set(v5_t, 8);
    103100
    104     std::cout << "The id of s is " << g.id(s)<< ", the id of t is " << g.id(t)<<"."<<std::endl;
     101    std::cout << "The id of s is " << g.id(s)<< std::endl;
     102    std::cout <<"The id of t is " << g.id(t)<<"."<<std::endl;
    105103
    106104    std::cout << "Dijkstra algorithm test..." << std::endl;
     
    113111    std::cout << "The distance of node t from node s: " << dijkstra_test.dist(t)<<std::endl;
    114112
    115     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;
     113    std::cout << "The shortest path from s to t goes through the following nodes" <<std::endl;
     114 std::cout << " (the first one is t, the last one is s): "<<std::endl;
    116115
    117116    for (Node v=t;v != s; v=dijkstra_test.predNode(v)){
     
    137136The following code fragment shows an example:
    138137
     138Ide Zsuzska fog irni!
     139
     140-
     141
    139142\code
    140143
Note: See TracChangeset for help on using the changeset viewer.