Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SmartGraph Class Reference
[Graph Structures]

#include <lemon/smart_graph.h>

List of all members.


Detailed Description

This is a simple and fast graph implementation. It is also quite memory efficient, but at the price that it does support only limited (only stack-like) node and edge deletions. It conforms to the ExtendableGraph concept.
See also:
concept::ExtendableGraph.
Author:
Alpar Juttner


Public Member Functions

Edge findEdge (Node u, Node v, Edge prev=INVALID)
 Finds an edge between two nodes.
Node split (Node n, bool connect=true)
 Split a node.

Classes

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


Member Function Documentation

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.
Thus you can iterate through each edge from u to v as it follows.
        for(Edge e=G.findEdge(u,v);e!=INVALID;e=G.findEdge(u,v,e)) {
          ...
        }
Todo:
Possibly it should be a global function.

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.


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:16:13 2005 for LEMON by  doxygen 1.4.4