lemon/edge_set.h
changeset 2031 080d51024ac5
parent 1999 2ff283124dfc
child 2076 10681ee9d8ae
     1.1 --- a/lemon/edge_set.h	Mon Apr 03 09:24:38 2006 +0000
     1.2 +++ b/lemon/edge_set.h	Mon Apr 03 09:45:23 2006 +0000
     1.3 @@ -206,11 +206,24 @@
     1.4      template <typename _Value>
     1.5      class NodeMap : public Graph::template NodeMap<_Value> {
     1.6      public:
     1.7 +
     1.8        typedef typename _Graph::template NodeMap<_Value> Parent;
     1.9 +
    1.10        explicit NodeMap(const ListEdgeSetBase<Graph>& edgeset) 
    1.11 -	: Parent(*edgeset.graph) { }
    1.12 +	: Parent(*edgeset.graph) {}
    1.13 +
    1.14        NodeMap(const ListEdgeSetBase<Graph>& edgeset, const _Value& value)
    1.15 -	: Parent(*edgeset.graph, value) { }
    1.16 +	: Parent(*edgeset.graph, value) {}
    1.17 +
    1.18 +      NodeMap& operator=(const NodeMap& cmap) {
    1.19 +        return operator=<NodeMap>(cmap);
    1.20 +      }
    1.21 +
    1.22 +      template <typename CMap>
    1.23 +      NodeMap& operator=(const CMap& cmap) {
    1.24 +        Parent::operator=(cmap);
    1.25 +        return *this;
    1.26 +      }
    1.27      };
    1.28  
    1.29    };
    1.30 @@ -521,11 +534,24 @@
    1.31      template <typename _Value>
    1.32      class NodeMap : public Graph::template NodeMap<_Value> {
    1.33      public:
    1.34 +
    1.35        typedef typename _Graph::template NodeMap<_Value> Parent;
    1.36 +
    1.37        explicit NodeMap(const SmartEdgeSetBase<Graph>& edgeset) 
    1.38  	: Parent(*edgeset.graph) { }
    1.39 +
    1.40        NodeMap(const SmartEdgeSetBase<Graph>& edgeset, const _Value& value)
    1.41  	: Parent(*edgeset.graph, value) { }
    1.42 +
    1.43 +      NodeMap& operator=(const NodeMap& cmap) {
    1.44 +        return operator=<NodeMap>(cmap);
    1.45 +      }
    1.46 +
    1.47 +      template <typename CMap>
    1.48 +      NodeMap& operator=(const CMap& cmap) {
    1.49 +        Parent::operator=(cmap);
    1.50 +        return *this;
    1.51 +      }
    1.52      };
    1.53  
    1.54    };
    1.55 @@ -667,7 +693,7 @@
    1.56      typedef typename Parent::NodesImplBase NodesImplBase;
    1.57  
    1.58      void eraseNode(const Node& node) {
    1.59 -      if (Parent::IncEdgeIt(*this, node) == INVALID) {
    1.60 +      if (typename Parent::IncEdgeIt(*this, node) == INVALID) {
    1.61          return;
    1.62        }
    1.63        throw UnsupportedOperation();