FillBoolMap Class Template Reference
[Map Adaptors]

#include <lemon/maps.h>

List of all members.


Detailed Description

template<typename Map>
class lemon::FillBoolMap< Map >

Writable bool map to fill the elements set to true with a given value. The value can set the container.

The next code finds the connected components of the undirected graph and stores it in the comp map:

      typedef UGraph::NodeMap<int> ComponentMap;
      ComponentMap comp(ugraph);
      typedef FillBoolMap<UGraph::NodeMap<int> > ComponentFillerMap;
      ComponentFillerMap filler(comp, 0);
     
      Dfs<UGraph>::DefProcessedMap<ComponentFillerMap>::Create dfs(ugraph);
      dfs.processedMap(filler);
      dfs.init();
      for (NodeIt it(ugraph); it != INVALID; ++it) {
        if (!dfs.reached(it)) {
          dfs.addSource(it);
          dfs.start();
          ++filler.fillValue();
        }
      }


Public Member Functions

 FillBoolMap (Map &_map, const typename Map::Value &_fill)
 Constructor.
 FillBoolMap (Map &_map)
 Constructor.
const Map::Value & fillValue () const
 Gives back the current fill value.
Map::Value & fillValue ()
 Gives back the current fill value.
void fillValue (const typename Map::Value &_fill)
 Sets the current fill value.
void set (const Key &key, Value value)
 Setter function of the map.


The documentation for this class was generated from the following file:
Generated on Tue Oct 31 09:51:10 2006 for LEMON by  doxygen 1.5.1