Prepends a pair of (node, edge) to this buffer.
Prepends a pair of (node, edge) to this buffer. The edge is selected
calling selectEdge
with the arguments node
and startNode
of
the correct buffer.
Prepends a (node, edge) pair to this buffer.
Prepends a (node, edge) pair to this buffer.
Prepends an edge to this buffer.
Prepends an edge to this buffer. The caller is responsible for correct order.
Prepends a node to this buffer.
Prepends a node to this buffer. The caller is responsible for correct order.
Finds cycles with a node/edge set different from this
cycle's node/edge set but
sharing at least one common node with this
cycle's node set.
Finds cycles with a node/edge set different from this
cycle's node/edge set but
sharing at least one common node with this
cycle's node set.
Currently it is not guaranteed that all such cycles will be found
as it could considerably blow up the number of cycles to be returned.
Predicate to filter the nodes to be visited during traversal.
The default value is anyNode
, that is no filtering.
A return of true
signals that the traversal is to be canceled.
Predicate to filter the edges to be visited during traversal.
The default value is anyEdge
meaning that no filtering takes place.
A positive value limits the number of layers for BFS respectively
the number of consecutive child visits before siblings are visited for DFS.
0
- the default - indicates that the traversal should have
an unlimited depth meaning that it will be continued either until
it's canceled by nodeVisitor
or until all nodes have been visited.
Function to be called on visiting a node for the first time
during a traversal. It can mutate the node or carry out any other side effect.
The default value is the empty function noNodeAction
.
Function to be called on visiting an edge.
It can mutate the node or carry out any other side effect.
The default value is the empty function noEdgeAction
.
List of dependent cycles.
Same as dependentCycles(...)
with default arguments.
Same as dependentCycles(...)
with default arguments.
Iterator over the edges of this path.
Iterator over the edges of this path. The result is chached on the first call, so consecutive calls of this method are cheep.
Iterator over all edges of this path in proper order.
List containing all edges of this path in proper order.
List containing all edges of this path in proper order.
The first edge found having its tail at from
and its head at to
and satisfying navigation.edgeFilter
.
The first edge found having its tail at from
and its head at to
and satisfying navigation.edgeFilter
.
The caller must guarantee that there is at least one connecting edge
between from
and to
with navigation.edgeFilter
.
This simplest select method can be passed to +=: (node, selectEdge)
whenever any of possibly several edges between the two nodes
satisfies the needs of the algorithm.
Returns whether the contents of this path are valid with respect to path semantics.
Returns whether the contents of this path are valid with respect to path semantics. This check is appropriate whenever there may be any doubt about the correctness of the result of an algorithm.
The number of edges on this path.
The number of edges on this path.
The edge with minimal weight having its tail at from
and its head at to
and satisfying navigation.edgeFilter
.
The edge with minimal weight having its tail at from
and its head at to
and satisfying navigation.edgeFilter
.
The caller must guarantee that there is at least one connecting edge
between from
and to
with navigation.edgeFilter
.
This select method can be passed to +=: (node, selectEdge)
whenever the edge with the minimal weight between the two nodes
should be selected.
Iterator over the nodes of this path.
Iterator over the nodes of this path. The result is chached on the first call, so consecutive calls of this method are cheep.
Iterator over all nodes of this path in proper order.
List containing all nodes of this path in proper order.
List containing all nodes of this path in proper order.
Semantically compares this
cycle with that
cycle.
Semantically compares this
cycle with that
cycle. While ==
returns true
only if the cycles contain the same elements in the same order, this comparison
returns also true
if the elements of that
cycle can be shifted and optionally
reversed such that their elements have the same order.
For instance, given
c1 = Cycle(1-2-3-1)
, c2 = Cycle(2-3-1-2)
and c3 = Cycle(2-1-3-2)
the following expressions hold:
c1 != c2
, c1 != c3
but c1 sameAs c2
and c1 sameAs c3
.
(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.
The cumulated weight of all edges on this path.
The cumulated weight of all edges on this path.
(Since version 2.10.0) use fold instead