# HG changeset patch # User athos # Date 1119602694 0 # Node ID d6b95a59da265b0e1fe5bce0f1384afa1edd3904 # Parent cde847387b5a8e3f3dedf597eb3d6cee905b7387 Half-done, but I want to continue from home. diff -r cde847387b5a -r d6b95a59da26 demo/helloworld.cc --- a/demo/helloworld.cc Fri Jun 24 07:58:18 2005 +0000 +++ b/demo/helloworld.cc Fri Jun 24 08:44:54 2005 +0000 @@ -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); diff -r cde847387b5a -r d6b95a59da26 doc/getstart.dox --- a/doc/getstart.dox Fri Jun 24 07:58:18 2005 +0000 +++ b/doc/getstart.dox Fri Jun 24 08:44:54 2005 +0000 @@ -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) diff -r cde847387b5a -r d6b95a59da26 doc/quicktour.dox --- a/doc/quicktour.dox Fri Jun 24 07:58:18 2005 +0000 +++ b/doc/quicktour.dox Fri Jun 24 08:44:54 2005 +0000 @@ -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)<<"."<