|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.iv.graphdrawing.datastructures.graph.UndirectedGraph
public class UndirectedGraph
Constructor Summary | |
---|---|
UndirectedGraph()
Constructor |
|
UndirectedGraph(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.lang.Object |
clone()
|
double[][] |
createAdjacencyMatrix(double diagonalValue)
|
java.util.Iterator |
edgeIterator()
returns all edges that point from a vertex to an other vertex |
int |
getEdgeCount()
|
UndirectedGraph |
getSubGraph(int[] vertexIndices)
|
UndirectedGraph |
getSubGraph(Vertex newRoot)
creates a subGraph |
double |
getSumOfEdgeWeights()
|
double |
getSumOfEdgeWeights(double threshold)
|
double |
getSumOfEdgeWeights(int[] vertexIndices)
|
double |
getSumOfEdgeWeights(int[] vertexIndices,
double threshold)
|
Vertex |
getVertex(int id)
Returns the vertex with this id |
int |
getVertexCount()
|
java.util.Iterator |
incidentEdgeIterator(Vertex v)
returns all incident edges from the given vertex |
void |
invertEdgeWeights()
|
static void |
main(java.lang.String[] args)
main-function for debug |
void |
normalizeEdgeWeights()
|
void |
normalizeEdgeWeights(double maxWeight)
|
void |
printStatistics()
|
void |
readExternal(java.io.ObjectInput in)
|
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. |
void |
renumberVertices()
|
java.lang.String |
toString()
toString-method only for debugging |
java.util.Iterator |
vertexIterator()
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UndirectedGraph()
public UndirectedGraph(int size)
size
- the initial capacity of the vectorMethod Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public UndirectedGraph getSubGraph(Vertex newRoot)
newRoot
- starting vertex, new root vertexpublic UndirectedGraph getSubGraph(int[] vertexIndices)
public void renumberVertices()
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 incidentEdgeIterator(Vertex v)
v
- the connected Vertexpublic java.util.Iterator edgeIterator()
edgeIterator
in interface Graph
public void invertEdgeWeights()
public void normalizeEdgeWeights()
public void normalizeEdgeWeights(double maxWeight)
public double getSumOfEdgeWeights()
public double getSumOfEdgeWeights(double threshold)
getSumOfEdgeWeights
in interface Graph
public double getSumOfEdgeWeights(int[] vertexIndices)
public double getSumOfEdgeWeights(int[] vertexIndices, double threshold)
getSumOfEdgeWeights
in interface Graph
public double[][] createAdjacencyMatrix(double diagonalValue)
public void printStatistics()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |