V - the type of verticesE - the type of edgespublic class Graph<V extends Node,E extends Edge>
extends edu.uci.ics.jung.graph.SparseMultigraph<V,E>
implements java.lang.Iterable<V>
Graph is the default graph implementation.| Constructor and Description |
|---|
Graph() |
| Modifier and Type | Method and Description |
|---|---|
E |
getEdge(E e)
Return the edge.
|
E |
getEdge(java.lang.String id)
Return the edge with the specified id.
|
V |
getVertex(java.lang.String id)
Return the vertex with the specified id.
|
V |
getVertex(V v)
Return the vertex.
|
java.util.Iterator<V> |
iterator() |
boolean |
removeVertices(java.util.Collection<V> vertices)
Removes the vertices and returns
true if at least one vertex was
removed. |
addEdge, addVertex, containsEdge, containsVertex, findEdge, getDefaultEdgeType, getDest, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getEndpoints, getFactory, getIncidentEdges, getIncoming_internal, getInEdges, getNeighbors, getOutEdges, getOutgoing_internal, getPredecessors, getSource, getSuccessors, getVertexCount, getVertices, isDest, isSource, removeEdge, removeVertexaddEdge, addEdge, addEdge, addEdge, addEdge, degree, findEdgeSet, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, toStringpublic java.util.Iterator<V> iterator()
public V getVertex(java.lang.String id)
id - the idpublic E getEdge(java.lang.String id)
id - the idpublic boolean removeVertices(java.util.Collection<V> vertices)
true if at least one vertex was
removed.vertices - the vertices to remove