ListEdgeSet

Declared in lemon/edge_set.h, in the group Graph Structures; the same class on the Doxygen site.

template< typename GR >
class ListEdgeSet : public lemon::EdgeSetExtender< ListEdgeSetBase< 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 based on doubly-linked lists, from each node the incident edges make up lists, therefore one edge can be erased in constant time. It also makes possible, that node can be removed from the underlying graph, in this case all edges incident to the given node is erased from the arc set.

This class fully conforms to the Graph concept. It provides only linear time counting for nodes, edges and arcs.

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 Types

typedef Parent::Node Node
typedef Parent::Arc Arc
typedef Parent::Edge Edge

Public Functions

inline ListEdgeSet( const GR & graph )

Constructor of the EdgeSet.

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 u and node v endpoints.

Returns:

The new edge.

inline void erase( const Edge & e )

Erase an edge from the graph.

Erase the edge e from the graph.

Protected Types

typedef Parent::NodesImplBase NodesImplBase

Protected Functions

inline void eraseNode( const Node & node )
inline void clearNodes()

Protected Attributes

NodesImpl _nodes
class NodesImpl : public NodesImplBase

Public Functions

inline NodesImpl( const GR & graph , ListEdgeSet & arcset )
inline virtual ~NodesImpl()

Protected Functions

inline virtual void erase( const Node & node )
inline virtual void erase( const std::vector< Node > & nodes )
inline virtual void clear()