|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
V
- The vertices in this graph.
public interface UndirectedGraph<V>
An undirected weighted graph.
UndirectedMutableGraph
Nested Class Summary | |
---|---|
static interface |
UndirectedGraph.Edge<V>
Deprecated. A possible edge connecting two vertices of an underlying UndirectedGraph . |
Field Summary | |
---|---|
static double |
DEFAULT_UNCONNECTED_WEIGHT
Deprecated. The default weight for two not connected vertices. |
Method Summary | |
---|---|
boolean |
containsEdge(V vertexA,
V vertexB)
Deprecated. Check if there exists an edge in the graph connecting the two vertices given as parameters. |
boolean |
containsVertex(V vertex)
Deprecated. Check if given vertex is contained in the graph. |
java.util.Iterator<? extends UndirectedGraph.Edge<V>> |
edges()
Deprecated. Get an iterator over all edges of the graph. |
java.util.Iterator<? extends UndirectedGraph.Edge<V>> |
edgesConnectedTo(V vertex)
Deprecated. Get an iterator over all edges in the graph, given vertex is connected with. |
UndirectedGraph.Edge<V> |
getEdge(V vertexA,
V vertexB)
Deprecated. Get the UndirectedGraph.Edge connecting the two vertices. |
double |
getEdgeWeight(V vertexA,
V vertexB)
Deprecated. Get the weight of the edge connecting the two vertices. |
double |
getUnconnectedWeight()
Deprecated. The method getEdgeWeight(Object, Object) returns a double
value for any possible edge connecting two vertices in the graph. |
int |
numEdges()
Deprecated. Get the number of edges. |
int |
numEdges(V vertex)
Deprecated. |
int |
numVertices()
Deprecated. Get the number of vertices. |
java.util.Iterator<V> |
vertices()
Deprecated. Get an iterator over all current vertices of this graph. |
java.util.Iterator<V> |
verticesConnectedTo(V vertex)
Deprecated. Get an iterator over all vertices that are connected with given vertex at the moment of this call. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Field Detail |
---|
static final double DEFAULT_UNCONNECTED_WEIGHT
Method Detail |
---|
double getUnconnectedWeight()
getEdgeWeight(Object, Object)
returns a double
value for any possible edge connecting two vertices in the graph. If
an edge does not exist, the method will return this value.
int numVertices()
int numEdges()
int numEdges(V vertex)
vertex
- Which vertex to count edges of.
java.util.NoSuchElementException
- If the vertex is not part of the graph.
java.lang.NullPointerException
- If vertex is null
.java.util.Iterator<V> vertices()
Iterable.iterator()
.
numVertices()
java.util.Iterator<V> verticesConnectedTo(V vertex)
vertex
- The vertex.
java.util.NoSuchElementException
- If the vertex is not part of the graph.
java.lang.NullPointerException
- If vertex is null
.numEdges(Object)
java.util.Iterator<? extends UndirectedGraph.Edge<V>> edges()
numEdges()
java.util.Iterator<? extends UndirectedGraph.Edge<V>> edgesConnectedTo(V vertex)
vertex
- The vertex.
java.util.NoSuchElementException
- If the vertex is not part of the graph.
java.lang.NullPointerException
- If vertex is null
.numEdges(Object)
boolean containsVertex(V vertex)
vertex
- The vertex to look for.
java.lang.NullPointerException
- If vertex is null
.boolean containsEdge(V vertexA, V vertexB)
vertexA
- One vertex.vertexB
- The other vertex.
java.util.NoSuchElementException
- If at least one of the vertices is not
part of the graph.
java.lang.NullPointerException
- If one of the vertices is null
.double getEdgeWeight(V vertexA, V vertexB)
getUnconnectedWeight()
if the two vertices are not connected.
vertexA
- One vertex.vertexB
- The other vertex.
getUnconnectedWeight()
.
java.util.NoSuchElementException
- If at least one of the vertices is not
part of the graph.
java.lang.NullPointerException
- If one of the vertices is null
.containsEdge(Object, Object)
,
getEdge(Object, Object)
UndirectedGraph.Edge<V> getEdge(V vertexA, V vertexB)
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.
vertexA
- One vertex.vertexB
- The other vertex.
java.util.NoSuchElementException
- If at least one of the vertices is not
part of the graph.
java.lang.NullPointerException
- If one of the vertices is null
.containsEdge(Object, Object)
,
getEdgeWeight(Object, Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |