COIN-OR::LEMON - Graph Library

Changeset 1531:a3b20dd847b5 in lemon-0.x for lemon/maps.h


Ignore:
Timestamp:
07/04/05 15:10:34 (19 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2022
Message:

New graph copy interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/maps.h

    r1456 r1531  
    207207  /// @{
    208208
     209  /// \brief Identity mapping.
     210  ///
     211  /// This mapping gives back the given key as value without any
     212  /// modification.
     213  template <typename T>
     214  class IdentityMap {
     215  public:
     216    typedef T Key;
     217    typedef T Value;
     218
     219    const Value& operator[](const Key& t) const {
     220      return t;
     221    }
     222  };
    209223
    210224  ///Convert the \c Value of a maps to another type.
Note: See TracChangeset for help on using the changeset viewer.