doc/algorithms.dox
changeset 2347 0aaa7ada5395
parent 2216 1e45cdeea3cc
child 2391 14a343be7a5a
equal deleted inserted replaced
1:784c6d752cf0 2:e03d72d7430a
    92 </ol>
    92 </ol>
    93 
    93 
    94 \dontinclude topological_ordering.cc
    94 \dontinclude topological_ordering.cc
    95 First of all we will need an own \ref lemon::Dfs::ProcessedMap "ProcessedMap". The ordering
    95 First of all we will need an own \ref lemon::Dfs::ProcessedMap "ProcessedMap". The ordering
    96 will be done through it.
    96 will be done through it.
    97 \skip SerializingWriteMap
    97 \skip MyOrdererMap
    98 \until };
    98 \until };
    99 The class meets the \ref lemon::WriteMap "WriteMap" concept. In it's \c set() method the only thing
    99 The class meets the \ref lemon::WriteMap "WriteMap" concept. In it's \c set() method the only thing
   100 we need to do is insert the key - that is the node who's processing just finished - into the beginning
   100 we need to do is insert the key - that is the node who's processing just finished - into the beginning
   101 of the list.
   101 of the list.<br>
       
   102 Although we implemented this needed helper class ourselves it was not necessary.
       
   103 The \ref lemon::FrontInserterBoolMap "FrontInserterBoolMap" class does exactly
       
   104 what we needed. To be correct it's more general - and it's all in \c LEMON. But
       
   105 we wanted to show you, how easy is to add additional functionality.
   102 
   106 
   103 First we declare the needed data structures: the graph and a map to store the nodes' label.
   107 First we declare the needed data structures: the graph and a map to store the nodes' label.
   104 \skip ListGraph
   108 \skip ListGraph
   105 \until label
   109 \until label
   106 
   110 
   124 composed in reverse way (with \c push_front() instead of \c push_back() so we just iterate it.
   128 composed in reverse way (with \c push_front() instead of \c push_back() so we just iterate it.
   125 \skip std
   129 \skip std
   126 \until endl
   130 \until endl
   127 
   131 
   128 The program is to be found in the \ref demo directory: \ref topological_ordering.cc
   132 The program is to be found in the \ref demo directory: \ref topological_ordering.cc
       
   133 
       
   134 More algorithms are described in the \ref algorithms2 "second part".
   129 */
   135 */
   130 }
   136 }