# HG changeset patch # User mqrelly # Date 1162287164 0 # Node ID 55b15666560f688dda5041ee2f6abea4345fc3c4 # Parent dc726706ea65cc41ac996e9742b8aad6ff6871bc tutorial update algorithms, and graph visualisation diff -r dc726706ea65 -r 55b15666560f demo/kruskal_demo.cc --- a/demo/kruskal_demo.cc Tue Oct 31 08:46:18 2006 +0000 +++ b/demo/kruskal_demo.cc Tue Oct 31 09:32:44 2006 +0000 @@ -106,13 +106,12 @@ int k=0; std::cout << "The edges of the tree:" ; - for(EdgeIt i(g); i!=INVALID; ++i){ - + for(EdgeIt i(g); i!=INVALID; ++i) if (tree_map[i]) { std::cout << g.id(i) <<";"; ++k; } - } + std::cout << std::endl; std::cout << "The size of the tree is: "<< k << std::endl; diff -r dc726706ea65 -r 55b15666560f doc/algorithms.dox --- a/doc/algorithms.dox Tue Oct 31 08:46:18 2006 +0000 +++ b/doc/algorithms.dox Tue Oct 31 09:32:44 2006 +0000 @@ -94,11 +94,15 @@ \dontinclude topological_ordering.cc First of all we will need an own \ref lemon::Dfs::ProcessedMap "ProcessedMap". The ordering will be done through it. -\skip SerializingWriteMap +\skip MyOrdererMap \until }; The class meets the \ref lemon::WriteMap "WriteMap" concept. In it's \c set() method the only thing we need to do is insert the key - that is the node who's processing just finished - into the beginning -of the list. +of the list.
+Although we implemented this needed helper class ourselves it was not necessary. +The \ref lemon::FrontInserterBoolMap "FrontInserterBoolMap" class does exactly +what we needed. To be correct it's more general - and it's all in \c LEMON. But +we wanted to show you, how easy is to add additional functionality. First we declare the needed data structures: the graph and a map to store the nodes' label. \skip ListGraph @@ -126,5 +130,7 @@ \until endl The program is to be found in the \ref demo directory: \ref topological_ordering.cc + +More algorithms are described in the \ref algorithms2 "second part". */ } diff -r dc726706ea65 -r 55b15666560f doc/tutorial.dox --- a/doc/tutorial.dox Tue Oct 31 08:46:18 2006 +0000 +++ b/doc/tutorial.dox Tue Oct 31 09:32:44 2006 +0000 @@ -23,8 +23,8 @@
  • \ref algorithms
  • \ref maps2 -
  • Show a graph +
  • \ref show_a_graph
  • Miscellaneous Tool