edu.uci.ics.jung.graph.impl
Class UndirectedSparseVertex

java.lang.Object
  extended byedu.uci.ics.jung.utils.UserData
      extended byedu.uci.ics.jung.graph.impl.AbstractSparseVertex
          extended byedu.uci.ics.jung.graph.impl.SimpleUndirectedSparseVertex
              extended byedu.uci.ics.jung.graph.impl.UndirectedSparseVertex
All Implemented Interfaces:
ArchetypeVertex, java.lang.Cloneable, UserDataContainer, Vertex

public class UndirectedSparseVertex
extends SimpleUndirectedSparseVertex

A vertex class for instances of UndirectedGraph that may contain parallel edges. UndirectedGraph

Author:
Joshua O'Madadhain

Nested Class Summary
 
Nested classes inherited from class edu.uci.ics.jung.utils.UserDataContainer
UserDataContainer.CopyAction
 
Field Summary
 
Fields inherited from class edu.uci.ics.jung.utils.UserData
CLONE, REMOVE, SHARED
 
Constructor Summary
UndirectedSparseVertex()
          Creates a new instance of a vertex for inclusion in a sparse graph.
 
Method Summary
 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 all edges that connect this vertex with the specified vertex v.
 
Methods inherited from class edu.uci.ics.jung.graph.impl.SimpleUndirectedSparseVertex
getInEdges, getOutEdges, getPredecessors, getSuccessors, inDegree, isDest, isPredecessorOf, isSource, isSuccessorOf, numPredecessors, numSuccessors, outDegree
 
Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseVertex
copy, degree, equals, getEqualVertex, getEquivalentVertex, getGraph, getIncidentEdges, getNeighbors, hashCode, isIncident, isNeighborOf, numNeighbors, toString
 
Methods inherited from class edu.uci.ics.jung.utils.UserData
addUserDatum, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer
addUserDatum, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
 

Constructor Detail

UndirectedSparseVertex

public UndirectedSparseVertex()
Creates a new instance of a vertex for inclusion in a sparse graph.

Method Detail

findEdge

public Edge findEdge(Vertex v)
Returns the edge that connects this vertex to the specified vertex 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.

Specified by:
findEdge in interface Vertex
Overrides:
findEdge in class SimpleUndirectedSparseVertex
See Also:
Vertex.findEdge(Vertex)

findEdgeSet

public java.util.Set findEdgeSet(Vertex v)
Description copied from interface: Vertex
Returns the set of all edges that connect this vertex with the specified vertex v. If v is not connected to this vertex, returns an empty Set.

Specified by:
findEdgeSet in interface Vertex
Overrides:
findEdgeSet in class AbstractSparseVertex
See Also:
Vertex.findEdgeSet(Vertex)