lemon/maps.h
changeset 877 141f9c0db4a3
parent 792 a2d5fd4c309a
child 942 633956ca9421
     1.1 --- a/lemon/maps.h	Wed Mar 17 12:35:52 2010 +0100
     1.2 +++ b/lemon/maps.h	Sat Mar 06 14:35:12 2010 +0000
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2009
     1.8 + * Copyright (C) 2003-2010
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -233,7 +233,7 @@
    1.13    /// It can be used together with some data structures, e.g.
    1.14    /// heap types and \c UnionFind, when the used items are small
    1.15    /// integers. This map conforms to the \ref concepts::ReferenceMap
    1.16 -  /// "ReferenceMap" concept. 
    1.17 +  /// "ReferenceMap" concept.
    1.18    ///
    1.19    /// The simplest way of using this map is through the rangeMap()
    1.20    /// function.
    1.21 @@ -1916,11 +1916,11 @@
    1.22    /// The graph items can be accessed by their values either using
    1.23    /// \c InverseMap or \c operator()(), and the values of the map can be
    1.24    /// accessed with an STL compatible forward iterator (\c ValueIt).
    1.25 -  /// 
    1.26 +  ///
    1.27    /// This map is intended to be used when all associated values are
    1.28    /// different (the map is actually invertable) or there are only a few
    1.29    /// items with the same value.
    1.30 -  /// Otherwise consider to use \c IterableValueMap, which is more 
    1.31 +  /// Otherwise consider to use \c IterableValueMap, which is more
    1.32    /// suitable and more efficient for such cases. It provides iterators
    1.33    /// to traverse the items with the same associated value, but
    1.34    /// it does not have \c InverseMap.
    1.35 @@ -2002,7 +2002,7 @@
    1.36      private:
    1.37        typename Container::const_iterator it;
    1.38      };
    1.39 -    
    1.40 +
    1.41      /// Alias for \c ValueIt
    1.42      typedef ValueIt ValueIterator;
    1.43  
    1.44 @@ -2061,7 +2061,7 @@
    1.45        typename Container::const_iterator it = _inv_map.find(val);
    1.46        return it != _inv_map.end() ? it->second : INVALID;
    1.47      }
    1.48 -    
    1.49 +
    1.50      /// \brief Returns the number of items with the given value.
    1.51      ///
    1.52      /// This function returns the number of items with the given value
    1.53 @@ -2378,7 +2378,7 @@
    1.54    inline RangeIdMap<GR, K> rangeIdMap(const GR& graph) {
    1.55      return RangeIdMap<GR, K>(graph);
    1.56    }
    1.57 -  
    1.58 +
    1.59    /// \brief Dynamic iterable \c bool map.
    1.60    ///
    1.61    /// This class provides a special graph map type which can store a
    1.62 @@ -2638,7 +2638,7 @@
    1.63        /// \param map The IterableBoolMap.
    1.64        /// \param value The value.
    1.65        ItemIt(const IterableBoolMap& map, bool value)
    1.66 -        : Parent(value ? 
    1.67 +        : Parent(value ?
    1.68                   (map._sep > 0 ?
    1.69                    map._array[map._sep - 1] : INVALID) :
    1.70                   (map._sep < int(map._array.size()) ?
    1.71 @@ -3786,7 +3786,7 @@
    1.72    void mapCopy(const GR& gr, const From& from, To& to) {
    1.73      typedef typename To::Key Item;
    1.74      typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
    1.75 -    
    1.76 +
    1.77      for (ItemIt it(gr); it != INVALID; ++it) {
    1.78        to.set(it, from[it]);
    1.79      }
    1.80 @@ -3794,7 +3794,7 @@
    1.81  
    1.82    /// \brief Compare two graph maps.
    1.83    ///
    1.84 -  /// This function compares the values of two graph maps. It returns 
    1.85 +  /// This function compares the values of two graph maps. It returns
    1.86    /// \c true if the maps assign the same value for all items in the graph.
    1.87    /// The \c Key type of the maps (\c Node, \c Arc or \c Edge) must be equal
    1.88    /// and their \c Value types must be comparable using \c %operator==().
    1.89 @@ -3806,7 +3806,7 @@
    1.90    bool mapCompare(const GR& gr, const Map1& map1, const Map2& map2) {
    1.91      typedef typename Map2::Key Item;
    1.92      typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
    1.93 -    
    1.94 +
    1.95      for (ItemIt it(gr); it != INVALID; ++it) {
    1.96        if (!(map1[it] == map2[it])) return false;
    1.97      }