All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Member Functions
ListArcSet< GR > Class Template Reference

Detailed Description

template<typename GR>
class lemon::ListArcSet< GR >

This structure can be used to establish another directed 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 outgoing and the incoming arcs make up lists, therefore one arc can be erased in constant time. It also makes possible, that node can be removed from the underlying graph, in this case all arcs incident to the given node is erased from the arc set.

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

GRThe type of the graph which shares its node set with this class. Its interface must conform to the Digraph or Graph concept.

#include <lemon/edge_set.h>

Inherits ArcSetExtender< Base >.

Public Member Functions

 ListArcSet (const GR &graph)
 Constructor of the ArcSet. More...
Arc addArc (const Node &s, const Node &t)
 Add a new arc to the digraph. More...
void erase (const Arc &a)
 Erase an arc from the digraph. More...

Constructor & Destructor Documentation

ListArcSet ( const GR &  graph)

Constructor of the ArcSet.

Member Function Documentation

Arc addArc ( const Node &  s,
const Node &  t 

Add a new arc to the digraph with source node s and target node t.

The new arc.
void erase ( const Arc &  a)

Erase an arc a from the digraph.