EdgeSet Class Template Reference
[Graph Structures]

#include <list_graph.h>

List of all members.


Detailed Description

template<typename GG>
class lemon::EdgeSet< GG >

This structure can be used to establish another graph over a node set of an existing one. The node iterator will go through the nodes of the original graph, and the NodeMap's of both graphs will convert to each other.

Warning:
Adding or deleting nodes from the graph is not safe if an EdgeSet is currently attached to it!

Todo:
Make it possible to add/delete edges from the base graph (and from EdgeSet, as well)
Parameters:
GG The type of the graph which shares its node set with this class. Its interface must conform to the StaticGraph concept.
It conforms to the ExtendableGraph concept.
See also:
skeleton::ExtendableGraph.

NodeSet.

Definition at line 780 of file list_graph.h.

Public Member Functions

 EdgeSet (NodeGraphType &_G)
 Constructor.
 EdgeSet (const EdgeSet &_g)
 Copy constructor.
int nodeNum () const
 Number of nodes.
int edgeNum () const
 Number of edges.
int maxNodeId () const
 Maximum node ID.
int maxEdgeId () const
 Maximum edge ID.
int id (Node v)
 Node ID.
Node addNode ()
 Adds a new node to the graph.
Edge findEdge (Node u, Node v, Edge prev=INVALID)
 Finds an edge between two nodes.
void clear ()
 Clear all edges. (Doesn't clear the nodes!).

Static Public Member Functions

int id (Edge e)
 Edge ID.


Constructor & Destructor Documentation

EdgeSet NodeGraphType &  _G  )  [inline, explicit]
 

Construates a new graph based on the nodeset of an existing one.

Parameters:
_G the base graph.
Definition at line 878 of file list_graph.h.

EdgeSet const EdgeSet< GG > &  _g  )  [inline, explicit]
 

Makes a copy of an EdgeSet. It will be based on the same graph. Definition at line 885 of file list_graph.h.


Member Function Documentation

int maxNodeId  )  const [inline]
 

Maximum node ID.

See also:
id(Node)
Definition at line 898 of file list_graph.h.

int maxEdgeId  )  const [inline]
 

Maximum edge ID.

See also:
id(Edge)
Definition at line 903 of file list_graph.h.

int id Node  v  )  [inline]
 

The ID of a valid Node is a nonnegative integer not greater than maxNodeId(). The range of the ID's is not surely continuous and the greatest node ID can be actually less then maxNodeId().

The ID of the INVALID node is -1.

Returns:
The ID of the node v.
Definition at line 925 of file list_graph.h.

int id Edge  e  )  [inline, static]
 

The ID of a valid Edge is a nonnegative integer not greater than maxEdgeId(). The range of the ID's is not surely continuous and the greatest edge ID can be actually less then maxEdgeId().

The ID of the INVALID edge is -1.

Returns:
The ID of the edge e.
Definition at line 934 of file list_graph.h.

Edge findEdge Node  u,
Node  v,
Edge  prev = INVALID
[inline]
 

Finds an edge from node u to node v.

If prev is INVALID (this is the default value), then It finds the first edge from u to v. Otherwise it looks for the next edge from u to v after prev.

Returns:
The found edge or INVALID if there is no such an edge.
Definition at line 978 of file list_graph.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 30 12:18:37 2004 for LEMON by doxygen 1.3.8