1.1 --- a/lemon/maps.h Thu Jul 23 18:09:41 2009 +0200
1.2 +++ b/lemon/maps.h Thu Jul 23 18:13:59 2009 +0200
1.3 @@ -1826,7 +1826,7 @@
1.4 /// Using this map you get access (i.e. can read) the inner id values of
1.5 /// the items stored in the graph, which is returned by the \c id()
1.6 /// function of the graph. This map can be inverted with its member
1.7 - /// class \c InverseMap or with the \c operator() member.
1.8 + /// class \c InverseMap or with the \c operator()() member.
1.9 ///
1.10 /// \tparam GR The graph type.
1.11 /// \tparam K The key type of the map (\c GR::Node, \c GR::Arc or
1.12 @@ -2033,6 +2033,14 @@
1.13 typename Container::const_iterator it = _inv_map.find(val);
1.14 return it != _inv_map.end() ? it->second : INVALID;
1.15 }
1.16 +
1.17 + /// \brief Returns the number of items with the given value.
1.18 + ///
1.19 + /// This function returns the number of items with the given value
1.20 + /// associated with it.
1.21 + int count(const Value &val) const {
1.22 + return _inv_map.count(val);
1.23 + }
1.24
1.25 protected:
1.26
1.27 @@ -2122,11 +2130,11 @@
1.28
1.29 };
1.30
1.31 - /// \brief Provides continuous and unique ID for the
1.32 + /// \brief Provides continuous and unique id for the
1.33 /// items of a graph.
1.34 ///
1.35 /// RangeIdMap provides a unique and continuous
1.36 - /// ID for each item of a given type (\c Node, \c Arc or
1.37 + /// id for each item of a given type (\c Node, \c Arc or
1.38 /// \c Edge) in a graph. This id is
1.39 /// - \b unique: different items get different ids,
1.40 /// - \b continuous: the range of the ids is the set of integers
1.41 @@ -2137,7 +2145,7 @@
1.42 /// Thus this id is not (necessarily) the same as what can get using
1.43 /// the \c id() function of the graph or \ref IdMap.
1.44 /// This map can be inverted with its member class \c InverseMap,
1.45 - /// or with the \c operator() member.
1.46 + /// or with the \c operator()() member.
1.47 ///
1.48 /// \tparam GR The graph type.
1.49 /// \tparam K The key type of the map (\c GR::Node, \c GR::Arc or