Package edu.uci.ics.jung.graph
Class OrderedSparseMultigraph<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.graph.AbstractGraph<V,E>
-
- edu.uci.ics.jung.graph.SparseMultigraph<V,E>
-
- edu.uci.ics.jung.graph.OrderedSparseMultigraph<V,E>
-
- All Implemented Interfaces:
edu.uci.ics.jung.graph.Graph<V,E>
,edu.uci.ics.jung.graph.Hypergraph<V,E>
,edu.uci.ics.jung.graph.MultiGraph<V,E>
,java.io.Serializable
- Direct Known Subclasses:
SortedSparseMultigraph
public class OrderedSparseMultigraph<V,E> extends SparseMultigraph<V,E> implements edu.uci.ics.jung.graph.MultiGraph<V,E>
An implementation ofGraph
that orders its vertex and edge collections according to insertion time, is suitable for sparse graphs, and permits directed, undirected, and parallel edges.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class edu.uci.ics.jung.graph.SparseMultigraph
directedEdges, edges, vertices
-
-
Constructor Summary
Constructors Constructor Description OrderedSparseMultigraph()
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addVertex(V vertex)
static <V,E>
org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.Graph<V,E>>getFactory()
Returns aFactory
that creates an instance of this graph type.java.util.Collection<E>
getIncidentEdges(V vertex)
java.util.Collection<V>
getNeighbors(V vertex)
java.util.Collection<V>
getPredecessors(V vertex)
java.util.Collection<V>
getSuccessors(V vertex)
-
Methods inherited from class edu.uci.ics.jung.graph.SparseMultigraph
addEdge, containsEdge, containsVertex, findEdge, getDefaultEdgeType, getDest, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getEndpoints, getIncoming_internal, getInEdges, getOutEdges, getOutgoing_internal, getSource, getVertexCount, getVertices, isDest, isSource, removeEdge, removeVertex
-
Methods inherited from class edu.uci.ics.jung.graph.AbstractGraph
addEdge, addEdge, addEdge, addEdge, addEdge, degree, findEdgeSet, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, toString
-
-
-
-
Method Detail
-
getFactory
public static <V,E> org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.Graph<V,E>> getFactory()
Returns aFactory
that creates an instance of this graph type.- Type Parameters:
V
- the vertex type for the graph factoryE
- the edge type for the graph factory
-
addVertex
public boolean addVertex(V vertex)
-
getPredecessors
public java.util.Collection<V> getPredecessors(V vertex)
- Specified by:
getPredecessors
in interfaceedu.uci.ics.jung.graph.Graph<V,E>
- Specified by:
getPredecessors
in interfaceedu.uci.ics.jung.graph.Hypergraph<V,E>
- Overrides:
getPredecessors
in classSparseMultigraph<V,E>
-
getSuccessors
public java.util.Collection<V> getSuccessors(V vertex)
- Specified by:
getSuccessors
in interfaceedu.uci.ics.jung.graph.Graph<V,E>
- Specified by:
getSuccessors
in interfaceedu.uci.ics.jung.graph.Hypergraph<V,E>
- Overrides:
getSuccessors
in classSparseMultigraph<V,E>
-
getNeighbors
public java.util.Collection<V> getNeighbors(V vertex)
- Specified by:
getNeighbors
in interfaceedu.uci.ics.jung.graph.Hypergraph<V,E>
- Overrides:
getNeighbors
in classSparseMultigraph<V,E>
-
getIncidentEdges
public java.util.Collection<E> getIncidentEdges(V vertex)
- Specified by:
getIncidentEdges
in interfaceedu.uci.ics.jung.graph.Hypergraph<V,E>
- Overrides:
getIncidentEdges
in classSparseMultigraph<V,E>
-
-