public interface Edge extends ArchetypeEdge
ArchetypeEdge
that connects exactly
two instances of Vertex
. Instances
of Edge
may be either directed or undirected.
If either of the vertices incident to an Edge
is removed
from its graph, then this edge becomes ill-formed and must also
be removed from the graph.
UserDataContainer.CopyAction
Modifier and Type | Method and Description |
---|---|
Pair |
getEndpoints()
Returns a pair consisting of both incident vertices.
|
Vertex |
getOpposite(Vertex v)
Returns the vertex at the opposite end of this edge from the
specified vertex
v . |
copy, getEqualEdge, getEquivalentEdge, getIncidentVertices, isIncident, numVertices
getGraph, getIncidentElements
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
Vertex getOpposite(Vertex v)
v
. Throws
IllegalArgumentException
if v
is
not incident to this edge.
For example, if this edge connects vertices a
and
b
, this.getOpposite(a)
returns
b
.
java.lang.IllegalArgumentException
Pair getEndpoints()