|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.utils.UserDataDelegate
edu.uci.ics.jung.graph.impl.AbstractElement
edu.uci.ics.jung.graph.impl.AbstractArchetypeVertex
public abstract class AbstractArchetypeVertex
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.uci.ics.jung.utils.UserDataContainer |
---|
UserDataContainer.CopyAction |
Field Summary |
---|
Fields inherited from class edu.uci.ics.jung.graph.impl.AbstractElement |
---|
id, m_Graph |
Fields inherited from class edu.uci.ics.jung.utils.UserDataDelegate |
---|
factory, udc_delegate |
Constructor Summary | |
---|---|
AbstractArchetypeVertex()
|
Method Summary | |
---|---|
ArchetypeVertex |
copy(ArchetypeGraph g)
Creates a copy of this vertex in graph g . |
int |
degree()
Returns the number of edges incident to this vertex. |
boolean |
equals(Object o)
Returns true if o is an instance of
ArchetypeVertex that is equivalent to this vertex. |
ArchetypeEdge |
findEdge(ArchetypeVertex v)
Returns an edge that connects this vertex to v . |
Set |
findEdgeSet(ArchetypeVertex v)
Returns the set of all edges that connect this vertex with the specified vertex v . |
protected abstract Collection |
getEdges_internal()
Returns a set containing all the incident edges of this vertex. |
ArchetypeVertex |
getEqualVertex(ArchetypeGraph ag)
Returns the vertex in the specified graph ag
that is equivalent to this vertex. |
ArchetypeVertex |
getEquivalentVertex(ArchetypeGraph ag)
Deprecated. As of version 1.4, renamed to getEqualVertex(ag). |
Set |
getIncidentEdges()
Returns the set of edges which are incident to this vertex. |
Set |
getIncidentElements()
Returns the set of elements that are incident to this element. |
protected abstract Collection |
getNeighbors_internal()
Returns a set containing all neighbors of this vertex. |
Set |
getNeighbors()
Returns the set of vertices which are connected to this vertex via edges; each of these vertices should implement ArchetypeVertex . |
boolean |
isIncident(ArchetypeEdge e)
Returns true if the specified edge e is
incident to this vertex, and false otherwise. |
boolean |
isNeighborOf(ArchetypeVertex v)
Returns true if the specified vertex v and
this vertex are each incident
to one or more of the same edges, and false otherwise. |
int |
numNeighbors()
Returns the number of neighbors that this vertex has. |
Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractElement |
---|
addGraph_internal, getGraph, hashCode, initialize, removeGraph_internal |
Methods inherited from class edu.uci.ics.jung.utils.UserDataDelegate |
---|
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.uci.ics.jung.graph.Element |
---|
getGraph |
Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer |
---|
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum |
Constructor Detail |
---|
public AbstractArchetypeVertex()
Method Detail |
---|
public Set getIncidentElements()
Element
getIncidentElements
in interface Element
Element.getIncidentElements()
public Set getNeighbors()
ArchetypeVertex
ArchetypeVertex
.
If this vertex is connected to itself with a self-loop, then
this vertex will be included in its own neighbor set.
getNeighbors
in interface ArchetypeVertex
ArchetypeVertex.getNeighbors()
public int numNeighbors()
ArchetypeVertex
numNeighbors
in interface ArchetypeVertex
ArchetypeVertex.numNeighbors()
public Set getIncidentEdges()
ArchetypeVertex
ArchetypeEdge
.
getIncidentEdges
in interface ArchetypeVertex
ArchetypeVertex.getIncidentEdges()
public int degree()
ArchetypeVertex
degree
in interface ArchetypeVertex
ArchetypeVertex.degree()
public boolean isNeighborOf(ArchetypeVertex v)
ArchetypeVertex
true
if the specified vertex v
and
this vertex are each incident
to one or more of the same edges, and false
otherwise.
The behavior of this method is undefined if v
is not
an element of this vertex's graph.
isNeighborOf
in interface ArchetypeVertex
ArchetypeVertex.isNeighborOf(ArchetypeVertex)
public boolean isIncident(ArchetypeEdge e)
ArchetypeVertex
true
if the specified edge e
is
incident to this vertex, and false
otherwise.
The behavior of this method is undefined if e
is not
an element of this vertex's graph.
isIncident
in interface ArchetypeVertex
ArchetypeVertex.isIncident(ArchetypeEdge)
public ArchetypeVertex copy(ArchetypeGraph g)
ArchetypeVertex
g
. The vertex
created will be equivalent to this vertex: given
v = this.copy(g)
, then
this.getEquivalentVertex(g) == v
, and
this.equals(v) == true
.
copy
in interface ArchetypeVertex
g
- the graph in which the copied vertex will be placed
ArchetypeVertex.copy(edu.uci.ics.jung.graph.ArchetypeGraph)
public boolean equals(Object o)
true
if o
is an instance of
ArchetypeVertex
that is equivalent to this vertex.
Respects the vertex
equivalences which are established by copy()
and
referenced by getEquivalentVertex()
.
equals
in class Object
Object.equals(java.lang.Object)
,
ArchetypeVertex.getEqualVertex(ArchetypeGraph)
,
ArchetypeVertex.copy(edu.uci.ics.jung.graph.ArchetypeGraph)
public ArchetypeVertex getEqualVertex(ArchetypeGraph ag)
ag
that is equivalent to this vertex. If there is no
such vertex, or if ag
is not an instance
of AbstractSparseGraph
, returns null
.
getEqualVertex
in interface ArchetypeVertex
ArchetypeVertex.getEqualVertex(ArchetypeGraph)
public ArchetypeVertex getEquivalentVertex(ArchetypeGraph ag)
getEquivalentVertex
in interface ArchetypeVertex
public ArchetypeEdge findEdge(ArchetypeVertex v)
ArchetypeVertex
v
.
If this edge is not uniquely
defined (that is, if the graph contains more than one edge connecting
this vertex to v
), any of these edges
v
may be returned. findEdgeSet(v)
may be
used to return all such edges.
If v
is not connected to this vertex, returns
null
.
findEdge
in interface ArchetypeVertex
ArchetypeVertex.findEdge(edu.uci.ics.jung.graph.ArchetypeVertex)
public Set findEdgeSet(ArchetypeVertex v)
ArchetypeVertex
v
.
findEdge(v)
may be used to return
a single (arbitrary) element of this set.
If v
is not connected to this vertex, returns an empty Set
.
findEdgeSet
in interface ArchetypeVertex
ArchetypeVertex.findEdgeSet(edu.uci.ics.jung.graph.ArchetypeVertex)
protected abstract Collection getNeighbors_internal()
protected abstract Collection getEdges_internal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |