[Lemon-commits] [lemon_svn] athos: r1581 - hugo/trunk/doc

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:46:22 CET 2006


Author: athos
Date: Thu Feb 24 18:04:49 2005
New Revision: 1581

Removed:
   hugo/trunk/doc/mainpage1.dox
Modified:
   hugo/trunk/doc/Doxyfile
   hugo/trunk/doc/demoprograms.dox
   hugo/trunk/doc/getstart.dox
   hugo/trunk/doc/quicktour.dox

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

Modified: hugo/trunk/doc/Doxyfile
==============================================================================
--- hugo/trunk/doc/Doxyfile	(original)
+++ hugo/trunk/doc/Doxyfile	Thu Feb 24 18:04:49 2005
@@ -445,6 +445,7 @@
 # with spaces.
 
 INPUT                  = mainpage.dox \
+			 getstart.dox \
                          quicktour.dox \
                          demoprograms.dox \
                          graphs.dox \

Modified: hugo/trunk/doc/demoprograms.dox
==============================================================================
--- hugo/trunk/doc/demoprograms.dox	(original)
+++ hugo/trunk/doc/demoprograms.dox	Thu Feb 24 18:04:49 2005
@@ -2,4 +2,7 @@
 
 \page demoprograms Demo Programs
 
+
+
+
 */
\ No newline at end of file

Modified: hugo/trunk/doc/getstart.dox
==============================================================================
--- hugo/trunk/doc/getstart.dox	(original)
+++ hugo/trunk/doc/getstart.dox	Thu Feb 24 18:04:49 2005
@@ -1,18 +1,102 @@
 /**
 \page getstart How to start using LEMON
 
+In this page we detail how to start using LEMON, from downloading it to 
+your computer, through the steps of installation to showing a simple
+"Hello World" type program that already uses LEMON. If anything is not 
+clear write to our FAQ.
+
+\todo Is this FAQ thing a good idea here? Is there such a thing? If
+twice YES then a link comes here.
+
+
+
+
 \section downloadLEMON How to download LEMON
 
-You can download LEMON from ...
+You can download LEMON from the following web site:
+
 
 \section installLEMON How to install LEMON
 
 In order to install LEMON you have to do the following
 
+Ide kell írni:
+ 
+-Hol fordul (Windows-os fordító nem fordítja, unix/linux alatt gcc hanyas verziója kell)
+-
+
 \section helloworld My first program using LEMON
 
-Helloworld program
-Link to quicktour
+If you have installed LEMON on your system you can paste the following code
+segment into a file to have a first working program that uses library LEMON.
+
+\code
+#include <iostream>
+#include <lemon/list_graph.h>
+
+using namespace lemon;
+
+int main()
+{
+  typedef ListGraph Graph;
+  typedef Graph::Edge Edge;
+  typedef Graph::InEdgeIt InEdgeIt;
+  typedef Graph::OutEdgeIt OutEdgeIt;
+  typedef Graph::EdgeIt EdgeIt;
+  typedef Graph::Node Node;
+  typedef Graph::NodeIt NodeIt;
+
+  Graph g;
+  
+  for (int i = 0; i < 3; i++)
+    g.addNode();
+  
+  for (NodeIt i(g); i!=INVALID; ++i)
+    for (NodeIt j(g); j!=INVALID; ++j)
+      if (i != j) g.addEdge(i, j);
+
+  std::cout << "Nodes:";
+  for (NodeIt i(g); i!=INVALID; ++i)
+    std::cout << " " << g.id(i);
+  std::cout << std::endl;
+
+  std::cout << "Edges:";
+  for (EdgeIt i(g); i!=INVALID; ++i)
+    std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
+  std::cout << std::endl;
+
+\endcode
+
+
+ListGraph is one of LEMON's graph classes. It is based on linked lists,
+therefore iterating throuh its edges and nodes is fast.
+
+After some convenient typedefs we create a graph and add three nodes to it.
+Then we add edges to it to form a complete graph.
+
+Then we iterate through all nodes of the graph. We use a constructor of the
+node iterator to initialize it to the first node. The operator++ is used to
+step to the next node. Using operator++ on the iterator pointing to the last
+node invalidates the iterator i.e. sets its value to
+\ref lemon::INVALID "INVALID". This is what we exploit in the stop condition.
+
+We can also iterate through all edges of the graph very similarly. The 
+\c target and
+\c source member functions can be used to access the endpoints of an edge.
+
+The previous code fragment prints out the following:
+
+\code
+Nodes: 2 1 0
+
+Edges: (0,2) (1,2) (0,1) (2,1) (1,0) (2,0)
+\endcode
+
+
+If you want to see more features, go to the \ref quicktour "Quick Tour to
+LEMON", if you want to see see some demo programs then go to our 
+\ref demoprograms "Demo Programs" page! 
 
 
-*/
\ No newline at end of file
+*/

Modified: hugo/trunk/doc/quicktour.dox
==============================================================================
--- hugo/trunk/doc/quicktour.dox	(original)
+++ hugo/trunk/doc/quicktour.dox	Thu Feb 24 18:04:49 2005
@@ -2,15 +2,87 @@
 
 \page quicktour Quick Tour to LEMON
 
+Let us first answer the question <b>"What do I want to use LEMON for?"
+</b>. 
+LEMON is a C++ library, so you can use it if you want to write C++ 
+programs. What kind of tasks does the library LEMON help to solve? 
+It helps to write programs that solve optimization problems that arise
+frequently when <b>designing and testing certain networks</b>, for example
+in telecommunication, computer networks, and other areas that I cannot
+think of now. A very natural way of modelling these networks is by means
+of a <b> graph</b> (we will always mean a directed graph by that). 
+So if you want to write a program that works with 
+graphs then you might find it useful to use our library LEMON.
+
+
+
+Some examples are the following:
+
+- First we give two examples that show how to instantiate a graph. The
+first one shows the methods that add nodes and edges, but one will
+usually use the second way which reads a graph from a stream (file).
+
+
+-# The following code fragment shows how to fill a graph with data.
+
+ \code
+
+  typedef ListGraph Graph;
+  typedef Graph::Edge Edge;
+  typedef Graph::InEdgeIt InEdgeIt;
+  typedef Graph::OutEdgeIt OutEdgeIt;
+  typedef Graph::EdgeIt EdgeIt;
+  typedef Graph::Node Node;
+  typedef Graph::NodeIt NodeIt;
+
+  Graph g;
+  
+  for (int i = 0; i < 3; i++)
+    g.addNode();
+  
+  for (NodeIt i(g); i!=INVALID; ++i)
+    for (NodeIt j(g); j!=INVALID; ++j)
+      if (i != j) g.addEdge(i, j);
+
+ \endcode 
+
+ -#
+
+- If you want to solve some transportation problems in a network then 
+you will want to find shortest paths between nodes of a graph. This is 
+usually solved using Dijkstra's algorithm. A utility
+that solves this is  the \ref lemon::Dijkstra "LEMON Dijkstra class".
+A simple program using the \ref lemon::Dijkstra "LEMON Dijkstra class" is
+as follows (we assume that the graph is already given in the memory):
+
+\code
+
+\endcode
+
+- If you want to design a network and want to minimize the total length
+of wires then you might be looking for a <b>minimum spanning tree</b> in
+an undirected graph. This can be found using the Kruskal algorithm: the 
+class \ref lemon::Kruskal "LEMON Kruskal class" does this job for you.
+The following code fragment shows an example:
+
+\code
+
+\endcode
+
+
+
+Some more detailed introduction can be obtained by following the links 
+below:
+
 \ref graphs "Graph structures"
-play a central role in LEMON, so if you are new to it,
+play a central role in LEMON, so if you are new to the library,
 you probably should start \ref graphs "here".
-You can also find that page along with others under
-<a class="el" href="pages.html"> Related Pages </a>.
+(You can also find that page along with others under
+<a class="el" href="pages.html"> Related Pages </a>.)
 
 If you are 
 interested in data structures and algorithms in more details, then
 you should browse the reference manual part of the documentation.
 Section <a class="el" href="modules.html"> Modules </a>
  is a good starting point for this.
-*/
\ No newline at end of file
+*/



More information about the Lemon-commits mailing list