Index: Makefile.am
===================================================================
--- Makefile.am	(revision 799)
+++ Makefile.am	(revision 676)
@@ -18,5 +18,4 @@
 	cmake/FindGLPK.cmake \
 	cmake/FindCOIN.cmake \
-	cmake/LEMONConfig.cmake.in \
 	cmake/version.cmake.in \
 	cmake/version.cmake \
Index: doc/Doxyfile.in
===================================================================
--- doc/Doxyfile.in	(revision 803)
+++ doc/Doxyfile.in	(revision 791)
@@ -1,3 +1,3 @@
-# Doxyfile 1.5.9
+# Doxyfile 1.5.7.1
 
 #---------------------------------------------------------------------------
@@ -22,4 +22,5 @@
 QT_AUTOBRIEF           = NO
 MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = YES
 INHERIT_DOCS           = NO
 SEPARATE_MEMBER_PAGES  = NO
@@ -224,5 +225,5 @@
 SKIP_FUNCTION_MACROS   = YES
 #---------------------------------------------------------------------------
-# Options related to the search engine   
+# Configuration::additions related to external references   
 #---------------------------------------------------------------------------
 TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
Index: doc/groups.dox
===================================================================
--- doc/groups.dox	(revision 818)
+++ doc/groups.dox	(revision 789)
@@ -317,6 +317,5 @@
 
 This group contains the common graph search algorithms, namely
-\e breadth-first \e search (BFS) and \e depth-first \e search (DFS)
-\ref clrs01algorithms.
+\e breadth-first \e search (BFS) and \e depth-first \e search (DFS).
 */
 
@@ -326,6 +325,5 @@
 \brief Algorithms for finding shortest paths.
 
-This group contains the algorithms for finding shortest paths in digraphs
-\ref clrs01algorithms.
+This group contains the algorithms for finding shortest paths in digraphs.
 
  - \ref Dijkstra algorithm for finding shortest paths from a source node
@@ -349,5 +347,5 @@
 
 This group contains the algorithms for finding minimum cost spanning
-trees and arborescences \ref clrs01algorithms.
+trees and arborescences.
 */
 
@@ -358,5 +356,5 @@
 
 This group contains the algorithms for finding maximum flows and
-feasible circulations \ref clrs01algorithms, \ref amo93networkflows.
+feasible circulations.
 
 The \e maximum \e flow \e problem is to find a flow of maximum value between
@@ -373,14 +371,10 @@
 
 LEMON contains several algorithms for solving maximum flow problems:
-- \ref EdmondsKarp Edmonds-Karp algorithm
-  \ref edmondskarp72theoretical.
-- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm
-  \ref goldberg88newapproach.
-- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees
-  \ref dinic70algorithm, \ref sleator83dynamic.
-- \ref GoldbergTarjan !Preflow push-relabel algorithm with dynamic trees
-  \ref goldberg88newapproach, \ref sleator83dynamic.
-
-In most cases the \ref Preflow algorithm provides the
+- \ref EdmondsKarp Edmonds-Karp algorithm.
+- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm.
+- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees.
+- \ref GoldbergTarjan Preflow push-relabel algorithm with dynamic trees.
+
+In most cases the \ref Preflow "Preflow" algorithm provides the
 fastest method for computing a maximum flow. All implementations
 also provide functions to query the minimum cut, which is the dual
@@ -400,20 +394,16 @@
 
 This group contains the algorithms for finding minimum cost flows and
-circulations \ref amo93networkflows. For more information about this
-problem and its dual solution, see \ref min_cost_flow
-"Minimum Cost Flow Problem".
+circulations. For more information about this problem and its dual
+solution see \ref min_cost_flow "Minimum Cost Flow Problem".
 
 LEMON contains several algorithms for this problem.
  - \ref NetworkSimplex Primal Network Simplex algorithm with various
-   pivot strategies \ref dantzig63linearprog, \ref kellyoneill91netsimplex.
+   pivot strategies.
  - \ref CostScaling Push-Relabel and Augment-Relabel algorithms based on
-   cost scaling \ref goldberg90approximation, \ref goldberg97efficient,
-   \ref bunnagel98efficient.
+   cost scaling.
  - \ref CapacityScaling Successive Shortest %Path algorithm with optional
-   capacity scaling \ref edmondskarp72theoretical.
- - \ref CancelAndTighten The Cancel and Tighten algorithm
-   \ref goldberg89cyclecanceling.
- - \ref CycleCanceling Cycle-Canceling algorithms
-   \ref klein67primal, \ref goldberg89cyclecanceling.
+   capacity scaling.
+ - \ref CancelAndTighten The Cancel and Tighten algorithm.
+ - \ref CycleCanceling Cycle-Canceling algorithms.
 
 In general NetworkSimplex is the most efficient implementation,
@@ -451,41 +441,4 @@
 If you want to find minimum cut just between two distinict nodes,
 see the \ref max_flow "maximum flow problem".
-*/
-
-/**
-@defgroup min_mean_cycle Minimum Mean Cycle Algorithms
-@ingroup algs
-\brief Algorithms for finding minimum mean cycles.
-
-This group contains the algorithms for finding minimum mean cycles
-\ref clrs01algorithms, \ref amo93networkflows.
-
-The \e minimum \e mean \e cycle \e problem is to find a directed cycle
-of minimum mean length (cost) in a digraph.
-The mean length of a cycle is the average length of its arcs, i.e. the
-ratio between the total length of the cycle and the number of arcs on it.
-
-This problem has an important connection to \e conservative \e length
-\e functions, too. A length function on the arcs of a digraph is called
-conservative if and only if there is no directed cycle of negative total
-length. For an arbitrary length function, the negative of the minimum
-cycle mean is the smallest \f$\epsilon\f$ value so that increasing the
-arc lengths uniformly by \f$\epsilon\f$ results in a conservative length
-function.
-
-LEMON contains three algorithms for solving the minimum mean cycle problem:
-- \ref Karp "Karp"'s original algorithm \ref amo93networkflows,
-  \ref dasdan98minmeancycle.
-- \ref HartmannOrlin "Hartmann-Orlin"'s algorithm, which is an improved
-  version of Karp's algorithm \ref dasdan98minmeancycle.
-- \ref Howard "Howard"'s policy iteration algorithm
-  \ref dasdan98minmeancycle.
-
-In practice, the Howard algorithm proved to be by far the most efficient
-one, though the best known theoretical bound on its running time is
-exponential.
-Both Karp and HartmannOrlin algorithms run in time O(ne) and use space
-O(n<sup>2</sup>+e), but the latter one is typically faster due to the
-applied early termination scheme.
 */
 
@@ -582,14 +535,11 @@
 
 /**
-@defgroup lp_group LP and MIP Solvers
+@defgroup lp_group Lp and Mip Solvers
 @ingroup gen_opt_group
-\brief LP and MIP solver interfaces for LEMON.
-
-This group contains LP and MIP solver interfaces for LEMON.
-Various LP solvers could be used in the same manner with this
-high-level interface.
-
-The currently supported solvers are \ref glpk, \ref clp, \ref cbc,
-\ref cplex, \ref soplex.
+\brief Lp and Mip solver interfaces for LEMON.
+
+This group contains Lp and Mip solver interfaces for LEMON. The
+various LP solvers could be used in the same manner with this
+interface.
 */
 
Index: doc/mainpage.dox
===================================================================
--- doc/mainpage.dox	(revision 802)
+++ doc/mainpage.dox	(revision 705)
@@ -22,9 +22,12 @@
 \section intro Introduction
 
-<b>LEMON</b> stands for <i><b>L</b>ibrary for <b>E</b>fficient <b>M</b>odeling
-and <b>O</b>ptimization in <b>N</b>etworks</i>.
-It is a C++ template library providing efficient implementation of common
-data structures and algorithms with focus on combinatorial optimization
-problems in graphs and networks.
+\subsection whatis What is LEMON
+
+LEMON stands for <b>L</b>ibrary for <b>E</b>fficient <b>M</b>odeling
+and <b>O</b>ptimization in <b>N</b>etworks.
+It is a C++ template
+library aimed at combinatorial optimization tasks which
+often involve in working
+with graphs.
 
 <b>
@@ -36,14 +39,5 @@
 </b>
 
-The project is maintained by the 
-<a href="http://www.cs.elte.hu/egres/">Egerv&aacute;ry Research Group on
-Combinatorial Optimization</a> \ref egres
-at the Operations Research Department of the
-<a href="http://www.elte.hu/">E&ouml;tv&ouml;s Lor&aacute;nd University,
-Budapest</a>, Hungary.
-LEMON is also a member of the <a href="http://www.coin-or.org/">COIN-OR</a>
-initiative \ref coinor.
-
-\section howtoread How to Read the Documentation
+\subsection howtoread How to read the documentation
 
 If you would like to get to know the library, see
Index: doc/min_cost_flow.dox
===================================================================
--- doc/min_cost_flow.dox	(revision 835)
+++ doc/min_cost_flow.dox	(revision 833)
@@ -27,5 +27,5 @@
 minimum total cost from a set of supply nodes to a set of demand nodes
 in a network with capacity constraints (lower and upper bounds)
-and arc costs \ref amo93networkflows.
+and arc costs.
 
 Formally, let \f$G=(V,A)\f$ be a digraph, \f$lower: A\rightarrow\mathbf{R}\f$,
Index: doc/references.bib
===================================================================
--- doc/references.bib	(revision 802)
+++ doc/references.bib	(revision 790)
@@ -13,5 +13,6 @@
   title =        {{EGRES} -- {E}gerv{\'a}ry {R}esearch {G}roup on
                   {C}ombinatorial {O}ptimization},
-  url =          {http://www.cs.elte.hu/egres/}
+  howpublished = {\url{http://www.cs.elte.hu/egres/}},
+  year =         2009
 }
 
@@ -20,5 +21,6 @@
   title =        {{COIN-OR} -- {C}omputational {I}nfrastructure for
                   {O}perations {R}esearch},
-  url =          {http://www.coin-or.org/}
+  howpublished = {\url{http://www.coin-or.org/}},
+  year =         2009
 }
 
@@ -29,5 +31,6 @@
   key =          {Boost},
   title =        {{B}oost {C++} {L}ibraries},
-  url =          {http://www.boost.org/}
+  howpublished = {\url{http://www.boost.org/}},
+  year =         2009
 }
 
@@ -45,5 +48,6 @@
   title =        {{LEDA} -- {L}ibrary of {E}fficient {D}ata {T}ypes and
                   {A}lgorithms},
-  url =          {http://www.algorithmic-solutions.com/}
+  howpublished = {\url{http://www.algorithmic-solutions.com/}},
+  year =         2009
 }
 
@@ -64,5 +68,6 @@
   key =          {CMake},
   title =        {{CMake} -- {C}ross {P}latform {M}ake},
-  url =          {http://www.cmake.org/}
+  howpublished = {\url{http://www.cmake.org/}},
+  year =         2009
 }
 
@@ -71,5 +76,6 @@
   title =        {{Doxygen} -- {S}ource code documentation generator
                   tool},
-  url =          {http://www.doxygen.org/}
+  howpublished = {\url{http://www.doxygen.org/}},
+  year =         2009
 }
 
@@ -80,5 +86,6 @@
   key =          {GLPK},
   title =        {{GLPK} -- {GNU} {L}inear {P}rogramming {K}it},
-  url =          {http://www.gnu.org/software/glpk/}
+  howpublished = {\url{http://www.gnu.org/software/glpk/}},
+  year =         2009
 }
 
@@ -86,5 +93,6 @@
   key =          {Clp},
   title =        {{Clp} -- {Coin-Or} {L}inear {P}rogramming},
-  url =          {http://projects.coin-or.org/Clp/}
+  howpublished = {\url{http://projects.coin-or.org/Clp/}},
+  year =         2009
 }
 
@@ -92,5 +100,6 @@
   key =          {Cbc},
   title =        {{Cbc} -- {Coin-Or} {B}ranch and {C}ut},
-  url =          {http://projects.coin-or.org/Cbc/}
+  howpublished = {\url{http://projects.coin-or.org/Cbc/}},
+  year =         2009
 }
 
@@ -98,5 +107,6 @@
   key =          {CPLEX},
   title =        {{ILOG} {CPLEX}},
-  url =          {http://www.ilog.com/}
+  howpublished = {\url{http://www.ilog.com/}},
+  year =         2009
 }
 
@@ -105,5 +115,6 @@
   title =        {{SoPlex} -- {T}he {S}equential {O}bject-{O}riented
                   {S}implex},
-  url =          {http://soplex.zib.de/}
+  howpublished = {\url{http://soplex.zib.de/}},
+  year =         2009
 }
 
@@ -151,23 +162,13 @@
 %%%%% Maximum flow algorithms %%%%%
 
-@article{edmondskarp72theoretical,
-  author =       {Jack Edmonds and Richard M. Karp},
-  title =        {Theoretical improvements in algorithmic efficiency
-                  for network flow problems},
-  journal =      {Journal of the ACM},
-  year =         1972,
-  volume =       19,
-  number =       2,
-  pages =        {248-264}
-}
-
-@article{goldberg88newapproach,
+@inproceedings{goldberg86newapproach,
   author =       {Andrew V. Goldberg and Robert E. Tarjan},
   title =        {A new approach to the maximum flow problem},
-  journal =      {Journal of the ACM},
-  year =         1988,
-  volume =       35,
-  number =       4,
-  pages =        {921-940}
+  booktitle =    {STOC '86: Proceedings of the Eighteenth Annual ACM
+                  Symposium on Theory of Computing},
+  year =         1986,
+  publisher =    {ACM Press},
+  address =      {New York, NY},
+  pages =        {136-146}
 }
 
@@ -240,16 +241,40 @@
 }
 
-@article{goldberg89cyclecanceling,
+@inproceedings{goldberg88cyclecanceling,
   author =       {Andrew V. Goldberg and Robert E. Tarjan},
   title =        {Finding minimum-cost circulations by canceling
                   negative cycles},
+  booktitle =    {STOC '88: Proceedings of the Twentieth Annual ACM
+                  Symposium on Theory of Computing},
+  year =         1988,
+  publisher =    {ACM Press},
+  address =      {New York, NY},
+  pages =        {388-397}
+}
+
+@article{edmondskarp72theoretical,
+  author =       {Jack Edmonds and Richard M. Karp},
+  title =        {Theoretical improvements in algorithmic efficiency
+                  for network flow problems},
   journal =      {Journal of the ACM},
-  year =         1989,
-  volume =       36,
-  number =       4,
-  pages =        {873-886}
-}
-
-@article{goldberg90approximation,
+  year =         1972,
+  volume =       19,
+  number =       2,
+  pages =        {248-264}
+}
+
+@inproceedings{goldberg87approximation,
+  author =       {Andrew V. Goldberg and Robert E. Tarjan},
+  title =        {Solving minimum-cost flow problems by successive
+                  approximation},
+  booktitle =    {STOC '87: Proceedings of the Nineteenth Annual ACM
+                  Symposium on Theory of Computing},
+  year =         1987,
+  publisher =    {ACM Press},
+  address =      {New York, NY},
+  pages =        {7-18}
+}
+
+@article{goldberg90finding,
   author =       {Andrew V. Goldberg and Robert E. Tarjan},
   title =        {Finding Minimum-Cost Circulations by Successive
@@ -284,11 +309,4 @@
 }
 
-@book{dantzig63linearprog,
-  author =       {George B. Dantzig},
-  title =        {Linear Programming and Extensions},
-  publisher =    {Princeton University Press},
-  year =         1963
-}
-
 @mastersthesis{kellyoneill91netsimplex,
   author =       {Damian J. Kelly and Garrett M. O'Neill},
@@ -300,2 +318,24 @@
   month =        sep,
 }
+
+@techreport{lobel96networksimplex,
+  author =       {Andreas L{\"o}bel},
+  title =        {Solving large-scale real-world minimum-cost flow
+                  problems by a network simplex method},
+  institution =  {Konrad-Zuse-Zentrum fur Informationstechnik Berlin
+                  ({ZIB})},
+  address =      {Berlin, Germany},
+  year =         1996,
+  number =       {SC 96-7}
+}
+
+@article{frangioni06computational,
+  author =       {Antonio Frangioni and Antonio Manca},
+  title =        {A Computational Study of Cost Reoptimization for
+                  Min-Cost Flow Problems},
+  journal =      {INFORMS Journal On Computing},
+  year =         2006,
+  volume =       18,
+  number =       1,
+  pages =        {61-70}
+}
Index: lemon/Makefile.am
===================================================================
--- lemon/Makefile.am	(revision 827)
+++ lemon/Makefile.am	(revision 755)
@@ -87,8 +87,5 @@
 	lemon/graph_to_eps.h \
 	lemon/grid_graph.h \
-	lemon/hartmann_orlin.h \
-	lemon/howard.h \
 	lemon/hypercube_graph.h \
-	lemon/karp.h \
 	lemon/kary_heap.h \
 	lemon/kruskal.h \
@@ -114,5 +111,4 @@
 	lemon/smart_graph.h \
 	lemon/soplex.h \
-	lemon/static_graph.h \
 	lemon/suurballe.h \
 	lemon/time_measure.h \
Index: lemon/adaptors.h
===================================================================
--- lemon/adaptors.h	(revision 834)
+++ lemon/adaptors.h	(revision 703)
@@ -361,7 +361,4 @@
   /// parameter is set to be \c const.
   ///
-  /// This class provides item counting in the same time as the adapted
-  /// digraph structure.
-  ///
   /// \tparam DGR The type of the adapted digraph.
   /// It must conform to the \ref concepts::Digraph "Digraph" concept.
@@ -722,6 +719,4 @@
   /// by adding or removing nodes or arcs, unless the \c GR template
   /// parameter is set to be \c const.
-  ///
-  /// This class provides only linear time counting for nodes and arcs.
   ///
   /// \tparam DGR The type of the adapted digraph.
@@ -1320,6 +1315,4 @@
   /// parameter is set to be \c const.
   ///
-  /// This class provides only linear time counting for nodes, edges and arcs.
-  ///
   /// \tparam GR The type of the adapted graph.
   /// It must conform to the \ref concepts::Graph "Graph" concept.
@@ -1478,6 +1471,4 @@
   /// by adding or removing nodes or arcs/edges, unless the \c GR template
   /// parameter is set to be \c const.
-  ///
-  /// This class provides only linear time item counting.
   ///
   /// \tparam GR The type of the adapted digraph or graph.
@@ -1629,6 +1620,4 @@
   /// parameter is set to be \c const.
   ///
-  /// This class provides only linear time counting for nodes and arcs.
-  ///
   /// \tparam DGR The type of the adapted digraph.
   /// It must conform to the \ref concepts::Digraph "Digraph" concept.
@@ -1740,6 +1729,4 @@
   /// by adding or removing nodes or edges, unless the \c GR template
   /// parameter is set to be \c const.
-  ///
-  /// This class provides only linear time counting for nodes, edges and arcs.
   ///
   /// \tparam GR The type of the adapted graph.
@@ -2246,7 +2233,4 @@
   /// parameter is set to be \c const.
   ///
-  /// This class provides item counting in the same time as the adapted
-  /// digraph structure.
-  ///
   /// \tparam DGR The type of the adapted digraph.
   /// It must conform to the \ref concepts::Digraph "Digraph" concept.
@@ -2551,7 +2535,4 @@
   /// by adding or removing nodes or arcs, unless the \c GR template
   /// parameter is set to be \c const.
-  ///
-  /// This class provides item counting in the same time as the adapted
-  /// graph structure.
   ///
   /// \tparam GR The type of the adapted graph.
@@ -2697,6 +2678,4 @@
   /// arcs).
   /// This class conforms to the \ref concepts::Digraph "Digraph" concept.
-  ///
-  /// This class provides only linear time counting for nodes and arcs.
   ///
   /// \tparam DGR The type of the adapted digraph.
@@ -3347,7 +3326,4 @@
   /// in the adaptor.
   ///
-  /// This class provides item counting in the same time as the adapted
-  /// digraph structure.
-  ///
   /// \tparam DGR The type of the adapted digraph.
   /// It must conform to the \ref concepts::Digraph "Digraph" concept.
Index: lemon/bellman_ford.h
===================================================================
--- lemon/bellman_ford.h	(revision 835)
+++ lemon/bellman_ford.h	(revision 833)
@@ -24,5 +24,4 @@
 /// \brief Bellman-Ford algorithm.
 
-#include <lemon/list_graph.h>
 #include <lemon/bits/path_dump.h>
 #include <lemon/core.h>
@@ -777,5 +776,5 @@
     /// length if the algorithm has already found one.
     /// Otherwise it gives back an empty path.
-    lemon::Path<Digraph> negativeCycle() const {
+    lemon::Path<Digraph> negativeCycle() {
       typename Digraph::template NodeMap<int> state(*_gr, -1);
       lemon::Path<Digraph> cycle;
Index: lemon/bfs.h
===================================================================
--- lemon/bfs.h	(revision 835)
+++ lemon/bfs.h	(revision 833)
@@ -702,6 +702,10 @@
     ///Runs the algorithm to visit all nodes in the digraph.
 
-    ///This method runs the %BFS algorithm in order to visit all nodes
-    ///in the digraph.
+    ///This method runs the %BFS algorithm in order to
+    ///compute the shortest path to each node.
+    ///
+    ///The algorithm computes
+    ///- the shortest path tree (forest),
+    ///- the distance of each node from the root(s).
     ///
     ///\note <tt>b.run(s)</tt> is just a shortcut of the following code.
@@ -1043,6 +1047,6 @@
     ///Runs BFS algorithm to visit all nodes in the digraph.
 
-    ///This method runs BFS algorithm in order to visit all nodes
-    ///in the digraph.
+    ///This method runs BFS algorithm in order to compute
+    ///the shortest path to each node.
     void run()
     {
@@ -1692,6 +1696,10 @@
     /// \brief Runs the algorithm to visit all nodes in the digraph.
     ///
-    /// This method runs the %BFS algorithm in order to visit all nodes
-    /// in the digraph.
+    /// This method runs the %BFS algorithm in order to
+    /// compute the shortest path to each node.
+    ///
+    /// The algorithm computes
+    /// - the shortest path tree (forest),
+    /// - the distance of each node from the root(s).
     ///
     /// \note <tt>b.run(s)</tt> is just a shortcut of the following code.
Index: lemon/bits/graph_extender.h
===================================================================
--- lemon/bits/graph_extender.h	(revision 825)
+++ lemon/bits/graph_extender.h	(revision 732)
@@ -57,9 +57,9 @@
     }
 
-    static Node fromId(int id, Node) {
+    Node fromId(int id, Node) const {
       return Parent::nodeFromId(id);
     }
 
-    static Arc fromId(int id, Arc) {
+    Arc fromId(int id, Arc) const {
       return Parent::arcFromId(id);
     }
@@ -356,13 +356,13 @@
     }
 
-    static Node fromId(int id, Node) {
+    Node fromId(int id, Node) const {
       return Parent::nodeFromId(id);
     }
 
-    static Arc fromId(int id, Arc) {
+    Arc fromId(int id, Arc) const {
       return Parent::arcFromId(id);
     }
 
-    static Edge fromId(int id, Edge) {
+    Edge fromId(int id, Edge) const {
       return Parent::edgeFromId(id);
     }
Index: lemon/dfs.h
===================================================================
--- lemon/dfs.h	(revision 835)
+++ lemon/dfs.h	(revision 833)
@@ -634,6 +634,10 @@
     ///Runs the algorithm to visit all nodes in the digraph.
 
-    ///This method runs the %DFS algorithm in order to visit all nodes
-    ///in the digraph.
+    ///This method runs the %DFS algorithm in order to compute the
+    ///%DFS path to each node.
+    ///
+    ///The algorithm computes
+    ///- the %DFS tree (forest),
+    ///- the distance of each node from the root(s) in the %DFS tree.
     ///
     ///\note <tt>d.run()</tt> is just a shortcut of the following code.
@@ -973,6 +977,6 @@
     ///Runs DFS algorithm to visit all nodes in the digraph.
 
-    ///This method runs DFS algorithm in order to visit all nodes
-    ///in the digraph.
+    ///This method runs DFS algorithm in order to compute
+    ///the DFS path to each node.
     void run()
     {
@@ -1575,6 +1579,10 @@
     /// \brief Runs the algorithm to visit all nodes in the digraph.
 
-    /// This method runs the %DFS algorithm in order to visit all nodes
-    /// in the digraph.
+    /// This method runs the %DFS algorithm in order to
+    /// compute the %DFS path to each node.
+    ///
+    /// The algorithm computes
+    /// - the %DFS tree (forest),
+    /// - the distance of each node from the root(s) in the %DFS tree.
     ///
     /// \note <tt>d.run()</tt> is just a shortcut of the following code.
Index: lemon/dijkstra.h
===================================================================
--- lemon/dijkstra.h	(revision 835)
+++ lemon/dijkstra.h	(revision 833)
@@ -207,5 +207,5 @@
 
     ///The type of the arc lengths.
-    typedef typename TR::Value Value;
+    typedef typename TR::LengthMap::Value Value;
     ///The type of the map that stores the arc lengths.
     typedef typename TR::LengthMap LengthMap;
Index: lemon/edge_set.h
===================================================================
--- lemon/edge_set.h	(revision 834)
+++ lemon/edge_set.h	(revision 717)
@@ -256,12 +256,11 @@
   /// all arcs incident to the given node is erased from the arc set.
   ///
-  /// This class fully conforms to the \ref concepts::Digraph
-  /// "Digraph" concept.
-  /// It provides only linear time counting for nodes and arcs.
-  ///
   /// \param GR The type of the graph which shares its node set with
   /// this class. Its interface must conform to the
   /// \ref concepts::Digraph "Digraph" or \ref concepts::Graph "Graph"
   /// concept.
+  ///
+  /// This class fully conforms to the \ref concepts::Digraph
+  /// "Digraph" concept.
   template <typename GR>
   class ListArcSet : public ArcSetExtender<ListArcSetBase<GR> > {
@@ -687,11 +686,10 @@
   /// incident to the given node is erased from the arc set.
   ///
-  /// This class fully conforms to the \ref concepts::Graph "Graph"
-  /// concept.
-  /// It provides only linear time counting for nodes, edges and arcs.
-  ///
   /// \param GR The type of the graph which shares its node set
   /// with this class. Its interface must conform to the
   /// \ref concepts::Digraph "Digraph" or \ref concepts::Graph "Graph"
+  /// concept.
+  ///
+  /// This class fully conforms to the \ref concepts::Graph "Graph"
   /// concept.
   template <typename GR>
@@ -870,5 +868,5 @@
     }
 
-    static void next(Arc& arc) {
+    void next(Arc& arc) const {
       --arc.id;
     }
@@ -957,12 +955,11 @@
   /// arcs. Therefore the arcs cannot be erased from the arc sets.
   ///
-  /// This class fully conforms to the \ref concepts::Digraph "Digraph"
-  /// concept.
-  /// It provides only linear time counting for nodes and arcs.
-  ///
   /// \warning If a node is erased from the underlying graph and this
   /// node is the source or target of one arc in the arc set, then
   /// the arc set is invalidated, and it cannot be used anymore. The
   /// validity can be checked with the \c valid() member function.
+  ///
+  /// This class fully conforms to the \ref concepts::Digraph
+  /// "Digraph" concept.
   template <typename GR>
   class SmartArcSet : public ArcSetExtender<SmartArcSetBase<GR> > {
@@ -1177,5 +1174,5 @@
     }
 
-    static void next(Arc& arc) {
+    void next(Arc& arc) const {
       --arc.id;
     }
@@ -1185,5 +1182,5 @@
     }
 
-    static void next(Edge& arc) {
+    void next(Edge& arc) const {
       --arc.id;
     }
@@ -1308,12 +1305,11 @@
   /// edges cannot be erased from the edge sets.
   ///
-  /// This class fully conforms to the \ref concepts::Graph "Graph"
-  /// concept.
-  /// It provides only linear time counting for nodes, edges and arcs.
-  ///
   /// \warning If a node is erased from the underlying graph and this
   /// node is incident to one edge in the edge set, then the edge set
   /// is invalidated, and it cannot be used anymore. The validity can
   /// be checked with the \c valid() member function.
+  ///
+  /// This class fully conforms to the \ref concepts::Graph
+  /// "Graph" concept.
   template <typename GR>
   class SmartEdgeSet : public EdgeSetExtender<SmartEdgeSetBase<GR> > {
Index: lemon/full_graph.h
===================================================================
--- lemon/full_graph.h	(revision 834)
+++ lemon/full_graph.h	(revision 782)
@@ -52,5 +52,5 @@
 
     Node operator()(int ix) const { return Node(ix); }
-    static int index(const Node& node) { return node._id; }
+    int index(const Node& node) const { return node._id; }
 
     Arc arc(const Node& s, const Node& t) const {
@@ -163,6 +163,4 @@
   /// only in the concept class.
   ///
-  /// This class provides constant time counting for nodes and arcs.
-  ///
   /// \note FullDigraph and FullGraph classes are very similar,
   /// but there are two differences. While this class conforms only
@@ -207,5 +205,4 @@
     /// completely static, the nodes can be indexed with integers from
     /// the range <tt>[0..nodeNum()-1]</tt>.
-    /// The index of a node is the same as its ID.
     /// \sa index()
     Node operator()(int ix) const { return Parent::operator()(ix); }
@@ -216,7 +213,6 @@
     /// completely static, the nodes can be indexed with integers from
     /// the range <tt>[0..nodeNum()-1]</tt>.
-    /// The index of a node is the same as its ID.
     /// \sa operator()()
-    static int index(const Node& node) { return Parent::index(node); }
+    int index(Node node) const { return Parent::index(node); }
 
     /// \brief Returns the arc connecting the given nodes.
@@ -292,5 +288,5 @@
 
     Node operator()(int ix) const { return Node(ix); }
-    static int index(const Node& node) { return node._id; }
+    int index(const Node& node) const { return node._id; }
 
     Edge edge(const Node& u, const Node& v) const {
@@ -540,6 +536,4 @@
   /// only in the concept class.
   ///
-  /// This class provides constant time counting for nodes, edges and arcs.
-  ///
   /// \note FullDigraph and FullGraph classes are very similar,
   /// but there are two differences. While FullDigraph
@@ -586,5 +580,4 @@
     /// completely static, the nodes can be indexed with integers from
     /// the range <tt>[0..nodeNum()-1]</tt>.
-    /// The index of a node is the same as its ID.
     /// \sa index()
     Node operator()(int ix) const { return Parent::operator()(ix); }
@@ -595,7 +588,6 @@
     /// completely static, the nodes can be indexed with integers from
     /// the range <tt>[0..nodeNum()-1]</tt>.
-    /// The index of a node is the same as its ID.
     /// \sa operator()()
-    static int index(const Node& node) { return Parent::index(node); }
+    int index(Node node) const { return Parent::index(node); }
 
     /// \brief Returns the arc connecting the given nodes.
Index: lemon/grid_graph.h
===================================================================
--- lemon/grid_graph.h	(revision 834)
+++ lemon/grid_graph.h	(revision 782)
@@ -504,6 +504,4 @@
   /// Most of its member functions and nested classes are documented
   /// only in the concept class.
-  ///
-  /// This class provides constant time counting for nodes, edges and arcs.
   class GridGraph : public ExtendedGridGraphBase {
     typedef ExtendedGridGraphBase Parent;
Index: mon/hartmann_orlin.h
===================================================================
--- lemon/hartmann_orlin.h	(revision 819)
+++ 	(revision )
@@ -1,640 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_HARTMANN_ORLIN_H
-#define LEMON_HARTMANN_ORLIN_H
-
-/// \ingroup min_mean_cycle
-///
-/// \file
-/// \brief Hartmann-Orlin's algorithm for finding a minimum mean cycle.
-
-#include <vector>
-#include <limits>
-#include <lemon/core.h>
-#include <lemon/path.h>
-#include <lemon/tolerance.h>
-#include <lemon/connectivity.h>
-
-namespace lemon {
-
-  /// \brief Default traits class of HartmannOrlin algorithm.
-  ///
-  /// Default traits class of HartmannOrlin algorithm.
-  /// \tparam GR The type of the digraph.
-  /// \tparam LEN The type of the length map.
-  /// It must conform to the \ref concepts::Rea_data "Rea_data" concept.
-#ifdef DOXYGEN
-  template <typename GR, typename LEN>
-#else
-  template <typename GR, typename LEN,
-    bool integer = std::numeric_limits<typename LEN::Value>::is_integer>
-#endif
-  struct HartmannOrlinDefaultTraits
-  {
-    /// The type of the digraph
-    typedef GR Digraph;
-    /// The type of the length map
-    typedef LEN LengthMap;
-    /// The type of the arc lengths
-    typedef typename LengthMap::Value Value;
-
-    /// \brief The large value type used for internal computations
-    ///
-    /// The large value type used for internal computations.
-    /// It is \c long \c long if the \c Value type is integer,
-    /// otherwise it is \c double.
-    /// \c Value must be convertible to \c LargeValue.
-    typedef double LargeValue;
-
-    /// The tolerance type used for internal computations
-    typedef lemon::Tolerance<LargeValue> Tolerance;
-
-    /// \brief The path type of the found cycles
-    ///
-    /// The path type of the found cycles.
-    /// It must conform to the \ref lemon::concepts::Path "Path" concept
-    /// and it must have an \c addFront() function.
-    typedef lemon::Path<Digraph> Path;
-  };
-
-  // Default traits class for integer value types
-  template <typename GR, typename LEN>
-  struct HartmannOrlinDefaultTraits<GR, LEN, true>
-  {
-    typedef GR Digraph;
-    typedef LEN LengthMap;
-    typedef typename LengthMap::Value Value;
-#ifdef LEMON_HAVE_LONG_LONG
-    typedef long long LargeValue;
-#else
-    typedef long LargeValue;
-#endif
-    typedef lemon::Tolerance<LargeValue> Tolerance;
-    typedef lemon::Path<Digraph> Path;
-  };
-
-
-  /// \addtogroup min_mean_cycle
-  /// @{
-
-  /// \brief Implementation of the Hartmann-Orlin algorithm for finding
-  /// a minimum mean cycle.
-  ///
-  /// This class implements the Hartmann-Orlin algorithm for finding
-  /// a directed cycle of minimum mean length (cost) in a digraph
-  /// \ref amo93networkflows, \ref dasdan98minmeancycle.
-  /// It is an improved version of \ref Karp "Karp"'s original algorithm,
-  /// it applies an efficient early termination scheme.
-  /// It runs in time O(ne) and uses space O(n<sup>2</sup>+e).
-  ///
-  /// \tparam GR The type of the digraph the algorithm runs on.
-  /// \tparam LEN The type of the length map. The default
-  /// map type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>".
-#ifdef DOXYGEN
-  template <typename GR, typename LEN, typename TR>
-#else
-  template < typename GR,
-             typename LEN = typename GR::template ArcMap<int>,
-             typename TR = HartmannOrlinDefaultTraits<GR, LEN> >
-#endif
-  class HartmannOrlin
-  {
-  public:
-
-    /// The type of the digraph
-    typedef typename TR::Digraph Digraph;
-    /// The type of the length map
-    typedef typename TR::LengthMap LengthMap;
-    /// The type of the arc lengths
-    typedef typename TR::Value Value;
-
-    /// \brief The large value type
-    ///
-    /// The large value type used for internal computations.
-    /// Using the \ref HartmannOrlinDefaultTraits "default traits class",
-    /// it is \c long \c long if the \c Value type is integer,
-    /// otherwise it is \c double.
-    typedef typename TR::LargeValue LargeValue;
-
-    /// The tolerance type
-    typedef typename TR::Tolerance Tolerance;
-
-    /// \brief The path type of the found cycles
-    ///
-    /// The path type of the found cycles.
-    /// Using the \ref HartmannOrlinDefaultTraits "default traits class",
-    /// it is \ref lemon::Path "Path<Digraph>".
-    typedef typename TR::Path Path;
-
-    /// The \ref HartmannOrlinDefaultTraits "traits class" of the algorithm
-    typedef TR Traits;
-
-  private:
-
-    TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-    // Data sturcture for path data
-    struct PathData
-    {
-      LargeValue dist;
-      Arc pred;
-      PathData(LargeValue d, Arc p = INVALID) :
-        dist(d), pred(p) {}
-    };
-
-    typedef typename Digraph::template NodeMap<std::vector<PathData> >
-      PathDataNodeMap;
-
-  private:
-
-    // The digraph the algorithm runs on
-    const Digraph &_gr;
-    // The length of the arcs
-    const LengthMap &_length;
-
-    // Data for storing the strongly connected components
-    int _comp_num;
-    typename Digraph::template NodeMap<int> _comp;
-    std::vector<std::vector<Node> > _comp_nodes;
-    std::vector<Node>* _nodes;
-    typename Digraph::template NodeMap<std::vector<Arc> > _out_arcs;
-
-    // Data for the found cycles
-    bool _curr_found, _best_found;
-    LargeValue _curr_length, _best_length;
-    int _curr_size, _best_size;
-    Node _curr_node, _best_node;
-    int _curr_level, _best_level;
-
-    Path *_cycle_path;
-    bool _local_path;
-
-    // Node map for storing path data
-    PathDataNodeMap _data;
-    // The processed nodes in the last round
-    std::vector<Node> _process;
-
-    Tolerance _tolerance;
-
-    // Infinite constant
-    const LargeValue INF;
-
-  public:
-
-    /// \name Named Template Parameters
-    /// @{
-
-    template <typename T>
-    struct SetLargeValueTraits : public Traits {
-      typedef T LargeValue;
-      typedef lemon::Tolerance<T> Tolerance;
-    };
-
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    /// \c LargeValue type.
-    ///
-    /// \ref named-templ-param "Named parameter" for setting \c LargeValue
-    /// type. It is used for internal computations in the algorithm.
-    template <typename T>
-    struct SetLargeValue
-      : public HartmannOrlin<GR, LEN, SetLargeValueTraits<T> > {
-      typedef HartmannOrlin<GR, LEN, SetLargeValueTraits<T> > Create;
-    };
-
-    template <typename T>
-    struct SetPathTraits : public Traits {
-      typedef T Path;
-    };
-
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    /// \c %Path type.
-    ///
-    /// \ref named-templ-param "Named parameter" for setting the \c %Path
-    /// type of the found cycles.
-    /// It must conform to the \ref lemon::concepts::Path "Path" concept
-    /// and it must have an \c addFront() function.
-    template <typename T>
-    struct SetPath
-      : public HartmannOrlin<GR, LEN, SetPathTraits<T> > {
-      typedef HartmannOrlin<GR, LEN, SetPathTraits<T> > Create;
-    };
-
-    /// @}
-
-  public:
-
-    /// \brief Constructor.
-    ///
-    /// The constructor of the class.
-    ///
-    /// \param digraph The digraph the algorithm runs on.
-    /// \param length The lengths (costs) of the arcs.
-    HartmannOrlin( const Digraph &digraph,
-                   const LengthMap &length ) :
-      _gr(digraph), _length(length), _comp(digraph), _out_arcs(digraph),
-      _best_found(false), _best_length(0), _best_size(1),
-      _cycle_path(NULL), _local_path(false), _data(digraph),
-      INF(std::numeric_limits<LargeValue>::has_infinity ?
-          std::numeric_limits<LargeValue>::infinity() :
-          std::numeric_limits<LargeValue>::max())
-    {}
-
-    /// Destructor.
-    ~HartmannOrlin() {
-      if (_local_path) delete _cycle_path;
-    }
-
-    /// \brief Set the path structure for storing the found cycle.
-    ///
-    /// This function sets an external path structure for storing the
-    /// found cycle.
-    ///
-    /// If you don't call this function before calling \ref run() or
-    /// \ref findMinMean(), it will allocate a local \ref Path "path"
-    /// structure. The destuctor deallocates this automatically
-    /// allocated object, of course.
-    ///
-    /// \note The algorithm calls only the \ref lemon::Path::addFront()
-    /// "addFront()" function of the given path structure.
-    ///
-    /// \return <tt>(*this)</tt>
-    HartmannOrlin& cycle(Path &path) {
-      if (_local_path) {
-        delete _cycle_path;
-        _local_path = false;
-      }
-      _cycle_path = &path;
-      return *this;
-    }
-
-    /// \brief Set the tolerance used by the algorithm.
-    ///
-    /// This function sets the tolerance object used by the algorithm.
-    ///
-    /// \return <tt>(*this)</tt>
-    HartmannOrlin& tolerance(const Tolerance& tolerance) {
-      _tolerance = tolerance;
-      return *this;
-    }
-
-    /// \brief Return a const reference to the tolerance.
-    ///
-    /// This function returns a const reference to the tolerance object
-    /// used by the algorithm.
-    const Tolerance& tolerance() const {
-      return _tolerance;
-    }
-
-    /// \name Execution control
-    /// The simplest way to execute the algorithm is to call the \ref run()
-    /// function.\n
-    /// If you only need the minimum mean length, you may call
-    /// \ref findMinMean().
-
-    /// @{
-
-    /// \brief Run the algorithm.
-    ///
-    /// This function runs the algorithm.
-    /// It can be called more than once (e.g. if the underlying digraph
-    /// and/or the arc lengths have been modified).
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    ///
-    /// \note <tt>mmc.run()</tt> is just a shortcut of the following code.
-    /// \code
-    ///   return mmc.findMinMean() && mmc.findCycle();
-    /// \endcode
-    bool run() {
-      return findMinMean() && findCycle();
-    }
-
-    /// \brief Find the minimum cycle mean.
-    ///
-    /// This function finds the minimum mean length of the directed
-    /// cycles in the digraph.
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    bool findMinMean() {
-      // Initialization and find strongly connected components
-      init();
-      findComponents();
-      
-      // Find the minimum cycle mean in the components
-      for (int comp = 0; comp < _comp_num; ++comp) {
-        if (!initComponent(comp)) continue;
-        processRounds();
-        
-        // Update the best cycle (global minimum mean cycle)
-        if ( _curr_found && (!_best_found || 
-             _curr_length * _best_size < _best_length * _curr_size) ) {
-          _best_found = true;
-          _best_length = _curr_length;
-          _best_size = _curr_size;
-          _best_node = _curr_node;
-          _best_level = _curr_level;
-        }
-      }
-      return _best_found;
-    }
-
-    /// \brief Find a minimum mean directed cycle.
-    ///
-    /// This function finds a directed cycle of minimum mean length
-    /// in the digraph using the data computed by findMinMean().
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    ///
-    /// \pre \ref findMinMean() must be called before using this function.
-    bool findCycle() {
-      if (!_best_found) return false;
-      IntNodeMap reached(_gr, -1);
-      int r = _best_level + 1;
-      Node u = _best_node;
-      while (reached[u] < 0) {
-        reached[u] = --r;
-        u = _gr.source(_data[u][r].pred);
-      }
-      r = reached[u];
-      Arc e = _data[u][r].pred;
-      _cycle_path->addFront(e);
-      _best_length = _length[e];
-      _best_size = 1;
-      Node v;
-      while ((v = _gr.source(e)) != u) {
-        e = _data[v][--r].pred;
-        _cycle_path->addFront(e);
-        _best_length += _length[e];
-        ++_best_size;
-      }
-      return true;
-    }
-
-    /// @}
-
-    /// \name Query Functions
-    /// The results of the algorithm can be obtained using these
-    /// functions.\n
-    /// The algorithm should be executed before using them.
-
-    /// @{
-
-    /// \brief Return the total length of the found cycle.
-    ///
-    /// This function returns the total length of the found cycle.
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    LargeValue cycleLength() const {
-      return _best_length;
-    }
-
-    /// \brief Return the number of arcs on the found cycle.
-    ///
-    /// This function returns the number of arcs on the found cycle.
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    int cycleArcNum() const {
-      return _best_size;
-    }
-
-    /// \brief Return the mean length of the found cycle.
-    ///
-    /// This function returns the mean length of the found cycle.
-    ///
-    /// \note <tt>alg.cycleMean()</tt> is just a shortcut of the
-    /// following code.
-    /// \code
-    ///   return static_cast<double>(alg.cycleLength()) / alg.cycleArcNum();
-    /// \endcode
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    double cycleMean() const {
-      return static_cast<double>(_best_length) / _best_size;
-    }
-
-    /// \brief Return the found cycle.
-    ///
-    /// This function returns a const reference to the path structure
-    /// storing the found cycle.
-    ///
-    /// \pre \ref run() or \ref findCycle() must be called before using
-    /// this function.
-    const Path& cycle() const {
-      return *_cycle_path;
-    }
-
-    ///@}
-
-  private:
-
-    // Initialization
-    void init() {
-      if (!_cycle_path) {
-        _local_path = true;
-        _cycle_path = new Path;
-      }
-      _cycle_path->clear();
-      _best_found = false;
-      _best_length = 0;
-      _best_size = 1;
-      _cycle_path->clear();
-      for (NodeIt u(_gr); u != INVALID; ++u)
-        _data[u].clear();
-    }
-
-    // Find strongly connected components and initialize _comp_nodes
-    // and _out_arcs
-    void findComponents() {
-      _comp_num = stronglyConnectedComponents(_gr, _comp);
-      _comp_nodes.resize(_comp_num);
-      if (_comp_num == 1) {
-        _comp_nodes[0].clear();
-        for (NodeIt n(_gr); n != INVALID; ++n) {
-          _comp_nodes[0].push_back(n);
-          _out_arcs[n].clear();
-          for (OutArcIt a(_gr, n); a != INVALID; ++a) {
-            _out_arcs[n].push_back(a);
-          }
-        }
-      } else {
-        for (int i = 0; i < _comp_num; ++i)
-          _comp_nodes[i].clear();
-        for (NodeIt n(_gr); n != INVALID; ++n) {
-          int k = _comp[n];
-          _comp_nodes[k].push_back(n);
-          _out_arcs[n].clear();
-          for (OutArcIt a(_gr, n); a != INVALID; ++a) {
-            if (_comp[_gr.target(a)] == k) _out_arcs[n].push_back(a);
-          }
-        }
-      }
-    }
-
-    // Initialize path data for the current component
-    bool initComponent(int comp) {
-      _nodes = &(_comp_nodes[comp]);
-      int n = _nodes->size();
-      if (n < 1 || (n == 1 && _out_arcs[(*_nodes)[0]].size() == 0)) {
-        return false;
-      }      
-      for (int i = 0; i < n; ++i) {
-        _data[(*_nodes)[i]].resize(n + 1, PathData(INF));
-      }
-      return true;
-    }
-
-    // Process all rounds of computing path data for the current component.
-    // _data[v][k] is the length of a shortest directed walk from the root
-    // node to node v containing exactly k arcs.
-    void processRounds() {
-      Node start = (*_nodes)[0];
-      _data[start][0] = PathData(0);
-      _process.clear();
-      _process.push_back(start);
-
-      int k, n = _nodes->size();
-      int next_check = 4;
-      bool terminate = false;
-      for (k = 1; k <= n && int(_process.size()) < n && !terminate; ++k) {
-        processNextBuildRound(k);
-        if (k == next_check || k == n) {
-          terminate = checkTermination(k);
-          next_check = next_check * 3 / 2;
-        }
-      }
-      for ( ; k <= n && !terminate; ++k) {
-        processNextFullRound(k);
-        if (k == next_check || k == n) {
-          terminate = checkTermination(k);
-          next_check = next_check * 3 / 2;
-        }
-      }
-    }
-
-    // Process one round and rebuild _process
-    void processNextBuildRound(int k) {
-      std::vector<Node> next;
-      Node u, v;
-      Arc e;
-      LargeValue d;
-      for (int i = 0; i < int(_process.size()); ++i) {
-        u = _process[i];
-        for (int j = 0; j < int(_out_arcs[u].size()); ++j) {
-          e = _out_arcs[u][j];
-          v = _gr.target(e);
-          d = _data[u][k-1].dist + _length[e];
-          if (_tolerance.less(d, _data[v][k].dist)) {
-            if (_data[v][k].dist == INF) next.push_back(v);
-            _data[v][k] = PathData(d, e);
-          }
-        }
-      }
-      _process.swap(next);
-    }
-
-    // Process one round using _nodes instead of _process
-    void processNextFullRound(int k) {
-      Node u, v;
-      Arc e;
-      LargeValue d;
-      for (int i = 0; i < int(_nodes->size()); ++i) {
-        u = (*_nodes)[i];
-        for (int j = 0; j < int(_out_arcs[u].size()); ++j) {
-          e = _out_arcs[u][j];
-          v = _gr.target(e);
-          d = _data[u][k-1].dist + _length[e];
-          if (_tolerance.less(d, _data[v][k].dist)) {
-            _data[v][k] = PathData(d, e);
-          }
-        }
-      }
-    }
-    
-    // Check early termination
-    bool checkTermination(int k) {
-      typedef std::pair<int, int> Pair;
-      typename GR::template NodeMap<Pair> level(_gr, Pair(-1, 0));
-      typename GR::template NodeMap<LargeValue> pi(_gr);
-      int n = _nodes->size();
-      LargeValue length;
-      int size;
-      Node u;
-      
-      // Search for cycles that are already found
-      _curr_found = false;
-      for (int i = 0; i < n; ++i) {
-        u = (*_nodes)[i];
-        if (_data[u][k].dist == INF) continue;
-        for (int j = k; j >= 0; --j) {
-          if (level[u].first == i && level[u].second > 0) {
-            // A cycle is found
-            length = _data[u][level[u].second].dist - _data[u][j].dist;
-            size = level[u].second - j;
-            if (!_curr_found || length * _curr_size < _curr_length * size) {
-              _curr_length = length;
-              _curr_size = size;
-              _curr_node = u;
-              _curr_level = level[u].second;
-              _curr_found = true;
-            }
-          }
-          level[u] = Pair(i, j);
-          u = _gr.source(_data[u][j].pred);
-        }
-      }
-
-      // If at least one cycle is found, check the optimality condition
-      LargeValue d;
-      if (_curr_found && k < n) {
-        // Find node potentials
-        for (int i = 0; i < n; ++i) {
-          u = (*_nodes)[i];
-          pi[u] = INF;
-          for (int j = 0; j <= k; ++j) {
-            if (_data[u][j].dist < INF) {
-              d = _data[u][j].dist * _curr_size - j * _curr_length;
-              if (_tolerance.less(d, pi[u])) pi[u] = d;
-            }
-          }
-        }
-
-        // Check the optimality condition for all arcs
-        bool done = true;
-        for (ArcIt a(_gr); a != INVALID; ++a) {
-          if (_tolerance.less(_length[a] * _curr_size - _curr_length,
-                              pi[_gr.target(a)] - pi[_gr.source(a)]) ) {
-            done = false;
-            break;
-          }
-        }
-        return done;
-      }
-      return (k == n);
-    }
-
-  }; //class HartmannOrlin
-
-  ///@}
-
-} //namespace lemon
-
-#endif //LEMON_HARTMANN_ORLIN_H
Index: mon/howard.h
===================================================================
--- lemon/howard.h	(revision 818)
+++ 	(revision )
@@ -1,597 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_HOWARD_H
-#define LEMON_HOWARD_H
-
-/// \ingroup min_mean_cycle
-///
-/// \file
-/// \brief Howard's algorithm for finding a minimum mean cycle.
-
-#include <vector>
-#include <limits>
-#include <lemon/core.h>
-#include <lemon/path.h>
-#include <lemon/tolerance.h>
-#include <lemon/connectivity.h>
-
-namespace lemon {
-
-  /// \brief Default traits class of Howard class.
-  ///
-  /// Default traits class of Howard class.
-  /// \tparam GR The type of the digraph.
-  /// \tparam LEN The type of the length map.
-  /// It must conform to the \ref concepts::ReadMap "ReadMap" concept.
-#ifdef DOXYGEN
-  template <typename GR, typename LEN>
-#else
-  template <typename GR, typename LEN,
-    bool integer = std::numeric_limits<typename LEN::Value>::is_integer>
-#endif
-  struct HowardDefaultTraits
-  {
-    /// The type of the digraph
-    typedef GR Digraph;
-    /// The type of the length map
-    typedef LEN LengthMap;
-    /// The type of the arc lengths
-    typedef typename LengthMap::Value Value;
-
-    /// \brief The large value type used for internal computations
-    ///
-    /// The large value type used for internal computations.
-    /// It is \c long \c long if the \c Value type is integer,
-    /// otherwise it is \c double.
-    /// \c Value must be convertible to \c LargeValue.
-    typedef double LargeValue;
-
-    /// The tolerance type used for internal computations
-    typedef lemon::Tolerance<LargeValue> Tolerance;
-
-    /// \brief The path type of the found cycles
-    ///
-    /// The path type of the found cycles.
-    /// It must conform to the \ref lemon::concepts::Path "Path" concept
-    /// and it must have an \c addBack() function.
-    typedef lemon::Path<Digraph> Path;
-  };
-
-  // Default traits class for integer value types
-  template <typename GR, typename LEN>
-  struct HowardDefaultTraits<GR, LEN, true>
-  {
-    typedef GR Digraph;
-    typedef LEN LengthMap;
-    typedef typename LengthMap::Value Value;
-#ifdef LEMON_HAVE_LONG_LONG
-    typedef long long LargeValue;
-#else
-    typedef long LargeValue;
-#endif
-    typedef lemon::Tolerance<LargeValue> Tolerance;
-    typedef lemon::Path<Digraph> Path;
-  };
-
-
-  /// \addtogroup min_mean_cycle
-  /// @{
-
-  /// \brief Implementation of Howard's algorithm for finding a minimum
-  /// mean cycle.
-  ///
-  /// This class implements Howard's policy iteration algorithm for finding
-  /// a directed cycle of minimum mean length (cost) in a digraph
-  /// \ref amo93networkflows, \ref dasdan98minmeancycle.
-  /// This class provides the most efficient algorithm for the
-  /// minimum mean cycle problem, though the best known theoretical
-  /// bound on its running time is exponential.
-  ///
-  /// \tparam GR The type of the digraph the algorithm runs on.
-  /// \tparam LEN The type of the length map. The default
-  /// map type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>".
-#ifdef DOXYGEN
-  template <typename GR, typename LEN, typename TR>
-#else
-  template < typename GR,
-             typename LEN = typename GR::template ArcMap<int>,
-             typename TR = HowardDefaultTraits<GR, LEN> >
-#endif
-  class Howard
-  {
-  public:
-  
-    /// The type of the digraph
-    typedef typename TR::Digraph Digraph;
-    /// The type of the length map
-    typedef typename TR::LengthMap LengthMap;
-    /// The type of the arc lengths
-    typedef typename TR::Value Value;
-
-    /// \brief The large value type
-    ///
-    /// The large value type used for internal computations.
-    /// Using the \ref HowardDefaultTraits "default traits class",
-    /// it is \c long \c long if the \c Value type is integer,
-    /// otherwise it is \c double.
-    typedef typename TR::LargeValue LargeValue;
-
-    /// The tolerance type
-    typedef typename TR::Tolerance Tolerance;
-
-    /// \brief The path type of the found cycles
-    ///
-    /// The path type of the found cycles.
-    /// Using the \ref HowardDefaultTraits "default traits class",
-    /// it is \ref lemon::Path "Path<Digraph>".
-    typedef typename TR::Path Path;
-
-    /// The \ref HowardDefaultTraits "traits class" of the algorithm
-    typedef TR Traits;
-
-  private:
-
-    TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-  
-    // The digraph the algorithm runs on
-    const Digraph &_gr;
-    // The length of the arcs
-    const LengthMap &_length;
-
-    // Data for the found cycles
-    bool _curr_found, _best_found;
-    LargeValue _curr_length, _best_length;
-    int _curr_size, _best_size;
-    Node _curr_node, _best_node;
-
-    Path *_cycle_path;
-    bool _local_path;
-
-    // Internal data used by the algorithm
-    typename Digraph::template NodeMap<Arc> _policy;
-    typename Digraph::template NodeMap<bool> _reached;
-    typename Digraph::template NodeMap<int> _level;
-    typename Digraph::template NodeMap<LargeValue> _dist;
-
-    // Data for storing the strongly connected components
-    int _comp_num;
-    typename Digraph::template NodeMap<int> _comp;
-    std::vector<std::vector<Node> > _comp_nodes;
-    std::vector<Node>* _nodes;
-    typename Digraph::template NodeMap<std::vector<Arc> > _in_arcs;
-    
-    // Queue used for BFS search
-    std::vector<Node> _queue;
-    int _qfront, _qback;
-
-    Tolerance _tolerance;
-  
-    // Infinite constant
-    const LargeValue INF;
-
-  public:
-  
-    /// \name Named Template Parameters
-    /// @{
-
-    template <typename T>
-    struct SetLargeValueTraits : public Traits {
-      typedef T LargeValue;
-      typedef lemon::Tolerance<T> Tolerance;
-    };
-
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    /// \c LargeValue type.
-    ///
-    /// \ref named-templ-param "Named parameter" for setting \c LargeValue
-    /// type. It is used for internal computations in the algorithm.
-    template <typename T>
-    struct SetLargeValue
-      : public Howard<GR, LEN, SetLargeValueTraits<T> > {
-      typedef Howard<GR, LEN, SetLargeValueTraits<T> > Create;
-    };
-
-    template <typename T>
-    struct SetPathTraits : public Traits {
-      typedef T Path;
-    };
-
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    /// \c %Path type.
-    ///
-    /// \ref named-templ-param "Named parameter" for setting the \c %Path
-    /// type of the found cycles.
-    /// It must conform to the \ref lemon::concepts::Path "Path" concept
-    /// and it must have an \c addBack() function.
-    template <typename T>
-    struct SetPath
-      : public Howard<GR, LEN, SetPathTraits<T> > {
-      typedef Howard<GR, LEN, SetPathTraits<T> > Create;
-    };
-    
-    /// @}
-
-  public:
-
-    /// \brief Constructor.
-    ///
-    /// The constructor of the class.
-    ///
-    /// \param digraph The digraph the algorithm runs on.
-    /// \param length The lengths (costs) of the arcs.
-    Howard( const Digraph &digraph,
-            const LengthMap &length ) :
-      _gr(digraph), _length(length), _best_found(false),
-      _best_length(0), _best_size(1), _cycle_path(NULL), _local_path(false),
-      _policy(digraph), _reached(digraph), _level(digraph), _dist(digraph),
-      _comp(digraph), _in_arcs(digraph),
-      INF(std::numeric_limits<LargeValue>::has_infinity ?
-          std::numeric_limits<LargeValue>::infinity() :
-          std::numeric_limits<LargeValue>::max())
-    {}
-
-    /// Destructor.
-    ~Howard() {
-      if (_local_path) delete _cycle_path;
-    }
-
-    /// \brief Set the path structure for storing the found cycle.
-    ///
-    /// This function sets an external path structure for storing the
-    /// found cycle.
-    ///
-    /// If you don't call this function before calling \ref run() or
-    /// \ref findMinMean(), it will allocate a local \ref Path "path"
-    /// structure. The destuctor deallocates this automatically
-    /// allocated object, of course.
-    ///
-    /// \note The algorithm calls only the \ref lemon::Path::addBack()
-    /// "addBack()" function of the given path structure.
-    ///
-    /// \return <tt>(*this)</tt>
-    Howard& cycle(Path &path) {
-      if (_local_path) {
-        delete _cycle_path;
-        _local_path = false;
-      }
-      _cycle_path = &path;
-      return *this;
-    }
-
-    /// \brief Set the tolerance used by the algorithm.
-    ///
-    /// This function sets the tolerance object used by the algorithm.
-    ///
-    /// \return <tt>(*this)</tt>
-    Howard& tolerance(const Tolerance& tolerance) {
-      _tolerance = tolerance;
-      return *this;
-    }
-
-    /// \brief Return a const reference to the tolerance.
-    ///
-    /// This function returns a const reference to the tolerance object
-    /// used by the algorithm.
-    const Tolerance& tolerance() const {
-      return _tolerance;
-    }
-
-    /// \name Execution control
-    /// The simplest way to execute the algorithm is to call the \ref run()
-    /// function.\n
-    /// If you only need the minimum mean length, you may call
-    /// \ref findMinMean().
-
-    /// @{
-
-    /// \brief Run the algorithm.
-    ///
-    /// This function runs the algorithm.
-    /// It can be called more than once (e.g. if the underlying digraph
-    /// and/or the arc lengths have been modified).
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    ///
-    /// \note <tt>mmc.run()</tt> is just a shortcut of the following code.
-    /// \code
-    ///   return mmc.findMinMean() && mmc.findCycle();
-    /// \endcode
-    bool run() {
-      return findMinMean() && findCycle();
-    }
-
-    /// \brief Find the minimum cycle mean.
-    ///
-    /// This function finds the minimum mean length of the directed
-    /// cycles in the digraph.
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    bool findMinMean() {
-      // Initialize and find strongly connected components
-      init();
-      findComponents();
-      
-      // Find the minimum cycle mean in the components
-      for (int comp = 0; comp < _comp_num; ++comp) {
-        // Find the minimum mean cycle in the current component
-        if (!buildPolicyGraph(comp)) continue;
-        while (true) {
-          findPolicyCycle();
-          if (!computeNodeDistances()) break;
-        }
-        // Update the best cycle (global minimum mean cycle)
-        if ( _curr_found && (!_best_found ||
-             _curr_length * _best_size < _best_length * _curr_size) ) {
-          _best_found = true;
-          _best_length = _curr_length;
-          _best_size = _curr_size;
-          _best_node = _curr_node;
-        }
-      }
-      return _best_found;
-    }
-
-    /// \brief Find a minimum mean directed cycle.
-    ///
-    /// This function finds a directed cycle of minimum mean length
-    /// in the digraph using the data computed by findMinMean().
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    ///
-    /// \pre \ref findMinMean() must be called before using this function.
-    bool findCycle() {
-      if (!_best_found) return false;
-      _cycle_path->addBack(_policy[_best_node]);
-      for ( Node v = _best_node;
-            (v = _gr.target(_policy[v])) != _best_node; ) {
-        _cycle_path->addBack(_policy[v]);
-      }
-      return true;
-    }
-
-    /// @}
-
-    /// \name Query Functions
-    /// The results of the algorithm can be obtained using these
-    /// functions.\n
-    /// The algorithm should be executed before using them.
-
-    /// @{
-
-    /// \brief Return the total length of the found cycle.
-    ///
-    /// This function returns the total length of the found cycle.
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    LargeValue cycleLength() const {
-      return _best_length;
-    }
-
-    /// \brief Return the number of arcs on the found cycle.
-    ///
-    /// This function returns the number of arcs on the found cycle.
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    int cycleArcNum() const {
-      return _best_size;
-    }
-
-    /// \brief Return the mean length of the found cycle.
-    ///
-    /// This function returns the mean length of the found cycle.
-    ///
-    /// \note <tt>alg.cycleMean()</tt> is just a shortcut of the
-    /// following code.
-    /// \code
-    ///   return static_cast<double>(alg.cycleLength()) / alg.cycleArcNum();
-    /// \endcode
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    double cycleMean() const {
-      return static_cast<double>(_best_length) / _best_size;
-    }
-
-    /// \brief Return the found cycle.
-    ///
-    /// This function returns a const reference to the path structure
-    /// storing the found cycle.
-    ///
-    /// \pre \ref run() or \ref findCycle() must be called before using
-    /// this function.
-    const Path& cycle() const {
-      return *_cycle_path;
-    }
-
-    ///@}
-
-  private:
-
-    // Initialize
-    void init() {
-      if (!_cycle_path) {
-        _local_path = true;
-        _cycle_path = new Path;
-      }
-      _queue.resize(countNodes(_gr));
-      _best_found = false;
-      _best_length = 0;
-      _best_size = 1;
-      _cycle_path->clear();
-    }
-    
-    // Find strongly connected components and initialize _comp_nodes
-    // and _in_arcs
-    void findComponents() {
-      _comp_num = stronglyConnectedComponents(_gr, _comp);
-      _comp_nodes.resize(_comp_num);
-      if (_comp_num == 1) {
-        _comp_nodes[0].clear();
-        for (NodeIt n(_gr); n != INVALID; ++n) {
-          _comp_nodes[0].push_back(n);
-          _in_arcs[n].clear();
-          for (InArcIt a(_gr, n); a != INVALID; ++a) {
-            _in_arcs[n].push_back(a);
-          }
-        }
-      } else {
-        for (int i = 0; i < _comp_num; ++i)
-          _comp_nodes[i].clear();
-        for (NodeIt n(_gr); n != INVALID; ++n) {
-          int k = _comp[n];
-          _comp_nodes[k].push_back(n);
-          _in_arcs[n].clear();
-          for (InArcIt a(_gr, n); a != INVALID; ++a) {
-            if (_comp[_gr.source(a)] == k) _in_arcs[n].push_back(a);
-          }
-        }
-      }
-    }
-
-    // Build the policy graph in the given strongly connected component
-    // (the out-degree of every node is 1)
-    bool buildPolicyGraph(int comp) {
-      _nodes = &(_comp_nodes[comp]);
-      if (_nodes->size() < 1 ||
-          (_nodes->size() == 1 && _in_arcs[(*_nodes)[0]].size() == 0)) {
-        return false;
-      }
-      for (int i = 0; i < int(_nodes->size()); ++i) {
-        _dist[(*_nodes)[i]] = INF;
-      }
-      Node u, v;
-      Arc e;
-      for (int i = 0; i < int(_nodes->size()); ++i) {
-        v = (*_nodes)[i];
-        for (int j = 0; j < int(_in_arcs[v].size()); ++j) {
-          e = _in_arcs[v][j];
-          u = _gr.source(e);
-          if (_length[e] < _dist[u]) {
-            _dist[u] = _length[e];
-            _policy[u] = e;
-          }
-        }
-      }
-      return true;
-    }
-
-    // Find the minimum mean cycle in the policy graph
-    void findPolicyCycle() {
-      for (int i = 0; i < int(_nodes->size()); ++i) {
-        _level[(*_nodes)[i]] = -1;
-      }
-      LargeValue clength;
-      int csize;
-      Node u, v;
-      _curr_found = false;
-      for (int i = 0; i < int(_nodes->size()); ++i) {
-        u = (*_nodes)[i];
-        if (_level[u] >= 0) continue;
-        for (; _level[u] < 0; u = _gr.target(_policy[u])) {
-          _level[u] = i;
-        }
-        if (_level[u] == i) {
-          // A cycle is found
-          clength = _length[_policy[u]];
-          csize = 1;
-          for (v = u; (v = _gr.target(_policy[v])) != u; ) {
-            clength += _length[_policy[v]];
-            ++csize;
-          }
-          if ( !_curr_found ||
-               (clength * _curr_size < _curr_length * csize) ) {
-            _curr_found = true;
-            _curr_length = clength;
-            _curr_size = csize;
-            _curr_node = u;
-          }
-        }
-      }
-    }
-
-    // Contract the policy graph and compute node distances
-    bool computeNodeDistances() {
-      // Find the component of the main cycle and compute node distances
-      // using reverse BFS
-      for (int i = 0; i < int(_nodes->size()); ++i) {
-        _reached[(*_nodes)[i]] = false;
-      }
-      _qfront = _qback = 0;
-      _queue[0] = _curr_node;
-      _reached[_curr_node] = true;
-      _dist[_curr_node] = 0;
-      Node u, v;
-      Arc e;
-      while (_qfront <= _qback) {
-        v = _queue[_qfront++];
-        for (int j = 0; j < int(_in_arcs[v].size()); ++j) {
-          e = _in_arcs[v][j];
-          u = _gr.source(e);
-          if (_policy[u] == e && !_reached[u]) {
-            _reached[u] = true;
-            _dist[u] = _dist[v] + _length[e] * _curr_size - _curr_length;
-            _queue[++_qback] = u;
-          }
-        }
-      }
-
-      // Connect all other nodes to this component and compute node
-      // distances using reverse BFS
-      _qfront = 0;
-      while (_qback < int(_nodes->size())-1) {
-        v = _queue[_qfront++];
-        for (int j = 0; j < int(_in_arcs[v].size()); ++j) {
-          e = _in_arcs[v][j];
-          u = _gr.source(e);
-          if (!_reached[u]) {
-            _reached[u] = true;
-            _policy[u] = e;
-            _dist[u] = _dist[v] + _length[e] * _curr_size - _curr_length;
-            _queue[++_qback] = u;
-          }
-        }
-      }
-
-      // Improve node distances
-      bool improved = false;
-      for (int i = 0; i < int(_nodes->size()); ++i) {
-        v = (*_nodes)[i];
-        for (int j = 0; j < int(_in_arcs[v].size()); ++j) {
-          e = _in_arcs[v][j];
-          u = _gr.source(e);
-          LargeValue delta = _dist[v] + _length[e] * _curr_size - _curr_length;
-          if (_tolerance.less(delta, _dist[u])) {
-            _dist[u] = delta;
-            _policy[u] = e;
-            improved = true;
-          }
-        }
-      }
-      return improved;
-    }
-
-  }; //class Howard
-
-  ///@}
-
-} //namespace lemon
-
-#endif //LEMON_HOWARD_H
Index: lemon/hypercube_graph.h
===================================================================
--- lemon/hypercube_graph.h	(revision 835)
+++ lemon/hypercube_graph.h	(revision 833)
@@ -263,5 +263,5 @@
     }
 
-    static int index(Node node) {
+    int index(Node node) const {
       return node._id;
     }
@@ -295,6 +295,4 @@
   /// only in the concept class.
   ///
-  /// This class provides constant time counting for nodes, edges and arcs.
-  ///
   /// \note The type of the indices is chosen to \c int for efficiency
   /// reasons. Thus the maximum dimension of this implementation is 26
@@ -359,5 +357,5 @@
     /// Gives back the index of the given node.
     /// The lower bits of the integer describes the node.
-    static int index(Node node) {
+    int index(Node node) const {
       return Parent::index(node);
     }
Index: mon/karp.h
===================================================================
--- lemon/karp.h	(revision 819)
+++ 	(revision )
@@ -1,582 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_KARP_H
-#define LEMON_KARP_H
-
-/// \ingroup min_mean_cycle
-///
-/// \file
-/// \brief Karp's algorithm for finding a minimum mean cycle.
-
-#include <vector>
-#include <limits>
-#include <lemon/core.h>
-#include <lemon/path.h>
-#include <lemon/tolerance.h>
-#include <lemon/connectivity.h>
-
-namespace lemon {
-
-  /// \brief Default traits class of Karp algorithm.
-  ///
-  /// Default traits class of Karp algorithm.
-  /// \tparam GR The type of the digraph.
-  /// \tparam LEN The type of the length map.
-  /// It must conform to the \ref concepts::ReadMap "ReadMap" concept.
-#ifdef DOXYGEN
-  template <typename GR, typename LEN>
-#else
-  template <typename GR, typename LEN,
-    bool integer = std::numeric_limits<typename LEN::Value>::is_integer>
-#endif
-  struct KarpDefaultTraits
-  {
-    /// The type of the digraph
-    typedef GR Digraph;
-    /// The type of the length map
-    typedef LEN LengthMap;
-    /// The type of the arc lengths
-    typedef typename LengthMap::Value Value;
-
-    /// \brief The large value type used for internal computations
-    ///
-    /// The large value type used for internal computations.
-    /// It is \c long \c long if the \c Value type is integer,
-    /// otherwise it is \c double.
-    /// \c Value must be convertible to \c LargeValue.
-    typedef double LargeValue;
-
-    /// The tolerance type used for internal computations
-    typedef lemon::Tolerance<LargeValue> Tolerance;
-
-    /// \brief The path type of the found cycles
-    ///
-    /// The path type of the found cycles.
-    /// It must conform to the \ref lemon::concepts::Path "Path" concept
-    /// and it must have an \c addFront() function.
-    typedef lemon::Path<Digraph> Path;
-  };
-
-  // Default traits class for integer value types
-  template <typename GR, typename LEN>
-  struct KarpDefaultTraits<GR, LEN, true>
-  {
-    typedef GR Digraph;
-    typedef LEN LengthMap;
-    typedef typename LengthMap::Value Value;
-#ifdef LEMON_HAVE_LONG_LONG
-    typedef long long LargeValue;
-#else
-    typedef long LargeValue;
-#endif
-    typedef lemon::Tolerance<LargeValue> Tolerance;
-    typedef lemon::Path<Digraph> Path;
-  };
-
-
-  /// \addtogroup min_mean_cycle
-  /// @{
-
-  /// \brief Implementation of Karp's algorithm for finding a minimum
-  /// mean cycle.
-  ///
-  /// This class implements Karp's algorithm for finding a directed
-  /// cycle of minimum mean length (cost) in a digraph
-  /// \ref amo93networkflows, \ref dasdan98minmeancycle.
-  /// It runs in time O(ne) and uses space O(n<sup>2</sup>+e).
-  ///
-  /// \tparam GR The type of the digraph the algorithm runs on.
-  /// \tparam LEN The type of the length map. The default
-  /// map type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>".
-#ifdef DOXYGEN
-  template <typename GR, typename LEN, typename TR>
-#else
-  template < typename GR,
-             typename LEN = typename GR::template ArcMap<int>,
-             typename TR = KarpDefaultTraits<GR, LEN> >
-#endif
-  class Karp
-  {
-  public:
-
-    /// The type of the digraph
-    typedef typename TR::Digraph Digraph;
-    /// The type of the length map
-    typedef typename TR::LengthMap LengthMap;
-    /// The type of the arc lengths
-    typedef typename TR::Value Value;
-
-    /// \brief The large value type
-    ///
-    /// The large value type used for internal computations.
-    /// Using the \ref KarpDefaultTraits "default traits class",
-    /// it is \c long \c long if the \c Value type is integer,
-    /// otherwise it is \c double.
-    typedef typename TR::LargeValue LargeValue;
-
-    /// The tolerance type
-    typedef typename TR::Tolerance Tolerance;
-
-    /// \brief The path type of the found cycles
-    ///
-    /// The path type of the found cycles.
-    /// Using the \ref KarpDefaultTraits "default traits class",
-    /// it is \ref lemon::Path "Path<Digraph>".
-    typedef typename TR::Path Path;
-
-    /// The \ref KarpDefaultTraits "traits class" of the algorithm
-    typedef TR Traits;
-
-  private:
-
-    TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-    // Data sturcture for path data
-    struct PathData
-    {
-      LargeValue dist;
-      Arc pred;
-      PathData(LargeValue d, Arc p = INVALID) :
-        dist(d), pred(p) {}
-    };
-
-    typedef typename Digraph::template NodeMap<std::vector<PathData> >
-      PathDataNodeMap;
-
-  private:
-
-    // The digraph the algorithm runs on
-    const Digraph &_gr;
-    // The length of the arcs
-    const LengthMap &_length;
-
-    // Data for storing the strongly connected components
-    int _comp_num;
-    typename Digraph::template NodeMap<int> _comp;
-    std::vector<std::vector<Node> > _comp_nodes;
-    std::vector<Node>* _nodes;
-    typename Digraph::template NodeMap<std::vector<Arc> > _out_arcs;
-
-    // Data for the found cycle
-    LargeValue _cycle_length;
-    int _cycle_size;
-    Node _cycle_node;
-
-    Path *_cycle_path;
-    bool _local_path;
-
-    // Node map for storing path data
-    PathDataNodeMap _data;
-    // The processed nodes in the last round
-    std::vector<Node> _process;
-
-    Tolerance _tolerance;
-    
-    // Infinite constant
-    const LargeValue INF;
-
-  public:
-
-    /// \name Named Template Parameters
-    /// @{
-
-    template <typename T>
-    struct SetLargeValueTraits : public Traits {
-      typedef T LargeValue;
-      typedef lemon::Tolerance<T> Tolerance;
-    };
-
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    /// \c LargeValue type.
-    ///
-    /// \ref named-templ-param "Named parameter" for setting \c LargeValue
-    /// type. It is used for internal computations in the algorithm.
-    template <typename T>
-    struct SetLargeValue
-      : public Karp<GR, LEN, SetLargeValueTraits<T> > {
-      typedef Karp<GR, LEN, SetLargeValueTraits<T> > Create;
-    };
-
-    template <typename T>
-    struct SetPathTraits : public Traits {
-      typedef T Path;
-    };
-
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    /// \c %Path type.
-    ///
-    /// \ref named-templ-param "Named parameter" for setting the \c %Path
-    /// type of the found cycles.
-    /// It must conform to the \ref lemon::concepts::Path "Path" concept
-    /// and it must have an \c addFront() function.
-    template <typename T>
-    struct SetPath
-      : public Karp<GR, LEN, SetPathTraits<T> > {
-      typedef Karp<GR, LEN, SetPathTraits<T> > Create;
-    };
-
-    /// @}
-
-  public:
-
-    /// \brief Constructor.
-    ///
-    /// The constructor of the class.
-    ///
-    /// \param digraph The digraph the algorithm runs on.
-    /// \param length The lengths (costs) of the arcs.
-    Karp( const Digraph &digraph,
-          const LengthMap &length ) :
-      _gr(digraph), _length(length), _comp(digraph), _out_arcs(digraph),
-      _cycle_length(0), _cycle_size(1), _cycle_node(INVALID),
-      _cycle_path(NULL), _local_path(false), _data(digraph),
-      INF(std::numeric_limits<LargeValue>::has_infinity ?
-          std::numeric_limits<LargeValue>::infinity() :
-          std::numeric_limits<LargeValue>::max())
-    {}
-
-    /// Destructor.
-    ~Karp() {
-      if (_local_path) delete _cycle_path;
-    }
-
-    /// \brief Set the path structure for storing the found cycle.
-    ///
-    /// This function sets an external path structure for storing the
-    /// found cycle.
-    ///
-    /// If you don't call this function before calling \ref run() or
-    /// \ref findMinMean(), it will allocate a local \ref Path "path"
-    /// structure. The destuctor deallocates this automatically
-    /// allocated object, of course.
-    ///
-    /// \note The algorithm calls only the \ref lemon::Path::addFront()
-    /// "addFront()" function of the given path structure.
-    ///
-    /// \return <tt>(*this)</tt>
-    Karp& cycle(Path &path) {
-      if (_local_path) {
-        delete _cycle_path;
-        _local_path = false;
-      }
-      _cycle_path = &path;
-      return *this;
-    }
-
-    /// \brief Set the tolerance used by the algorithm.
-    ///
-    /// This function sets the tolerance object used by the algorithm.
-    ///
-    /// \return <tt>(*this)</tt>
-    Karp& tolerance(const Tolerance& tolerance) {
-      _tolerance = tolerance;
-      return *this;
-    }
-
-    /// \brief Return a const reference to the tolerance.
-    ///
-    /// This function returns a const reference to the tolerance object
-    /// used by the algorithm.
-    const Tolerance& tolerance() const {
-      return _tolerance;
-    }
-
-    /// \name Execution control
-    /// The simplest way to execute the algorithm is to call the \ref run()
-    /// function.\n
-    /// If you only need the minimum mean length, you may call
-    /// \ref findMinMean().
-
-    /// @{
-
-    /// \brief Run the algorithm.
-    ///
-    /// This function runs the algorithm.
-    /// It can be called more than once (e.g. if the underlying digraph
-    /// and/or the arc lengths have been modified).
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    ///
-    /// \note <tt>mmc.run()</tt> is just a shortcut of the following code.
-    /// \code
-    ///   return mmc.findMinMean() && mmc.findCycle();
-    /// \endcode
-    bool run() {
-      return findMinMean() && findCycle();
-    }
-
-    /// \brief Find the minimum cycle mean.
-    ///
-    /// This function finds the minimum mean length of the directed
-    /// cycles in the digraph.
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    bool findMinMean() {
-      // Initialization and find strongly connected components
-      init();
-      findComponents();
-      
-      // Find the minimum cycle mean in the components
-      for (int comp = 0; comp < _comp_num; ++comp) {
-        if (!initComponent(comp)) continue;
-        processRounds();
-        updateMinMean();
-      }
-      return (_cycle_node != INVALID);
-    }
-
-    /// \brief Find a minimum mean directed cycle.
-    ///
-    /// This function finds a directed cycle of minimum mean length
-    /// in the digraph using the data computed by findMinMean().
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    ///
-    /// \pre \ref findMinMean() must be called before using this function.
-    bool findCycle() {
-      if (_cycle_node == INVALID) return false;
-      IntNodeMap reached(_gr, -1);
-      int r = _data[_cycle_node].size();
-      Node u = _cycle_node;
-      while (reached[u] < 0) {
-        reached[u] = --r;
-        u = _gr.source(_data[u][r].pred);
-      }
-      r = reached[u];
-      Arc e = _data[u][r].pred;
-      _cycle_path->addFront(e);
-      _cycle_length = _length[e];
-      _cycle_size = 1;
-      Node v;
-      while ((v = _gr.source(e)) != u) {
-        e = _data[v][--r].pred;
-        _cycle_path->addFront(e);
-        _cycle_length += _length[e];
-        ++_cycle_size;
-      }
-      return true;
-    }
-
-    /// @}
-
-    /// \name Query Functions
-    /// The results of the algorithm can be obtained using these
-    /// functions.\n
-    /// The algorithm should be executed before using them.
-
-    /// @{
-
-    /// \brief Return the total length of the found cycle.
-    ///
-    /// This function returns the total length of the found cycle.
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    LargeValue cycleLength() const {
-      return _cycle_length;
-    }
-
-    /// \brief Return the number of arcs on the found cycle.
-    ///
-    /// This function returns the number of arcs on the found cycle.
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    int cycleArcNum() const {
-      return _cycle_size;
-    }
-
-    /// \brief Return the mean length of the found cycle.
-    ///
-    /// This function returns the mean length of the found cycle.
-    ///
-    /// \note <tt>alg.cycleMean()</tt> is just a shortcut of the
-    /// following code.
-    /// \code
-    ///   return static_cast<double>(alg.cycleLength()) / alg.cycleArcNum();
-    /// \endcode
-    ///
-    /// \pre \ref run() or \ref findMinMean() must be called before
-    /// using this function.
-    double cycleMean() const {
-      return static_cast<double>(_cycle_length) / _cycle_size;
-    }
-
-    /// \brief Return the found cycle.
-    ///
-    /// This function returns a const reference to the path structure
-    /// storing the found cycle.
-    ///
-    /// \pre \ref run() or \ref findCycle() must be called before using
-    /// this function.
-    const Path& cycle() const {
-      return *_cycle_path;
-    }
-
-    ///@}
-
-  private:
-
-    // Initialization
-    void init() {
-      if (!_cycle_path) {
-        _local_path = true;
-        _cycle_path = new Path;
-      }
-      _cycle_path->clear();
-      _cycle_length = 0;
-      _cycle_size = 1;
-      _cycle_node = INVALID;
-      for (NodeIt u(_gr); u != INVALID; ++u)
-        _data[u].clear();
-    }
-
-    // Find strongly connected components and initialize _comp_nodes
-    // and _out_arcs
-    void findComponents() {
-      _comp_num = stronglyConnectedComponents(_gr, _comp);
-      _comp_nodes.resize(_comp_num);
-      if (_comp_num == 1) {
-        _comp_nodes[0].clear();
-        for (NodeIt n(_gr); n != INVALID; ++n) {
-          _comp_nodes[0].push_back(n);
-          _out_arcs[n].clear();
-          for (OutArcIt a(_gr, n); a != INVALID; ++a) {
-            _out_arcs[n].push_back(a);
-          }
-        }
-      } else {
-        for (int i = 0; i < _comp_num; ++i)
-          _comp_nodes[i].clear();
-        for (NodeIt n(_gr); n != INVALID; ++n) {
-          int k = _comp[n];
-          _comp_nodes[k].push_back(n);
-          _out_arcs[n].clear();
-          for (OutArcIt a(_gr, n); a != INVALID; ++a) {
-            if (_comp[_gr.target(a)] == k) _out_arcs[n].push_back(a);
-          }
-        }
-      }
-    }
-
-    // Initialize path data for the current component
-    bool initComponent(int comp) {
-      _nodes = &(_comp_nodes[comp]);
-      int n = _nodes->size();
-      if (n < 1 || (n == 1 && _out_arcs[(*_nodes)[0]].size() == 0)) {
-        return false;
-      }      
-      for (int i = 0; i < n; ++i) {
-        _data[(*_nodes)[i]].resize(n + 1, PathData(INF));
-      }
-      return true;
-    }
-
-    // Process all rounds of computing path data for the current component.
-    // _data[v][k] is the length of a shortest directed walk from the root
-    // node to node v containing exactly k arcs.
-    void processRounds() {
-      Node start = (*_nodes)[0];
-      _data[start][0] = PathData(0);
-      _process.clear();
-      _process.push_back(start);
-
-      int k, n = _nodes->size();
-      for (k = 1; k <= n && int(_process.size()) < n; ++k) {
-        processNextBuildRound(k);
-      }
-      for ( ; k <= n; ++k) {
-        processNextFullRound(k);
-      }
-    }
-
-    // Process one round and rebuild _process
-    void processNextBuildRound(int k) {
-      std::vector<Node> next;
-      Node u, v;
-      Arc e;
-      LargeValue d;
-      for (int i = 0; i < int(_process.size()); ++i) {
-        u = _process[i];
-        for (int j = 0; j < int(_out_arcs[u].size()); ++j) {
-          e = _out_arcs[u][j];
-          v = _gr.target(e);
-          d = _data[u][k-1].dist + _length[e];
-          if (_tolerance.less(d, _data[v][k].dist)) {
-            if (_data[v][k].dist == INF) next.push_back(v);
-            _data[v][k] = PathData(d, e);
-          }
-        }
-      }
-      _process.swap(next);
-    }
-
-    // Process one round using _nodes instead of _process
-    void processNextFullRound(int k) {
-      Node u, v;
-      Arc e;
-      LargeValue d;
-      for (int i = 0; i < int(_nodes->size()); ++i) {
-        u = (*_nodes)[i];
-        for (int j = 0; j < int(_out_arcs[u].size()); ++j) {
-          e = _out_arcs[u][j];
-          v = _gr.target(e);
-          d = _data[u][k-1].dist + _length[e];
-          if (_tolerance.less(d, _data[v][k].dist)) {
-            _data[v][k] = PathData(d, e);
-          }
-        }
-      }
-    }
-
-    // Update the minimum cycle mean
-    void updateMinMean() {
-      int n = _nodes->size();
-      for (int i = 0; i < n; ++i) {
-        Node u = (*_nodes)[i];
-        if (_data[u][n].dist == INF) continue;
-        LargeValue length, max_length = 0;
-        int size, max_size = 1;
-        bool found_curr = false;
-        for (int k = 0; k < n; ++k) {
-          if (_data[u][k].dist == INF) continue;
-          length = _data[u][n].dist - _data[u][k].dist;
-          size = n - k;
-          if (!found_curr || length * max_size > max_length * size) {
-            found_curr = true;
-            max_length = length;
-            max_size = size;
-          }
-        }
-        if ( found_curr && (_cycle_node == INVALID ||
-             max_length * _cycle_size < _cycle_length * max_size) ) {
-          _cycle_length = max_length;
-          _cycle_size = max_size;
-          _cycle_node = u;
-        }
-      }
-    }
-
-  }; //class Karp
-
-  ///@}
-
-} //namespace lemon
-
-#endif //LEMON_KARP_H
Index: lemon/list_graph.h
===================================================================
--- lemon/list_graph.h	(revision 835)
+++ lemon/list_graph.h	(revision 833)
@@ -325,6 +325,4 @@
   ///only in the concept class.
   ///
-  ///This class provides only linear time counting for nodes and arcs.
-  ///
   ///\sa concepts::Digraph
   ///\sa ListGraph
@@ -363,9 +361,5 @@
     ///\brief Erase a node from the digraph.
     ///
-    ///This function erases the given node along with its outgoing and
-    ///incoming arcs from the digraph.
-    ///
-    ///\note All iterators referencing the removed node or the connected
-    ///arcs are invalidated, of course.
+    ///This function erases the given node from the digraph.
     void erase(Node n) { Parent::erase(n); }
 
@@ -373,7 +367,4 @@
     ///
     ///This function erases the given arc from the digraph.
-    ///
-    ///\note All iterators referencing the removed arc are invalidated,
-    ///of course.
     void erase(Arc a) { Parent::erase(a); }
 
@@ -520,5 +511,4 @@
     ///This function erases all nodes and arcs from the digraph.
     ///
-    ///\note All iterators of the digraph are invalidated, of course.
     void clear() {
       Parent::clear();
@@ -1190,6 +1180,4 @@
   ///only in the concept class.
   ///
-  ///This class provides only linear time counting for nodes, edges and arcs.
-  ///
   ///\sa concepts::Graph
   ///\sa ListDigraph
@@ -1230,9 +1218,5 @@
     ///\brief Erase a node from the graph.
     ///
-    /// This function erases the given node along with its incident arcs
-    /// from the graph.
-    ///
-    /// \note All iterators referencing the removed node or the incident
-    /// edges are invalidated, of course.
+    /// This function erases the given node from the graph.
     void erase(Node n) { Parent::erase(n); }
 
@@ -1240,7 +1224,4 @@
     ///
     /// This function erases the given edge from the graph.
-    ///
-    /// \note All iterators referencing the removed edge are invalidated,
-    /// of course.
     void erase(Edge e) { Parent::erase(e); }
     /// Node validity check
@@ -1332,5 +1313,4 @@
     ///This function erases all nodes and arcs from the graph.
     ///
-    ///\note All iterators of the graph are invalidated, of course.
     void clear() {
       Parent::clear();
Index: lemon/network_simplex.h
===================================================================
--- lemon/network_simplex.h	(revision 835)
+++ lemon/network_simplex.h	(revision 833)
@@ -41,7 +41,5 @@
   ///
   /// \ref NetworkSimplex implements the primal Network Simplex algorithm
-  /// for finding a \ref min_cost_flow "minimum cost flow"
-  /// \ref amo93networkflows, \ref dantzig63linearprog,
-  /// \ref kellyoneill91netsimplex.
+  /// for finding a \ref min_cost_flow "minimum cost flow".
   /// This algorithm is a specialized version of the linear programming
   /// simplex method directly for the minimum cost flow problem.
Index: lemon/path.h
===================================================================
--- lemon/path.h	(revision 831)
+++ lemon/path.h	(revision 606)
@@ -71,5 +71,5 @@
     template <typename CPath>
     Path(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
     }
 
@@ -79,5 +79,5 @@
     template <typename CPath>
     Path& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
       return *this;
     }
@@ -259,5 +259,5 @@
     template <typename CPath>
     SimplePath(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
     }
 
@@ -268,5 +268,5 @@
     template <typename CPath>
     SimplePath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
       return *this;
     }
@@ -438,5 +438,5 @@
     template <typename CPath>
     ListPath(const CPath& cpath) : first(0), last(0) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
     }
 
@@ -454,5 +454,5 @@
     template <typename CPath>
     ListPath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
       return *this;
     }
@@ -764,5 +764,5 @@
     template <typename CPath>
     StaticPath(const CPath& cpath) : arcs(0) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
     }
 
@@ -780,5 +780,5 @@
     template <typename CPath>
     StaticPath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
       return *this;
     }
@@ -929,55 +929,55 @@
     };
 
-    template <typename From, typename To,
-              bool buildEnable = BuildTagIndicator<To>::value>
+    template <typename Target, typename Source,
+              bool buildEnable = BuildTagIndicator<Target>::value>
     struct PathCopySelectorForward {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        for (typename From::ArcIt it(from); it != INVALID; ++it) {
-          to.addBack(it);
+      static void copy(Target& target, const Source& source) {
+        target.clear();
+        for (typename Source::ArcIt it(source); it != INVALID; ++it) {
+          target.addBack(it);
         }
       }
     };
 
-    template <typename From, typename To>
-    struct PathCopySelectorForward<From, To, true> {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        to.build(from);
-      }
-    };
-
-    template <typename From, typename To,
-              bool buildEnable = BuildTagIndicator<To>::value>
+    template <typename Target, typename Source>
+    struct PathCopySelectorForward<Target, Source, true> {
+      static void copy(Target& target, const Source& source) {
+        target.clear();
+        target.build(source);
+      }
+    };
+
+    template <typename Target, typename Source,
+              bool buildEnable = BuildTagIndicator<Target>::value>
     struct PathCopySelectorBackward {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        for (typename From::RevArcIt it(from); it != INVALID; ++it) {
-          to.addFront(it);
+      static void copy(Target& target, const Source& source) {
+        target.clear();
+        for (typename Source::RevArcIt it(source); it != INVALID; ++it) {
+          target.addFront(it);
         }
       }
     };
 
-    template <typename From, typename To>
-    struct PathCopySelectorBackward<From, To, true> {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        to.buildRev(from);
+    template <typename Target, typename Source>
+    struct PathCopySelectorBackward<Target, Source, true> {
+      static void copy(Target& target, const Source& source) {
+        target.clear();
+        target.buildRev(source);
       }
     };
 
     
-    template <typename From, typename To,
-              bool revEnable = RevPathTagIndicator<From>::value>
+    template <typename Target, typename Source,
+              bool revEnable = RevPathTagIndicator<Source>::value>
     struct PathCopySelector {
-      static void copy(const From& from, To& to) {
-        PathCopySelectorForward<From, To>::copy(from, to);
+      static void copy(Target& target, const Source& source) {
+        PathCopySelectorForward<Target, Source>::copy(target, source);
       }      
     };
 
-    template <typename From, typename To>
-    struct PathCopySelector<From, To, true> {
-      static void copy(const From& from, To& to) {
-        PathCopySelectorBackward<From, To>::copy(from, to);
+    template <typename Target, typename Source>
+    struct PathCopySelector<Target, Source, true> {
+      static void copy(Target& target, const Source& source) {
+        PathCopySelectorBackward<Target, Source>::copy(target, source);
       }      
     };
@@ -988,17 +988,9 @@
   /// \brief Make a copy of a path.
   ///
-  /// This function makes a copy of a path.
-  template <typename From, typename To>
-  void pathCopy(const From& from, To& to) {
-    checkConcept<concepts::PathDumper<typename From::Digraph>, From>();
-    _path_bits::PathCopySelector<From, To>::copy(from, to);
-  }
-
-  /// \brief Deprecated version of \ref pathCopy().
-  ///
-  /// Deprecated version of \ref pathCopy() (only for reverse compatibility).
-  template <typename To, typename From>
-  void copyPath(To& to, const From& from) {
-    pathCopy(from, to);
+  ///  This function makes a copy of a path.
+  template <typename Target, typename Source>
+  void copyPath(Target& target, const Source& source) {
+    checkConcept<concepts::PathDumper<typename Source::Digraph>, Source>();
+    _path_bits::PathCopySelector<Target, Source>::copy(target, source);
   }
 
@@ -1024,18 +1016,16 @@
   /// \brief The source of a path
   ///
-  /// This function returns the source node of the given path.
-  /// If the path is empty, then it returns \c INVALID.
+  /// This function returns the source of the given path.
   template <typename Digraph, typename Path>
   typename Digraph::Node pathSource(const Digraph& digraph, const Path& path) {
-    return path.empty() ? INVALID : digraph.source(path.front());
+    return digraph.source(path.front());
   }
 
   /// \brief The target of a path
   ///
-  /// This function returns the target node of the given path.
-  /// If the path is empty, then it returns \c INVALID.
+  /// This function returns the target of the given path.
   template <typename Digraph, typename Path>
   typename Digraph::Node pathTarget(const Digraph& digraph, const Path& path) {
-    return path.empty() ? INVALID : digraph.target(path.back());
+    return digraph.target(path.back());
   }
 
Index: lemon/preflow.h
===================================================================
--- lemon/preflow.h	(revision 835)
+++ lemon/preflow.h	(revision 833)
@@ -103,6 +103,5 @@
   /// This class provides an implementation of Goldberg-Tarjan's \e preflow
   /// \e push-relabel algorithm producing a \ref max_flow
-  /// "flow of maximum value" in a digraph \ref clrs01algorithms,
-  /// \ref amo93networkflows, \ref goldberg88newapproach.
+  /// "flow of maximum value" in a digraph.
   /// The preflow algorithms are the fastest known maximum
   /// flow algorithms. The current implementation uses a mixture of the
Index: lemon/smart_graph.h
===================================================================
--- lemon/smart_graph.h	(revision 834)
+++ lemon/smart_graph.h	(revision 783)
@@ -195,6 +195,4 @@
   ///only in the concept class.
   ///
-  ///This class provides constant time counting for nodes and arcs.
-  ///
   ///\sa concepts::Digraph
   ///\sa SmartGraph
@@ -500,5 +498,5 @@
     }
 
-    static void next(Node& node) {
+    void next(Node& node) const {
       --node._id;
     }
@@ -508,5 +506,5 @@
     }
 
-    static void next(Arc& arc) {
+    void next(Arc& arc) const {
       --arc._id;
     }
@@ -516,5 +514,5 @@
     }
 
-    static void next(Edge& arc) {
+    void next(Edge& arc) const {
       --arc._id;
     }
@@ -623,6 +621,4 @@
   /// only in the concept class.
   ///
-  /// This class provides constant time counting for nodes, edges and arcs.
-  ///
   /// \sa concepts::Graph
   /// \sa SmartDigraph
Index: mon/static_graph.h
===================================================================
--- lemon/static_graph.h	(revision 834)
+++ 	(revision )
@@ -1,476 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_STATIC_GRAPH_H
-#define LEMON_STATIC_GRAPH_H
-
-///\ingroup graphs
-///\file
-///\brief StaticDigraph class.
-
-#include <lemon/core.h>
-#include <lemon/bits/graph_extender.h>
-
-namespace lemon {
-
-  class StaticDigraphBase {
-  public:
-
-    StaticDigraphBase() 
-      : built(false), node_num(0), arc_num(0), 
-        node_first_out(NULL), node_first_in(NULL),
-        arc_source(NULL), arc_target(NULL), 
-        arc_next_in(NULL), arc_next_out(NULL) {}
-    
-    ~StaticDigraphBase() {
-      if (built) {
-        delete[] node_first_out;
-        delete[] node_first_in;
-        delete[] arc_source;
-        delete[] arc_target;
-        delete[] arc_next_out;
-        delete[] arc_next_in;
-      }
-    }
-
-    class Node {
-      friend class StaticDigraphBase;
-    protected:
-      int id;
-      Node(int _id) : id(_id) {}
-    public:
-      Node() {}
-      Node (Invalid) : id(-1) {}
-      bool operator==(const Node& node) const { return id == node.id; }
-      bool operator!=(const Node& node) const { return id != node.id; }
-      bool operator<(const Node& node) const { return id < node.id; }
-    };
-
-    class Arc {
-      friend class StaticDigraphBase;      
-    protected:
-      int id;
-      Arc(int _id) : id(_id) {}
-    public:
-      Arc() { }
-      Arc (Invalid) : id(-1) {}
-      bool operator==(const Arc& arc) const { return id == arc.id; }
-      bool operator!=(const Arc& arc) const { return id != arc.id; }
-      bool operator<(const Arc& arc) const { return id < arc.id; }
-    };
-
-    Node source(const Arc& e) const { return Node(arc_source[e.id]); }
-    Node target(const Arc& e) const { return Node(arc_target[e.id]); }
-
-    void first(Node& n) const { n.id = node_num - 1; }
-    static void next(Node& n) { --n.id; }
-
-    void first(Arc& e) const { e.id = arc_num - 1; }
-    static void next(Arc& e) { --e.id; }
-
-    void firstOut(Arc& e, const Node& n) const { 
-      e.id = node_first_out[n.id] != node_first_out[n.id + 1] ? 
-        node_first_out[n.id] : -1;
-    }
-    void nextOut(Arc& e) const { e.id = arc_next_out[e.id]; }
-
-    void firstIn(Arc& e, const Node& n) const { e.id = node_first_in[n.id]; }
-    void nextIn(Arc& e) const { e.id = arc_next_in[e.id]; }
-
-    static int id(const Node& n) { return n.id; }
-    static Node nodeFromId(int id) { return Node(id); }
-    int maxNodeId() const { return node_num - 1; }
-
-    static int id(const Arc& e) { return e.id; }
-    static Arc arcFromId(int id) { return Arc(id); }
-    int maxArcId() const { return arc_num - 1; }
-
-    typedef True NodeNumTag;
-    typedef True ArcNumTag;
-
-    int nodeNum() const { return node_num; }
-    int arcNum() const { return arc_num; }
-
-  private:
-
-    template <typename Digraph, typename NodeRefMap>
-    class ArcLess {
-    public:
-      typedef typename Digraph::Arc Arc;
-
-      ArcLess(const Digraph &_graph, const NodeRefMap& _nodeRef) 
-        : digraph(_graph), nodeRef(_nodeRef) {}
-      
-      bool operator()(const Arc& left, const Arc& right) const {
-	return nodeRef[digraph.target(left)] < nodeRef[digraph.target(right)];
-      }
-    private:
-      const Digraph& digraph;
-      const NodeRefMap& nodeRef;
-    };
-    
-  public:
-
-    typedef True BuildTag;
-    
-    void clear() {
-      if (built) {
-        delete[] node_first_out;
-        delete[] node_first_in;
-        delete[] arc_source;
-        delete[] arc_target;
-        delete[] arc_next_out;
-        delete[] arc_next_in;
-      }
-      built = false;
-      node_num = 0;
-      arc_num = 0;
-    }
-    
-    template <typename Digraph, typename NodeRefMap, typename ArcRefMap>
-    void build(const Digraph& digraph, NodeRefMap& nodeRef, ArcRefMap& arcRef) {
-      typedef typename Digraph::Node GNode;
-      typedef typename Digraph::Arc GArc;
-
-      built = true;
-
-      node_num = countNodes(digraph);
-      arc_num = countArcs(digraph);
-
-      node_first_out = new int[node_num + 1];
-      node_first_in = new int[node_num];
-
-      arc_source = new int[arc_num];
-      arc_target = new int[arc_num];
-      arc_next_out = new int[arc_num];
-      arc_next_in = new int[arc_num];
-
-      int node_index = 0;
-      for (typename Digraph::NodeIt n(digraph); n != INVALID; ++n) {
-        nodeRef[n] = Node(node_index);
-        node_first_in[node_index] = -1;
-        ++node_index;
-      }
-
-      ArcLess<Digraph, NodeRefMap> arcLess(digraph, nodeRef);
-
-      int arc_index = 0;
-      for (typename Digraph::NodeIt n(digraph); n != INVALID; ++n) {
-        int source = nodeRef[n].id;
-        std::vector<GArc> arcs;
-        for (typename Digraph::OutArcIt e(digraph, n); e != INVALID; ++e) {
-          arcs.push_back(e);
-        }
-        if (!arcs.empty()) {
-          node_first_out[source] = arc_index;
-          std::sort(arcs.begin(), arcs.end(), arcLess);
-          for (typename std::vector<GArc>::iterator it = arcs.begin();
-               it != arcs.end(); ++it) {
-            int target = nodeRef[digraph.target(*it)].id;
-            arcRef[*it] = Arc(arc_index);
-            arc_source[arc_index] = source; 
-            arc_target[arc_index] = target;
-            arc_next_in[arc_index] = node_first_in[target];
-            node_first_in[target] = arc_index;
-            arc_next_out[arc_index] = arc_index + 1;
-            ++arc_index;
-          }
-          arc_next_out[arc_index - 1] = -1;
-        } else {
-          node_first_out[source] = arc_index;
-        }
-      }
-      node_first_out[node_num] = arc_num;
-    }
-    
-    template <typename ArcListIterator>
-    void build(int n, ArcListIterator first, ArcListIterator last) {
-      built = true;
-
-      node_num = n;
-      arc_num = std::distance(first, last);
-
-      node_first_out = new int[node_num + 1];
-      node_first_in = new int[node_num];
-
-      arc_source = new int[arc_num];
-      arc_target = new int[arc_num];
-      arc_next_out = new int[arc_num];
-      arc_next_in = new int[arc_num];
-      
-      for (int i = 0; i != node_num; ++i) {
-        node_first_in[i] = -1;
-      }      
-      
-      int arc_index = 0;
-      for (int i = 0; i != node_num; ++i) {
-        node_first_out[i] = arc_index;
-        for ( ; first != last && (*first).first == i; ++first) {
-          int j = (*first).second;
-          LEMON_ASSERT(j >= 0 && j < node_num,
-            "Wrong arc list for StaticDigraph::build()");
-          arc_source[arc_index] = i;
-          arc_target[arc_index] = j;
-          arc_next_in[arc_index] = node_first_in[j];
-          node_first_in[j] = arc_index;
-          arc_next_out[arc_index] = arc_index + 1;
-          ++arc_index;
-        }
-        if (arc_index > node_first_out[i])
-          arc_next_out[arc_index - 1] = -1;
-      }
-      LEMON_ASSERT(first == last,
-        "Wrong arc list for StaticDigraph::build()");
-      node_first_out[node_num] = arc_num;
-    }
-
-  protected:
-
-    void fastFirstOut(Arc& e, const Node& n) const {
-      e.id = node_first_out[n.id];
-    }
-
-    static void fastNextOut(Arc& e) {
-      ++e.id;
-    }
-    void fastLastOut(Arc& e, const Node& n) const {
-      e.id = node_first_out[n.id + 1];
-    }
-
-  protected:
-    bool built;
-    int node_num;
-    int arc_num;
-    int *node_first_out;
-    int *node_first_in;
-    int *arc_source;
-    int *arc_target;
-    int *arc_next_in;
-    int *arc_next_out;
-  };
-
-  typedef DigraphExtender<StaticDigraphBase> ExtendedStaticDigraphBase;
-
-
-  /// \ingroup graphs
-  ///
-  /// \brief A static directed graph class.
-  ///
-  /// \ref StaticDigraph is a highly efficient digraph implementation,
-  /// but it is fully static.
-  /// It stores only two \c int values for each node and only four \c int
-  /// values for each arc. Moreover it provides faster item iteration than
-  /// \ref ListDigraph and \ref SmartDigraph, especially using \c OutArcIt
-  /// iterators, since its arcs are stored in an appropriate order.
-  /// However it only provides build() and clear() functions and does not
-  /// support any other modification of the digraph.
-  ///
-  /// Since this digraph structure is completely static, its nodes and arcs
-  /// can be indexed with integers from the ranges <tt>[0..nodeNum()-1]</tt>
-  /// and <tt>[0..arcNum()-1]</tt>, respectively. 
-  /// The index of an item is the same as its ID, it can be obtained
-  /// using the corresponding \ref index() or \ref concepts::Digraph::id()
-  /// "id()" function. A node or arc with a certain index can be obtained
-  /// using node() or arc().
-  ///
-  /// This type fully conforms to the \ref concepts::Digraph "Digraph concept".
-  /// Most of its member functions and nested classes are documented
-  /// only in the concept class.
-  ///
-  /// This class provides constant time counting for nodes and arcs.
-  ///
-  /// \sa concepts::Digraph
-  class StaticDigraph : public ExtendedStaticDigraphBase {
-  public:
-
-    typedef ExtendedStaticDigraphBase Parent;
-  
-  public:
-  
-    /// \brief Constructor
-    ///
-    /// Default constructor.
-    StaticDigraph() : Parent() {}
-
-    /// \brief The node with the given index.
-    ///
-    /// This function returns the node with the given index.
-    /// \sa index()
-    static Node node(int ix) { return Parent::nodeFromId(ix); }
-
-    /// \brief The arc with the given index.
-    ///
-    /// This function returns the arc with the given index.
-    /// \sa index()
-    static Arc arc(int ix) { return Parent::arcFromId(ix); }
-
-    /// \brief The index of the given node.
-    ///
-    /// This function returns the index of the the given node.
-    /// \sa node()
-    static int index(Node node) { return Parent::id(node); }
-
-    /// \brief The index of the given arc.
-    ///
-    /// This function returns the index of the the given arc.
-    /// \sa arc()
-    static int index(Arc arc) { return Parent::id(arc); }
-
-    /// \brief Number of nodes.
-    ///
-    /// This function returns the number of nodes.
-    int nodeNum() const { return node_num; }
-
-    /// \brief Number of arcs.
-    ///
-    /// This function returns the number of arcs.
-    int arcNum() const { return arc_num; }
-
-    /// \brief Build the digraph copying another digraph.
-    ///
-    /// This function builds the digraph copying another digraph of any
-    /// kind. It can be called more than once, but in such case, the whole
-    /// structure and all maps will be cleared and rebuilt.
-    ///
-    /// This method also makes possible to copy a digraph to a StaticDigraph
-    /// structure using \ref DigraphCopy.
-    /// 
-    /// \param digraph An existing digraph to be copied.
-    /// \param nodeRef The node references will be copied into this map.
-    /// Its key type must be \c Digraph::Node and its value type must be
-    /// \c StaticDigraph::Node.
-    /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap"
-    /// concept.
-    /// \param arcRef The arc references will be copied into this map.
-    /// Its key type must be \c Digraph::Arc and its value type must be
-    /// \c StaticDigraph::Arc.
-    /// It must conform to the \ref concepts::WriteMap "WriteMap" concept.
-    ///
-    /// \note If you do not need the arc references, then you could use
-    /// \ref NullMap for the last parameter. However the node references
-    /// are required by the function itself, thus they must be readable
-    /// from the map.
-    template <typename Digraph, typename NodeRefMap, typename ArcRefMap>
-    void build(const Digraph& digraph, NodeRefMap& nodeRef, ArcRefMap& arcRef) {
-      if (built) Parent::clear();
-      Parent::build(digraph, nodeRef, arcRef);
-    }
-  
-    /// \brief Build the digraph from an arc list.
-    ///
-    /// This function builds the digraph from the given arc list.
-    /// It can be called more than once, but in such case, the whole
-    /// structure and all maps will be cleared and rebuilt.
-    ///
-    /// The list of the arcs must be given in the range <tt>[begin, end)</tt>
-    /// specified by STL compatible itartors whose \c value_type must be
-    /// <tt>std::pair<int,int></tt>.
-    /// Each arc must be specified by a pair of integer indices
-    /// from the range <tt>[0..n-1]</tt>. <i>The pairs must be in a
-    /// non-decreasing order with respect to their first values.</i>
-    /// If the k-th pair in the list is <tt>(i,j)</tt>, then
-    /// <tt>arc(k-1)</tt> will connect <tt>node(i)</tt> to <tt>node(j)</tt>.
-    ///
-    /// \param n The number of nodes.
-    /// \param begin An iterator pointing to the beginning of the arc list.
-    /// \param end An iterator pointing to the end of the arc list.
-    ///
-    /// For example, a simple digraph can be constructed like this.
-    /// \code
-    ///   std::vector<std::pair<int,int> > arcs;
-    ///   arcs.push_back(std::make_pair(0,1));
-    ///   arcs.push_back(std::make_pair(0,2));
-    ///   arcs.push_back(std::make_pair(1,3));
-    ///   arcs.push_back(std::make_pair(1,2));
-    ///   arcs.push_back(std::make_pair(3,0));
-    ///   StaticDigraph gr;
-    ///   gr.build(4, arcs.begin(), arcs.end());
-    /// \endcode
-    template <typename ArcListIterator>
-    void build(int n, ArcListIterator begin, ArcListIterator end) {
-      if (built) Parent::clear();
-      StaticDigraphBase::build(n, begin, end);
-      notifier(Node()).build();
-      notifier(Arc()).build();
-    }
-
-    /// \brief Clear the digraph.
-    ///
-    /// This function erases all nodes and arcs from the digraph.
-    void clear() {
-      Parent::clear();
-    }
-
-  protected:
-
-    using Parent::fastFirstOut;
-    using Parent::fastNextOut;
-    using Parent::fastLastOut;
-    
-  public:
-
-    class OutArcIt : public Arc {
-    public:
-
-      OutArcIt() { }
-
-      OutArcIt(Invalid i) : Arc(i) { }
-
-      OutArcIt(const StaticDigraph& digraph, const Node& node) {
-	digraph.fastFirstOut(*this, node);
-	digraph.fastLastOut(last, node);
-        if (last == *this) *this = INVALID;
-      }
-
-      OutArcIt(const StaticDigraph& digraph, const Arc& arc) : Arc(arc) {
-        if (arc != INVALID) {
-          digraph.fastLastOut(last, digraph.source(arc));
-        }
-      }
-
-      OutArcIt& operator++() { 
-        StaticDigraph::fastNextOut(*this);
-        if (last == *this) *this = INVALID;
-        return *this; 
-      }
-
-    private:
-      Arc last;
-    };
-
-    Node baseNode(const OutArcIt &arc) const {
-      return Parent::source(static_cast<const Arc&>(arc));
-    }
-
-    Node runningNode(const OutArcIt &arc) const {
-      return Parent::target(static_cast<const Arc&>(arc));
-    }
-
-    Node baseNode(const InArcIt &arc) const {
-      return Parent::target(static_cast<const Arc&>(arc));
-    }
-
-    Node runningNode(const InArcIt &arc) const {
-      return Parent::source(static_cast<const Arc&>(arc));
-    }
-
-  };
-
-}
-
-#endif
Index: scripts/bib2dox.py
===================================================================
--- scripts/bib2dox.py	(revision 801)
+++ scripts/bib2dox.py	(revision 792)
@@ -71,5 +71,5 @@
 author_rex = re.compile('\s+and\s+')
 rembraces_rex = re.compile('[{}]')
-capitalize_rex = re.compile('({[^}]*})')
+capitalize_rex = re.compile('({\w*})')
 
 # used by bibtexkeywords(data)
@@ -364,6 +364,4 @@
             if entrycont.has_key('note') and (entrycont['note'] != ''):
                 entry.append(entrycont['note'] + '.')
-            if entrycont.has_key('url') and (entrycont['url'] != ''):
-                entry.append(entrycont['url'] + '.')
 
             # generate keys for sorting and for the output
@@ -413,7 +411,4 @@
                 field = string.lower(field)
                 data =  data_rex.sub('\g<2>', line)
-
-            if field == 'url':
-                data = '\\url{' + data.strip() + '}'
             
             if field in ('author', 'editor'):
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt	(revision 817)
+++ test/CMakeLists.txt	(revision 745)
@@ -33,5 +33,4 @@
   min_cost_arborescence_test
   min_cost_flow_test
-  min_mean_cycle_test
   path_test
   preflow_test
Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 817)
+++ test/Makefile.am	(revision 745)
@@ -31,5 +31,4 @@
 	test/min_cost_arborescence_test \
 	test/min_cost_flow_test \
-	test/min_mean_cycle_test \
 	test/path_test \
 	test/preflow_test \
@@ -80,5 +79,4 @@
 test_min_cost_arborescence_test_SOURCES = test/min_cost_arborescence_test.cc
 test_min_cost_flow_test_SOURCES = test/min_cost_flow_test.cc
-test_min_mean_cycle_test_SOURCES = test/min_mean_cycle_test.cc
 test_path_test_SOURCES = test/path_test.cc
 test_preflow_test_SOURCES = test/preflow_test.cc
Index: test/adaptors_test.cc
===================================================================
--- test/adaptors_test.cc	(revision 550)
+++ test/adaptors_test.cc	(revision 488)
@@ -1372,18 +1372,26 @@
 
   GridGraph::EdgeMap<bool> dir_map(graph);
-  dir_map[graph.right(n1)] = graph.u(graph.right(n1)) != n1;
-  dir_map[graph.up(n1)] = graph.u(graph.up(n1)) == n1;
-  dir_map[graph.left(n4)] = graph.u(graph.left(n4)) == n4;
-  dir_map[graph.down(n4)] = graph.u(graph.down(n4)) == n4;
+  dir_map[graph.right(n1)] = graph.u(graph.right(n1)) == n1;
+  dir_map[graph.up(n1)] = graph.u(graph.up(n1)) != n1;
+  dir_map[graph.left(n4)] = graph.u(graph.left(n4)) != n4;
+  dir_map[graph.down(n4)] = graph.u(graph.down(n4)) != n4;
 
   // Apply several adaptors on the grid graph
-  typedef SplitNodes<Orienter< const GridGraph, GridGraph::EdgeMap<bool> > >
-    SplitGridGraph;
+  typedef SplitNodes< ReverseDigraph< const Orienter<
+            const GridGraph, GridGraph::EdgeMap<bool> > > >
+    RevSplitGridGraph;
+  typedef ReverseDigraph<const RevSplitGridGraph> SplitGridGraph;
   typedef Undirector<const SplitGridGraph> USplitGridGraph;
+  typedef Undirector<const USplitGridGraph> UUSplitGridGraph;
+  checkConcept<concepts::Digraph, RevSplitGridGraph>();
   checkConcept<concepts::Digraph, SplitGridGraph>();
   checkConcept<concepts::Graph, USplitGridGraph>();
-
-  SplitGridGraph adaptor = splitNodes(orienter(graph, dir_map));
+  checkConcept<concepts::Graph, UUSplitGridGraph>();
+
+  RevSplitGridGraph rev_adaptor =
+    splitNodes(reverseDigraph(orienter(graph, dir_map)));
+  SplitGridGraph adaptor = reverseDigraph(rev_adaptor);
   USplitGridGraph uadaptor = undirector(adaptor);
+  UUSplitGridGraph uuadaptor = undirector(uadaptor);
 
   // Check adaptor
@@ -1392,21 +1400,21 @@
   checkGraphConArcList(adaptor, 8);
 
-  checkGraphOutArcList(adaptor, adaptor.inNode(n1), 1);
-  checkGraphOutArcList(adaptor, adaptor.outNode(n1), 1);
-  checkGraphOutArcList(adaptor, adaptor.inNode(n2), 1);
-  checkGraphOutArcList(adaptor, adaptor.outNode(n2), 0);
-  checkGraphOutArcList(adaptor, adaptor.inNode(n3), 1);
-  checkGraphOutArcList(adaptor, adaptor.outNode(n3), 1);
-  checkGraphOutArcList(adaptor, adaptor.inNode(n4), 1);
-  checkGraphOutArcList(adaptor, adaptor.outNode(n4), 2);
-
-  checkGraphInArcList(adaptor, adaptor.inNode(n1), 1);
-  checkGraphInArcList(adaptor, adaptor.outNode(n1), 1);
-  checkGraphInArcList(adaptor, adaptor.inNode(n2), 2);
-  checkGraphInArcList(adaptor, adaptor.outNode(n2), 1);
-  checkGraphInArcList(adaptor, adaptor.inNode(n3), 1);
-  checkGraphInArcList(adaptor, adaptor.outNode(n3), 1);
-  checkGraphInArcList(adaptor, adaptor.inNode(n4), 0);
-  checkGraphInArcList(adaptor, adaptor.outNode(n4), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.inNode(n1), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.outNode(n1), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.inNode(n2), 2);
+  checkGraphOutArcList(adaptor, rev_adaptor.outNode(n2), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.inNode(n3), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.outNode(n3), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.inNode(n4), 0);
+  checkGraphOutArcList(adaptor, rev_adaptor.outNode(n4), 1);
+
+  checkGraphInArcList(adaptor, rev_adaptor.inNode(n1), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.outNode(n1), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.inNode(n2), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.outNode(n2), 0);
+  checkGraphInArcList(adaptor, rev_adaptor.inNode(n3), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.outNode(n3), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.inNode(n4), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.outNode(n4), 2);
 
   checkNodeIds(adaptor);
@@ -1431,12 +1439,27 @@
   checkGraphArcMap(uadaptor);
 
-  checkGraphIncEdgeArcLists(uadaptor, adaptor.inNode(n1), 2);
-  checkGraphIncEdgeArcLists(uadaptor, adaptor.outNode(n1), 2);
-  checkGraphIncEdgeArcLists(uadaptor, adaptor.inNode(n2), 3);
-  checkGraphIncEdgeArcLists(uadaptor, adaptor.outNode(n2), 1);
-  checkGraphIncEdgeArcLists(uadaptor, adaptor.inNode(n3), 2);
-  checkGraphIncEdgeArcLists(uadaptor, adaptor.outNode(n3), 2);
-  checkGraphIncEdgeArcLists(uadaptor, adaptor.inNode(n4), 1);
-  checkGraphIncEdgeArcLists(uadaptor, adaptor.outNode(n4), 3);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.inNode(n1), 2);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.outNode(n1), 2);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.inNode(n2), 3);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.outNode(n2), 1);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.inNode(n3), 2);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.outNode(n3), 2);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.inNode(n4), 1);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.outNode(n4), 3);
+
+  // Check uuadaptor
+  checkGraphNodeList(uuadaptor, 8);
+  checkGraphEdgeList(uuadaptor, 16);
+  checkGraphArcList(uuadaptor, 32);
+  checkGraphConEdgeList(uuadaptor, 16);
+  checkGraphConArcList(uuadaptor, 32);
+
+  checkNodeIds(uuadaptor);
+  checkEdgeIds(uuadaptor);
+  checkArcIds(uuadaptor);
+
+  checkGraphNodeMap(uuadaptor);
+  checkGraphEdgeMap(uuadaptor);
+  checkGraphArcMap(uuadaptor);
 }
 
Index: test/bellman_ford_test.cc
===================================================================
--- test/bellman_ford_test.cc	(revision 828)
+++ test/bellman_ford_test.cc	(revision 746)
@@ -97,5 +97,4 @@
     p  = const_bf_test.predMap();
     pp = const_bf_test.path(t);
-    pp = const_bf_test.negativeCycle();
     
     for (BF::ActiveIt it(const_bf_test); it != INVALID; ++it) {}
@@ -134,5 +133,4 @@
     b  = bf_test.reached(t);
     pp = bf_test.path(t);
-    pp = bf_test.negativeCycle();
   }
 }
Index: test/digraph_test.cc
===================================================================
--- test/digraph_test.cc	(revision 827)
+++ test/digraph_test.cc	(revision 787)
@@ -20,5 +20,4 @@
 #include <lemon/list_graph.h>
 #include <lemon/smart_graph.h>
-#include <lemon/static_graph.h>
 #include <lemon/full_graph.h>
 
@@ -330,8 +329,4 @@
     checkConcept<ClearableDigraphComponent<>, SmartDigraph>();
   }
-  { // Checking StaticDigraph
-    checkConcept<Digraph, StaticDigraph>();
-    checkConcept<ClearableDigraphComponent<>, StaticDigraph>();
-  }
   { // Checking FullDigraph
     checkConcept<Digraph, FullDigraph>();
@@ -387,111 +382,4 @@
   check(!g.valid(g.nodeFromId(-1)), "Wrong validity check");
   check(!g.valid(g.arcFromId(-1)), "Wrong validity check");
-}
-
-void checkStaticDigraph() {
-  SmartDigraph g;
-  SmartDigraph::NodeMap<StaticDigraph::Node> nref(g);
-  SmartDigraph::ArcMap<StaticDigraph::Arc> aref(g);
-  
-  StaticDigraph G;
-  
-  checkGraphNodeList(G, 0);
-  checkGraphArcList(G, 0);
-
-  G.build(g, nref, aref);
-
-  checkGraphNodeList(G, 0);
-  checkGraphArcList(G, 0);
-
-  SmartDigraph::Node
-    n1 = g.addNode(),
-    n2 = g.addNode(),
-    n3 = g.addNode();
-
-  G.build(g, nref, aref);
-
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 0);
-
-  SmartDigraph::Arc a1 = g.addArc(n1, n2);
-
-  G.build(g, nref, aref);
-
-  check(G.source(aref[a1]) == nref[n1] && G.target(aref[a1]) == nref[n2],
-        "Wrong arc or wrong references");
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 1);
-
-  checkGraphOutArcList(G, nref[n1], 1);
-  checkGraphOutArcList(G, nref[n2], 0);
-  checkGraphOutArcList(G, nref[n3], 0);
-
-  checkGraphInArcList(G, nref[n1], 0);
-  checkGraphInArcList(G, nref[n2], 1);
-  checkGraphInArcList(G, nref[n3], 0);
-
-  checkGraphConArcList(G, 1);
-
-  SmartDigraph::Arc
-    a2 = g.addArc(n2, n1),
-    a3 = g.addArc(n2, n3),
-    a4 = g.addArc(n2, n3);
-
-  digraphCopy(g, G).nodeRef(nref).run();
-
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 4);
-
-  checkGraphOutArcList(G, nref[n1], 1);
-  checkGraphOutArcList(G, nref[n2], 3);
-  checkGraphOutArcList(G, nref[n3], 0);
-
-  checkGraphInArcList(G, nref[n1], 1);
-  checkGraphInArcList(G, nref[n2], 1);
-  checkGraphInArcList(G, nref[n3], 2);
-
-  checkGraphConArcList(G, 4);
-
-  std::vector<std::pair<int,int> > arcs;
-  arcs.push_back(std::make_pair(0,1));
-  arcs.push_back(std::make_pair(0,2));
-  arcs.push_back(std::make_pair(1,3));
-  arcs.push_back(std::make_pair(1,2));
-  arcs.push_back(std::make_pair(3,0));
-  arcs.push_back(std::make_pair(3,3));
-  arcs.push_back(std::make_pair(4,2));
-  arcs.push_back(std::make_pair(4,3));
-  arcs.push_back(std::make_pair(4,1));
-
-  G.build(6, arcs.begin(), arcs.end());
-  
-  checkGraphNodeList(G, 6);
-  checkGraphArcList(G, 9);
-
-  checkGraphOutArcList(G, G.node(0), 2);
-  checkGraphOutArcList(G, G.node(1), 2);
-  checkGraphOutArcList(G, G.node(2), 0);
-  checkGraphOutArcList(G, G.node(3), 2);
-  checkGraphOutArcList(G, G.node(4), 3);
-  checkGraphOutArcList(G, G.node(5), 0);
-
-  checkGraphInArcList(G, G.node(0), 1);
-  checkGraphInArcList(G, G.node(1), 2);
-  checkGraphInArcList(G, G.node(2), 3);
-  checkGraphInArcList(G, G.node(3), 3);
-  checkGraphInArcList(G, G.node(4), 0);
-  checkGraphInArcList(G, G.node(5), 0);
-
-  checkGraphConArcList(G, 9);
-
-  checkNodeIds(G);
-  checkArcIds(G);
-  checkGraphNodeMap(G);
-  checkGraphArcMap(G);
-  
-  int n = G.nodeNum();
-  int m = G.arcNum();
-  check(G.index(G.node(n-1)) == n-1, "Wrong index.");
-  check(G.index(G.arc(m-1)) == m-1, "Wrong index.");
 }
 
@@ -548,7 +436,4 @@
     checkDigraphValidity<SmartDigraph>();
   }
-  { // Checking StaticDigraph
-    checkStaticDigraph();
-  }
   { // Checking FullDigraph
     checkFullDigraph(8);
Index: st/min_mean_cycle_test.cc
===================================================================
--- test/min_mean_cycle_test.cc	(revision 816)
+++ 	(revision )
@@ -1,216 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2009
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <iostream>
-#include <sstream>
-
-#include <lemon/smart_graph.h>
-#include <lemon/lgf_reader.h>
-#include <lemon/path.h>
-#include <lemon/concepts/digraph.h>
-#include <lemon/concept_check.h>
-
-#include <lemon/karp.h>
-#include <lemon/hartmann_orlin.h>
-#include <lemon/howard.h>
-
-#include "test_tools.h"
-
-using namespace lemon;
-
-char test_lgf[] =
-  "@nodes\n"
-  "label\n"
-  "1\n"
-  "2\n"
-  "3\n"
-  "4\n"
-  "5\n"
-  "6\n"
-  "7\n"
-  "@arcs\n"
-  "    len1 len2 len3 len4  c1 c2 c3 c4\n"
-  "1 2    1    1    1    1   0  0  0  0\n"
-  "2 4    5    5    5    5   1  0  0  0\n"
-  "2 3    8    8    8    8   0  0  0  0\n"
-  "3 2   -2    0    0    0   1  0  0  0\n"
-  "3 4    4    4    4    4   0  0  0  0\n"
-  "3 7   -4   -4   -4   -4   0  0  0  0\n"
-  "4 1    2    2    2    2   0  0  0  0\n"
-  "4 3    3    3    3    3   1  0  0  0\n"
-  "4 4    3    3    0    0   0  0  1  0\n"
-  "5 2    4    4    4    4   0  0  0  0\n"
-  "5 6    3    3    3    3   0  1  0  0\n"
-  "6 5    2    2    2    2   0  1  0  0\n"
-  "6 4   -1   -1   -1   -1   0  0  0  0\n"
-  "6 7    1    1    1    1   0  0  0  0\n"
-  "7 7    4    4    4   -1   0  0  0  1\n";
-
-                        
-// Check the interface of an MMC algorithm
-template <typename GR, typename Value>
-struct MmcClassConcept
-{
-  template <typename MMC>
-  struct Constraints {
-    void constraints() {
-      const Constraints& me = *this;
-
-      typedef typename MMC
-        ::template SetPath<ListPath<GR> >
-        ::template SetLargeValue<Value>
-        ::Create MmcAlg;
-      MmcAlg mmc(me.g, me.length);
-      const MmcAlg& const_mmc = mmc;
-      
-      typename MmcAlg::Tolerance tol = const_mmc.tolerance();
-      mmc.tolerance(tol);
-      
-      b = mmc.cycle(p).run();
-      b = mmc.findMinMean();
-      b = mmc.findCycle();
-
-      v = const_mmc.cycleLength();
-      i = const_mmc.cycleArcNum();
-      d = const_mmc.cycleMean();
-      p = const_mmc.cycle();
-    }
-
-    typedef concepts::ReadMap<typename GR::Arc, Value> LM;
-  
-    GR g;
-    LM length;
-    ListPath<GR> p;
-    Value v;
-    int i;
-    double d;
-    bool b;
-  };
-};
-
-// Perform a test with the given parameters
-template <typename MMC>
-void checkMmcAlg(const SmartDigraph& gr,
-                 const SmartDigraph::ArcMap<int>& lm,
-                 const SmartDigraph::ArcMap<int>& cm,
-                 int length, int size) {
-  MMC alg(gr, lm);
-  alg.findMinMean();
-  check(alg.cycleMean() == static_cast<double>(length) / size,
-        "Wrong cycle mean");
-  alg.findCycle();
-  check(alg.cycleLength() == length && alg.cycleArcNum() == size,
-        "Wrong path");
-  SmartDigraph::ArcMap<int> cycle(gr, 0);
-  for (typename MMC::Path::ArcIt a(alg.cycle()); a != INVALID; ++a) {
-    ++cycle[a];
-  }
-  for (SmartDigraph::ArcIt a(gr); a != INVALID; ++a) {
-    check(cm[a] == cycle[a], "Wrong path");
-  }
-}
-
-// Class for comparing types
-template <typename T1, typename T2>
-struct IsSameType {
-  static const int result = 0;
-};
-
-template <typename T>
-struct IsSameType<T,T> {
-  static const int result = 1;
-};
-
-
-int main() {
-  #ifdef LEMON_HAVE_LONG_LONG
-    typedef long long long_int;
-  #else
-    typedef long long_int;
-  #endif
-
-  // Check the interface
-  {
-    typedef concepts::Digraph GR;
-
-    // Karp
-    checkConcept< MmcClassConcept<GR, int>,
-                  Karp<GR, concepts::ReadMap<GR::Arc, int> > >();
-    checkConcept< MmcClassConcept<GR, float>,
-                  Karp<GR, concepts::ReadMap<GR::Arc, float> > >();
-    
-    // HartmannOrlin
-    checkConcept< MmcClassConcept<GR, int>,
-                  HartmannOrlin<GR, concepts::ReadMap<GR::Arc, int> > >();
-    checkConcept< MmcClassConcept<GR, float>,
-                  HartmannOrlin<GR, concepts::ReadMap<GR::Arc, float> > >();
-    
-    // Howard
-    checkConcept< MmcClassConcept<GR, int>,
-                  Howard<GR, concepts::ReadMap<GR::Arc, int> > >();
-    checkConcept< MmcClassConcept<GR, float>,
-                  Howard<GR, concepts::ReadMap<GR::Arc, float> > >();
-
-    if (IsSameType<Howard<GR, concepts::ReadMap<GR::Arc, int> >::LargeValue,
-          long_int>::result == 0) check(false, "Wrong LargeValue type");
-    if (IsSameType<Howard<GR, concepts::ReadMap<GR::Arc, float> >::LargeValue,
-          double>::result == 0) check(false, "Wrong LargeValue type");
-  }
-
-  // Run various tests
-  {
-    typedef SmartDigraph GR;
-    DIGRAPH_TYPEDEFS(GR);
-    
-    GR gr;
-    IntArcMap l1(gr), l2(gr), l3(gr), l4(gr);
-    IntArcMap c1(gr), c2(gr), c3(gr), c4(gr);
-    
-    std::istringstream input(test_lgf);
-    digraphReader(gr, input).
-      arcMap("len1", l1).
-      arcMap("len2", l2).
-      arcMap("len3", l3).
-      arcMap("len4", l4).
-      arcMap("c1", c1).
-      arcMap("c2", c2).
-      arcMap("c3", c3).
-      arcMap("c4", c4).
-      run();
-
-    // Karp
-    checkMmcAlg<Karp<GR, IntArcMap> >(gr, l1, c1,  6, 3);
-    checkMmcAlg<Karp<GR, IntArcMap> >(gr, l2, c2,  5, 2);
-    checkMmcAlg<Karp<GR, IntArcMap> >(gr, l3, c3,  0, 1);
-    checkMmcAlg<Karp<GR, IntArcMap> >(gr, l4, c4, -1, 1);
-
-    // HartmannOrlin
-    checkMmcAlg<HartmannOrlin<GR, IntArcMap> >(gr, l1, c1,  6, 3);
-    checkMmcAlg<HartmannOrlin<GR, IntArcMap> >(gr, l2, c2,  5, 2);
-    checkMmcAlg<HartmannOrlin<GR, IntArcMap> >(gr, l3, c3,  0, 1);
-    checkMmcAlg<HartmannOrlin<GR, IntArcMap> >(gr, l4, c4, -1, 1);
-
-    // Howard
-    checkMmcAlg<Howard<GR, IntArcMap> >(gr, l1, c1,  6, 3);
-    checkMmcAlg<Howard<GR, IntArcMap> >(gr, l2, c2,  5, 2);
-    checkMmcAlg<Howard<GR, IntArcMap> >(gr, l3, c3,  0, 1);
-    checkMmcAlg<Howard<GR, IntArcMap> >(gr, l4, c4, -1, 1);
-  }
-
-  return 0;
-}
Index: test/test_tools.h
===================================================================
--- test/test_tools.h	(revision 810)
+++ test/test_tools.h	(revision 463)
@@ -38,13 +38,9 @@
 ///print something like this (and then exits).
 ///\verbatim file_name.cc:123: error: This is obviously false. \endverbatim
-#define check(rc, msg)                                                  \
-  {                                                                     \
-    if(!(rc)) {                                                         \
-      std::cerr << __FILE__ ":" << __LINE__ << ": error: "              \
-                << msg << std::endl;                                    \
-      abort();                                                          \
-    } else { }                                                          \
-  }                                                                     \
-    
+#define check(rc, msg) \
+  if(!(rc)) { \
+    std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \
+    abort(); \
+  } else { } \
 
 #endif
