SmartEdgeSet
Declared in lemon/edge_set.h, in the group Graph Structures; the same class on the Doxygen site.
-
template< typename GR >
class SmartEdgeSet : public lemon::EdgeSetExtender< SmartEdgeSetBase< GR > > Graph using a node set of another digraph or graph and an own edge set.
This structure can be used to establish another graph over a node set of an existing one. This class uses the same Node type as the underlying graph, and each valid node of the original graph is valid in this arc set, therefore the node objects of the original graph can be used directly with this class. The node handling functions (id handling, observing, and iterators) works equivalently as in the original graph.
This implementation is slightly faster than the
ListEdgeSet, because it uses continuous storage for edges and it uses just single-linked lists for enumerate incident edges. Therefore the edges cannot be erased from the edge sets.This class fully conforms to the Graph concept. It provides only linear time counting for nodes, edges and arcs.
Warning
If a node is erased from the underlying graph and this node is incident to one edge in the edge set, then the edge set is invalidated, and it cannot be used anymore. The validity can be checked with the
valid()member function.- Template Parameters:
GR – The type of the graph which shares its node set with this class. Its interface must conform to the Digraph or Graph concept.
Public Functions
-
inline Edge addEdge( const Node & u , const Node & v )
Add a new edge to the graph.
Add a new edge to the graph with node
uand nodevendpoints.- Returns:
The new edge.
-
inline bool valid() const
Validity check.
This functions gives back false if the EdgeSet is invalidated. It occurs when a node in the underlying graph is erased and it is not isolated in the EdgeSet.
Protected Types
-
typedef Parent::NodesImplBase NodesImplBase
-
class NodesImpl : public NodesImplBase
Public Functions
-
inline NodesImpl( const GR & graph , SmartEdgeSet & arcset )
-
inline virtual ~NodesImpl()
-
inline bool attached() const
-
inline NodesImpl( const GR & graph , SmartEdgeSet & arcset )