public class DirectedSimpleGraph<T extends DirectedSimpleVertex> extends AbstractGraph<T>
Constructor and Description |
---|
DirectedSimpleGraph()
Initialize graph to a default initial capacity of 16 vertices
|
DirectedSimpleGraph(java.util.Collection<T> vertices)
Use the vertices in a collection as the initial vertices in the graph
|
DirectedSimpleGraph(int initialCapacity)
Initialize graph to have capacity for the given number of vertices
|
Modifier and Type | Method and Description |
---|---|
int |
edgeCount()
Returns the number of edges in the graph.
|
addVertex, containsEdge, containsVertex, getVertices, removeVertex, vertexCount, vertexIterator
public DirectedSimpleGraph()
public DirectedSimpleGraph(int initialCapacity)
initialCapacity
- expected number of verticespublic DirectedSimpleGraph(java.util.Collection<T> vertices)
vertices
- collection of vertices that will make up the initial vertices
of the graphpublic final int edgeCount()
AbstractGraph
edgeCount
in class AbstractGraph<T extends DirectedSimpleVertex>