******************************************** ************** COOMPACT SPAWN ************** *******************************************
******************************************** ************** COOMPACT SPAWN ************** *******************************************
true only when a discontinuity (i.e., a change) is observed on x
(you may choose how to handle the first observation)
Alias for remember()
Alias for remember()
the current position in space
the current local time
Periodically invoke a function.
Periodically invoke a function.
FiniteDuratrion, timeout
() -> T, function to be invoked
T, default value
T, apply f if the timeout is expired, NULL otherwise
Periodically invoke a function.
Periodically invoke a function.
T, timeout
T, decay rate
() -> V, function to be invoked
V, default value
V, apply f if the timeout is expired, NULL otherwise
Cyclic timer with a default unitary decay
Cyclic timer with a default unitary decay
timeout
true if the timeout is expired, false otherwise
Cyclic timer.
Cyclic timer.
timeout
decay rate
true if the timeout is expired, false otherwise
It is a simple building block which returns the same values it receives in input delayed by one computation round.
It is a simple building block which returns the same values it receives in input delayed by one computation round.
the duration since the last round of execution
Evaporation pattern.
Evaporation pattern. Starting from [lenght, info] descends to [0, info] with a predefined unitary decay (The floor values depends on length's type)
T, duration
V, information
[V, T]
Evaporation pattern.
Evaporation pattern. Starting from [lenght, info] descends to [0, info] with a custom decay (The floor values depends on length's type)
T, duration
T => T, decay rate
V, information
[V, T]
Exponential back-off filter.
Exponential back-off filter.
T, signal to be filtered
T, alpha value
T, filtered signal
true when the given parameter goes from true to false (starting from false); false otherwise
true when the given parameter goes from false to true (starting from false); false otherwise
Remembers the occurrence of some condition or event
Remembers the occurrence of some condition or event
Remembers the provided optional value, unless empty
Remembers the provided optional value, unless empty
Time forward view: expected time from the device computation to neighbor's next computation incorporating that information.
Time forward view: expected time from the device computation to neighbor's next computation incorporating that information. For device's neighbors, it is the best estimate that the underlying system can provide. For the current device, it is like deltaTime().
This is the idea, pictorially:
PAST PRESENT FUTURE TIME ----------------------------------------------|--------------> X N X ------------lag------------
Time backward view: how long ago information from neighbors was received.
Time backward view: how long ago information from neighbors was received. For device's neighbors, it is the time of the computation minus the timestamp on the packet. Dropped packets temporarily increase nbrLag. For the current device, it is like deltaTime().
Get the distance between the current device and its neighbors.
Get the distance between the current device and its neighbors.
Get the direction vectors towards neighbours.
Get the direction vectors towards neighbours.
a point of type P, assuming the currently executing device is the origin
a random double from 0 to 1
Returns a non-empty optional with the provided value just once, then None
Returns a non-empty optional with the provided value just once, then None
a random double from 0 to 1
Remembers the provided value
Remembers the provided value
Counts the number of rounds, refreshing each time the computation is re-entered.
Counts the number of rounds, refreshing each time the computation is re-entered. TODO: consider boundedness as a limitation for long-lived/eternal systems
the number of the round
Timer synchronized within a neighborhood
Timer synchronized within a neighborhood
the current time in milliseconds since epoch
(Since version ) see corresponding Javadoc for more information.