StoreBoolMap< _Iterator, _Functor > Class Template Reference
[Map Adaptors]


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

#include <lemon/maps.h>

List of all members.

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.


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