|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
V
- The vertices in this graph.
public interface UndirectedMutableGraph<V>
An extension of an UndirectedGraph
. The graph can be changed after
it was created.
Nested Class Summary | |
---|---|
static interface |
UndirectedMutableGraph.Edge<V>
Deprecated. The extension of UndirectedGraph.Edge to be mutable. |
Field Summary |
---|
Fields inherited from interface de.aitools.aq.graph.weighted.UndirectedGraph |
---|
DEFAULT_UNCONNECTED_WEIGHT |
Method Summary | |
---|---|
boolean |
addVertex(V vertex)
Deprecated. Add a vertex to the graph. |
java.util.Iterator<? extends UndirectedMutableGraph.Edge<V>> |
edges()
Deprecated. Get an iterator over all edges of the graph. |
java.util.Iterator<? extends UndirectedMutableGraph.Edge<V>> |
edgesConnectedTo(V vertex)
Deprecated. Get an iterator over all edges in the graph, given vertex is connected with. |
UndirectedMutableGraph.Edge<V> |
getEdge(V vertexA,
V vertexB)
Deprecated. Get the UndirectedGraph.Edge connecting the two vertices. |
double |
removeEdge(V vertexA,
V vertexB)
Deprecated. Remove a edge determined by two vertices. |
boolean |
removeVertex(V vertex)
Deprecated. Remove a vertex from the graph. |
double |
setEdgeWeight(V vertexA,
V vertexB,
double weight)
Deprecated. Set the weight of a edge determined by two vertices. |
void |
setUnconnectedWeight(double unconnectedWeight)
Deprecated. Change the weight that is returned by UndirectedGraph.getEdgeWeight(Object, Object) if the two vertices are not
connected. |
Methods inherited from interface de.aitools.aq.graph.weighted.UndirectedGraph |
---|
containsEdge, containsVertex, getEdgeWeight, getUnconnectedWeight, numEdges, numEdges, numVertices, vertices, verticesConnectedTo |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
void setUnconnectedWeight(double unconnectedWeight)
UndirectedGraph.getEdgeWeight(Object, Object)
if the two vertices are not
connected. This will remove all edges that currently have
unconnectedWeight as their weight.
unconnectedWeight
- The new weight for unconnected vertices.java.util.Iterator<? extends UndirectedMutableGraph.Edge<V>> edges()
UndirectedGraph
edges
in interface UndirectedGraph<V>
UndirectedGraph.numEdges()
java.util.Iterator<? extends UndirectedMutableGraph.Edge<V>> edgesConnectedTo(V vertex)
UndirectedGraph
edgesConnectedTo
in interface UndirectedGraph<V>
vertex
- The vertex.
UndirectedGraph.numEdges(Object)
UndirectedMutableGraph.Edge<V> getEdge(V vertexA, V vertexB)
UndirectedGraph
UndirectedGraph.Edge
connecting the two vertices. The object will also
be returned if there does not exists such an edge in the graph. Use
UndirectedGraph.Edge.exists()
to check.
getEdge
in interface UndirectedGraph<V>
vertexA
- One vertex.vertexB
- The other vertex.
UndirectedGraph.containsEdge(Object, Object)
,
UndirectedGraph.getEdgeWeight(Object, Object)
boolean addVertex(V vertex)
vertex
- The vertex to be added.
java.lang.NullPointerException
- If vertex is null
.boolean removeVertex(V vertex)
vertex
- The vertex to be removed.
java.lang.NullPointerException
- If vertex is null
.double setEdgeWeight(V vertexA, V vertexB, double weight)
UndirectedGraph.getUnconnectedWeight()
, this should be the same as calling
removeEdge(Object, Object)
. The old weight of the edge is
returned, which may be UndirectedGraph.getUnconnectedWeight()
if the edge had
not existed.
vertexA
- One vertex of the edge.vertexB
- The other vertex of the edge.weight
- The new weight of the edge.
UndirectedGraph.getEdgeWeight(Object, Object)
directly before this call.
java.util.NoSuchElementException
- If at least one of the two vertices is
not a part of the graph (see UndirectedGraph.containsVertex(Object)
).
java.lang.NullPointerException
- If at least one vertex is null
.double removeEdge(V vertexA, V vertexB)
UndirectedGraph.getUnconnectedWeight()
if the edge had
not existed (in which case nothing has happened).
vertexA
- One vertex of the edge.vertexB
- The other vertex of the edge.
UndirectedGraph.getEdgeWeight(Object, Object)
directly before this call.
java.util.NoSuchElementException
- If at least one of the two vertices is
not a part of the graph (see UndirectedGraph.containsVertex(Object)
).
java.lang.NullPointerException
- If at least one vertex is null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |