template<typename GR, typename K>
class lemon::IterableBoolMap< GR, K >
This class provides a special graph map type which can store a bool value for graph items (Node, Arc or Edge). For both true and false values it is possible to iterate on the keys mapped to the value.
This type is a reference map, so it can be modified with the subscript operator.
- Template Parameters
-
| GR | The graph type. |
| K | The key type of the map (GR::Node, GR::Arc or GR::Edge). |
- See also
- IterableIntMap, IterableValueMap
-
CrossRefMap
Inherits Type.
|
| | IterableBoolMap (const Graph &graph, bool def=false) |
| | Constructor of the map with a default value.
|
| |
| bool | operator[] (const Key &key) const |
| | Const subscript operator of the map.
|
| |
| Reference | operator[] (const Key &key) |
| | Subscript operator of the map.
|
| |
| void | set (const Key &key, bool value) |
| | Set operation of the map.
|
| |
| void | setAll (bool value) |
| | Set all items.
|
| |
| int | trueNum () const |
| | Returns the number of the keys mapped to true.
|
| |
| int | falseNum () const |
| | Returns the number of the keys mapped to false.
|
| |