DynamicIterators.ControlledType
Controlled(C, P)

"Controlled" iterator P with the state t of C calling

(t => x) = evolve(P, t=>x, tᵒ)

Example

# Apply collatz twice each step using the default for Evolve

collatz(n) = n % 2 == 0 ? n÷2 : 3n + 1
collectfrom(Controlled(1:2:20, Evolve(collatz)), (1,14))
DynamicIterators.EvolutionType
Evolution

Evolutions define

    evolve(iter, value::T)::T

and possibly

    evolve(iter, key=>value)

They guarantee HasEltype() and eltype(iter) == T.

DynamicIterators.EvolveType
evolve(f)

Create the DynamicIterator corresponding to the evolution

    x = f(x)

Integer keys default to increments. Integer control default to keys (and repetitions).

julia> collect(take(from(Evolve(x->x + 1), 10), 5))
5-element Array{Any,1}:
 10
 11
 12
 13
 14
DynamicIterators.FromType
from(P, x)

Attach a starting value to a DynamicIterator.

Example

collect(from(1:14, 10)) == [11, 12, 13, 14]
DynamicIterators.MixType
mix(f, P, Q)

Mix two dynamic iterators by applying the mixing function f to their states:

x, y = f(x, y)

Example

collectfrom(Mix((x,y) -> (x+y, y), 1:0, 1:100), (1,1)))
# last value 100*101/2 + 100
DynamicIterators.MixtureType
mixture(I, Ps)

evolve(M::Mixture, (i, x))

Choose evolution in Ps[i] for x using iterate i of I.

DynamicIterators.StartType
Start(value) <: Message

Transient message to start to iterate from the state corresponding to value.

DynamicIterators.ValueType
Value(value, state) <: Message

Transient message to continue to iterate from state reacting to a forced change in the iterate value.

DynamicIterators.dyniterateMethod
dyniterate(iter, state, (steps,)::Steps)

Advance the iterator steps times, and for negative numbers, if implemented, rewind the iterator -steps times.

DynamicIterators.traceFunction
trace(P, u::Pair, stop; register = x->true)

Trace the trajectoy of a keyed Dynamic iterator as Trajectory.