COIN-OR::LEMON - Graph Library

Changeset 2287:16954ac69517 in lemon-0.x for lemon


Ignore:
Timestamp:
10/31/06 15:56:13 (13 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3052
Message:

Removing template Map template parameter from InvertableMaps?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_utils.h

    r2286 r2287  
    11331133  ///
    11341134  /// \see IterableValueMap
    1135 #ifndef DOXYGEN
    1136   /// \param _Map A ReadWriteMap mapping from the item type to integer.
    1137   template <
    1138     typename _Graph, typename _Item, typename _Value,
    1139     typename _Map = DefaultMap<_Graph, _Item, _Value>
    1140   >
    1141 #else
    11421135  template <typename _Graph, typename _Item, typename _Value>
    1143 #endif
    1144   class InvertableMap : protected _Map {
    1145   public:
    1146 
    1147     /// The key type of InvertableMap (Node, Edge, UEdge).
    1148     typedef typename _Map::Key Key;
    1149     /// The value type of the InvertableMap.
    1150     typedef typename _Map::Value Value;
    1151 
     1136  class InvertableMap : protected DefaultMap<_Graph, _Item, _Value> {
    11521137  private:
    11531138   
    1154     typedef _Map Map;
     1139    typedef DefaultMap<_Graph, _Item, _Value> Map;
    11551140    typedef _Graph Graph;
    11561141
    1157     typedef std::map<Value, Key> Container;
     1142    typedef std::map<_Value, _Item> Container;
    11581143    Container invMap;   
    11591144
    11601145  public:
    11611146 
     1147    /// The key type of InvertableMap (Node, Edge, UEdge).
     1148    typedef typename Map::Key Key;
     1149    /// The value type of the InvertableMap.
     1150    typedef typename Map::Value Value;
     1151
    11621152
    11631153
     
    13391329  /// \param _Item The Item is the Key of the Map. It may be Node, Edge or
    13401330  /// UEdge.
    1341 #ifndef DOXYGEN
    1342   /// \param _Map A ReadWriteMap mapping from the item type to integer.
    1343   template <
    1344     typename _Graph, typename _Item,
    1345     typename _Map = DefaultMap<_Graph, _Item, int>
    1346   >
    1347 #else
    13481331  template <typename _Graph, typename _Item>
    1349 #endif
    1350   class DescriptorMap : protected _Map {
     1332  class DescriptorMap : protected DefaultMap<_Graph, _Item, int> {
    13511333
    13521334    typedef _Item Item;
    1353     typedef _Map Map;
     1335    typedef DefaultMap<_Graph, _Item, int> Map;
    13541336
    13551337  public:
     
    13581340
    13591341    /// The key type of DescriptorMap (Node, Edge, UEdge).
    1360     typedef typename _Map::Key Key;
     1342    typedef typename Map::Key Key;
    13611343    /// The value type of DescriptorMap.
    1362     typedef typename _Map::Value Value;
     1344    typedef typename Map::Value Value;
    13631345
    13641346    /// \brief Constructor.
     
    13731355      }     
    13741356    }
    1375 
    13761357
    13771358  protected:
Note: See TracChangeset for help on using the changeset viewer.