The first node.
The first node. Same as _n(0).
The second node.
The second node. Same as _n(1).
The n'th node with 0 <= n < arity.
The n'th node with 0 <= n < arity.
Number of nodes linked by this Edge.
Number of nodes linked by this Edge. At least two nodes are linked. In case of a hook, the two nodes are identical. Hyper-edges may link more than two nodes.
It is a prerequisite for edge-classes to implement this method.
It is a prerequisite for edge-classes to implement this method. Otherwise
they cannot be passed to a Graph
.
Graph
calls this method internally to obtain a new instance of the
edge passed to Graph
with nodes of the type of the inner class NodeT
which itself contains the outer node.
true
it this edge is directed.
true
it this edge is directed.
Same as contains
.
Same as contains
.
Same as directed
.
Same as directed
.
true
if this is a hyperedge that is it may have more than two ends.
true
if this edge is labeled.
true
if this edge is labeled. See also label
.
true
if this edge produces a self-loop.
true
if this edge produces a self-loop.
In case of a non-hyperedge, a loop is given if the incident nodes are equal.
In case of a directed hyperedge, a loop is given if the source is equal to
any of the targets.
In case of an undirected hyperedge, a loop is given if any pair of incident
nodes has equal nodes.
Same as undirected
.
Same as undirected
.
A function to determine whether the arity
of the passed Product
of nodes (that is the number of edge ends) is valid.
A function to determine whether the arity
of the passed Product
of nodes (that is the number of edge ends) is valid.
This function is called on every edge-instantiation
by validate
that throws EdgeException if this method returns false
.
This method may be overridden to enforce additional validation at edge creation time.
This method may be overridden to enforce additional validation at edge
creation time. Be careful to call super.isValidCustom
when overriding.
This function is called on every edge-instantiation
by validate
that throws EdgeException if this method returns false
.
Iterator for the nodes (end-points) of this edge.
Iterator for the nodes (end-points) of this edge.
Sequence of the end points of this edge.
Sequence of the end points of this edge.
called by equals if nodes are formally not equal but may still functionally be equal due to being undirected, e.
called by equals if nodes are formally not equal but may still functionally be equal due to being undirected, e. g. (1, 2) and (2, 1) will be equal
true
if this edge has exactly two ends.
true
if this edge has exactly two ends.
Same as ! looping
.
Same as ! looping
.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
true
it this edge is undirected.
true
it this edge is undirected.
Performs basic, inevitable edge validation.
Performs basic, inevitable edge validation. Among others, ensures
that nodes ne null
and no edge end eq null
.
This validation method must be called in the constructor of any edge class
that directly extends or mixes in EdgeLike
. To perform additional custom
validation isValidCustom
is to be overridden.
if any of the basic validations or of eventually supplied additional validations fails.
weighted, labeled undirected edge.