Index: src/lemon/full_graph.h
===================================================================
--- src/lemon/full_graph.h	(revision 946)
+++ src/lemon/full_graph.h	(revision 951)
@@ -37,4 +37,155 @@
 /// \addtogroup graphs
 /// @{
+
+  class FullGraphBase {
+    int NodeNum;
+    int EdgeNum;
+  public:
+
+    typedef FullGraphBase Graph;
+
+    class Node;
+    class Edge;
+
+  public:
+
+    FullGraphBase() {}
+
+
+    ///Creates a full graph with \c n nodes.
+    void construct(int n) { NodeNum = n; EdgeNum = n * n; }
+    ///
+    //    FullGraphBase(const FullGraphBase &_g)
+    //      : NodeNum(_g.nodeNum()), EdgeNum(NodeNum*NodeNum) { }
+    
+    ///Number of nodes.
+    int nodeNum() const { return NodeNum; }
+    ///Number of edges.
+    int edgeNum() const { return EdgeNum; }
+
+    /// Maximum node ID.
+    
+    /// Maximum node ID.
+    ///\sa id(Node)
+    int maxNodeId() const { return NodeNum-1; }
+    /// Maximum edge ID.
+    
+    /// Maximum edge ID.
+    ///\sa id(Edge)
+    int maxEdgeId() const { return EdgeNum-1; }
+
+    Node tail(Edge e) const { return e.id % NodeNum; }
+    Node head(Edge e) const { return e.id / NodeNum; }
+
+
+    /// Node ID.
+    
+    /// The ID of a valid Node is a nonnegative integer not greater than
+    /// \ref maxNodeId(). The range of the ID's is not surely continuous
+    /// and the greatest node ID can be actually less then \ref maxNodeId().
+    ///
+    /// The ID of the \ref INVALID node is -1.
+    ///\return The ID of the node \c v. 
+
+    static int id(Node v) { return v.id; }
+    /// Edge ID.
+    
+    /// The ID of a valid Edge is a nonnegative integer not greater than
+    /// \ref maxEdgeId(). The range of the ID's is not surely continuous
+    /// and the greatest edge ID can be actually less then \ref maxEdgeId().
+    ///
+    /// The ID of the \ref INVALID edge is -1.
+    ///\return The ID of the edge \c e. 
+    static int id(Edge e) { return e.id; }
+
+    /// Finds an edge between two nodes.
+    
+    /// Finds an edge from node \c u to node \c v.
+    ///
+    /// If \c prev is \ref INVALID (this is the default value), then
+    /// It finds the first edge from \c u to \c v. Otherwise it looks for
+    /// the next edge from \c u to \c v after \c prev.
+    /// \return The found edge or INVALID if there is no such an edge.
+    Edge findEdge(Node u,Node v, Edge prev = INVALID) 
+    {
+      return prev.id == -1 ? Edge(*this, u.id, v.id) : INVALID;
+    }
+    
+      
+    class Node {
+      friend class FullGraphBase;
+
+    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 Edge {
+      friend class FullGraphBase;
+      
+    protected:
+      int id;  // NodeNum * head + tail;
+
+      Edge(int _id) : id(_id) {}
+
+      Edge(const FullGraphBase& _graph, int tail, int head) 
+	: id(_graph.NodeNum * head+tail) {}
+    public:
+      Edge() { }
+      Edge (Invalid) { id = -1; }
+      bool operator==(const Edge edge) const {return id == edge.id;}
+      bool operator!=(const Edge edge) const {return id != edge.id;}
+      bool operator<(const Edge edge) const {return id < edge.id;}
+    };
+
+    void first(Node& node) const {
+      node.id = NodeNum-1;
+    }
+
+    static void next(Node& node) {
+      --node.id;
+    }
+
+    void first(Edge& edge) const {
+      edge.id = EdgeNum-1;
+    }
+
+    static void next(Edge& edge) {
+      --edge.id;
+    }
+
+    void firstOut(Edge& edge, const Node& node) const {
+      edge.id = EdgeNum + node.id - NodeNum;
+    }
+
+    void nextOut(Edge& edge) const {
+      edge.id -= NodeNum;
+      if (edge.id < 0) edge.id = -1;
+    }
+
+    void firstIn(Edge& edge, const Node& node) const {
+      edge.id = node.id * NodeNum;
+    }
+    
+    void nextIn(Edge& edge) const {
+      ++edge.id;
+      if (edge.id % NodeNum == 0) edge.id = -1;
+    }
+
+  };
+
+
+  typedef AlterableGraphExtender<FullGraphBase> AlterableFullGraphBase;
+  typedef IterableGraphExtender<AlterableFullGraphBase> IterableFullGraphBase;
+  typedef IdMappableGraphExtender<IterableFullGraphBase> IdMappableFullGraphBase;
+  typedef DefaultMappableGraphExtender<IdMappableFullGraphBase> MappableFullGraphBase;
 
   ///A full graph class.
@@ -50,155 +201,4 @@
   ///
   ///\author Alpar Juttner
-  class FullGraphBase {
-    int NodeNum;
-    int EdgeNum;
-  public:
-
-    typedef FullGraphBase Graph;
-
-    class Node;
-    class Edge;
-
-  public:
-
-    FullGraphBase() {}
-
-
-    ///Creates a full graph with \c n nodes.
-    void construct(int n) { NodeNum = n; EdgeNum = n * n; }
-    ///
-    //    FullGraphBase(const FullGraphBase &_g)
-    //      : NodeNum(_g.nodeNum()), EdgeNum(NodeNum*NodeNum) { }
-    
-    ///Number of nodes.
-    int nodeNum() const { return NodeNum; }
-    ///Number of edges.
-    int edgeNum() const { return EdgeNum; }
-
-    /// Maximum node ID.
-    
-    /// Maximum node ID.
-    ///\sa id(Node)
-    int maxNodeId() const { return NodeNum-1; }
-    /// Maximum edge ID.
-    
-    /// Maximum edge ID.
-    ///\sa id(Edge)
-    int maxEdgeId() const { return EdgeNum-1; }
-
-    Node tail(Edge e) const { return e.id % NodeNum; }
-    Node head(Edge e) const { return e.id / NodeNum; }
-
-
-    /// Node ID.
-    
-    /// The ID of a valid Node is a nonnegative integer not greater than
-    /// \ref maxNodeId(). The range of the ID's is not surely continuous
-    /// and the greatest node ID can be actually less then \ref maxNodeId().
-    ///
-    /// The ID of the \ref INVALID node is -1.
-    ///\return The ID of the node \c v. 
-
-    static int id(Node v) { return v.id; }
-    /// Edge ID.
-    
-    /// The ID of a valid Edge is a nonnegative integer not greater than
-    /// \ref maxEdgeId(). The range of the ID's is not surely continuous
-    /// and the greatest edge ID can be actually less then \ref maxEdgeId().
-    ///
-    /// The ID of the \ref INVALID edge is -1.
-    ///\return The ID of the edge \c e. 
-    static int id(Edge e) { return e.id; }
-
-    /// Finds an edge between two nodes.
-    
-    /// Finds an edge from node \c u to node \c v.
-    ///
-    /// If \c prev is \ref INVALID (this is the default value), then
-    /// It finds the first edge from \c u to \c v. Otherwise it looks for
-    /// the next edge from \c u to \c v after \c prev.
-    /// \return The found edge or INVALID if there is no such an edge.
-    Edge findEdge(Node u,Node v, Edge prev = INVALID) 
-    {
-      return prev.id == -1 ? Edge(*this, u.id, v.id) : INVALID;
-    }
-    
-      
-    class Node {
-      friend class FullGraphBase;
-
-    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 Edge {
-      friend class FullGraphBase;
-      
-    protected:
-      int id;  // NodeNum * head + tail;
-
-      Edge(int _id) : id(_id) {}
-
-      Edge(const FullGraphBase& _graph, int tail, int head) 
-	: id(_graph.NodeNum * head+tail) {}
-    public:
-      Edge() { }
-      Edge (Invalid) { id = -1; }
-      bool operator==(const Edge edge) const {return id == edge.id;}
-      bool operator!=(const Edge edge) const {return id != edge.id;}
-      bool operator<(const Edge edge) const {return id < edge.id;}
-    };
-
-    void first(Node& node) const {
-      node.id = NodeNum-1;
-    }
-
-    static void next(Node& node) {
-      --node.id;
-    }
-
-    void first(Edge& edge) const {
-      edge.id = EdgeNum-1;
-    }
-
-    static void next(Edge& edge) {
-      --edge.id;
-    }
-
-    void firstOut(Edge& edge, const Node& node) const {
-      edge.id = EdgeNum + node.id - NodeNum;
-    }
-
-    void nextOut(Edge& edge) const {
-      edge.id -= NodeNum;
-      if (edge.id < 0) edge.id = -1;
-    }
-
-    void firstIn(Edge& edge, const Node& node) const {
-      edge.id = node.id * NodeNum;
-    }
-    
-    void nextIn(Edge& edge) const {
-      ++edge.id;
-      if (edge.id % NodeNum == 0) edge.id = -1;
-    }
-
-  };
-
-
-  typedef AlterableGraphExtender<FullGraphBase> AlterableFullGraphBase;
-  typedef IterableGraphExtender<AlterableFullGraphBase> IterableFullGraphBase;
-  typedef IdMappableGraphExtender<IterableFullGraphBase> IdMappableFullGraphBase;
-  typedef DefaultMappableGraphExtender<IdMappableFullGraphBase> MappableFullGraphBase;
-
   class FullGraph : public MappableFullGraphBase {
   public:
