1.1 --- a/lemon/concepts/digraph.h Sat Apr 18 21:54:30 2009 +0200
1.2 +++ b/lemon/concepts/digraph.h Tue Apr 21 10:34:49 2009 +0100
1.3 @@ -421,12 +421,11 @@
1.4 /// Gives back the opposite node on the given arc.
1.5 Node oppositeNode(const Node&, const Arc&) const { return INVALID; }
1.6
1.7 - /// \brief Read write map of the nodes to type \c T.
1.8 + /// \brief Reference map of the nodes to type \c T.
1.9 ///
1.10 - /// ReadWrite map of the nodes to type \c T.
1.11 - /// \sa Reference
1.12 + /// Reference map of the nodes to type \c T.
1.13 template<class T>
1.14 - class NodeMap : public ReadWriteMap< Node, T > {
1.15 + class NodeMap : public ReferenceMap<Node, T, T&, const T&> {
1.16 public:
1.17
1.18 ///\e
1.19 @@ -436,7 +435,8 @@
1.20
1.21 private:
1.22 ///Copy constructor
1.23 - NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
1.24 + NodeMap(const NodeMap& nm) :
1.25 + ReferenceMap<Node, T, T&, const T&>(nm) { }
1.26 ///Assignment operator
1.27 template <typename CMap>
1.28 NodeMap& operator=(const CMap&) {
1.29 @@ -445,12 +445,11 @@
1.30 }
1.31 };
1.32
1.33 - /// \brief Read write map of the arcs to type \c T.
1.34 + /// \brief Reference map of the arcs to type \c T.
1.35 ///
1.36 /// Reference map of the arcs to type \c T.
1.37 - /// \sa Reference
1.38 template<class T>
1.39 - class ArcMap : public ReadWriteMap<Arc,T> {
1.40 + class ArcMap : public ReferenceMap<Arc, T, T&, const T&> {
1.41 public:
1.42
1.43 ///\e
1.44 @@ -459,7 +458,8 @@
1.45 ArcMap(const Digraph&, T) { }
1.46 private:
1.47 ///Copy constructor
1.48 - ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { }
1.49 + ArcMap(const ArcMap& em) :
1.50 + ReferenceMap<Arc, T, T&, const T&>(em) { }
1.51 ///Assignment operator
1.52 template <typename CMap>
1.53 ArcMap& operator=(const CMap&) {
1.54 @@ -471,6 +471,7 @@
1.55 template <typename _Digraph>
1.56 struct Constraints {
1.57 void constraints() {
1.58 + checkConcept<BaseDigraphComponent, _Digraph>();
1.59 checkConcept<IterableDigraphComponent<>, _Digraph>();
1.60 checkConcept<IDableDigraphComponent<>, _Digraph>();
1.61 checkConcept<MappableDigraphComponent<>, _Digraph>();