public class DirectedSparseMultigraph<V,E> extends AbstractTypedGraph<V,E> implements edu.uci.ics.jung.graph.DirectedGraph<V,E>, edu.uci.ics.jung.graph.MultiGraph<V,E>
DirectedGraph, suitable for sparse graphs,
that permits parallel edges.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<E,edu.uci.ics.jung.graph.util.Pair<V>> |
edges |
protected java.util.Map<V,edu.uci.ics.jung.graph.util.Pair<java.util.Set<E>>> |
vertices |
edge_type| Constructor and Description |
|---|
DirectedSparseMultigraph()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEdge(E edge,
edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints,
edu.uci.ics.jung.graph.util.EdgeType edgeType)
Adds
edge to this graph with the specified endpoints
and EdgeType. |
boolean |
addVertex(V vertex) |
boolean |
containsEdge(E edge) |
boolean |
containsVertex(V vertex) |
E |
findEdge(V v1,
V v2) |
V |
getDest(E edge) |
int |
getEdgeCount() |
java.util.Collection<E> |
getEdges() |
edu.uci.ics.jung.graph.util.Pair<V> |
getEndpoints(E edge) |
static <V,E> org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.DirectedGraph<V,E>> |
getFactory()
Returns a
Factory that creates an instance of this graph type. |
java.util.Collection<E> |
getIncidentEdges(V vertex) |
protected java.util.Collection<E> |
getIncoming_internal(V vertex) |
java.util.Collection<E> |
getInEdges(V vertex) |
java.util.Collection<V> |
getNeighbors(V vertex) |
java.util.Collection<E> |
getOutEdges(V vertex) |
protected java.util.Collection<E> |
getOutgoing_internal(V vertex) |
java.util.Collection<V> |
getPredecessors(V vertex) |
V |
getSource(E edge) |
java.util.Collection<V> |
getSuccessors(V vertex) |
int |
getVertexCount() |
java.util.Collection<V> |
getVertices() |
boolean |
isDest(V vertex,
E edge) |
boolean |
isSource(V vertex,
E edge) |
boolean |
removeEdge(E edge) |
boolean |
removeVertex(V vertex) |
getDefaultEdgeType, getEdgeCount, getEdges, getEdgeType, hasEqualEdgeType, validateEdgeTypeaddEdge, addEdge, addEdge, addEdge, addEdge, degree, findEdgeSet, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic DirectedSparseMultigraph()
public static <V,E> org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.DirectedGraph<V,E>> getFactory()
Factory that creates an instance of this graph type.V - the vertex type for the graph factoryE - the edge type for the graph factorypublic java.util.Collection<E> getEdges()
public java.util.Collection<V> getVertices()
public boolean containsVertex(V vertex)
public boolean containsEdge(E edge)
public boolean addVertex(V vertex)
public boolean removeVertex(V vertex)
public boolean removeEdge(E edge)
public boolean addEdge(E edge, edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints, edu.uci.ics.jung.graph.util.EdgeType edgeType)
AbstractGraphedge to this graph with the specified endpoints
and EdgeType.addEdge in class AbstractGraph<V,E> true iff the graph was modified as a result of this callpublic int getEdgeCount()