lemon/full_graph.h
changeset 1791 62e7d237e1fb
parent 1726 f214631ea1ac
child 1820 22099ef840d7
     1.1 --- a/lemon/full_graph.h	Mon Nov 14 18:36:45 2005 +0000
     1.2 +++ b/lemon/full_graph.h	Mon Nov 14 18:38:41 2005 +0000
     1.3 @@ -23,8 +23,7 @@
     1.4  #include <lemon/bits/iterable_graph_extender.h>
     1.5  #include <lemon/bits/alteration_notifier.h>
     1.6  #include <lemon/bits/static_map.h>
     1.7 -
     1.8 -#include <lemon/bits/undir_graph_extender.h>
     1.9 +#include <lemon/bits/graph_extender.h>
    1.10  
    1.11  #include <lemon/invalid.h>
    1.12  #include <lemon/utility.h>
    1.13 @@ -70,12 +69,12 @@
    1.14      
    1.15      /// Maximum node ID.
    1.16      ///\sa id(Node)
    1.17 -    int maxId(Node = INVALID) const { return _nodeNum-1; }
    1.18 +    int maxNodeId() const { return _nodeNum-1; }
    1.19      /// Maximum edge ID.
    1.20      
    1.21      /// Maximum edge ID.
    1.22      ///\sa id(Edge)
    1.23 -    int maxId(Edge = INVALID) const { return _edgeNum-1; }
    1.24 +    int maxEdgeId() const { return _edgeNum-1; }
    1.25  
    1.26      Node source(Edge e) const { return e.id % _nodeNum; }
    1.27      Node target(Edge e) const { return e.id / _nodeNum; }
    1.28 @@ -101,9 +100,9 @@
    1.29      ///\return The ID of the edge \c e. 
    1.30      static int id(Edge e) { return e.id; }
    1.31  
    1.32 -    static Node fromId(int id, Node) { return Node(id);}
    1.33 +    static Node nodeFromId(int id) { return Node(id);}
    1.34      
    1.35 -    static Edge fromId(int id, Edge) { return Edge(id);}
    1.36 +    static Edge edgeFromId(int id) { return Edge(id);}
    1.37  
    1.38      typedef True FindEdgeTag;
    1.39  
    1.40 @@ -190,14 +189,10 @@
    1.41  
    1.42    };
    1.43  
    1.44 -
    1.45 -  typedef AlterableGraphExtender<FullGraphBase> 
    1.46 -  AlterableFullGraphBase;
    1.47 -  typedef IterableGraphExtender<AlterableFullGraphBase> 
    1.48 -  IterableFullGraphBase;
    1.49    typedef StaticMappableGraphExtender<
    1.50      IterableGraphExtender<
    1.51 -    AlterableGraphExtender<FullGraphBase> > > ExtendedFullGraphBase;
    1.52 +    AlterableGraphExtender<
    1.53 +    GraphExtender<FullGraphBase> > > > ExtendedFullGraphBase;
    1.54  
    1.55    /// \ingroup graphs
    1.56    ///
    1.57 @@ -217,7 +212,6 @@
    1.58      FullGraph(int n) { construct(n); }
    1.59    };
    1.60  
    1.61 -  ///@}
    1.62  
    1.63    class UndirFullGraphBase {
    1.64      int _nodeNum;
    1.65 @@ -252,12 +246,12 @@
    1.66      
    1.67      /// Maximum node ID.
    1.68      ///\sa id(Node)
    1.69 -    int maxId(Node = INVALID) const { return _nodeNum-1; }
    1.70 +    int maxNodeId() const { return _nodeNum-1; }
    1.71      /// Maximum edge ID.
    1.72      
    1.73      /// Maximum edge ID.
    1.74      ///\sa id(Edge)
    1.75 -    int maxId(Edge = INVALID) const { return _edgeNum-1; }
    1.76 +    int maxEdgeId() const { return _edgeNum-1; }
    1.77  
    1.78      Node source(Edge e) const { 
    1.79        /// \todo we may do it faster