[Lemon-commits] [lemon_svn] athos: r1994 - in hugo/trunk: demo doc
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:49:21 CET 2006
Author: athos
Date: Fri Jun 24 10:44:54 2005
New Revision: 1994
Modified:
hugo/trunk/demo/helloworld.cc
hugo/trunk/doc/getstart.dox
hugo/trunk/doc/quicktour.dox
Log:
Half-done, but I want to continue from home.
Modified: hugo/trunk/demo/helloworld.cc
==============================================================================
--- hugo/trunk/demo/helloworld.cc (original)
+++ hugo/trunk/demo/helloworld.cc Fri Jun 24 10:44:54 2005
@@ -22,6 +22,11 @@
for (NodeIt j(g); j!=INVALID; ++j)
if (i != j) g.addEdge(i, j);
+ std::cout << "Hello World!" << std::endl;
+ std::cout << std::endl;
+ std::cout << "This is library LEMON here! We have a graph!" << std::endl;
+ std::cout << std::endl;
+
std::cout << "Nodes:";
for (NodeIt i(g); i!=INVALID; ++i)
std::cout << " " << g.id(i);
Modified: hugo/trunk/doc/getstart.dox
==============================================================================
--- hugo/trunk/doc/getstart.dox (original)
+++ hugo/trunk/doc/getstart.dox Fri Jun 24 10:44:54 2005
@@ -11,16 +11,30 @@
-
\section downloadLEMON How to download LEMON
-You can download LEMON from the following web site:
+You can download LEMON from the LEMON web site:
+http://lemon.cs.elte.hu
+by 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.
\section installLEMON How to install LEMON
In order to install LEMON you have to do the following
+Download the tarball and issue the following commands:
+
+\code
+tar xvzf lemon-0.3.1.tar.gz
+cd lemon-0.3.1
+./configure
+make
+make check (This is optional, but recomended. It runs a bunch of tests.)
+make install
+\endcode
+
+These commands install LEMON under /usr/local. If you want to install it to some other place, then pass the --prefix=DIR flag to ./configure.
+
Ide kell írni:
-Hol fordul (Windows-os fordító nem fordítja, unix/linux alatt gcc hanyas verziója kell)
Modified: hugo/trunk/doc/quicktour.dox
==============================================================================
--- hugo/trunk/doc/quicktour.dox (original)
+++ hugo/trunk/doc/quicktour.dox Fri Jun 24 10:44:54 2005
@@ -18,21 +18,16 @@
graph: a very good description can be found in the page
about \ref graphs "graphs".
-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".
+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 of any type. Read more about maps \ref maps-page "here".
-Some examples are the following (you will find links next to the code fragments that help to download full demo programs):
+Some 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):
- 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. 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.
+-# 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.
\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;
@@ -45,10 +40,12 @@
if (i != j) g.addEdge(i, j);
\endcode
+See the whole program in file \ref helloworld.cc.
+
If you want to read more on the LEMON graph structures and concepts, read the page about \ref graphs "graphs".
-# 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
-in that format (find the documentation of the DIMECS file format on the web).
+in that format (find the documentation of the DIMACS file format on the web).
\code
Graph g;
std::ifstream f("graph.dim");
@@ -101,7 +98,8 @@
len.set(v4_t, 8);
len.set(v5_t, 8);
- std::cout << "The id of s is " << g.id(s)<< ", the id of t is " << g.id(t)<<"."<<std::endl;
+ std::cout << "The id of s is " << g.id(s)<< std::endl;
+ std::cout <<"The id of t is " << g.id(t)<<"."<<std::endl;
std::cout << "Dijkstra algorithm test..." << std::endl;
@@ -112,7 +110,8 @@
std::cout << "The distance of node t from node s: " << dijkstra_test.dist(t)<<std::endl;
- 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;
+ std::cout << "The shortest path from s to t goes through the following nodes" <<std::endl;
+ std::cout << " (the first one is t, the last one is s): "<<std::endl;
for (Node v=t;v != s; v=dijkstra_test.predNode(v)){
std::cout << g.id(v) << "<-";
@@ -136,6 +135,10 @@
class \ref lemon::Kruskal "LEMON Kruskal class" does this job for you.
The following code fragment shows an example:
+Ide Zsuzska fog irni!
+
+-
+
\code
\endcode
More information about the Lemon-commits
mailing list