Changeset 1511:d6b95a59da26 in lemon-0.x
- Timestamp:
- 06/24/05 10:44:54 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1994
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/helloworld.cc
r1435 r1511 23 23 if (i != j) g.addEdge(i, j); 24 24 25 std::cout << "Hello World!" << std::endl; 26 std::cout << std::endl; 27 std::cout << "This is library LEMON here! We have a graph!" << std::endl; 28 std::cout << std::endl; 29 25 30 std::cout << "Nodes:"; 26 31 for (NodeIt i(g); i!=INVALID; ++i) -
doc/getstart.dox
r1175 r1511 12 12 13 13 14 15 14 \section downloadLEMON How to download LEMON 16 15 17 You can download LEMON from the following web site: 16 You can download LEMON from the LEMON web site: 17 http://lemon.cs.elte.hu 18 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. 18 19 19 20 … … 21 22 22 23 In order to install LEMON you have to do the following 24 25 Download the tarball and issue the following commands: 26 27 \code 28 tar xvzf lemon-0.3.1.tar.gz 29 cd lemon-0.3.1 30 ./configure 31 make 32 make check (This is optional, but recomended. It runs a bunch of tests.) 33 make install 34 \endcode 35 36 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. 23 37 24 38 Ide kell írni: -
doc/quicktour.dox
r1287 r1511 19 19 about \ref graphs "graphs". 20 20 21 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".21 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". 22 22 23 Some examples are the following (you will find links next to the code fragments that help to download full demo programs ):23 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): 24 24 25 25 - First we give two examples that show how to instantiate a graph. The 26 26 first one shows the methods that add nodes and edges, but one will 27 27 usually use the second way which reads a graph from a stream (file). 28 -# 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 supp pose them later as well.28 -# 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. 29 29 \code 30 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 31 typedef Graph::NodeIt NodeIt; 37 32 … … 46 41 \endcode 47 42 43 See the whole program in file \ref helloworld.cc. 44 48 45 If you want to read more on the LEMON graph structures and concepts, read the page about \ref graphs "graphs". 49 46 50 47 -# 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 51 in that format (find the documentation of the DIM ECS file format on the web).48 in that format (find the documentation of the DIMACS file format on the web). 52 49 \code 53 50 Graph g; … … 102 99 len.set(v5_t, 8); 103 100 104 std::cout << "The id of s is " << g.id(s)<< ", the id of t is " << g.id(t)<<"."<<std::endl; 101 std::cout << "The id of s is " << g.id(s)<< std::endl; 102 std::cout <<"The id of t is " << g.id(t)<<"."<<std::endl; 105 103 106 104 std::cout << "Dijkstra algorithm test..." << std::endl; … … 113 111 std::cout << "The distance of node t from node s: " << dijkstra_test.dist(t)<<std::endl; 114 112 115 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; 113 std::cout << "The shortest path from s to t goes through the following nodes" <<std::endl; 114 std::cout << " (the first one is t, the last one is s): "<<std::endl; 116 115 117 116 for (Node v=t;v != s; v=dijkstra_test.predNode(v)){ … … 137 136 The following code fragment shows an example: 138 137 138 Ide Zsuzska fog irni! 139 140 - 141 139 142 \code 140 143
Note: See TracChangeset
for help on using the changeset viewer.