Changeset 877:141f9c0db4a3 in lemon-1.2 for lemon/maps.h
- Timestamp:
- 03/06/10 15:35:12 (14 years ago)
- Branch:
- default
- Children:
- 878:f802439d2b58, 880:38213abd2911, 909:f112c18bc304
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/maps.h
r792 r877 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 234 234 /// heap types and \c UnionFind, when the used items are small 235 235 /// integers. This map conforms to the \ref concepts::ReferenceMap 236 /// "ReferenceMap" concept. 236 /// "ReferenceMap" concept. 237 237 /// 238 238 /// The simplest way of using this map is through the rangeMap() … … 1917 1917 /// \c InverseMap or \c operator()(), and the values of the map can be 1918 1918 /// accessed with an STL compatible forward iterator (\c ValueIt). 1919 /// 1919 /// 1920 1920 /// This map is intended to be used when all associated values are 1921 1921 /// different (the map is actually invertable) or there are only a few 1922 1922 /// items with the same value. 1923 /// Otherwise consider to use \c IterableValueMap, which is more 1923 /// Otherwise consider to use \c IterableValueMap, which is more 1924 1924 /// suitable and more efficient for such cases. It provides iterators 1925 1925 /// to traverse the items with the same associated value, but … … 2003 2003 typename Container::const_iterator it; 2004 2004 }; 2005 2005 2006 2006 /// Alias for \c ValueIt 2007 2007 typedef ValueIt ValueIterator; … … 2062 2062 return it != _inv_map.end() ? it->second : INVALID; 2063 2063 } 2064 2064 2065 2065 /// \brief Returns the number of items with the given value. 2066 2066 /// … … 2379 2379 return RangeIdMap<GR, K>(graph); 2380 2380 } 2381 2381 2382 2382 /// \brief Dynamic iterable \c bool map. 2383 2383 /// … … 2639 2639 /// \param value The value. 2640 2640 ItemIt(const IterableBoolMap& map, bool value) 2641 : Parent(value ? 2641 : Parent(value ? 2642 2642 (map._sep > 0 ? 2643 2643 map._array[map._sep - 1] : INVALID) : … … 3787 3787 typedef typename To::Key Item; 3788 3788 typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt; 3789 3789 3790 3790 for (ItemIt it(gr); it != INVALID; ++it) { 3791 3791 to.set(it, from[it]); … … 3795 3795 /// \brief Compare two graph maps. 3796 3796 /// 3797 /// This function compares the values of two graph maps. It returns 3797 /// This function compares the values of two graph maps. It returns 3798 3798 /// \c true if the maps assign the same value for all items in the graph. 3799 3799 /// The \c Key type of the maps (\c Node, \c Arc or \c Edge) must be equal … … 3807 3807 typedef typename Map2::Key Item; 3808 3808 typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt; 3809 3809 3810 3810 for (ItemIt it(gr); it != INVALID; ++it) { 3811 3811 if (!(map1[it] == map2[it])) return false;
Note: See TracChangeset
for help on using the changeset viewer.