template<typename DGR, typename NF, typename AF>
class lemon::SubDigraph< DGR, NF, AF >
SubDigraph can be used for hiding nodes and arcs in a digraph. A bool
node map and a bool
arc map must be specified, which define the filters for nodes and arcs. Only the nodes and arcs with true
filter value are shown in the subdigraph. The arcs that are incident to hidden nodes are also filtered out. This adaptor conforms to the Digraph concept.
The adapted digraph can also be modified through this adaptor by adding or removing nodes or arcs, unless the GR
template parameter is set to be const
.
This class provides only linear time counting for nodes and arcs.
- Template Parameters
-
DGR | The type of the adapted digraph. It must conform to the Digraph concept. It can also be specified to be const . |
NF | The type of the node filter map. It must be a bool (or convertible) node map of the adapted digraph. The default type is DGR::NodeMap<bool>. |
AF | The type of the arc filter map. It must be bool (or convertible) arc map of the adapted digraph. The default type is DGR::ArcMap<bool>. |
- Note
- The
Node
and Arc
types of this adaptor and the adapted digraph are convertible to each other.
- See Also
- FilterNodes
-
FilterArcs
|
| SubDigraph (DGR &digraph, NF &node_filter, AF &arc_filter) |
| Constructor. More...
|
|
void | status (const Node &n, bool v) const |
| Sets the status of the given node. More...
|
|
void | status (const Arc &a, bool v) const |
| Sets the status of the given arc. More...
|
|
bool | status (const Node &n) const |
| Returns the status of the given node. More...
|
|
bool | status (const Arc &a) const |
| Returns the status of the given arc. More...
|
|
void | disable (const Node &n) const |
| Disables the given node. More...
|
|
void | disable (const Arc &a) const |
| Disables the given arc. More...
|
|
void | enable (const Node &n) const |
| Enables the given node. More...
|
|
void | enable (const Arc &a) const |
| Enables the given arc. More...
|
|