StoreBoolMap Class Template Reference
[Map Adaptors]

#include <lemon/maps.h>

List of all members.


Detailed Description

template<typename _Iterator, typename _Functor = _maps_bits::Identity<typename _maps_bits:: IteratorTraits<_Iterator>::Value>>
class lemon::StoreBoolMap< _Iterator, _Functor >

A read-write bool map for logging each true assigned element, i.e it copies all the keys set to true to the given iterator.

Note:
The container of the iterator should contain space for each element.
The following example shows how you can write the edges found by the Prim algorithm directly to the standard output.
      typedef IdMap<UGraph, UEdge> UEdgeIdMap;
      UEdgeIdMap uedgeId(ugraph);
     
      typedef MapFunctor<UEdgeIdMap> UEdgeIdFunctor;
      UEdgeIdFunctor uedgeIdFunctor(uedgeId);
     
      StoreBoolMap<ostream_iterator<int>, UEdgeIdFunctor> 
        writerMap(ostream_iterator<int>(cout, " "), uedgeIdFunctor);
     
      prim(ugraph, cost, writerMap);

See also:
BackInserterBoolMap

FrontInserterBoolMap

InserterBoolMap


Public Member Functions

 StoreBoolMap (Iterator it, const Functor &functor=Functor())
 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) const
 The set function of the map.

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

Generated on Sat Apr 19 14:20:54 2008 for LEMON by  doxygen 1.5.5