Rename StoreBoolMap to LoggerBoolMap (ticket #34).
authorPeter Kovacs <kpeter@inf.elte.hu>
Sat, 14 Jun 2008 19:34:15 +0200
changeset 167d57ae6f0a335
parent 166 579979fad316
child 168 8ceb318224b1
Rename StoreBoolMap to LoggerBoolMap (ticket #34).
lemon/kruskal.h
lemon/maps.h
test/maps_test.cc
     1.1 --- a/lemon/kruskal.h	Wed Jun 04 11:28:08 2008 +0100
     1.2 +++ b/lemon/kruskal.h	Sat Jun 14 19:34:15 2008 +0200
     1.3 @@ -229,7 +229,7 @@
     1.4        typedef typename In::value_type::second_type Value;
     1.5  
     1.6        static Value kruskal(const Graph& graph, const In& in, Out& out) {
     1.7 -        typedef StoreBoolMap<typename RemoveConst<Out>::type> Map;
     1.8 +        typedef LoggerBoolMap<typename RemoveConst<Out>::type> Map;
     1.9          Map map(out);
    1.10          return _kruskal_bits::kruskal(graph, in, map);
    1.11        }
     2.1 --- a/lemon/maps.h	Wed Jun 04 11:28:08 2008 +0100
     2.2 +++ b/lemon/maps.h	Sat Jun 14 19:34:15 2008 +0200
     2.3 @@ -1700,9 +1700,9 @@
     2.4    /// maps and most of them assign \c true at most once for each key.
     2.5    /// In these cases it is a natural request to store each \c true
     2.6    /// assigned elements (in order of the assignment), which can be
     2.7 -  /// easily done with StoreBoolMap.
     2.8 +  /// easily done with LoggerBoolMap.
     2.9    ///
    2.10 -  /// The simplest way of using this map is through the storeBoolMap()
    2.11 +  /// The simplest way of using this map is through the loggerBoolMap()
    2.12    /// function.
    2.13    ///
    2.14    /// \tparam It The type of the iterator.
    2.15 @@ -1717,7 +1717,7 @@
    2.16    template <typename It,
    2.17  	    typename Ke=typename _maps_bits::IteratorTraits<It>::Value>
    2.18  #endif
    2.19 -  class StoreBoolMap {
    2.20 +  class LoggerBoolMap {
    2.21    public:
    2.22      typedef It Iterator;
    2.23  
    2.24 @@ -1725,7 +1725,7 @@
    2.25      typedef bool Value;
    2.26  
    2.27      /// Constructor
    2.28 -    StoreBoolMap(Iterator it)
    2.29 +    LoggerBoolMap(Iterator it)
    2.30        : _begin(it), _end(it) {}
    2.31  
    2.32      /// Gives back the given iterator set for the first key
    2.33 @@ -1750,9 +1750,9 @@
    2.34      Iterator _end;
    2.35    };
    2.36    
    2.37 -  /// Returns a \ref StoreBoolMap class
    2.38 +  /// Returns a \ref LoggerBoolMap class
    2.39  
    2.40 -  /// This function just returns a \ref StoreBoolMap class.
    2.41 +  /// This function just returns a \ref LoggerBoolMap class.
    2.42    ///
    2.43    /// The most important usage of it is storing certain nodes or arcs
    2.44    /// that were marked \c true by an algorithm.
    2.45 @@ -1760,24 +1760,24 @@
    2.46    /// order of Dfs algorithm, as the following examples show.
    2.47    /// \code
    2.48    ///   std::vector<Node> v;
    2.49 -  ///   dfs(g,s).processedMap(storeBoolMap(std::back_inserter(v))).run();
    2.50 +  ///   dfs(g,s).processedMap(loggerBoolMap(std::back_inserter(v))).run();
    2.51    /// \endcode
    2.52    /// \code
    2.53    ///   std::vector<Node> v(countNodes(g));
    2.54 -  ///   dfs(g,s).processedMap(storeBoolMap(v.begin())).run();
    2.55 +  ///   dfs(g,s).processedMap(loggerBoolMap(v.begin())).run();
    2.56    /// \endcode
    2.57    ///
    2.58    /// \note The container of the iterator must contain enough space
    2.59    /// for the elements or the iterator should be an inserter iterator.
    2.60    ///
    2.61 -  /// \note StoreBoolMap is just \ref concepts::WriteMap "writable", so
    2.62 +  /// \note LoggerBoolMap is just \ref concepts::WriteMap "writable", so
    2.63    /// it cannot be used when a readable map is needed, for example as
    2.64 -  /// \c ReachedMap for Bfs, Dfs and Dijkstra algorithms.
    2.65 +  /// \c ReachedMap for \ref Bfs, \ref Dfs and \ref Dijkstra algorithms.
    2.66    ///
    2.67 -  /// \relates StoreBoolMap
    2.68 +  /// \relates LoggerBoolMap
    2.69    template<typename Iterator>
    2.70 -  inline StoreBoolMap<Iterator> storeBoolMap(Iterator it) {
    2.71 -    return StoreBoolMap<Iterator>(it);
    2.72 +  inline LoggerBoolMap<Iterator> loggerBoolMap(Iterator it) {
    2.73 +    return LoggerBoolMap<Iterator>(it);
    2.74    }
    2.75  
    2.76    /// @}
     3.1 --- a/test/maps_test.cc	Wed Jun 04 11:28:08 2008 +0100
     3.2 +++ b/test/maps_test.cc	Sat Jun 14 19:34:15 2008 +0200
     3.3 @@ -305,13 +305,13 @@
     3.4            "Something is wrong with EqualMap");
     3.5    }
     3.6    
     3.7 -  // StoreBoolMap
     3.8 +  // LoggerBoolMap
     3.9    {
    3.10      typedef std::vector<int> vec;
    3.11      vec v1;
    3.12      vec v2(10);
    3.13 -    StoreBoolMap<std::back_insert_iterator<vec> > map1(std::back_inserter(v1));
    3.14 -    StoreBoolMap<vec::iterator> map2(v2.begin());
    3.15 +    LoggerBoolMap<std::back_insert_iterator<vec> > map1(std::back_inserter(v1));
    3.16 +    LoggerBoolMap<vec::iterator> map2(v2.begin());
    3.17      map1.set(10, false);
    3.18      map1.set(20, true);   map2.set(20, true);
    3.19      map1.set(30, false);  map2.set(40, false);
    3.20 @@ -319,12 +319,12 @@
    3.21      map1.set(60, true);   map2.set(60, true);
    3.22      check(v1.size() == 3 && v2.size() == 10 &&
    3.23            v1[0]==20 && v1[1]==50 && v1[2]==60 && v2[0]==20 && v2[1]==50 && v2[2]==60,
    3.24 -          "Something is wrong with StoreBoolMap");
    3.25 +          "Something is wrong with LoggerBoolMap");
    3.26            
    3.27      int i = 0;
    3.28 -    for ( StoreBoolMap<vec::iterator>::Iterator it = map2.begin();
    3.29 +    for ( LoggerBoolMap<vec::iterator>::Iterator it = map2.begin();
    3.30            it != map2.end(); ++it )
    3.31 -      check(v1[i++] == *it, "Something is wrong with StoreBoolMap");
    3.32 +      check(v1[i++] == *it, "Something is wrong with LoggerBoolMap");
    3.33    }
    3.34  
    3.35    return 0;