0
3
0
| ... | ... |
@@ -1702,5 +1702,5 @@ |
| 1702 | 1702 |
/// assigned elements (in order of the assignment), which can be |
| 1703 |
/// easily done with |
|
| 1703 |
/// easily done with LoggerBoolMap. |
|
| 1704 | 1704 |
/// |
| 1705 |
/// The simplest way of using this map is through the |
|
| 1705 |
/// The simplest way of using this map is through the loggerBoolMap() |
|
| 1706 | 1706 |
/// function. |
| ... | ... |
@@ -1719,3 +1719,3 @@ |
| 1719 | 1719 |
#endif |
| 1720 |
class |
|
| 1720 |
class LoggerBoolMap {
|
|
| 1721 | 1721 |
public: |
| ... | ... |
@@ -1727,3 +1727,3 @@ |
| 1727 | 1727 |
/// Constructor |
| 1728 |
|
|
| 1728 |
LoggerBoolMap(Iterator it) |
|
| 1729 | 1729 |
: _begin(it), _end(it) {}
|
| ... | ... |
@@ -1752,5 +1752,5 @@ |
| 1752 | 1752 |
|
| 1753 |
/// Returns a \ref |
|
| 1753 |
/// Returns a \ref LoggerBoolMap class |
|
| 1754 | 1754 |
|
| 1755 |
/// This function just returns a \ref |
|
| 1755 |
/// This function just returns a \ref LoggerBoolMap class. |
|
| 1756 | 1756 |
/// |
| ... | ... |
@@ -1762,3 +1762,3 @@ |
| 1762 | 1762 |
/// std::vector<Node> v; |
| 1763 |
/// dfs(g,s).processedMap( |
|
| 1763 |
/// dfs(g,s).processedMap(loggerBoolMap(std::back_inserter(v))).run(); |
|
| 1764 | 1764 |
/// \endcode |
| ... | ... |
@@ -1766,3 +1766,3 @@ |
| 1766 | 1766 |
/// std::vector<Node> v(countNodes(g)); |
| 1767 |
/// dfs(g,s).processedMap( |
|
| 1767 |
/// dfs(g,s).processedMap(loggerBoolMap(v.begin())).run(); |
|
| 1768 | 1768 |
/// \endcode |
| ... | ... |
@@ -1772,10 +1772,10 @@ |
| 1772 | 1772 |
/// |
| 1773 |
/// \note |
|
| 1773 |
/// \note LoggerBoolMap is just \ref concepts::WriteMap "writable", so |
|
| 1774 | 1774 |
/// it cannot be used when a readable map is needed, for example as |
| 1775 |
/// \c ReachedMap for Bfs, Dfs and Dijkstra algorithms. |
|
| 1775 |
/// \c ReachedMap for \ref Bfs, \ref Dfs and \ref Dijkstra algorithms. |
|
| 1776 | 1776 |
/// |
| 1777 |
/// \relates |
|
| 1777 |
/// \relates LoggerBoolMap |
|
| 1778 | 1778 |
template<typename Iterator> |
| 1779 |
inline StoreBoolMap<Iterator> storeBoolMap(Iterator it) {
|
|
| 1780 |
return StoreBoolMap<Iterator>(it); |
|
| 1779 |
inline LoggerBoolMap<Iterator> loggerBoolMap(Iterator it) {
|
|
| 1780 |
return LoggerBoolMap<Iterator>(it); |
|
| 1781 | 1781 |
} |
| ... | ... |
@@ -307,3 +307,3 @@ |
| 307 | 307 |
|
| 308 |
// |
|
| 308 |
// LoggerBoolMap |
|
| 309 | 309 |
{
|
| ... | ... |
@@ -312,4 +312,4 @@ |
| 312 | 312 |
vec v2(10); |
| 313 |
StoreBoolMap<std::back_insert_iterator<vec> > map1(std::back_inserter(v1)); |
|
| 314 |
StoreBoolMap<vec::iterator> map2(v2.begin()); |
|
| 313 |
LoggerBoolMap<std::back_insert_iterator<vec> > map1(std::back_inserter(v1)); |
|
| 314 |
LoggerBoolMap<vec::iterator> map2(v2.begin()); |
|
| 315 | 315 |
map1.set(10, false); |
| ... | ... |
@@ -321,8 +321,8 @@ |
| 321 | 321 |
v1[0]==20 && v1[1]==50 && v1[2]==60 && v2[0]==20 && v2[1]==50 && v2[2]==60, |
| 322 |
"Something is wrong with |
|
| 322 |
"Something is wrong with LoggerBoolMap"); |
|
| 323 | 323 |
|
| 324 | 324 |
int i = 0; |
| 325 |
for ( |
|
| 325 |
for ( LoggerBoolMap<vec::iterator>::Iterator it = map2.begin(); |
|
| 326 | 326 |
it != map2.end(); ++it ) |
| 327 |
check(v1[i++] == *it, "Something is wrong with |
|
| 327 |
check(v1[i++] == *it, "Something is wrong with LoggerBoolMap"); |
|
| 328 | 328 |
} |
0 comments (0 inline)