org.apache.commons.graph
Interface MutableDirectedGraph<V extends Vertex,E extends Edge<V>>

Type Parameters:
V - the Graph vertices type
E - the Graph edges type
All Superinterfaces:
DirectedGraph<V,E>, Graph<V,E>

public interface MutableDirectedGraph<V extends Vertex,E extends Edge<V>>
extends DirectedGraph<V,E>

The MutableDirectedGraph is a directed graph that supports the addition and removal of Vertex and Edges.


Method Summary
 void addEdge(E e, V source, V target)
          Adds a feature to the Edge attribute of the MutableDirectedGraph object.
 void addVertex(V v)
          Adds a feature to the Vertex attribute of the MutableDirectedGraph object.
 void removeEdge(E e)
          Adds a feature to the Edge attribute of the MutableDirectedGraph object
 void removeVertex(V v)
          Removes the Vertex from the MutableGraph object.
 
Methods inherited from interface org.apache.commons.graph.DirectedGraph
getInbound, getOutbound
 
Methods inherited from interface org.apache.commons.graph.Graph
getEdges, getEdges, getVertices, getVertices
 

Method Detail

addVertex

void addVertex(V v)
               throws GraphException
Adds a feature to the Vertex attribute of the MutableDirectedGraph object.

Parameters:
v - the Vertex has to be added in this MutableDirectedGraph instance.
Throws:
GraphException

addEdge

void addEdge(E e,
             V source,
             V target)
             throws GraphException
Adds a feature to the Edge attribute of the MutableDirectedGraph object.

Parameters:
e - the Edge has to be added to this MutableDirectedGraph object.
source - the input Edge source
target - the input Edge target
Throws:
GraphException

removeVertex

void removeVertex(V v)
                  throws GraphException
Removes the Vertex from the MutableGraph object.

Parameters:
v - the Vertex has to be removed from this MutableDirectedGraph instance.
Throws:
GraphException

removeEdge

void removeEdge(E e)
                throws GraphException
Adds a feature to the Edge attribute of the MutableDirectedGraph object

Parameters:
e - the Edge has to be added in this MutableDirectedGraph instance.
Throws:
GraphException


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.