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.
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
it this edge is directed.
true
it 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.
(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.
The weight of this edge defaulting to 1L.
The weight of this edge defaulting to 1L.
Note that weight
is normally not part of the edge key (hashCode) meaning that
edges of different weights connecting the same nodes will be treated as equal
and not added more than once. If 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
.
In case of weights of a type other than Long
you either convert values of
that type to Long
prior to edge creation or define a custom edge class
to include your own val
of that type and override def weight
to provide
a conversion.
Applies f
to the source end resp.
Applies f
to the target end resp.
(wLkUnDiEdge: MonadOps[N]).filter(p)
(wLkUnDiEdge: MonadOps[N]).flatMap(f)
(wLkUnDiEdge: OuterNode[WLkUnDiEdge[N]]).isDefined
(wLkUnDiEdge: OuterNode[WLkUnDiEdge[N]]).isEdge
(wLkUnDiEdge: OuterNode[WLkUnDiEdge[N]]).isIn
(wLkUnDiEdge: OuterNode[WLkUnDiEdge[N]]).isNode
(wLkUnDiEdge: OuterNode[WLkUnDiEdge[N]]).isOut
(wLkUnDiEdge: MonadOps[N]).map(f)
(wLkUnDiEdge: OuterNode[WLkUnDiEdge[N]]).stringPrefix
(wLkUnDiEdge: OuterNode[WLkUnDiEdge[N]]).toString()
(wLkUnDiEdge: MonadOps[N]).withFilter(p)
weighted, key-labeled undirected edge.