|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.iv.graphdrawing.datastructures.graph.DirectedGraph
public class DirectedGraph
Constructor Summary | |
---|---|
DirectedGraph()
Constructor |
|
DirectedGraph(int size)
Constructor |
Method Summary | |
---|---|
void |
addEdge(Edge e)
adds an edge to the graph. |
void |
addVertex(Vertex v)
adds a Vertex to the graph. |
java.util.Iterator |
edgeIterator()
returns all edges that point from a vertex to an other vertex |
int |
getEdgeCount()
|
double |
getSumOfEdgeWeights(double threshold)
|
double |
getSumOfEdgeWeights(int[] vertices,
double threshold)
|
Vertex |
getVertex(int id)
Returns the vertex with this id |
int |
getVertexCount()
|
java.util.Iterator |
incomingEdgeIterator(Vertex v)
|
static void |
main(java.lang.String[] args)
main-function for debug |
java.util.Iterator |
outgoingEdgeIterator(Vertex v)
returns all incident edges from the given vertex |
void |
removeEdge(Edge e)
remove an edge from the graph (and from both adjacent Vertices) //O(1) |
void |
removeVertex(Vertex v)
remove the Vertex and all incident edges from the graph. |
java.lang.String |
toString()
toString-method only for debugging |
java.util.Iterator |
vertexIterator()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DirectedGraph()
public DirectedGraph(int size)
size
- the initial capacity of the vectorMethod Detail |
---|
public void addVertex(Vertex v)
v
- the Vertex to be addedpublic java.util.Iterator vertexIterator()
vertexIterator
in interface Graph
public int getVertexCount()
getVertexCount
in interface Graph
public int getEdgeCount()
getEdgeCount
in interface Graph
public void removeVertex(Vertex v)
v
- the Vertex to be removedpublic Vertex getVertex(int id)
id
- of the Vertex
public void addEdge(Edge e)
e
- the Edge to be added.public void removeEdge(Edge e)
e
- the Edge to be removedpublic java.util.Iterator outgoingEdgeIterator(Vertex v)
v
- the connected Vertexpublic java.util.Iterator incomingEdgeIterator(Vertex v)
public java.util.Iterator edgeIterator()
edgeIterator
in interface Graph
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
public double getSumOfEdgeWeights(int[] vertices, double threshold)
getSumOfEdgeWeights
in interface Graph
public double getSumOfEdgeWeights(double threshold)
getSumOfEdgeWeights
in interface Graph
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |