COIN-OR::LEMON - Graph Library

Changeset 767:6e8c27ee9079 in lemon for lemon/maps.h


Ignore:
Timestamp:
07/23/09 18:13:59 (15 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Improvements for graph maps (#302)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/maps.h

    r731 r767  
    18271827  /// the items stored in the graph, which is returned by the \c id()
    18281828  /// function of the graph. This map can be inverted with its member
    1829   /// class \c InverseMap or with the \c operator() member.
     1829  /// class \c InverseMap or with the \c operator()() member.
    18301830  ///
    18311831  /// \tparam GR The graph type.
     
    20332033      typename Container::const_iterator it = _inv_map.find(val);
    20342034      return it != _inv_map.end() ? it->second : INVALID;
     2035    }
     2036   
     2037    /// \brief Returns the number of items with the given value.
     2038    ///
     2039    /// This function returns the number of items with the given value
     2040    /// associated with it.
     2041    int count(const Value &val) const {
     2042      return _inv_map.count(val);
    20352043    }
    20362044
     
    21232131  };
    21242132
    2125   /// \brief Provides continuous and unique ID for the
     2133  /// \brief Provides continuous and unique id for the
    21262134  /// items of a graph.
    21272135  ///
    21282136  /// RangeIdMap provides a unique and continuous
    2129   /// ID for each item of a given type (\c Node, \c Arc or
     2137  /// id for each item of a given type (\c Node, \c Arc or
    21302138  /// \c Edge) in a graph. This id is
    21312139  ///  - \b unique: different items get different ids,
     
    21382146  /// the \c id() function of the graph or \ref IdMap.
    21392147  /// This map can be inverted with its member class \c InverseMap,
    2140   /// or with the \c operator() member.
     2148  /// or with the \c operator()() member.
    21412149  ///
    21422150  /// \tparam GR The graph type.
Note: See TracChangeset for help on using the changeset viewer.