Template assign operator for graph maps.
authordeba
Wed, 31 Aug 2005 13:29:32 +0000
changeset 166966ae78d29f1e
parent 1668 d5a7d6bc0f00
child 1670 c0fa68014ba0
Template assign operator for graph maps.

Some naming and coding conventions.
lemon/bits/array_map.h
lemon/bits/default_map.h
lemon/bits/vector_map.h
lemon/concept/graph_component.h
lemon/concept/undir_graph.h
lemon/full_graph.h
lemon/graph_adaptor.h
lemon/list_graph.h
lemon/maps.h
lemon/smart_graph.h
     1.1 --- a/lemon/bits/array_map.h	Tue Aug 30 21:19:07 2005 +0000
     1.2 +++ b/lemon/bits/array_map.h	Wed Aug 31 13:29:32 2005 +0000
     1.3 @@ -19,26 +19,27 @@
     1.4  
     1.5  #include <memory>
     1.6  #include <lemon/bits/map_iterator.h>
     1.7 +#include <lemon/concept_check.h>
     1.8 +#include <lemon/concept/maps.h>
     1.9  
    1.10 -///\ingroup graphmapfactory
    1.11 -///\file
    1.12 -///\brief Graph maps that construates and destruates
    1.13 -///their elements dynamically.
    1.14 +/// \ingroup graphmapfactory
    1.15 +/// \file
    1.16 +/// \brief Graph maps that construct and destruct
    1.17 +/// their elements dynamically.
    1.18  
    1.19  namespace lemon {
    1.20  
    1.21 -
    1.22 -  /// \addtogroup graphmapfactory
    1.23 -  /// @{
    1.24 -	
    1.25 +  /// \ingroup graphmapfactory
    1.26 +  ///
    1.27 +  /// \brief Graph map based on the array storage.
    1.28 +  ///
    1.29    /// The ArrayMap template class is graph map structure what
    1.30    /// automatically updates the map when a key is added to or erased from
    1.31 -  /// the map. This map factory uses the allocators to implement 
    1.32 +  /// the map. This map uses the allocators to implement 
    1.33    /// the container functionality.
    1.34    ///
    1.35    /// The template parameter is the AlterationNotifier that the maps
    1.36    /// will belong to and the Value.
    1.37 -   
    1.38  
    1.39    template <typename _Graph, 
    1.40  	    typename _Item,
    1.41 @@ -69,7 +70,6 @@
    1.42    public:
    1.43  
    1.44      /// Graph and Registry initialized map constructor.
    1.45 -     
    1.46      ArrayMap(const Graph& _g) : graph(&_g) {
    1.47        Item it;
    1.48        attach(_g.getNotifier(Item()));
    1.49 @@ -110,47 +110,33 @@
    1.50        }
    1.51      }
    1.52  
    1.53 -    using Parent::attach;
    1.54 -    using Parent::detach;
    1.55 -    using Parent::attached;
    1.56 -
    1.57 -    /// Assign operator to copy a map of the same map type.
    1.58 -     
    1.59 -    ArrayMap& operator=(const ArrayMap& copy) {
    1.60 -      if (&copy == this) return *this;
    1.61 -      
    1.62 -      if (graph != copy.graph) {
    1.63 -	if (attached()) {
    1.64 -	  clear();
    1.65 -	  detach();
    1.66 -	}
    1.67 -	if (copy.attached()) {
    1.68 -	  attach(*copy.getRegistry());
    1.69 -	}
    1.70 -	capacity = copy.capacity;
    1.71 -	if (capacity == 0) return *this;
    1.72 -	values = allocator.allocate(capacity);      
    1.73 -      }
    1.74 -
    1.75 -      Item it;
    1.76 -      for (graph->first(it); it != INVALID; graph->next(it)) {
    1.77 -	int id = graph->id(it);;
    1.78 -	allocator.construct(&(values[id]), copy.values[id]);
    1.79 -      }
    1.80 -
    1.81 -      return *this;
    1.82 -    }
    1.83 -
    1.84 +    /// \brief The destructor of the map.
    1.85 +    ///     
    1.86      /// The destructor of the map.
    1.87 -     
    1.88      virtual ~ArrayMap() {      
    1.89        if (attached()) {
    1.90  	clear();
    1.91  	detach();
    1.92        }
    1.93      }
    1.94 -	
    1.95 -	
    1.96 +		
    1.97 +  private:
    1.98 +
    1.99 +    ArrayMap& operator=(const ArrayMap&);
   1.100 +
   1.101 +  protected:
   1.102 +
   1.103 +    using Parent::attach;
   1.104 +    using Parent::detach;
   1.105 +    using Parent::attached;
   1.106 +
   1.107 +    const Graph* getGraph() {
   1.108 +      return graph;
   1.109 +    }
   1.110 +
   1.111 +
   1.112 +  public:
   1.113 +
   1.114      ///The subscript operator. The map can be subscripted by the
   1.115      ///actual keys of the graph. 
   1.116       
   1.117 @@ -174,7 +160,9 @@
   1.118      void set(const Key& key, const Value& val) {
   1.119        (*this)[key] = val;
   1.120      }
   1.121 -		
   1.122 +
   1.123 +  protected:
   1.124 +    
   1.125      /// Add a new key to the map. It called by the map registry.
   1.126       
   1.127      void add(const Key& key) {
   1.128 @@ -274,10 +262,6 @@
   1.129        }
   1.130      }
   1.131  
   1.132 -    const Graph* getGraph() {
   1.133 -      return graph;
   1.134 -    }
   1.135 -
   1.136    private:
   1.137        
   1.138      void allocate_memory() {
   1.139 @@ -301,69 +285,6 @@
   1.140  
   1.141    };		
   1.142  
   1.143 -  template <typename _Base> 
   1.144 -  class ArrayMappableGraphExtender : public _Base {
   1.145 -  public:
   1.146 -
   1.147 -    typedef ArrayMappableGraphExtender<_Base> Graph;
   1.148 -    typedef _Base Parent;
   1.149 -
   1.150 -    typedef typename Parent::Node Node;
   1.151 -    typedef typename Parent::NodeIt NodeIt;
   1.152 -    typedef typename Parent::NodeNotifier NodeObserverRegistry;
   1.153 -
   1.154 -    typedef typename Parent::Edge Edge;
   1.155 -    typedef typename Parent::EdgeIt EdgeIt;
   1.156 -    typedef typename Parent::EdgeNotifier EdgeObserverRegistry;
   1.157 -
   1.158 -    
   1.159 -
   1.160 -    template <typename _Value>
   1.161 -    class NodeMap 
   1.162 -      : public IterableMapExtender<ArrayMap<Graph, Node, _Value> > {
   1.163 -    public:
   1.164 -      typedef ArrayMappableGraphExtender<_Base> Graph;
   1.165 -
   1.166 -      typedef typename Graph::Node Node;
   1.167 -      typedef typename Graph::NodeIt NodeIt;
   1.168 -
   1.169 -      typedef IterableMapExtender<ArrayMap<Graph, Node, _Value> > Parent;
   1.170 -
   1.171 -      //typedef typename Parent::Graph Graph;
   1.172 -      typedef typename Parent::Value Value;
   1.173 -
   1.174 -      NodeMap(const Graph& g) 
   1.175 -	: Parent(g) {}
   1.176 -      NodeMap(const Graph& g, const Value& v) 
   1.177 -	: Parent(g, v) {}
   1.178 -
   1.179 -    };
   1.180 -
   1.181 -    template <typename _Value>
   1.182 -    class EdgeMap 
   1.183 -      : public IterableMapExtender<ArrayMap<Graph, Edge, _Value> > {
   1.184 -    public:
   1.185 -      typedef ArrayMappableGraphExtender<_Base> Graph;
   1.186 -
   1.187 -      typedef typename Graph::Edge Edge;
   1.188 -      typedef typename Graph::EdgeIt EdgeIt;
   1.189 -
   1.190 -      typedef IterableMapExtender<ArrayMap<Graph, Edge, _Value> > Parent;
   1.191 -
   1.192 -      //typedef typename Parent::Graph Graph;
   1.193 -      typedef typename Parent::Value Value;
   1.194 -
   1.195 -      EdgeMap(const Graph& g) 
   1.196 -	: Parent(g) {}
   1.197 -      EdgeMap(const Graph& g, const Value& v) 
   1.198 -	: Parent(g, v) {}
   1.199 -
   1.200 -    };
   1.201 -    
   1.202 -  };
   1.203 -
   1.204 -/// @}
   1.205 -
   1.206  }
   1.207  
   1.208  #endif //LEMON_ARRAY_MAP_H
     2.1 --- a/lemon/bits/default_map.h	Tue Aug 30 21:19:07 2005 +0000
     2.2 +++ b/lemon/bits/default_map.h	Wed Aug 31 13:29:32 2005 +0000
     2.3 @@ -28,19 +28,8 @@
     2.4  
     2.5  namespace lemon {
     2.6  
     2.7 -/// \addtogroup graphmapfactory
     2.8 -/// @{
     2.9 -
    2.10 -  /** The ArrayMap template class is graph map structure what
    2.11 -   *  automatically updates the map when a key is added to or erased from
    2.12 -   *  the map. This map uses the VectorMap if the Value is a primitive
    2.13 -   *  type and the ArrayMap for the other cases.
    2.14 -   *
    2.15 -   *  The template parameter is the MapRegistry that the maps
    2.16 -   *  will belong to and the Value.
    2.17 -   */
    2.18 -
    2.19 -
    2.20 +  /// \addtogroup graphmapfactory
    2.21 +  /// @{
    2.22  
    2.23    template <typename _Graph, typename _Item, typename _Value>
    2.24    struct DefaultMapSelector {
    2.25 @@ -135,8 +124,7 @@
    2.26      typedef VectorMap<_Graph, _Item, _Ptr*> Map;
    2.27    };
    2.28  
    2.29 -
    2.30 -
    2.31 +  /// \e
    2.32    template <
    2.33      typename _Graph, 
    2.34      typename _Item,
    2.35 @@ -152,15 +140,16 @@
    2.36  
    2.37      DefaultMap(const Graph& _g) : Parent(_g) {}
    2.38      DefaultMap(const Graph& _g, const Value& _v) : Parent(_g, _v) {}
    2.39 +
    2.40    };
    2.41  
    2.42  
    2.43 -
    2.44 +  /// \e
    2.45    template <typename _Base> 
    2.46 -  class DefaultMappableGraphExtender : public _Base {
    2.47 +  class MappableGraphExtender : public _Base {
    2.48    public:
    2.49  
    2.50 -    typedef DefaultMappableGraphExtender<_Base> Graph;
    2.51 +    typedef MappableGraphExtender<_Base> Graph;
    2.52      typedef _Base Parent;
    2.53  
    2.54      typedef typename Parent::Node Node;
    2.55 @@ -174,37 +163,67 @@
    2.56      class NodeMap 
    2.57        : public IterableMapExtender<DefaultMap<Graph, Node, _Value> > {
    2.58      public:
    2.59 -      typedef DefaultMappableGraphExtender Graph;
    2.60 +      typedef MappableGraphExtender Graph;
    2.61        typedef IterableMapExtender<DefaultMap<Graph, Node, _Value> > Parent;
    2.62  
    2.63        NodeMap(const Graph& _g) 
    2.64  	: Parent(_g) {}
    2.65        NodeMap(const Graph& _g, const _Value& _v) 
    2.66  	: Parent(_g, _v) {}
    2.67 +
    2.68 +      /// \brief Template assign operator.
    2.69 +      ///
    2.70 +      /// The given parameter should be conform to the ReadMap
    2.71 +      /// concecpt and could be indiced by the current item set of
    2.72 +      /// the NodeMap. In this case the value for each item
    2.73 +      /// is assigned by the value of the given ReadMap. 
    2.74 +      template <typename CMap>
    2.75 +      NodeMap& operator=(const CMap& cmap) {
    2.76 +	checkConcept<concept::ReadMap<Node, _Value>, CMap>();
    2.77 +	const typename Parent::Graph* graph = Parent::getGraph();
    2.78 +	Node it;
    2.79 +	for (graph->first(it); it != INVALID; graph->next(it)) {
    2.80 +	  Parent::set(it, cmap[it]);
    2.81 +	}
    2.82 +	return *this;
    2.83 +      }
    2.84 +
    2.85      };
    2.86  
    2.87      template <typename _Value>
    2.88      class EdgeMap 
    2.89        : public IterableMapExtender<DefaultMap<Graph, Edge, _Value> > {
    2.90      public:
    2.91 -      typedef DefaultMappableGraphExtender Graph;
    2.92 +      typedef MappableGraphExtender Graph;
    2.93        typedef IterableMapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
    2.94  
    2.95        EdgeMap(const Graph& _g) 
    2.96  	: Parent(_g) {}
    2.97        EdgeMap(const Graph& _g, const _Value& _v) 
    2.98  	: Parent(_g, _v) {}
    2.99 +
   2.100 +      template <typename CMap>
   2.101 +      EdgeMap& operator=(const CMap& cmap) {
   2.102 +	checkConcept<concept::ReadMap<Edge, _Value>, CMap>();
   2.103 +	const typename Parent::Graph* graph = Parent::getGraph();
   2.104 +	Edge it;
   2.105 +	for (graph->first(it); it != INVALID; graph->next(it)) {
   2.106 +	  Parent::set(it, cmap[it]);
   2.107 +	}
   2.108 +	return *this;
   2.109 +      }
   2.110      };
   2.111      
   2.112    };
   2.113  
   2.114 +  /// \e
   2.115    template <typename _Base> 
   2.116    class MappableUndirGraphExtender : 
   2.117 -    public DefaultMappableGraphExtender<_Base> {
   2.118 +    public MappableGraphExtender<_Base> {
   2.119    public:
   2.120  
   2.121      typedef MappableUndirGraphExtender Graph;
   2.122 -    typedef DefaultMappableGraphExtender<_Base> Parent;
   2.123 +    typedef MappableGraphExtender<_Base> Parent;
   2.124  
   2.125      typedef typename Parent::UndirEdge UndirEdge;
   2.126  
   2.127 @@ -220,11 +239,23 @@
   2.128  	: Parent(_g) {}
   2.129        UndirEdgeMap(const Graph& _g, const _Value& _v) 
   2.130  	: Parent(_g, _v) {}
   2.131 +
   2.132 +      template <typename CMap>
   2.133 +      UndirEdgeMap& operator=(const CMap& cmap) {
   2.134 +	checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
   2.135 +	const typename Parent::Graph* graph = Parent::getGraph();
   2.136 +	UndirEdge it;
   2.137 +	for (graph->first(it); it != INVALID; graph->next(it)) {
   2.138 +	  Parent::set(it, cmap[it]);
   2.139 +	}
   2.140 +	return *this;
   2.141 +      }
   2.142      };
   2.143  
   2.144  
   2.145    };
   2.146  
   2.147 +  /// @}
   2.148  }
   2.149  
   2.150  #endif
     3.1 --- a/lemon/bits/vector_map.h	Tue Aug 30 21:19:07 2005 +0000
     3.2 +++ b/lemon/bits/vector_map.h	Wed Aug 31 13:29:32 2005 +0000
     3.3 @@ -23,16 +23,20 @@
     3.4  #include <lemon/utility.h>
     3.5  #include <lemon/bits/map_iterator.h>
     3.6  #include <lemon/bits/alteration_notifier.h>
     3.7 +#include <lemon/concept_check.h>
     3.8 +#include <lemon/concept/maps.h>
     3.9  
    3.10 -///\ingroup graphmapfactory
    3.11 +/// \ingroup graphmapfactory
    3.12 +///
    3.13  ///\file
    3.14  ///\brief Vector based graph maps.
    3.15  
    3.16  namespace lemon {
    3.17 -  
    3.18 -  /// \addtogroup graphmapfactory
    3.19 -  /// @{
    3.20 -  
    3.21 +
    3.22 +  /// \ingroup graphmapfactory
    3.23 +  ///
    3.24 +  /// \brief Graph map based on the std::vector storage.
    3.25 +  ///
    3.26    /// The VectorMap template class is graph map structure what
    3.27    /// automatically updates the map when a key is added to or erased from
    3.28    /// the map. This map factory uses the allocators to implement 
    3.29 @@ -117,39 +121,29 @@
    3.30        }
    3.31      }
    3.32  
    3.33 -    using Parent::attach;
    3.34 -    using Parent::detach;
    3.35 -    using Parent::attached;
    3.36 -
    3.37 -    /** Assign operator to copy a map of the same map type.
    3.38 -     */
    3.39 -    VectorMap& operator=(const VectorMap& copy) {
    3.40 -      if (&copy == this) return *this;
    3.41 -      
    3.42 -      if (graph != copy.graph) {
    3.43 -	if (attached()) {
    3.44 -	  detach();
    3.45 -	}
    3.46 -	if (copy.attached()) {
    3.47 -	  attach(*copy.getRegistry());
    3.48 -	}
    3.49 -      }
    3.50 -      container = copy.container;
    3.51 -
    3.52 -      return *this;
    3.53 -    }
    3.54 -
    3.55 -
    3.56      virtual ~VectorMap() {
    3.57        if (attached()) {
    3.58  	detach();
    3.59        }
    3.60      }
    3.61  
    3.62 +
    3.63 +  private:
    3.64 +
    3.65 +    VectorMap& operator=(const VectorMap&);
    3.66 +
    3.67 +  protected:
    3.68 +
    3.69 +    using Parent::attach;
    3.70 +    using Parent::detach;
    3.71 +    using Parent::attached;
    3.72 +
    3.73      const Graph* getGraph() const {
    3.74        return graph;
    3.75      }
    3.76  
    3.77 +  public:
    3.78 +
    3.79      /// The subcript operator.
    3.80  
    3.81      /// The subscript operator. The map can be subscripted by the
    3.82 @@ -173,13 +167,14 @@
    3.83  
    3.84      /// It the same as operator[](key) = value expression.
    3.85      ///
    3.86 -     
    3.87      void set(const Key& key, const Value& value) {
    3.88        (*this)[key] = value;
    3.89      }
    3.90  
    3.91 -    /// Adds a new key to the map.
    3.92 -		
    3.93 +  protected:
    3.94 +
    3.95 +    /// \brief Adds a new key to the map.
    3.96 +    ///		
    3.97      /// It adds a new key to the map. It called by the observer registry
    3.98      /// and it overrides the add() member function of the observer base.
    3.99       
   3.100 @@ -220,69 +215,6 @@
   3.101  
   3.102    };
   3.103  
   3.104 -
   3.105 -  template <typename _Base> 
   3.106 -  class VectorMappableGraphExtender : public _Base {
   3.107 -  public:
   3.108 -
   3.109 -    typedef VectorMappableGraphExtender<_Base> Graph;
   3.110 -    typedef _Base Parent;
   3.111 -
   3.112 -    typedef typename Parent::Node Node;
   3.113 -    typedef typename Parent::NodeIt NodeIt;
   3.114 -    typedef typename Parent::NodeIdMap NodeIdMap;
   3.115 -    typedef typename Parent::NodeNotifier NodeObserverRegistry;
   3.116 -
   3.117 -    typedef typename Parent::Edge Edge;
   3.118 -    typedef typename Parent::EdgeIt EdgeIt;
   3.119 -    typedef typename Parent::EdgeIdMap EdgeIdMap;
   3.120 -    typedef typename Parent::EdgeNotifier EdgeObserverRegistry;
   3.121 -
   3.122 -    
   3.123 -    template <typename _Value>
   3.124 -    class NodeMap : 
   3.125 -      public IterableMapExtender<VectorMap<Graph, Node, _Value> > {
   3.126 -    public:
   3.127 -      typedef VectorMappableGraphExtender<_Base> Graph;
   3.128 -
   3.129 -      typedef typename Graph::Node Node;
   3.130 -
   3.131 -      typedef IterableMapExtender<VectorMap<Graph, Node, _Value> > Parent;
   3.132 -
   3.133 -      //typedef typename Parent::Graph Graph;
   3.134 -      typedef typename Parent::Value Value;
   3.135 -
   3.136 -      NodeMap(const Graph& g) 
   3.137 -	: Parent(g) {}
   3.138 -      NodeMap(const Graph& g, const Value& v) 
   3.139 -	: Parent(g, v) {}
   3.140 -
   3.141 -    };
   3.142 -
   3.143 -    template <typename _Value>
   3.144 -    class EdgeMap 
   3.145 -      : public IterableMapExtender<VectorMap<Graph, Edge, _Value> > {
   3.146 -    public:
   3.147 -      typedef VectorMappableGraphExtender<_Base> Graph;
   3.148 -
   3.149 -      typedef typename Graph::Edge Edge;
   3.150 -
   3.151 -      typedef IterableMapExtender<VectorMap<Graph, Edge, _Value> > Parent;
   3.152 -
   3.153 -      //typedef typename Parent::Graph Graph;
   3.154 -      typedef typename Parent::Value Value;
   3.155 -
   3.156 -      EdgeMap(const Graph& g) 
   3.157 -	: Parent(g) {}
   3.158 -      EdgeMap(const Graph& g, const Value& v) 
   3.159 -	: Parent(g, v) {}
   3.160 -
   3.161 -    };
   3.162 -    
   3.163 -  };
   3.164 -  
   3.165 -  /// @}
   3.166 -  
   3.167  }
   3.168  
   3.169  #endif
     4.1 --- a/lemon/concept/graph_component.h	Tue Aug 30 21:19:07 2005 +0000
     4.2 +++ b/lemon/concept/graph_component.h	Wed Aug 31 13:29:32 2005 +0000
     4.3 @@ -798,8 +798,6 @@
     4.4  	  _Map a2(g,t);
     4.5  	  // Copy constructor. Do we need it?
     4.6  	  _Map b=c;
     4.7 -	  // Copy operator. Do we need it?
     4.8 -	  a=b;
     4.9  
    4.10  	  ignore_unused_variable_warning(a2);
    4.11  	}
     5.1 --- a/lemon/concept/undir_graph.h	Tue Aug 30 21:19:07 2005 +0000
     5.2 +++ b/lemon/concept/undir_graph.h	Wed Aug 31 13:29:32 2005 +0000
     5.3 @@ -248,9 +248,9 @@
     5.4        ///
     5.5        typedef True UndirTag;
     5.6  
     5.7 -      /// The base type of node iterators, 
     5.8 +      /// \brief The base type of node iterators, 
     5.9        /// or in other words, the trivial node iterator.
    5.10 -
    5.11 +      ///
    5.12        /// This is the base type of each node iterator,
    5.13        /// thus each kind of node iterator converts to this.
    5.14        /// More precisely each kind of node iterator should be inherited 
     6.1 --- a/lemon/full_graph.h	Tue Aug 30 21:19:07 2005 +0000
     6.2 +++ b/lemon/full_graph.h	Wed Aug 31 13:29:32 2005 +0000
     6.3 @@ -195,8 +195,9 @@
     6.4    AlterableFullGraphBase;
     6.5    typedef IterableGraphExtender<AlterableFullGraphBase> 
     6.6    IterableFullGraphBase;
     6.7 -  typedef DefaultMappableGraphExtender<IterableFullGraphBase> 
     6.8 -  MappableFullGraphBase;
     6.9 +  typedef MappableGraphExtender<
    6.10 +    IterableGraphExtender<
    6.11 +    AlterableGraphExtender<FullGraphBase> > > ExtendedFullGraphBase;
    6.12  
    6.13    /// \ingroup graphs
    6.14    ///
    6.15 @@ -210,7 +211,7 @@
    6.16    /// \sa concept::StaticGraph.
    6.17    ///
    6.18    /// \author Alpar Juttner
    6.19 -  class FullGraph : public MappableFullGraphBase {
    6.20 +  class FullGraph : public ExtendedFullGraphBase {
    6.21    public:
    6.22  
    6.23      FullGraph(int n) { construct(n); }
    6.24 @@ -378,14 +379,10 @@
    6.25  
    6.26    };
    6.27  
    6.28 -  typedef UndirGraphExtender<UndirFullGraphBase>
    6.29 -  UndirUndirFullGraphBase;
    6.30 -  typedef AlterableUndirGraphExtender<UndirUndirFullGraphBase> 
    6.31 -  AlterableUndirFullGraphBase;
    6.32 -  typedef IterableUndirGraphExtender<AlterableUndirFullGraphBase> 
    6.33 -  IterableUndirFullGraphBase;
    6.34 -  typedef MappableUndirGraphExtender<IterableUndirFullGraphBase> 
    6.35 -  MappableUndirFullGraphBase;
    6.36 +  typedef MappableUndirGraphExtender<
    6.37 +    IterableUndirGraphExtender<
    6.38 +    AlterableUndirGraphExtender<
    6.39 +    UndirGraphExtender<UndirFullGraphBase> > > > ExtendedUndirFullGraphBase;
    6.40  
    6.41    /// \ingroup graphs
    6.42    ///
    6.43 @@ -402,7 +399,7 @@
    6.44    /// \sa FullGraph
    6.45    ///
    6.46    /// \author Balazs Dezso
    6.47 -  class UndirFullGraph : public MappableUndirFullGraphBase {
    6.48 +  class UndirFullGraph : public ExtendedUndirFullGraphBase {
    6.49    public:
    6.50      UndirFullGraph(int n) { construct(n); }
    6.51    };
     7.1 --- a/lemon/graph_adaptor.h	Tue Aug 30 21:19:07 2005 +0000
     7.2 +++ b/lemon/graph_adaptor.h	Wed Aug 31 13:29:32 2005 +0000
     7.3 @@ -1430,7 +1430,7 @@
     7.4      public ErasableGraphExtender<
     7.5      ClearableGraphExtender<
     7.6      ExtendableGraphExtender<
     7.7 -    DefaultMappableGraphExtender<
     7.8 +    MappableGraphExtender<
     7.9      IterableGraphExtender<
    7.10      AlterableGraphExtender<
    7.11      NewEdgeSetAdaptorBase<_Graph> > > > > > > {
    7.12 @@ -1440,7 +1440,7 @@
    7.13      typedef ErasableGraphExtender<
    7.14        ClearableGraphExtender<
    7.15        ExtendableGraphExtender<
    7.16 -      DefaultMappableGraphExtender<
    7.17 +      MappableGraphExtender<
    7.18        IterableGraphExtender<
    7.19        AlterableGraphExtender<
    7.20        NewEdgeSetAdaptorBase<_Graph> > > > > > > Parent;
     8.1 --- a/lemon/list_graph.h	Tue Aug 30 21:19:07 2005 +0000
     8.2 +++ b/lemon/list_graph.h	Wed Aug 31 13:29:32 2005 +0000
     8.3 @@ -304,10 +304,15 @@
     8.4  
     8.5    typedef AlterableGraphExtender<ListGraphBase> AlterableListGraphBase;
     8.6    typedef IterableGraphExtender<AlterableListGraphBase> IterableListGraphBase;
     8.7 -  typedef DefaultMappableGraphExtender<IterableListGraphBase> MappableListGraphBase;
     8.8 +  typedef MappableGraphExtender<IterableListGraphBase> MappableListGraphBase;
     8.9    typedef ExtendableGraphExtender<MappableListGraphBase> ExtendableListGraphBase;
    8.10    typedef ClearableGraphExtender<ExtendableListGraphBase> ClearableListGraphBase;
    8.11 -  typedef ErasableGraphExtender<ClearableListGraphBase> ErasableListGraphBase;
    8.12 +  typedef ErasableGraphExtender<
    8.13 +    ClearableGraphExtender<
    8.14 +    ExtendableGraphExtender<
    8.15 +    MappableGraphExtender<
    8.16 +    IterableGraphExtender<
    8.17 +    AlterableGraphExtender<ListGraphBase> > > > > > ExtendedListGraphBase;
    8.18  
    8.19  /// \addtogroup graphs
    8.20  /// @{
    8.21 @@ -321,7 +326,7 @@
    8.22    ///it also provides several additional useful extra functionalities.
    8.23    ///\sa concept::ErasableGraph.
    8.24  
    8.25 -  class ListGraph : public ErasableListGraphBase 
    8.26 +  class ListGraph : public ExtendedListGraphBase 
    8.27    {
    8.28    public:
    8.29      /// Changes the target of \c e to \c n
    8.30 @@ -549,7 +554,7 @@
    8.31      MappableUndirGraphExtender<
    8.32      IterableUndirGraphExtender<
    8.33      AlterableUndirGraphExtender<
    8.34 -    UndirGraphExtender<ListGraphBase> > > > > > > ErasableUndirListGraphBase;
    8.35 +    UndirGraphExtender<ListGraphBase> > > > > > > ExtendedUndirListGraphBase;
    8.36  
    8.37  /// \addtogroup graphs
    8.38  /// @{
    8.39 @@ -566,7 +571,7 @@
    8.40    ///\todo SnapShot, reverseEdge(), changeTarget(), changeSource(), contract()
    8.41    ///haven't been implemented yet.
    8.42    ///
    8.43 -  class UndirListGraph : public ErasableUndirListGraphBase {
    8.44 +  class UndirListGraph : public ExtendedUndirListGraphBase {
    8.45    };
    8.46  
    8.47    
     9.1 --- a/lemon/maps.h	Tue Aug 30 21:19:07 2005 +0000
     9.2 +++ b/lemon/maps.h	Wed Aug 31 13:29:32 2005 +0000
     9.3 @@ -113,10 +113,10 @@
     9.4  
     9.5    ///This function just returns a \ref ConstMap class.
     9.6    ///\relates ConstMap
     9.7 -  template<class V,class K> 
     9.8 -  inline ConstMap<V,K> constMap(const K &k) 
     9.9 +  template<class K,class V> 
    9.10 +  inline ConstMap<K,V> constMap(const V &v) 
    9.11    {
    9.12 -    return ConstMap<V,K>(k);
    9.13 +    return ConstMap<K,V>(v);
    9.14    }
    9.15  
    9.16  
    10.1 --- a/lemon/smart_graph.h	Tue Aug 30 21:19:07 2005 +0000
    10.2 +++ b/lemon/smart_graph.h	Wed Aug 31 13:29:32 2005 +0000
    10.3 @@ -233,11 +233,11 @@
    10.4  
    10.5    };
    10.6  
    10.7 -  typedef AlterableGraphExtender<SmartGraphBase> AlterableSmartGraphBase;
    10.8 -  typedef IterableGraphExtender<AlterableSmartGraphBase> IterableSmartGraphBase;
    10.9 -  typedef DefaultMappableGraphExtender<IterableSmartGraphBase> MappableSmartGraphBase;
   10.10 -  typedef ExtendableGraphExtender<MappableSmartGraphBase> ExtendableSmartGraphBase;
   10.11 -  typedef ClearableGraphExtender<ExtendableSmartGraphBase> ClearableSmartGraphBase;
   10.12 +  typedef ClearableGraphExtender<
   10.13 +    ExtendableGraphExtender<
   10.14 +    MappableGraphExtender<
   10.15 +    IterableGraphExtender<
   10.16 +    AlterableGraphExtender<SmartGraphBase> > > > > ExtendedSmartGraphBase;
   10.17  
   10.18    /// \addtogroup graphs
   10.19    /// @{
   10.20 @@ -253,7 +253,7 @@
   10.21    ///\sa concept::ExtendableGraph.
   10.22    ///
   10.23    ///\author Alpar Juttner
   10.24 -  class SmartGraph : public ClearableSmartGraphBase {
   10.25 +  class SmartGraph : public ExtendedSmartGraphBase {
   10.26    public:
   10.27      /// Finds an edge between two nodes.
   10.28      
   10.29 @@ -390,7 +390,7 @@
   10.30      MappableUndirGraphExtender<
   10.31      IterableUndirGraphExtender<
   10.32      AlterableUndirGraphExtender<
   10.33 -    UndirGraphExtender<SmartGraphBase> > > > > > UndirSmartGraphBase;
   10.34 +    UndirGraphExtender<SmartGraphBase> > > > > > ExtendedUndirSmartGraphBase;
   10.35  
   10.36    ///A smart undirected graph class.
   10.37  
   10.38 @@ -404,7 +404,7 @@
   10.39    ///
   10.40    ///\todo SnapShot hasn't been implemented yet.
   10.41    ///
   10.42 -  class UndirSmartGraph : public UndirSmartGraphBase {
   10.43 +  class UndirSmartGraph : public ExtendedUndirSmartGraphBase {
   10.44    };
   10.45  
   10.46