public class DirectedSparseGraph<V,E> extends AbstractTypedGraph<V,E> implements edu.uci.ics.jung.graph.DirectedGraph<V,E>
DirectedGraph
suitable for sparse graphs.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.Map<V,E>>> |
vertices |
edge_type
Constructor and Description |
---|
DirectedSparseGraph()
Creates an 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) |
java.util.Collection<E> |
findEdgeSet(V v1,
V v2) |
V |
getDest(E directed_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) |
protected java.util.Collection<V> |
getPreds_internal(V vertex) |
V |
getSource(E directed_edge) |
java.util.Collection<V> |
getSuccessors(V vertex) |
protected java.util.Collection<V> |
getSuccs_internal(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, validateEdgeType
addEdge, addEdge, addEdge, addEdge, addEdge, degree, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final <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 boolean addEdge(E edge, edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints, edu.uci.ics.jung.graph.util.EdgeType edgeType)
AbstractGraph
edge
to this graph with the specified endpoints
and EdgeType
.addEdge
in class AbstractGraph<V,E>
public java.util.Collection<E> findEdgeSet(V v1, V v2)
findEdgeSet
in interface edu.uci.ics.jung.graph.Hypergraph<V,E>
findEdgeSet
in class AbstractGraph<V,E>
public java.util.Collection<E> getEdges()
public java.util.Collection<V> getVertices()
public boolean containsVertex(V vertex)
public boolean containsEdge(E edge)
public int getEdgeCount()
public int getVertexCount()
public boolean addVertex(V vertex)
public boolean removeVertex(V vertex)