public class HypervertexBPG extends AbstractHyperUnitBPG implements Hypervertex
UserDataContainer.CopyAction
graph, vertex
Constructor and Description |
---|
HypervertexBPG() |
Modifier and Type | Method and Description |
---|---|
boolean |
connectEdge(Hyperedge e)
Connects
he to this hypervertex and vice versa. |
ArchetypeVertex |
copy(ArchetypeGraph g)
Creates a copy of this vertex in graph
g . |
int |
degree()
Returns the number of edges adjacent to this vertex
|
boolean |
disconnectEdge(Hyperedge e)
Disconnects
he from this hypervertex and vice versa. |
ArchetypeEdge |
findEdge(ArchetypeVertex v)
Returns an edge that connects this vertex to
v . |
java.util.Set |
findEdgeSet(ArchetypeVertex v)
Returns the set of all edges that connect this vertex
with the specified vertex
v . |
ArchetypeVertex |
getEqualVertex(ArchetypeGraph g)
Returns the vertex in graph
g , if any, that is
equal to this vertex. |
ArchetypeVertex |
getEquivalentVertex(ArchetypeGraph g)
Deprecated.
As of version 1.4, renamed to getEqualVertex(g).
|
java.util.Set |
getIncidentEdges()
Returns the set of edges which are incident to this vertex.
|
java.util.Set |
getIncidentElements()
Returns the set of elements that are incident to this element.
|
java.util.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)
Not a very efficient implementation
|
int |
numNeighbors()
Not a very efficient implemenation: for each edge, counts the
neighbors.
|
addUserDatum, clone, containsUserDatumKey, equals, getGraph, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, removeVertex, setGraph, setUserDatum, underlying_vertex
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
public java.util.Set getIncidentElements()
Element
getIncidentElements
in interface Element
public java.util.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 java.util.Set getIncidentEdges()
ArchetypeVertex
ArchetypeEdge
.getIncidentEdges
in interface ArchetypeVertex
ArchetypeVertex.getIncidentEdges()
public int degree()
degree
in interface ArchetypeVertex
ArchetypeVertex.degree()
public ArchetypeVertex getEqualVertex(ArchetypeGraph g)
ArchetypeVertex
g
, if any, that is
equal to this vertex. Otherwise, returns null.
Two vertices are equal if one of them is an ancestor (via
copy()
) of the other.getEqualVertex
in interface ArchetypeVertex
ArchetypeVertex.getEqualVertex(edu.uci.ics.jung.graph.ArchetypeGraph)
public ArchetypeVertex getEquivalentVertex(ArchetypeGraph g)
getEquivalentVertex
in interface ArchetypeVertex
public boolean isNeighborOf(ArchetypeVertex v)
isNeighborOf
in interface ArchetypeVertex
ArchetypeVertex.isNeighborOf(edu.uci.ics.jung.graph.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(edu.uci.ics.jung.graph.ArchetypeEdge)
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(ArchetypeVertex)
public java.util.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(ArchetypeVertex)
public int numNeighbors()
numNeighbors
in interface ArchetypeVertex
ArchetypeVertex.numNeighbors()
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 placedArchetypeVertex.copy(edu.uci.ics.jung.graph.ArchetypeGraph)
public boolean connectEdge(Hyperedge e)
Hypervertex
he
to this hypervertex and vice versa.
Does not affect he
's membership in the graph.
Equivalent to calling he.connectVertex(this)
.connectEdge
in interface Hypervertex
public boolean disconnectEdge(Hyperedge e)
Hypervertex
he
from this hypervertex and vice versa.
Does not affect he
's membership in the graph.
Equivalent to calling he.disconnectVertex(this)
.disconnectEdge
in interface Hypervertex