# HG changeset patch # User Peter Kovacs # Date 1213464855 -7200 # Node ID d57ae6f0a335ba6ee61d0f1e4fd7f11460318268 # Parent 579979fad316ae8b42af36ac92b98eec5d3bfb3f Rename StoreBoolMap to LoggerBoolMap (ticket #34). diff -r 579979fad316 -r d57ae6f0a335 lemon/kruskal.h --- a/lemon/kruskal.h Wed Jun 04 11:28:08 2008 +0100 +++ b/lemon/kruskal.h Sat Jun 14 19:34:15 2008 +0200 @@ -229,7 +229,7 @@ typedef typename In::value_type::second_type Value; static Value kruskal(const Graph& graph, const In& in, Out& out) { - typedef StoreBoolMap::type> Map; + typedef LoggerBoolMap::type> Map; Map map(out); return _kruskal_bits::kruskal(graph, in, map); } diff -r 579979fad316 -r d57ae6f0a335 lemon/maps.h --- a/lemon/maps.h Wed Jun 04 11:28:08 2008 +0100 +++ b/lemon/maps.h Sat Jun 14 19:34:15 2008 +0200 @@ -1700,9 +1700,9 @@ /// maps and most of them assign \c true at most once for each key. /// In these cases it is a natural request to store each \c true /// assigned elements (in order of the assignment), which can be - /// easily done with StoreBoolMap. + /// easily done with LoggerBoolMap. /// - /// The simplest way of using this map is through the storeBoolMap() + /// The simplest way of using this map is through the loggerBoolMap() /// function. /// /// \tparam It The type of the iterator. @@ -1717,7 +1717,7 @@ template ::Value> #endif - class StoreBoolMap { + class LoggerBoolMap { public: typedef It Iterator; @@ -1725,7 +1725,7 @@ typedef bool Value; /// Constructor - StoreBoolMap(Iterator it) + LoggerBoolMap(Iterator it) : _begin(it), _end(it) {} /// Gives back the given iterator set for the first key @@ -1750,9 +1750,9 @@ Iterator _end; }; - /// Returns a \ref StoreBoolMap class + /// Returns a \ref LoggerBoolMap class - /// This function just returns a \ref StoreBoolMap class. + /// This function just returns a \ref LoggerBoolMap class. /// /// The most important usage of it is storing certain nodes or arcs /// that were marked \c true by an algorithm. @@ -1760,24 +1760,24 @@ /// order of Dfs algorithm, as the following examples show. /// \code /// std::vector v; - /// dfs(g,s).processedMap(storeBoolMap(std::back_inserter(v))).run(); + /// dfs(g,s).processedMap(loggerBoolMap(std::back_inserter(v))).run(); /// \endcode /// \code /// std::vector v(countNodes(g)); - /// dfs(g,s).processedMap(storeBoolMap(v.begin())).run(); + /// dfs(g,s).processedMap(loggerBoolMap(v.begin())).run(); /// \endcode /// /// \note The container of the iterator must contain enough space /// for the elements or the iterator should be an inserter iterator. /// - /// \note StoreBoolMap is just \ref concepts::WriteMap "writable", so + /// \note LoggerBoolMap is just \ref concepts::WriteMap "writable", so /// it cannot be used when a readable map is needed, for example as - /// \c ReachedMap for Bfs, Dfs and Dijkstra algorithms. + /// \c ReachedMap for \ref Bfs, \ref Dfs and \ref Dijkstra algorithms. /// - /// \relates StoreBoolMap + /// \relates LoggerBoolMap template - inline StoreBoolMap storeBoolMap(Iterator it) { - return StoreBoolMap(it); + inline LoggerBoolMap loggerBoolMap(Iterator it) { + return LoggerBoolMap(it); } /// @} diff -r 579979fad316 -r d57ae6f0a335 test/maps_test.cc --- a/test/maps_test.cc Wed Jun 04 11:28:08 2008 +0100 +++ b/test/maps_test.cc Sat Jun 14 19:34:15 2008 +0200 @@ -305,13 +305,13 @@ "Something is wrong with EqualMap"); } - // StoreBoolMap + // LoggerBoolMap { typedef std::vector vec; vec v1; vec v2(10); - StoreBoolMap > map1(std::back_inserter(v1)); - StoreBoolMap map2(v2.begin()); + LoggerBoolMap > map1(std::back_inserter(v1)); + LoggerBoolMap map2(v2.begin()); map1.set(10, false); map1.set(20, true); map2.set(20, true); map1.set(30, false); map2.set(40, false); @@ -319,12 +319,12 @@ map1.set(60, true); map2.set(60, true); check(v1.size() == 3 && v2.size() == 10 && v1[0]==20 && v1[1]==50 && v1[2]==60 && v2[0]==20 && v2[1]==50 && v2[2]==60, - "Something is wrong with StoreBoolMap"); + "Something is wrong with LoggerBoolMap"); int i = 0; - for ( StoreBoolMap::Iterator it = map2.begin(); + for ( LoggerBoolMap::Iterator it = map2.begin(); it != map2.end(); ++it ) - check(v1[i++] == *it, "Something is wrong with StoreBoolMap"); + check(v1[i++] == *it, "Something is wrong with LoggerBoolMap"); } return 0;