edu.uci.ics.jung.graph
Class DirectedOrderedSparseMultigraph<V,E>
java.lang.Object
edu.uci.ics.jung.graph.AbstractGraph<V,E>
edu.uci.ics.jung.graph.DirectedSparseMultigraph<V,E>
edu.uci.ics.jung.graph.DirectedOrderedSparseMultigraph<V,E>
- All Implemented Interfaces:
- DirectedGraph<V,E>, Graph<V,E>, Hypergraph<V,E>, MultiGraph<V,E>, Serializable
public class DirectedOrderedSparseMultigraph<V,E>
- extends DirectedSparseMultigraph<V,E>
- implements DirectedGraph<V,E>, MultiGraph<V,E>, Serializable
An implementation of DirectedGraph
, suitable for sparse graphs,
that orders its vertex and edge collections
according to insertion time.
- See Also:
- Serialized Form
Methods inherited from class edu.uci.ics.jung.graph.DirectedSparseMultigraph |
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 |
Methods inherited from interface edu.uci.ics.jung.graph.Graph |
addEdge, addEdge, getDest, getEndpoints, getInEdges, getOpposite, getOutEdges, getPredecessorCount, getSource, getSuccessorCount, inDegree, isDest, isPredecessor, isSource, isSuccessor, outDegree |
Methods inherited from interface edu.uci.ics.jung.graph.Hypergraph |
addEdge, addEdge, containsEdge, containsVertex, degree, findEdge, findEdgeSet, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getIncidentCount, getIncidentVertices, getNeighborCount, getVertexCount, getVertices, isIncident, isNeighbor, removeEdge, removeVertex |
DirectedOrderedSparseMultigraph
public DirectedOrderedSparseMultigraph()
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 DirectedSparseMultigraph<V,E>
- Parameters:
vertex
- the vertex to add
- Returns:
true
if the add is successful, and false
otherwise
getPredecessors
public Collection<V> getPredecessors(V vertex)
- Description copied from interface:
Graph
- Returns a
Collection
view of the predecessors of vertex
in this graph. A predecessor of vertex
is defined as a vertex v
which is connected to
vertex
by an edge e
, where e
is an outgoing edge of
v
and an incoming edge of vertex
.
- Specified by:
getPredecessors
in interface Graph<V,E>
- Overrides:
getPredecessors
in class DirectedSparseMultigraph<V,E>
- Parameters:
vertex
- the vertex whose predecessors are to be returned
- Returns:
- a
Collection
view of the predecessors of
vertex
in this graph
getSuccessors
public Collection<V> getSuccessors(V vertex)
- Description copied from interface:
Graph
- Returns a
Collection
view of the successors of vertex
in this graph. A successor of vertex
is defined as a vertex v
which is connected to
vertex
by an edge e
, where e
is an incoming edge of
v
and an outgoing edge of vertex
.
- Specified by:
getSuccessors
in interface Graph<V,E>
- Overrides:
getSuccessors
in class DirectedSparseMultigraph<V,E>
- Parameters:
vertex
- the vertex whose predecessors are to be returned
- Returns:
- a
Collection
view of the successors of
vertex
in this graph
getNeighbors
public Collection<V> getNeighbors(V vertex)
- Description copied from interface:
Hypergraph
- Returns the collection of vertices which are connected to
vertex
via any edges in this graph.
If vertex
is connected to itself with a self-loop, then
it will be included in the collection returned.
- Specified by:
getNeighbors
in interface Hypergraph<V,E>
- Overrides:
getNeighbors
in class DirectedSparseMultigraph<V,E>
- Parameters:
vertex
- the vertex whose neighbors are to be returned
- Returns:
- the collection of vertices which are connected to
vertex
,
or null
if vertex
is not present
getIncidentEdges
public Collection<E> getIncidentEdges(V vertex)
- Description copied from interface:
Hypergraph
- Returns the collection of edges in this graph which are connected to
vertex
.
- Specified by:
getIncidentEdges
in interface Hypergraph<V,E>
- Overrides:
getIncidentEdges
in class DirectedSparseMultigraph<V,E>
- Parameters:
vertex
- the vertex whose incident edges are to be returned
- Returns:
- the collection of edges which are connected to
vertex
,
or null
if vertex
is not present
Copyright © 2008 null. All Rights Reserved.