ListGraph Class Reference
[Graph Structures]

#include <lemon/list_graph.h>

List of all members.


Detailed Description

This is a simple and fast erasable graph implementation.

It addition that it conforms to the ErasableGraph concept, it also provides several additional useful extra functionalities.

See also:
concept::ErasableGraph.


Public Member Functions

void changeTarget (Edge e, Node n)
 Changes the target of e to n.
void changeSource (Edge e, Node n)
 Changes the source of e to n.
void reverseEdge (Edge e)
 Invert the direction of an edge.
void reserveEdge (int n)
 Using this it possible to avoid the superfluous memory allocation.
void contract (Node a, Node b, bool r=true)
 Contract two nodes.
Node split (Node n, bool connect=true)
 Split a node.
Node split (Edge e)
 Split an edge.

Classes

class  Snapshot
 Class to make a snapshot of the graph and to restrore to it later. More...


Member Function Documentation

void changeTarget Edge  e,
Node  n
[inline]
 

Changes the target of e to n

Note:
The Edge's and OutEdge's referencing the changed edge remain valid. However InEdge's are invalidated.

void changeSource Edge  e,
Node  n
[inline]
 

Changes the source of e to n

Note:
The Edge's and InEdge's referencing the changed edge remain valid. However OutEdge's are invalidated.

void reverseEdge Edge  e  )  [inline]
 

Note:
The Edge's referencing the changed edge remain valid. However OutEdge's and InEdge's are invalidated.

void reserveEdge int  n  )  [inline]
 

Using this it possible to avoid the superfluous memory allocation.

Todo:
more docs...

void contract Node  a,
Node  b,
bool  r = true
[inline]
 

This function contracts two nodes.

Node b will be removed but instead of deleting its neighboring edges, they will be joined to a. The last parameter r controls whether to remove loops. true means that loops will be removed.

Note:
The Edges referencing a moved edge remain valid. However InEdge's and OutEdge's may be invalidated.

Node split Node  n,
bool  connect = true
[inline]
 

This function splits a node. First a new node is added to the graph, then the source of each outgoing edge of n is moved to this new node. If connect is true (this is the default value), then a new edge from n to the newly created node is also added.

Returns:
The newly created node.
Note:
The Edges referencing a moved edge remain valid. However InEdge's and OutEdge's may be invalidated.
Warning:
This functionality cannot be used together with the Snapshot feature.
Todo:
It could be implemented in a bit faster way.

Node split Edge  e  )  [inline]
 

This function splits an edge. First a new node b is added to the graph, then the original edge is re-targetes to b. Finally an edge from b to the original target is added.

Returns:
The newly created node.
Warning:
This functionality cannot be used together with the Snapshot feature.


The documentation for this class was generated from the following file:
Generated on Fri Feb 3 18:42:05 2006 for LEMON by  doxygen 1.4.6