Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Graph Class Reference

#include <Graph.hpp>

Inheritance diagram for Graph:

Inheritance graph
[legend]
Collaboration diagram for Graph:

Collaboration graph
[legend]

Detailed Description

Editable Graph class.

The Graph inherits the ConstGraph, and implements the IEditGraph interface. The only difference between the ConstGraph and the Graph classes is that the Graph's nodes and edges can be modified using public methods, whereas the ConstGraph's nodes and edges cannot be modified from outside.


Public Member Functions

 Graph ()
 Empty constructor.
 Graph (PropertyFacility *p)
 Constructor.
 Graph (const Graph &)
 Copy constructor.
virtual ~Graph ()
 Destructor.
virtual Node new_node (NodeID id="")
 Add a node to the graph.
virtual void del_node (Node n)
 Delete a node from the graph and removes all edges adjacent to this node.
virtual Edge new_edge (Node u, Node v, EdgeID id="")
 Add an edge to the graph.
virtual void del_edge (Edge e)
 Delete an edge from the graph.
virtual void del_edge (Node u, Node v)
 Delete a(ll) directed (u,v) edge(s) from the graph.
virtual void add_nodes (int num, int start)
 Convenient method to add nodes to the graph.


Constructor & Destructor Documentation

Graph  ) 
 

Empty constructor.

Graph PropertyFacility p  ) 
 

Constructor.

Graph const Graph g  ) 
 

Copy constructor.

~Graph  )  [virtual]
 

Destructor.


Member Function Documentation

void add_nodes int  num,
int  start
[virtual]
 

Convenient method to add nodes to the graph.

See ConstGraph::priv_add_nodes(num, start).

Parameters:
num Number of nodes to add
start Start of id sequence

Reimplemented in ObservableGraph.

void del_edge Node  u,
Node  v
[virtual]
 

Delete a(ll) directed (u,v) edge(s) from the graph.

See ConstGraph::priv_del_edge(u, v).

Parameters:
u The source node of the directed edge to delete
v The target node of the directed edge to delete

Implements IEditGraph.

Reimplemented in ObservableGraph.

void del_edge Edge  e  )  [virtual]
 

Delete an edge from the graph.

See ConstGraph::priv_del_edge(e).

Parameters:
e The edge to delete.

Implements IEditGraph.

Reimplemented in ObservableGraph.

void del_node Node  n  )  [virtual]
 

Delete a node from the graph and removes all edges adjacent to this node.

See ConstGraph::priv_del_node(n).

Parameters:
n The node to delete

Implements IEditGraph.

Reimplemented in ObservableGraph.

Edge new_edge Node  u,
Node  v,
EdgeID  id = ""
[virtual]
 

Add an edge to the graph.

See ConstGraph::priv_new_edge(u, v, id).

Parameters:
u The source node
v The target node
id The id of the new edge

Implements IEditGraph.

Reimplemented in ObservableGraph.

Node new_node NodeID  id = ""  )  [virtual]
 

Add a node to the graph.

See ConstGraph::priv_new_node(id).

Parameters:
id The id of the new node

Implements IEditGraph.

Reimplemented in ObservableGraph.


Generated on Sun Nov 5 12:06:23 2006 for Graph by  doxygen 1.4.1