1.1 --- a/lemon/graph_utils.h Tue Oct 31 14:41:12 2006 +0000
1.2 +++ b/lemon/graph_utils.h Tue Oct 31 14:56:13 2006 +0000
1.3 @@ -1132,33 +1132,23 @@
1.4 /// \param _Value The value type of the map.
1.5 ///
1.6 /// \see IterableValueMap
1.7 -#ifndef DOXYGEN
1.8 - /// \param _Map A ReadWriteMap mapping from the item type to integer.
1.9 - template <
1.10 - typename _Graph, typename _Item, typename _Value,
1.11 - typename _Map = DefaultMap<_Graph, _Item, _Value>
1.12 - >
1.13 -#else
1.14 template <typename _Graph, typename _Item, typename _Value>
1.15 -#endif
1.16 - class InvertableMap : protected _Map {
1.17 - public:
1.18 -
1.19 - /// The key type of InvertableMap (Node, Edge, UEdge).
1.20 - typedef typename _Map::Key Key;
1.21 - /// The value type of the InvertableMap.
1.22 - typedef typename _Map::Value Value;
1.23 -
1.24 + class InvertableMap : protected DefaultMap<_Graph, _Item, _Value> {
1.25 private:
1.26
1.27 - typedef _Map Map;
1.28 + typedef DefaultMap<_Graph, _Item, _Value> Map;
1.29 typedef _Graph Graph;
1.30
1.31 - typedef std::map<Value, Key> Container;
1.32 + typedef std::map<_Value, _Item> Container;
1.33 Container invMap;
1.34
1.35 public:
1.36
1.37 + /// The key type of InvertableMap (Node, Edge, UEdge).
1.38 + typedef typename Map::Key Key;
1.39 + /// The value type of the InvertableMap.
1.40 + typedef typename Map::Value Value;
1.41 +
1.42
1.43
1.44 /// \brief Constructor.
1.45 @@ -1338,28 +1328,20 @@
1.46 /// \param _Graph The graph class the \c DescriptorMap belongs to.
1.47 /// \param _Item The Item is the Key of the Map. It may be Node, Edge or
1.48 /// UEdge.
1.49 -#ifndef DOXYGEN
1.50 - /// \param _Map A ReadWriteMap mapping from the item type to integer.
1.51 - template <
1.52 - typename _Graph, typename _Item,
1.53 - typename _Map = DefaultMap<_Graph, _Item, int>
1.54 - >
1.55 -#else
1.56 template <typename _Graph, typename _Item>
1.57 -#endif
1.58 - class DescriptorMap : protected _Map {
1.59 + class DescriptorMap : protected DefaultMap<_Graph, _Item, int> {
1.60
1.61 typedef _Item Item;
1.62 - typedef _Map Map;
1.63 + typedef DefaultMap<_Graph, _Item, int> Map;
1.64
1.65 public:
1.66 /// The graph class of DescriptorMap.
1.67 typedef _Graph Graph;
1.68
1.69 /// The key type of DescriptorMap (Node, Edge, UEdge).
1.70 - typedef typename _Map::Key Key;
1.71 + typedef typename Map::Key Key;
1.72 /// The value type of DescriptorMap.
1.73 - typedef typename _Map::Value Value;
1.74 + typedef typename Map::Value Value;
1.75
1.76 /// \brief Constructor.
1.77 ///
1.78 @@ -1373,7 +1355,6 @@
1.79 }
1.80 }
1.81
1.82 -
1.83 protected:
1.84
1.85 /// \brief Add a new key to the map.