diff -r a2dfee683243 -r 8abf74160dc4 lemon/bits/default_map.h --- a/lemon/bits/default_map.h Wed Nov 30 17:49:01 2005 +0000 +++ b/lemon/bits/default_map.h Thu Dec 01 15:08:46 2005 +0000 @@ -225,6 +225,47 @@ /// \e template + class MappableEdgeSetExtender : public _Base { + public: + + typedef MappableEdgeSetExtender<_Base> Graph; + typedef _Base Parent; + + typedef typename Parent::Edge Edge; + typedef typename Parent::EdgeIt EdgeIt; + + template + class EdgeMap + : public IterableMapExtender > { + public: + typedef MappableEdgeSetExtender Graph; + typedef IterableMapExtender > Parent; + + EdgeMap(const Graph& _g) + : Parent(_g) {} + EdgeMap(const Graph& _g, const _Value& _v) + : Parent(_g, _v) {} + + EdgeMap& operator=(const EdgeMap& cmap) { + return operator=(cmap); + } + + template + EdgeMap& operator=(const CMap& cmap) { + checkConcept, CMap>(); + const typename Parent::Graph* graph = Parent::getGraph(); + Edge it; + for (graph->first(it); it != INVALID; graph->next(it)) { + Parent::set(it, cmap[it]); + } + return *this; + } + }; + + }; + + /// \e + template class MappableUndirGraphExtender : public MappableGraphExtender<_Base> { public: @@ -266,6 +307,49 @@ }; + /// \e + template + class MappableUndirEdgeSetExtender : + public MappableEdgeSetExtender<_Base> { + public: + + typedef MappableUndirEdgeSetExtender Graph; + typedef MappableEdgeSetExtender<_Base> Parent; + + typedef typename Parent::UndirEdge UndirEdge; + + template + class UndirEdgeMap + : public IterableMapExtender > { + public: + typedef MappableUndirEdgeSetExtender Graph; + typedef IterableMapExtender< + DefaultMap > Parent; + + UndirEdgeMap(const Graph& _g) + : Parent(_g) {} + UndirEdgeMap(const Graph& _g, const _Value& _v) + : Parent(_g, _v) {} + + UndirEdgeMap& operator=(const UndirEdgeMap& cmap) { + return operator=(cmap); + } + + template + UndirEdgeMap& operator=(const CMap& cmap) { + checkConcept, CMap>(); + const typename Parent::Graph* graph = Parent::getGraph(); + UndirEdge it; + for (graph->first(it); it != INVALID; graph->next(it)) { + Parent::set(it, cmap[it]); + } + return *this; + } + }; + + + }; + template class MappableUndirBipartiteGraphExtender : public _Base {