Everithing is half-done, but some progress has been made in writing documentation.
1.1 --- a/doc/Doxyfile Thu Feb 24 14:44:17 2005 +0000
1.2 +++ b/doc/Doxyfile Thu Feb 24 17:04:49 2005 +0000
1.3 @@ -445,6 +445,7 @@
1.4 # with spaces.
1.5
1.6 INPUT = mainpage.dox \
1.7 + getstart.dox \
1.8 quicktour.dox \
1.9 demoprograms.dox \
1.10 graphs.dox \
2.1 --- a/doc/demoprograms.dox Thu Feb 24 14:44:17 2005 +0000
2.2 +++ b/doc/demoprograms.dox Thu Feb 24 17:04:49 2005 +0000
2.3 @@ -2,4 +2,7 @@
2.4
2.5 \page demoprograms Demo Programs
2.6
2.7 +
2.8 +
2.9 +
2.10 */
2.11 \ No newline at end of file
3.1 --- a/doc/getstart.dox Thu Feb 24 14:44:17 2005 +0000
3.2 +++ b/doc/getstart.dox Thu Feb 24 17:04:49 2005 +0000
3.3 @@ -1,18 +1,102 @@
3.4 /**
3.5 \page getstart How to start using LEMON
3.6
3.7 +In this page we detail how to start using LEMON, from downloading it to
3.8 +your computer, through the steps of installation to showing a simple
3.9 +"Hello World" type program that already uses LEMON. If anything is not
3.10 +clear write to our FAQ.
3.11 +
3.12 +\todo Is this FAQ thing a good idea here? Is there such a thing? If
3.13 +twice YES then a link comes here.
3.14 +
3.15 +
3.16 +
3.17 +
3.18 \section downloadLEMON How to download LEMON
3.19
3.20 -You can download LEMON from ...
3.21 +You can download LEMON from the following web site:
3.22 +
3.23
3.24 \section installLEMON How to install LEMON
3.25
3.26 In order to install LEMON you have to do the following
3.27
3.28 +Ide kell írni:
3.29 +
3.30 +-Hol fordul (Windows-os fordító nem fordítja, unix/linux alatt gcc hanyas verziója kell)
3.31 +-
3.32 +
3.33 \section helloworld My first program using LEMON
3.34
3.35 -Helloworld program
3.36 -Link to quicktour
3.37 +If you have installed LEMON on your system you can paste the following code
3.38 +segment into a file to have a first working program that uses library LEMON.
3.39
3.40 +\code
3.41 +#include <iostream>
3.42 +#include <lemon/list_graph.h>
3.43
3.44 -*/
3.45 \ No newline at end of file
3.46 +using namespace lemon;
3.47 +
3.48 +int main()
3.49 +{
3.50 + typedef ListGraph Graph;
3.51 + typedef Graph::Edge Edge;
3.52 + typedef Graph::InEdgeIt InEdgeIt;
3.53 + typedef Graph::OutEdgeIt OutEdgeIt;
3.54 + typedef Graph::EdgeIt EdgeIt;
3.55 + typedef Graph::Node Node;
3.56 + typedef Graph::NodeIt NodeIt;
3.57 +
3.58 + Graph g;
3.59 +
3.60 + for (int i = 0; i < 3; i++)
3.61 + g.addNode();
3.62 +
3.63 + for (NodeIt i(g); i!=INVALID; ++i)
3.64 + for (NodeIt j(g); j!=INVALID; ++j)
3.65 + if (i != j) g.addEdge(i, j);
3.66 +
3.67 + std::cout << "Nodes:";
3.68 + for (NodeIt i(g); i!=INVALID; ++i)
3.69 + std::cout << " " << g.id(i);
3.70 + std::cout << std::endl;
3.71 +
3.72 + std::cout << "Edges:";
3.73 + for (EdgeIt i(g); i!=INVALID; ++i)
3.74 + std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
3.75 + std::cout << std::endl;
3.76 +
3.77 +\endcode
3.78 +
3.79 +
3.80 +ListGraph is one of LEMON's graph classes. It is based on linked lists,
3.81 +therefore iterating throuh its edges and nodes is fast.
3.82 +
3.83 +After some convenient typedefs we create a graph and add three nodes to it.
3.84 +Then we add edges to it to form a complete graph.
3.85 +
3.86 +Then we iterate through all nodes of the graph. We use a constructor of the
3.87 +node iterator to initialize it to the first node. The operator++ is used to
3.88 +step to the next node. Using operator++ on the iterator pointing to the last
3.89 +node invalidates the iterator i.e. sets its value to
3.90 +\ref lemon::INVALID "INVALID". This is what we exploit in the stop condition.
3.91 +
3.92 +We can also iterate through all edges of the graph very similarly. The
3.93 +\c target and
3.94 +\c source member functions can be used to access the endpoints of an edge.
3.95 +
3.96 +The previous code fragment prints out the following:
3.97 +
3.98 +\code
3.99 +Nodes: 2 1 0
3.100 +
3.101 +Edges: (0,2) (1,2) (0,1) (2,1) (1,0) (2,0)
3.102 +\endcode
3.103 +
3.104 +
3.105 +If you want to see more features, go to the \ref quicktour "Quick Tour to
3.106 +LEMON", if you want to see see some demo programs then go to our
3.107 +\ref demoprograms "Demo Programs" page!
3.108 +
3.109 +
3.110 +*/
4.1 --- a/doc/mainpage1.dox Thu Feb 24 14:44:17 2005 +0000
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,37 +0,0 @@
4.4 -/**
4.5 -\mainpage LEMON Documentation
4.6 -
4.7 -\section intro Introduction
4.8 -
4.9 -\subsection whatis What is LEMON
4.10 -
4.11 -LEMON stands for
4.12 -<b>L</b>ibrary of <b>E</b>fficient <b>M</b>odels
4.13 -and <b>O</b>ptimization in <b>N</b>etworks.
4.14 -It is a C++ template
4.15 -library aimed at combinatorial optimization tasks which
4.16 -often involve in working with graphs.
4.17 -
4.18 -<b>
4.19 -LEMON is an <a class="el" href="http://opensource.org/">open source</a>
4.20 -project.
4.21 -You are free to use it in your commercial or
4.22 -non-commercial applications under very permissive
4.23 -\ref license "license terms".
4.24 -</b>
4.25 -
4.26 -\subsection howtoread How to read this document
4.27 -
4.28 -\ref graphs "Graph structures"
4.29 -play central role in LEMON, so if you are new to it,
4.30 -you probably should start \ref graphs "here".
4.31 -You can also find this page along with others under
4.32 -<a class="el" href="pages.html"> Related Pages </a>.
4.33 -
4.34 -If you are
4.35 -interested in data structures and algorithms in more details, then
4.36 -you should browse the reference manual part of the documentation.
4.37 -Section <a class="el" href="modules.html"> Modules </a>
4.38 - is a good starting point for this.
4.39 -
4.40 -*/
5.1 --- a/doc/quicktour.dox Thu Feb 24 14:44:17 2005 +0000
5.2 +++ b/doc/quicktour.dox Thu Feb 24 17:04:49 2005 +0000
5.3 @@ -2,15 +2,87 @@
5.4
5.5 \page quicktour Quick Tour to LEMON
5.6
5.7 +Let us first answer the question <b>"What do I want to use LEMON for?"
5.8 +</b>.
5.9 +LEMON is a C++ library, so you can use it if you want to write C++
5.10 +programs. What kind of tasks does the library LEMON help to solve?
5.11 +It helps to write programs that solve optimization problems that arise
5.12 +frequently when <b>designing and testing certain networks</b>, for example
5.13 +in telecommunication, computer networks, and other areas that I cannot
5.14 +think of now. A very natural way of modelling these networks is by means
5.15 +of a <b> graph</b> (we will always mean a directed graph by that).
5.16 +So if you want to write a program that works with
5.17 +graphs then you might find it useful to use our library LEMON.
5.18 +
5.19 +
5.20 +
5.21 +Some examples are the following:
5.22 +
5.23 +- First we give two examples that show how to instantiate a graph. The
5.24 +first one shows the methods that add nodes and edges, but one will
5.25 +usually use the second way which reads a graph from a stream (file).
5.26 +
5.27 +
5.28 +-# The following code fragment shows how to fill a graph with data.
5.29 +
5.30 + \code
5.31 +
5.32 + typedef ListGraph Graph;
5.33 + typedef Graph::Edge Edge;
5.34 + typedef Graph::InEdgeIt InEdgeIt;
5.35 + typedef Graph::OutEdgeIt OutEdgeIt;
5.36 + typedef Graph::EdgeIt EdgeIt;
5.37 + typedef Graph::Node Node;
5.38 + typedef Graph::NodeIt NodeIt;
5.39 +
5.40 + Graph g;
5.41 +
5.42 + for (int i = 0; i < 3; i++)
5.43 + g.addNode();
5.44 +
5.45 + for (NodeIt i(g); i!=INVALID; ++i)
5.46 + for (NodeIt j(g); j!=INVALID; ++j)
5.47 + if (i != j) g.addEdge(i, j);
5.48 +
5.49 + \endcode
5.50 +
5.51 + -#
5.52 +
5.53 +- If you want to solve some transportation problems in a network then
5.54 +you will want to find shortest paths between nodes of a graph. This is
5.55 +usually solved using Dijkstra's algorithm. A utility
5.56 +that solves this is the \ref lemon::Dijkstra "LEMON Dijkstra class".
5.57 +A simple program using the \ref lemon::Dijkstra "LEMON Dijkstra class" is
5.58 +as follows (we assume that the graph is already given in the memory):
5.59 +
5.60 +\code
5.61 +
5.62 +\endcode
5.63 +
5.64 +- If you want to design a network and want to minimize the total length
5.65 +of wires then you might be looking for a <b>minimum spanning tree</b> in
5.66 +an undirected graph. This can be found using the Kruskal algorithm: the
5.67 +class \ref lemon::Kruskal "LEMON Kruskal class" does this job for you.
5.68 +The following code fragment shows an example:
5.69 +
5.70 +\code
5.71 +
5.72 +\endcode
5.73 +
5.74 +
5.75 +
5.76 +Some more detailed introduction can be obtained by following the links
5.77 +below:
5.78 +
5.79 \ref graphs "Graph structures"
5.80 -play a central role in LEMON, so if you are new to it,
5.81 +play a central role in LEMON, so if you are new to the library,
5.82 you probably should start \ref graphs "here".
5.83 -You can also find that page along with others under
5.84 -<a class="el" href="pages.html"> Related Pages </a>.
5.85 +(You can also find that page along with others under
5.86 +<a class="el" href="pages.html"> Related Pages </a>.)
5.87
5.88 If you are
5.89 interested in data structures and algorithms in more details, then
5.90 you should browse the reference manual part of the documentation.
5.91 Section <a class="el" href="modules.html"> Modules </a>
5.92 is a good starting point for this.
5.93 -*/
5.94 \ No newline at end of file
5.95 +*/