# HG changeset patch # User deba # Date 1162306573 0 # Node ID 16954ac695174703100c1150a33298d4630b666d # Parent 1ef281b2b10e645599ee275af98217ae66a82187 Removing template Map template parameter from InvertableMaps diff -r 1ef281b2b10e -r 16954ac69517 lemon/graph_utils.h --- a/lemon/graph_utils.h Tue Oct 31 14:41:12 2006 +0000 +++ b/lemon/graph_utils.h Tue Oct 31 14:56:13 2006 +0000 @@ -1132,33 +1132,23 @@ /// \param _Value The value type of the map. /// /// \see IterableValueMap -#ifndef DOXYGEN - /// \param _Map A ReadWriteMap mapping from the item type to integer. - template < - typename _Graph, typename _Item, typename _Value, - typename _Map = DefaultMap<_Graph, _Item, _Value> - > -#else template -#endif - class InvertableMap : protected _Map { - public: - - /// The key type of InvertableMap (Node, Edge, UEdge). - typedef typename _Map::Key Key; - /// The value type of the InvertableMap. - typedef typename _Map::Value Value; - + class InvertableMap : protected DefaultMap<_Graph, _Item, _Value> { private: - typedef _Map Map; + typedef DefaultMap<_Graph, _Item, _Value> Map; typedef _Graph Graph; - typedef std::map Container; + typedef std::map<_Value, _Item> Container; Container invMap; public: + /// The key type of InvertableMap (Node, Edge, UEdge). + typedef typename Map::Key Key; + /// The value type of the InvertableMap. + typedef typename Map::Value Value; + /// \brief Constructor. @@ -1338,28 +1328,20 @@ /// \param _Graph The graph class the \c DescriptorMap belongs to. /// \param _Item The Item is the Key of the Map. It may be Node, Edge or /// UEdge. -#ifndef DOXYGEN - /// \param _Map A ReadWriteMap mapping from the item type to integer. - template < - typename _Graph, typename _Item, - typename _Map = DefaultMap<_Graph, _Item, int> - > -#else template -#endif - class DescriptorMap : protected _Map { + class DescriptorMap : protected DefaultMap<_Graph, _Item, int> { typedef _Item Item; - typedef _Map Map; + typedef DefaultMap<_Graph, _Item, int> Map; public: /// The graph class of DescriptorMap. typedef _Graph Graph; /// The key type of DescriptorMap (Node, Edge, UEdge). - typedef typename _Map::Key Key; + typedef typename Map::Key Key; /// The value type of DescriptorMap. - typedef typename _Map::Value Value; + typedef typename Map::Value Value; /// \brief Constructor. /// @@ -1373,7 +1355,6 @@ } } - protected: /// \brief Add a new key to the map.