LoggerBoolMap Class Template Reference
[Maps]

#include <lemon/maps.h>

List of all members.


Detailed Description

template<typename It, typename Ke>
class lemon::LoggerBoolMap< It, Ke >

A writable bool map for logging each true assigned element, i.e it copies subsequently each keys set to true to the given iterator. The most important usage of it is storing certain nodes or arcs that were marked true by an algorithm.

There are several algorithms that provide solutions through bool maps and most of them assign true at most once for each key. In these cases it is a natural request to store each true assigned elements (in order of the assignment), which can be easily done with LoggerBoolMap.

The simplest way of using this map is through the loggerBoolMap() function.

Template Parameters:
It The type of the iterator.
Ke The key type of the map. The default value set according to the iterator type should work in most cases.
Note:
The container of the iterator must contain enough space for the elements or the iterator should be an inserter iterator.

Public Member Functions

 LoggerBoolMap (Iterator it)
 Constructor.
Iterator begin () const
 Gives back the given iterator set for the first key.
Iterator end () const
 Gives back the the 'after the last' iterator.
void set (const Key &key, Value value)
 The set function of the map.

Related Functions

(Note that these are not member functions.)

template<typename Iterator>
LoggerBoolMap< Iterator > loggerBoolMap (Iterator it)
 Returns a LoggerBoolMap class.

The documentation for this class was generated from the following file:

Generated on Tue May 5 07:41:57 2009 for LEMON by  doxygen 1.5.6