public class UndirectedSparseVertex extends SimpleUndirectedSparseVertex
UndirectedGraph
that may contain parallel edges.
UndirectedGraph
UserDataContainer.CopyAction
id, m_Graph
factory, udc_delegate
Constructor and Description |
---|
UndirectedSparseVertex()
Creates a new instance of a vertex for inclusion in a
sparse graph.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addNeighbor_internal(Edge e,
Vertex v)
Adds the specified edge
e and vertex v
to the internal data structures of this vertex. |
Edge |
findEdge(Vertex v)
Returns the edge that connects this
vertex to the specified vertex
v , or
null if there is no such edge. |
java.util.Set |
findEdgeSet(Vertex v)
Returns the set of edges that connect this vertex to the
specified vertex.
|
protected java.util.Collection |
getEdges_internal()
Returns a list of all incident edges of this vertex.
|
protected void |
removeNeighbor_internal(Edge e,
Vertex v)
Removes the neighbor from this vertex's internal map.
|
getInEdges, getNeighbors_internal, getNeighborsToEdges, getOutEdges, getPredecessors, getSuccessors, inDegree, initialize, isDest, isPredecessorOf, isSource, isSuccessorOf, numPredecessors, numSuccessors, outDegree, setNeighborsToEdges
copy, findEdge, findEdgeSet, toString
degree, equals, getEqualVertex, getEquivalentVertex, getIncidentEdges, getIncidentElements, getNeighbors, isIncident, isNeighborOf, numNeighbors
addGraph_internal, getGraph, hashCode, removeGraph_internal
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum
finalize, getClass, notify, notifyAll, wait, wait, wait
degree, getEqualVertex, getEquivalentVertex, getIncidentEdges, getNeighbors, isIncident, isNeighborOf, numNeighbors
getGraph, getIncidentElements
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
public UndirectedSparseVertex()
public Edge findEdge(Vertex v)
v
, or
null
if there is no such edge.
Implemented using a hash table for a performance
improvement over the implementation in
AbstractSparseVertex
.
Looks for a directed edge first, and then for an
undirected edge if no directed edges are found.findEdge
in interface Vertex
findEdge
in class SimpleUndirectedSparseVertex
Vertex.findEdge(Vertex)
public java.util.Set findEdgeSet(Vertex v)
SimpleUndirectedSparseVertex
findEdge(v)
.findEdgeSet
in interface Vertex
findEdgeSet
in class SimpleUndirectedSparseVertex
Vertex.findEdgeSet(Vertex)
protected java.util.Collection getEdges_internal()
getEdges_internal
in class SimpleUndirectedSparseVertex
AbstractArchetypeVertex.getEdges_internal()
protected void addNeighbor_internal(Edge e, Vertex v)
AbstractSparseVertex
e
and vertex v
to the internal data structures of this vertex.addNeighbor_internal
in class SimpleUndirectedSparseVertex
e
- the new incident edge of this vertexv
- the new neighbor of this vertexAbstractSparseVertex.addNeighbor_internal(Edge, Vertex)
protected void removeNeighbor_internal(Edge e, Vertex v)
SimpleUndirectedSparseVertex
removeNeighbor_internal
in class SimpleUndirectedSparseVertex
e
- the incident edge of this vertex which is being removedv
- the neighbor of this vertex which is being removedAbstractSparseVertex.removeNeighbor_internal(Edge, Vertex)