Index: src/hugo/dijkstra.h
===================================================================
--- src/hugo/dijkstra.h	(revision 693)
+++ src/hugo/dijkstra.h	(revision 694)
@@ -85,5 +85,5 @@
     ///Initialize maps
     
-    ///\todo Error if \c G or are \c NULL. What about \c length
+    ///\todo Error if \c G or are \c NULL. What about \c length?
     ///\todo Better memory allocation (instead of new).
     void init_maps() 
@@ -197,72 +197,5 @@
     }
     
-    void run(Node s);
-    
-    ///The distance of a node from the root.
-
-    ///Returns the distance of a node from the root.
-    ///\pre \ref run() must be called before using this function.
-    ///\warning If node \c v in unreachable from the root the return value
-    ///of this funcion is undefined.
-    ValueType dist(Node v) const { return (*distance)[v]; }
-
-    ///Returns the 'previous edge' of the shortest path tree.
-
-    ///For a node \c v it returns the 'previous edge' of the shortest path tree,
-    ///i.e. it returns the last edge from a shortest path from the root to \c
-    ///v. It is \ref INVALID
-    ///if \c v is unreachable from the root or if \c v=s. The
-    ///shortest path tree used here is equal to the shortest path tree used in
-    ///\ref predNode(Node v).  \pre \ref run() must be called before using
-    ///this function.
-    Edge pred(Node v) const { return (*predecessor)[v]; }
-
-    ///Returns the 'previous node' of the shortest path tree.
-
-    ///For a node \c v it returns the 'previous node' of the shortest path tree,
-    ///i.e. it returns the last but one node from a shortest path from the
-    ///root to \c /v. It is INVALID if \c v is unreachable from the root or if
-    ///\c v=s. The shortest path tree used here is equal to the shortest path
-    ///tree used in \ref pred(Node v).  \pre \ref run() must be called before
-    ///using this function.
-    Node predNode(Node v) const { return (*pred_node)[v]; }
-    
-    ///Returns a reference to the NodeMap of distances.
-
-    ///Returns a reference to the NodeMap of distances. \pre \ref run() must
-    ///be called before using this function.
-    const DistMap &distMap() const { return *distance;}
- 
-    ///Returns a reference to the shortest path tree map.
-
-    ///Returns a reference to the NodeMap of the edges of the
-    ///shortest path tree.
-    ///\pre \ref run() must be called before using this function.
-    const PredMap &predMap() const { return *predecessor;}
- 
-    ///Returns a reference to the map of nodes of shortest paths.
-
-    ///Returns a reference to the NodeMap of the last but one nodes of the
-    ///shortest path tree.
-    ///\pre \ref run() must be called before using this function.
-    const PredNodeMap &predNodeMap() const { return *pred_node;}
-
-    ///Checks if a node is reachable from the root.
-
-    ///Returns \c true if \c v is reachable from the root.
-    ///\warning the root node is reported to be unreached!
-    ///\todo Is this what we want?
-    ///\pre \ref run() must be called before using this function.
-    ///
-    bool reached(Node v) { return G->valid((*predecessor)[v]); }
-    
-  };
-  
-
-  // **********************************************************************
-  //  IMPLEMENTATIONS
-  // **********************************************************************
-
-  ///Runs %Dijkstra algorithm from node the root.
+  ///Runs %Dijkstra algorithm from node \c s.
 
   ///This method runs the %Dijkstra algorithm from a root node \c s
@@ -272,25 +205,24 @@
   ///- The shortest path tree.
   ///- The distance of each node from the root.
-  template <typename GR, typename LM,
-	    template<class,class,class,class> class Heap >
-  void Dijkstra<GR,LM,Heap>::run(Node s) {
-
-    init_maps();
-
-    for ( NodeIt u(*G) ; G->valid(u) ; G->next(u) ) {
-      predecessor->set(u,INVALID);
-      pred_node->set(u,INVALID);
-    }
-    
-    typename GR::template NodeMap<int> heap_map(*G,-1);
-    
-    typedef Heap<Node, ValueType, typename GR::template NodeMap<int>,
+    
+    void run(Node s) {
+      
+      init_maps();
+      
+      for ( NodeIt u(*G) ; G->valid(u) ; G->next(u) ) {
+	predecessor->set(u,INVALID);
+	pred_node->set(u,INVALID);
+      }
+      
+      typename GR::template NodeMap<int> heap_map(*G,-1);
+      
+      typedef Heap<Node, ValueType, typename GR::template NodeMap<int>,
       std::less<ValueType> > 
       HeapType;
-    
-    HeapType heap(heap_map);
-    
-    heap.push(s,0); 
-    
+      
+      HeapType heap(heap_map);
+      
+      heap.push(s,0); 
+      
       while ( !heap.empty() ) {
 	
@@ -300,5 +232,5 @@
 	distance->set(v, oldvalue);
 	
-	  
+	
 	for(OutEdgeIt e(*G,v); G->valid(e); G->next(e)) {
 	  Node w=G->bNode(e); 
@@ -322,5 +254,70 @@
 	}
       }
-  }
+    }
+    
+    ///The distance of a node from the root.
+
+    ///Returns the distance of a node from the root.
+    ///\pre \ref run() must be called before using this function.
+    ///\warning If node \c v in unreachable from the root the return value
+    ///of this funcion is undefined.
+    ValueType dist(Node v) const { return (*distance)[v]; }
+
+    ///Returns the 'previous edge' of the shortest path tree.
+
+    ///For a node \c v it returns the 'previous edge' of the shortest path tree,
+    ///i.e. it returns the last edge from a shortest path from the root to \c
+    ///v. It is \ref INVALID
+    ///if \c v is unreachable from the root or if \c v=s. The
+    ///shortest path tree used here is equal to the shortest path tree used in
+    ///\ref predNode(Node v).  \pre \ref run() must be called before using
+    ///this function.
+    Edge pred(Node v) const { return (*predecessor)[v]; }
+
+    ///Returns the 'previous node' of the shortest path tree.
+
+    ///For a node \c v it returns the 'previous node' of the shortest path tree,
+    ///i.e. it returns the last but one node from a shortest path from the
+    ///root to \c /v. It is INVALID if \c v is unreachable from the root or if
+    ///\c v=s. The shortest path tree used here is equal to the shortest path
+    ///tree used in \ref pred(Node v).  \pre \ref run() must be called before
+    ///using this function.
+    Node predNode(Node v) const { return (*pred_node)[v]; }
+    
+    ///Returns a reference to the NodeMap of distances.
+
+    ///Returns a reference to the NodeMap of distances. \pre \ref run() must
+    ///be called before using this function.
+    const DistMap &distMap() const { return *distance;}
+ 
+    ///Returns a reference to the shortest path tree map.
+
+    ///Returns a reference to the NodeMap of the edges of the
+    ///shortest path tree.
+    ///\pre \ref run() must be called before using this function.
+    const PredMap &predMap() const { return *predecessor;}
+ 
+    ///Returns a reference to the map of nodes of shortest paths.
+
+    ///Returns a reference to the NodeMap of the last but one nodes of the
+    ///shortest path tree.
+    ///\pre \ref run() must be called before using this function.
+    const PredNodeMap &predNodeMap() const { return *pred_node;}
+
+    ///Checks if a node is reachable from the root.
+
+    ///Returns \c true if \c v is reachable from the root.
+    ///\warning the root node is reported to be unreached!
+    ///\todo Is this what we want?
+    ///\pre \ref run() must be called before using this function.
+    ///
+    bool reached(Node v) { return G->valid((*predecessor)[v]); }
+    
+  };
+  
+
+  // **********************************************************************
+  //  IMPLEMENTATIONS
+  // **********************************************************************
 
 /// @}
