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