LoggerBoolMap

Declared in lemon/maps.h, in the group Maps; the same class on the Doxygen site.

template< typename IT , typename KEY >
class LoggerBoolMap : public MapBase< KEY , bool >

Writable bool map for logging each true assigned element.

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.

Note

The container of the iterator must contain enough space for the elements or the iterator should be an inserter iterator.

Template Parameters:
  • IT – The type of the iterator.

  • KEY – The key type of the map. The default value set according to the iterator type should work in most cases.

Public Types

typedef KEY Key

typedef bool Value

typedef IT Iterator

Public Functions

inline LoggerBoolMap( Iterator it )

Constructor.

inline Iterator begin() const

Gives back the given iterator set for the first key.

inline Iterator end() const

Gives back the the ‘after the last’ iterator.

inline void set( const Key & key , Value value )

The set function of the map.