COIN-OR::LEMON - Graph Library

Changeset 1511:d6b95a59da26 in lemon-0.x


Ignore:
Timestamp:
06/24/05 10:44:54 (19 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.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • demo/helloworld.cc

    r1435 r1511  
    2323      if (i != j) g.addEdge(i, j);
    2424
     25  std::cout << "Hello World!" << std::endl;
     26  std::cout <<  std::endl;
     27  std::cout << "This is library LEMON here! We have a graph!" << std::endl;
     28  std::cout <<  std::endl;
     29
    2530  std::cout << "Nodes:";
    2631  for (NodeIt i(g); i!=INVALID; ++i)
  • doc/getstart.dox

    r1175 r1511  
    1212
    1313
    14 
    1514\section downloadLEMON How to download LEMON
    1615
    17 You can download LEMON from the following web site:
     16You can download LEMON from the LEMON web site:
     17http://lemon.cs.elte.hu
     18by following the download link. There you will find the issued distributions in form of \e .ta.gz files. If you want a developer version  (for example you want to contribute in developing the library LEMON) then you might want to use our Subversion repository. This case is not detailed here, so from now on we suppose that you downloaded a tar.gz file.
    1819
    1920
     
    2122
    2223In order to install LEMON you have to do the following
     24
     25Download the tarball and issue the following commands:
     26
     27\code
     28tar xvzf lemon-0.3.1.tar.gz
     29cd lemon-0.3.1
     30./configure
     31make
     32make check (This is optional, but recomended. It runs a bunch of tests.)
     33make install
     34\endcode
     35
     36These commands install LEMON under /usr/local. If you want to install it to some other place, then pass the --prefix=DIR flag to ./configure.
    2337
    2438Ide kell írni:
  • 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.