Home | Trees | Indices | Help |
---|
|
object --+ | Graph --+ | DirectedGraph
This class defines a Directed Graph. The Directed Graph class extends the Graph class and enables the creation of directed arcs.
This class provides several methods for modifying and accessing arcs, as well as extending certain accessors to provide more accurate functionality.
Mutators: -addArc(n) -removeArc(i, j)
Accessors: -isArc(i, j) -inDegree(i) -size()
If a Directed Graph contains two symmetric arcs, it is considered to contain the edge.
|
|||
Inherited from |
|
|||
|
|||
|
|||
boolean |
|
||
number |
|
||
integer |
|
||
|
|||
Inherited from Inherited from |
|
|||
|
|||
__abstractmethods__ =
|
|||
Inherited from |
|
|||
Inherited from |
|
Creates an arc from i to j This method creates an arc from i to j. Arcs are uni-directional, and so the order of the parameters i and j does matter. Self-loops, i.e. arcs where i == j, are allowed, but are indistinguishable from edges.
|
Removes an arc from i to j This method removes an arc from i to j. Note that if an edge between i and j exists, this method can 'split' the edge and remove the outbound arc, so that the arc (j, i) in the other direction, is left. |
Returns True if and only if j is adjacent to i. This method returns true if there is an arc from i to j. However, it also returns true if there is an edge between i and j.
|
Returns the number of arcs and edges going into i. Parameter: i -- a non-negative integer representing a vertex in this graph Raises : ValueError if either i or j is not a valid vertex label in this graph.
|
Returns the number of arcs in this graph. This method returns the number of arcs in this graph. An edge counts as two arcs.
|
The default connector of this graph is the arc.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Feb 25 13:23:34 2010 | http://epydoc.sourceforge.net |