|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Graph<V,E extends Edge<V,?>>
A Graph is a collection of vertices and the edges
emanating from them.
Method Summary | |
---|---|
void |
add(E edge)
Adds an edge to the graph, mapping the source vertex to the edge. |
void |
addVertex(V vertex)
Adds a vertex to the graph with no edges associated with it. |
void |
clear()
Removes all vertices and edges from the graph. |
java.util.Set<E> |
edgeSet(V v)
Returns a set containing all of the edges emanating from a given vertex. |
int |
size()
Returns the number of vertices in the graph. |
java.util.Set<V> |
vertexSet()
Returns the set of vertices in the graph. |
Method Detail |
---|
void add(E edge)
edge
- The edge to add.void addVertex(V vertex)
vertex
- The vertex to add.void clear()
java.util.Set<E> edgeSet(V v)
v
- A source vertex.
int size()
java.util.Set<V> vertexSet()
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |