FilterEdges
Declared in lemon/adaptors.h, in the group Adaptor Classes for Graphs; the same class on the Doxygen site.
-
template< typename GR , typename EF >
class FilterEdges Adaptor class for hiding edges in a graph.
FilterEdges adaptor can be used for hiding edges in a graph. A
booledge map must be specified, which defines the filter for the edges. Only the edges withtruefilter value are shown in the subgraph. This adaptor conforms to the Graph concept.The adapted graph can also be modified through this adaptor by adding or removing nodes or edges, unless the
GRtemplate parameter is set to beconst.This class provides only linear time counting for nodes, edges and arcs.
Note
The
Node,EdgeandArctypes of this adaptor and the adapted graph are convertible to each other.- Template Parameters:
GR – The type of the adapted graph. It must conform to the Graph concept. It can also be specified to be
const.EF – The type of the edge filter map. It must be a
bool(or convertible) edge map of the adapted graph. The default type is GR::EdgeMap< bool >.
Public Types
-
typedef Parent::Edge Edge
Public Functions
-
inline FilterEdges( GR & graph , EF & edge_filter )
Constructor.
Creates a subgraph for the given graph with the given edge filter map.
-
inline FilterEdges( const FilterEdges & other )
Copy constructor.
Creates an adaptor of the same graph with the same edge filter map, which refers to none of the members of
other.
-
inline FilterEdges & operator=( const FilterEdges & other )
Assignment.
Makes this adaptor adapt the graph of
otherwith its edge filter map.
-
inline void status( const Edge & e , bool v ) const
Sets the status of the given edge.
This function sets the status of the given edge. It is done by simply setting the assigned value of
etovin the edge filter map.
-
inline bool status( const Edge & e ) const
Returns the status of the given edge.
This function returns the status of the given edge. It is
trueif the given edge is enabled (i.e. not hidden).
-
inline void disable( const Edge & e ) const
Disables the given edge.
This function disables the given edge in the subgraph, so the iteration jumps over it. It is the same as status(e, false).
-
inline void enable( const Edge & e ) const
Enables the given edge.
This function enables the given edge in the subgraph. It is the same as status(e, true).
Protected Functions
-
inline FilterEdges()