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. Hyperedges may link more than two nodes.
Same as isAt
.
Same as isAt
.
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
if this edge is directed.
true
if this edge is directed.
true
if any source end of this edge fulfills pred
.
true
if node
is a source of this edge.
true
if any target end of this edge fulfills pred
.
true
if node
is a target of this edge.
true
if any end of this edge fulfills pred
.
true
if node
is incident with this edge.
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.
true
if
a) two distinct ends of this undirected edge exist
for which p1
and p2
hold or
b) p1
holds for a source and p2
for a target of this directed edge.
true
if
a) both n1
and n2
are at this edge for an undirected edge
b) n1
is a source and n2
a target of this edge for a directed edge.
Sequence of the end points of this edge.
Sequence of the end points of this edge.
The end nodes joined by this edge.
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.
All source ends of this edge.
All source ends of this edge.
All target ends of this edge.
All target ends of this edge.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
true
if this edge is undirected.
true
if 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.
EdgeException
if any of the basic validations or of eventually
supplied additional validations fails.
The weight of this edge with a default of 1.
The weight of this edge with a default of 1.
Note that weight
is normally not part of the edge key (hashCode). As a result,
edges with different weights connecting the same nodes will be evaluated as equal
and thus added once and only once to the graph.
In case you need multi-edges based on different weights
you should either make use of a predefined key-weighted edge type such as WDiEdge
or define a custom edge class that mixes in ExtendedKey
and adds weight
to
keyAttributes
.
For weight types other than Long
you may either convert then to Long
prior to edge creation or define a custom edge class that includes the
weight of the appropriate type and overrides def weight
to provide the
required conversion to Long
.
Applies f
to all source ends of this edge without new memory allocation.
Applies f
to the target ends of this edge without new memory allocation.
key-weighted, labeled undirected edge.