COIN-OR::LEMON - Graph Library

Changeset 1175:6205eebd62fc in lemon-0.x for doc/quicktour.dox

02/24/05 18:04:49 (19 years ago)

Everithing is half-done, but some progress has been made in writing documentation.

1 edited


  • doc/quicktour.dox

    r1170 r1175  
    33\page quicktour Quick Tour to LEMON
     5Let us first answer the question <b>"What do I want to use LEMON for?"
     7LEMON is a C++ library, so you can use it if you want to write C++
     8programs. What kind of tasks does the library LEMON help to solve?
     9It helps to write programs that solve optimization problems that arise
     10frequently when <b>designing and testing certain networks</b>, for example
     11in telecommunication, computer networks, and other areas that I cannot
     12think of now. A very natural way of modelling these networks is by means
     13of a <b> graph</b> (we will always mean a directed graph by that).
     14So if you want to write a program that works with
     15graphs then you might find it useful to use our library LEMON.
     19Some examples are the following:
     21- First we give two examples that show how to instantiate a graph. The
     22first one shows the methods that add nodes and edges, but one will
     23usually use the second way which reads a graph from a stream (file).
     26-# The following code fragment shows how to fill a graph with data.
     28 \code
     30  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;
     36  typedef Graph::NodeIt NodeIt;
     38  Graph g;
     40  for (int i = 0; i < 3; i++)
     41    g.addNode();
     43  for (NodeIt i(g); i!=INVALID; ++i)
     44    for (NodeIt j(g); j!=INVALID; ++j)
     45      if (i != j) g.addEdge(i, j);
     47 \endcode
     49 -#
     51- If you want to solve some transportation problems in a network then
     52you will want to find shortest paths between nodes of a graph. This is
     53usually solved using Dijkstra's algorithm. A utility
     54that solves this is  the \ref lemon::Dijkstra "LEMON Dijkstra class".
     55A simple program using the \ref lemon::Dijkstra "LEMON Dijkstra class" is
     56as follows (we assume that the graph is already given in the memory):
     62- If you want to design a network and want to minimize the total length
     63of wires then you might be looking for a <b>minimum spanning tree</b> in
     64an undirected graph. This can be found using the Kruskal algorithm: the
     65class \ref lemon::Kruskal "LEMON Kruskal class" does this job for you.
     66The following code fragment shows an example:
     74Some more detailed introduction can be obtained by following the links
    577\ref graphs "Graph structures"
    6 play a central role in LEMON, so if you are new to it,
     78play a central role in LEMON, so if you are new to the library,
    779you probably should start \ref graphs "here".
    8 You can also find that page along with others under
    9 <a class="el" href="pages.html"> Related Pages </a>.
     80(You can also find that page along with others under
     81<a class="el" href="pages.html"> Related Pages </a>.)
    1183If you are
Note: See TracChangeset for help on using the changeset viewer.