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)<<"."<