edu.uci.ics.jung.graph
Class SortedSparseMultigraph<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>
edu.uci.ics.jung.graph.SortedSparseMultigraph<V,E>
- All Implemented Interfaces:
- Graph<V,E>, Hypergraph<V,E>, MultiGraph<V,E>, Serializable
public class SortedSparseMultigraph<V,E>
- extends OrderedSparseMultigraph<V,E>
- implements MultiGraph<V,E>, Serializable
An implementation of Graph
that is suitable for sparse graphs,
orders its vertex and edge collections according to either specified Comparator
instances or the natural ordering of their elements, and permits directed, undirected,
and parallel edges.
- Author:
- Joshua O'Madadhain
- See Also:
- Serialized Form
Methods inherited from class edu.uci.ics.jung.graph.SparseMultigraph |
addEdge, addEdge, addEdge, addEdge, containsEdge, containsVertex, findEdge, 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, degree, findEdgeSet, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, toString |
vertex_comparator
protected Comparator<V> vertex_comparator
Comparator
used in ordering vertices. Defaults to util.ComparableComparator
if no comparators are specified in the constructor.
edge_comparator
protected Comparator<E> edge_comparator
Comparator
used in ordering edges. Defaults to util.ComparableComparator
if no comparators are specified in the constructor.
SortedSparseMultigraph
public SortedSparseMultigraph(Comparator<V> vertex_comparator,
Comparator<E> edge_comparator)
SortedSparseMultigraph
public SortedSparseMultigraph()
getFactory
public static <V,E> getFactory()
addVertex
public boolean addVertex(V vertex)
- Description copied from interface:
Hypergraph
- Adds
vertex
to this graph.
Fails if vertex
is null or already in the graph.
- Specified by:
addVertex
in interface Hypergraph<V,E>
- Overrides:
addVertex
in class OrderedSparseMultigraph<V,E>
- Parameters:
vertex
- the vertex to add
- Returns:
true
if the add is successful, and false
otherwise
Copyright © 2008 null. All Rights Reserved.