Index: src/hugo/path.h
===================================================================
--- src/hugo/path.h	(revision 819)
+++ src/hugo/path.h	(revision 831)
@@ -30,5 +30,5 @@
 #include <hugo/invalid.h>
 #include <hugo/error.h>
-#include <hugo/debug.h>
+//#include <hugo/debug.h>
 
 namespace hugo {
@@ -49,5 +49,5 @@
   //!
   //! \todo Thoroughfully check all the range and consistency tests.
-  template<typename Graph, typename DM = DefaultDebugMode>
+  template<typename Graph>
   class DirPath {
   public:
@@ -75,5 +75,5 @@
     /// \warning It is an error if the two edges are not in order!
     DirPath(const DirPath &P, const NodeIt &a, const NodeIt &b) {
-      if( DM::range_check && (!a.valid() || !b.valid) ) {
+      if(!a.valid() || !b.valid) {
 	// FIXME: this check should be more elaborate...
 	fault("DirPath, subpath ctor: invalid bounding nodes");
@@ -88,5 +88,5 @@
     /// \warning It is an error if the two edges are not in order!
     DirPath(const DirPath &P, const EdgeIt &a, const EdgeIt &b) {
-      if( DM::range_check && (!a.valid() || !b.valid) ) {
+      if (!a.valid() || !b.valid) {
 	// FIXME: this check should be more elaborate...
 	fault("DirPath, subpath ctor: invalid bounding nodes");
@@ -108,5 +108,5 @@
     /// Starting point of the path.
     /// Returns INVALID if the path is empty.
-    GraphNode from() const {
+    GraphNode tail() const {
       return empty() ? INVALID : gr->tail(edges[0]);
     }
@@ -115,5 +115,5 @@
     /// End point of the path.
     /// Returns INVALID if the path is empty.
-    GraphNode to() const {
+    GraphNode head() const {
       return empty() ? INVALID : gr->head(edges[length()-1]);
     }
@@ -128,5 +128,5 @@
     /// \brief Initializes node iterator to point to the node of a given index.
     NodeIt& nth(NodeIt &i, int n) const {
-      if( DM::range_check && (n<0 || n>int(length())) )
+      if(n<0 || n>int(length())) 
 	fault("DirPath::nth: index out of range");
       return i=NodeIt(*this, n);
@@ -135,5 +135,5 @@
     /// \brief Initializes edge iterator to point to the edge of a given index.
     EdgeIt& nth(EdgeIt &i, int n) const {
-      if( DM::range_check && (n<0 || n>=int(length())) )
+      if(n<0 || n>=int(length())) 
 	fault("DirPath::nth: index out of range");
       return i=EdgeIt(*this, n);
@@ -149,5 +149,5 @@
     static
     It& next(It &e) {
-      if( DM::range_check && !e.valid() )
+      if( !e.valid() )
 	fault("DirPath::next() on invalid iterator");
       return ++e;
@@ -157,5 +157,5 @@
     /// given edge iterator.
     NodeIt head(const EdgeIt& e) const {
-      if( DM::range_check && !e.valid() )
+      if( !e.valid() )
 	fault("DirPath::head() on invalid iterator");
       return NodeIt(*this, e.idx+1);
@@ -165,5 +165,5 @@
     /// given edge iterator.
     NodeIt tail(const EdgeIt& e) const {
-      if( DM::range_check && !e.valid() )
+      if( !e.valid() )
 	fault("DirPath::tail() on invalid iterator");
       return NodeIt(*this, e.idx);
@@ -253,5 +253,5 @@
       operator const GraphNode& () const {
 	if(idx >= p->length())
-	  return p->to();
+	  return p->head();
 	else if(idx >= 0)
 	  return p->gr->tail(p->edges[idx]);
@@ -313,5 +313,5 @@
       ///\sa setStartNode
       void pushFront(const GraphEdge& e) {
-	if( DM::consistensy_check && !empty() && P.gr->head(e)!=from() ) {
+	if( !empty() && P.gr->head(e)!=tail() ) {
 	  fault("DirPath::Builder::pushFront: nonincident edge");
 	}
@@ -324,5 +324,5 @@
       ///\sa setStartNode
       void pushBack(const GraphEdge& e) {
-	if( DM::consistensy_check && !empty() && P.gr->tail(e)!=to() ) {
+	if( !empty() && P.gr->tail(e)!=head() ) {
 	  fault("DirPath::Builder::pushBack: nonincident edge");
 	}
@@ -356,4 +356,7 @@
       }
 
+      void reserveFront(size_t r) {}
+      void reserveBack(size_t r) {}
+
     private:
       bool empty() {
@@ -361,5 +364,5 @@
       }
 
-      GraphNode from() const {
+      GraphNode tail() const {
 	if( ! front.empty() )
 	  return P.gr->tail(front[front.size()-1]);
@@ -371,5 +374,5 @@
 	  return INVALID;
       }
-      GraphNode to() const {
+      GraphNode head() const {
 	if( ! back.empty() )
 	  return P.gr->head(back[back.size()-1]);
@@ -412,5 +415,5 @@
   //!
   //! \todo Thoroughfully check all the range and consistency tests.
-  template<typename Graph, typename DM = DefaultDebugMode>
+  template<typename Graph>
   class UndirPath {
   public:
@@ -438,5 +441,5 @@
     /// \warning It is an error if the two edges are not in order!
     UndirPath(const UndirPath &P, const NodeIt &a, const NodeIt &b) {
-      if( DM::range_check && (!a.valid() || !b.valid) ) {
+      if(!a.valid() || !b.valid) {
 	// FIXME: this check should be more elaborate...
 	fault("UndirPath, subpath ctor: invalid bounding nodes");
@@ -451,5 +454,5 @@
     /// \warning It is an error if the two edges are not in order!
     UndirPath(const UndirPath &P, const EdgeIt &a, const EdgeIt &b) {
-      if( DM::range_check && (!a.valid() || !b.valid) ) {
+      if(!a.valid() || !b.valid) {
 	// FIXME: this check should be more elaborate...
 	fault("UndirPath, subpath ctor: invalid bounding nodes");
@@ -471,5 +474,5 @@
     /// Starting point of the path.
     /// Returns INVALID if the path is empty.
-    GraphNode from() const {
+    GraphNode tail() const {
       return empty() ? INVALID : gr->tail(edges[0]);
     }
@@ -478,5 +481,5 @@
     /// End point of the path.
     /// Returns INVALID if the path is empty.
-    GraphNode to() const {
+    GraphNode head() const {
       return empty() ? INVALID : gr->head(edges[length()-1]);
     }
@@ -491,5 +494,5 @@
     /// \brief Initializes node iterator to point to the node of a given index.
     NodeIt& nth(NodeIt &i, int n) const {
-      if( DM::range_check && (n<0 || n>int(length())) )
+      if(n<0 || n>int(length()))
 	fault("UndirPath::nth: index out of range");
       return i=NodeIt(*this, n);
@@ -498,5 +501,5 @@
     /// \brief Initializes edge iterator to point to the edge of a given index.
     EdgeIt& nth(EdgeIt &i, int n) const {
-      if( DM::range_check && (n<0 || n>=int(length())) )
+      if(n<0 || n>=int(length()))
 	fault("UndirPath::nth: index out of range");
       return i=EdgeIt(*this, n);
@@ -512,5 +515,5 @@
     static
     It& next(It &e) {
-      if( DM::range_check && !e.valid() )
+      if( !e.valid() )
 	fault("UndirPath::next() on invalid iterator");
       return ++e;
@@ -520,5 +523,5 @@
     /// given edge iterator.
     NodeIt head(const EdgeIt& e) const {
-      if( DM::range_check && !e.valid() )
+      if( !e.valid() )
 	fault("UndirPath::head() on invalid iterator");
       return NodeIt(*this, e.idx+1);
@@ -528,5 +531,5 @@
     /// given edge iterator.
     NodeIt tail(const EdgeIt& e) const {
-      if( DM::range_check && !e.valid() )
+      if( !e.valid() )
 	fault("UndirPath::tail() on invalid iterator");
       return NodeIt(*this, e.idx);
@@ -614,5 +617,5 @@
       operator const GraphNode& () const {
 	if(idx >= p->length())
-	  return p->to();
+	  return p->head();
 	else if(idx >= 0)
 	  return p->gr->tail(p->edges[idx]);
@@ -674,5 +677,5 @@
       ///\sa setStartNode
       void pushFront(const GraphEdge& e) {
-	if( DM::consistensy_check && !empty() && P.gr->head(e)!=from() ) {
+	if( !empty() && P.gr->head(e)!=tail() ) {
 	  fault("UndirPath::Builder::pushFront: nonincident edge");
 	}
@@ -685,5 +688,5 @@
       ///\sa setStartNode
       void pushBack(const GraphEdge& e) {
-	if( DM::consistensy_check && !empty() && P.gr->tail(e)!=to() ) {
+	if( !empty() && P.gr->tail(e)!=head() ) {
 	  fault("UndirPath::Builder::pushBack: nonincident edge");
 	}
@@ -717,4 +720,7 @@
       }
 
+      void reserveFront(size_t r) {}
+      void reserveBack(size_t r) {}
+
     private:
       bool empty() {
@@ -722,5 +728,5 @@
       }
 
-      GraphNode from() const {
+      GraphNode tail() const {
 	if( ! front.empty() )
 	  return P.gr->tail(front[front.size()-1]);
@@ -732,5 +738,5 @@
 	  return INVALID;
       }
-      GraphNode to() const {
+      GraphNode head() const {
 	if( ! back.empty() )
 	  return P.gr->head(back[back.size()-1]);
@@ -792,6 +798,6 @@
     
     size_t length() const { return edges.size(); }
-    GraphNode from() const { return _first; }
-    GraphNode to() const { return _last; }
+    GraphNode tail() const { return _first; }
+    GraphNode head() const { return _last; }
 
     NodeIt& first(NodeIt &n) const { return nth(n, 0); }
