public class UndirectedSparseMultigraph<V,E> extends AbstractTypedGraph<V,E> implements edu.uci.ics.jung.graph.UndirectedGraph<V,E>, edu.uci.ics.jung.graph.MultiGraph<V,E>
UndirectedGraph that is suitable for
sparse graphs and 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,java.util.Set<E>> |
vertices |
edge_type| Constructor and Description |
|---|
UndirectedSparseMultigraph()
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 edge_type)
Adds
edge to this graph with the specified endpoints
and EdgeType. |
boolean |
addEdge(E edge,
V v1,
V v2,
edu.uci.ics.jung.graph.util.EdgeType edgeType) |
boolean |
addVertex(V vertex) |
boolean |
containsEdge(E edge) |
boolean |
containsVertex(V vertex) |
E |
findEdge(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.UndirectedGraph<V,E>> |
getFactory()
Returns a
Factory that creates an instance of this graph type. |
protected java.util.Collection<E> |
getIncident_internal(V vertex) |
java.util.Collection<E> |
getIncidentEdges(V vertex) |
java.util.Collection<E> |
getInEdges(V vertex) |
java.util.Collection<V> |
getNeighbors(V vertex) |
java.util.Collection<E> |
getOutEdges(V vertex) |
java.util.Collection<V> |
getPredecessors(V vertex) |
V |
getSource(E directed_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, 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 UndirectedSparseMultigraph()
public static <V,E> org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.UndirectedGraph<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 addEdge(E edge, edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints, edu.uci.ics.jung.graph.util.EdgeType edge_type)
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 boolean removeEdge(E edge)
public int getEdgeCount()