InserterBoolMap< Container, Functor > Class Template Reference
[Map Adaptors]


Detailed Description

template<typename Container, typename Functor = _maps_bits::Identity<typename Container::value_type>>
class lemon::InserterBoolMap< Container, Functor >

Writable bool map for storing each true assigned element in an insertable container. It will insert all the keys set to true into the container.

For example, if you want to store the cut arcs of the strongly connected components in a set you can use the next code:

      set<Edge> cut_edges;
      InserterBoolMap<set<Edge> > inserter_map(cut_edges);
      stronglyConnectedCutEdges(graph, cost, inserter_map);

See also:
BackInserterBoolMap

FrontInserterBoolMap

#include <lemon/maps.h>

List of all members.

Public Member Functions

 InserterBoolMap (Container &_container, typename Container::iterator _it, const Functor &_functor=Functor())
 Constructor with specified iterator.
 InserterBoolMap (Container &_container, const Functor &_functor=Functor())
 Constructor.
void set (const Key &key, Value value)
 The set function of the map.


Constructor & Destructor Documentation

InserterBoolMap ( Container &  _container,
typename Container::iterator  _it,
const Functor &  _functor = Functor() 
) [inline]

Constructor with specified iterator.

Parameters:
_container The container for storing the elements.
_it The elements will be inserted before this iterator.
_functor The functor that is used when an element is stored.

InserterBoolMap ( Container &  _container,
const Functor &  _functor = Functor() 
) [inline]

Constructor without specified iterator. The elements will be inserted before _container.end().

Parameters:
_container The container for storing the elements.
_functor The functor that is used when an element is stored.


Generated on Thu Jun 4 04:06:15 2009 for LEMON by  doxygen 1.5.9