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
.
- 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.
|
|
void | status (const Node &n, bool v) const |
| Sets the status of the given node.
|
|
void | status (const Arc &a, bool v) const |
| Sets the status of the given arc.
|
|
bool | status (const Node &n) const |
| Returns the status of the given node.
|
|
bool | status (const Arc &a) const |
| Returns the status of the given arc.
|
|
void | disable (const Node &n) const |
| Disables the given node.
|
|
void | disable (const Arc &a) const |
| Disables the given arc.
|
|
void | enable (const Node &n) const |
| Enables the given node.
|
|
void | enable (const Arc &a) const |
| Enables the given arc.
|
|