COIN-OR::LEMON - Graph Library

Changeset 956:141f9c0db4a3 in lemon for lemon/maps.h


Ignore:
Timestamp:
03/06/10 15:35:12 (10 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
957:f802439d2b58, 959:38213abd2911, 1041:f112c18bc304
Phase:
public
Message:

Unify the sources (#339)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/maps.h

    r839 r956  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    234234  /// heap types and \c UnionFind, when the used items are small
    235235  /// integers. This map conforms to the \ref concepts::ReferenceMap
    236   /// "ReferenceMap" concept. 
     236  /// "ReferenceMap" concept.
    237237  ///
    238238  /// The simplest way of using this map is through the rangeMap()
     
    19171917  /// \c InverseMap or \c operator()(), and the values of the map can be
    19181918  /// accessed with an STL compatible forward iterator (\c ValueIt).
    1919   /// 
     1919  ///
    19201920  /// This map is intended to be used when all associated values are
    19211921  /// different (the map is actually invertable) or there are only a few
    19221922  /// 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
    19241924  /// suitable and more efficient for such cases. It provides iterators
    19251925  /// to traverse the items with the same associated value, but
     
    20032003      typename Container::const_iterator it;
    20042004    };
    2005    
     2005
    20062006    /// Alias for \c ValueIt
    20072007    typedef ValueIt ValueIterator;
     
    20622062      return it != _inv_map.end() ? it->second : INVALID;
    20632063    }
    2064    
     2064
    20652065    /// \brief Returns the number of items with the given value.
    20662066    ///
     
    23792379    return RangeIdMap<GR, K>(graph);
    23802380  }
    2381  
     2381
    23822382  /// \brief Dynamic iterable \c bool map.
    23832383  ///
     
    26392639      /// \param value The value.
    26402640      ItemIt(const IterableBoolMap& map, bool value)
    2641         : Parent(value ? 
     2641        : Parent(value ?
    26422642                 (map._sep > 0 ?
    26432643                  map._array[map._sep - 1] : INVALID) :
     
    37873787    typedef typename To::Key Item;
    37883788    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
    3789    
     3789
    37903790    for (ItemIt it(gr); it != INVALID; ++it) {
    37913791      to.set(it, from[it]);
     
    37953795  /// \brief Compare two graph maps.
    37963796  ///
    3797   /// This function compares the values of two graph maps. It returns 
     3797  /// This function compares the values of two graph maps. It returns
    37983798  /// \c true if the maps assign the same value for all items in the graph.
    37993799  /// The \c Key type of the maps (\c Node, \c Arc or \c Edge) must be equal
     
    38073807    typedef typename Map2::Key Item;
    38083808    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
    3809    
     3809
    38103810    for (ItemIt it(gr); it != INVALID; ++it) {
    38113811      if (!(map1[it] == map2[it])) return false;
Note: See TracChangeset for help on using the changeset viewer.