Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt	(revision 770)
+++ test/CMakeLists.txt	(revision 698)
@@ -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 770)
+++ test/Makefile.am	(revision 698)
@@ -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/bellman_ford_test.cc
===================================================================
--- test/bellman_ford_test.cc	(revision 699)
+++ test/bellman_ford_test.cc	(revision 781)
@@ -97,4 +97,5 @@
     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) {}
@@ -133,4 +134,5 @@
     b  = bf_test.reached(t);
     pp = bf_test.path(t);
+    pp = bf_test.negativeCycle();
   }
 }
Index: test/digraph_test.cc
===================================================================
--- test/digraph_test.cc	(revision 780)
+++ test/digraph_test.cc	(revision 440)
@@ -20,5 +20,4 @@
 #include <lemon/list_graph.h>
 #include <lemon/smart_graph.h>
-#include <lemon/static_graph.h>
 #include <lemon/full_graph.h>
 
@@ -36,7 +35,4 @@
   checkGraphNodeList(G, 0);
   checkGraphArcList(G, 0);
-
-  G.reserveNode(3);
-  G.reserveArc(4);
 
   Node
@@ -288,12 +284,4 @@
 
   snapshot.restore();
-  snapshot.save(G);
-
-  checkGraphNodeList(G, 4);
-  checkGraphArcList(G, 4);
-
-  G.addArc(G.addNode(), G.addNode());
-
-  snapshot.restore();
 
   checkGraphNodeList(G, 4);
@@ -330,8 +318,4 @@
     checkConcept<ClearableDigraphComponent<>, SmartDigraph>();
   }
-  { // Checking StaticDigraph
-    checkConcept<Digraph, StaticDigraph>();
-    checkConcept<ClearableDigraphComponent<>, StaticDigraph>();
-  }
   { // Checking FullDigraph
     checkConcept<Digraph, FullDigraph>();
@@ -389,120 +373,8 @@
 }
 
-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.");
-}
-
 void checkFullDigraph(int num) {
   typedef FullDigraph Digraph;
   DIGRAPH_TYPEDEFS(Digraph);
-
   Digraph G(num);
-  check(G.nodeNum() == num && G.arcNum() == num * num, "Wrong size");
-
-  G.resize(num);
-  check(G.nodeNum() == num && G.arcNum() == num * num, "Wrong size");
 
   checkGraphNodeList(G, num);
@@ -548,7 +420,4 @@
     checkDigraphValidity<SmartDigraph>();
   }
-  { // Checking StaticDigraph
-    checkStaticDigraph();
-  }
   { // Checking FullDigraph
     checkFullDigraph(8);
Index: test/graph_test.cc
===================================================================
--- test/graph_test.cc	(revision 740)
+++ test/graph_test.cc	(revision 440)
@@ -39,7 +39,4 @@
   checkGraphArcList(G, 0);
 
-  G.reserveNode(3);
-  G.reserveEdge(3);
-
   Node
     n1 = G.addNode(),
@@ -260,17 +257,8 @@
 
   snapshot.restore();
-  snapshot.save(G);
 
   checkGraphNodeList(G, 4);
   checkGraphEdgeList(G, 3);
   checkGraphArcList(G, 6);
-  
-  G.addEdge(G.addNode(), G.addNode());
-
-  snapshot.restore();
-
-  checkGraphNodeList(G, 4);
-  checkGraphEdgeList(G, 3);
-  checkGraphArcList(G, 6);
 }
 
@@ -280,11 +268,4 @@
 
   Graph G(num);
-  check(G.nodeNum() == num && G.edgeNum() == num * (num - 1) / 2,
-        "Wrong size");
-
-  G.resize(num);
-  check(G.nodeNum() == num && G.edgeNum() == num * (num - 1) / 2,
-        "Wrong size");
-
   checkGraphNodeList(G, num);
   checkGraphEdgeList(G, num * (num - 1) / 2);
@@ -431,8 +412,4 @@
   check(G.height() == height, "Wrong row number");
 
-  G.resize(width, height);
-  check(G.width() == width, "Wrong column number");
-  check(G.height() == height, "Wrong row number");
-
   for (int i = 0; i < width; ++i) {
     for (int j = 0; j < height; ++j) {
@@ -510,9 +487,4 @@
 
   HypercubeGraph G(dim);
-  check(G.dimension() == dim, "Wrong dimension");
-
-  G.resize(dim);
-  check(G.dimension() == dim, "Wrong dimension");
-  
   checkGraphNodeList(G, 1 << dim);
   checkGraphEdgeList(G, dim * (1 << (dim-1)));
Index: test/min_mean_cycle_test.cc
===================================================================
--- test/min_mean_cycle_test.cc	(revision 769)
+++ 	(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/mip_test.cc
===================================================================
--- test/mip_test.cc	(revision 748)
+++ test/mip_test.cc	(revision 631)
@@ -51,6 +51,5 @@
   if (stat ==  MipSolver::OPTIMAL) {
     std::ostringstream sbuf;
-    sbuf << "Wrong optimal value ("<< mip.solValue()
-         <<" instead of " << exp_opt << ")";
+    buf << "Wrong optimal value: the right optimum is " << exp_opt;
     check(std::abs(mip.solValue()-exp_opt) < 1e-3, sbuf.str());
     //+ecvt(exp_opt,2)
Index: test/test_tools.h
===================================================================
--- test/test_tools.h	(revision 763)
+++ test/test_tools.h	(revision 440)
@@ -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
