Package-level declarations
Types
Link copied to clipboard
class AggregateContext(localId: ID, messages: Collection<InboundMessage>, previousState: Set<State<*>>)
Context for managing aggregate computation. It represents the localId of the device, the messages received from the neighbours, and the previousState of the device.
Link copied to clipboard
Functions
Link copied to clipboard
fun <X> aggregate(localId: ID, condition: () -> Boolean, network: Network, init: AggregateContext.() -> X): AggregateResult<X>
Aggregate program entry point which computes multiple iterations of a device localId, over a condition and a network of devices, with the lambda init with AggregateContext object receiver that provides the aggregate constructs.
fun <X> aggregate(localId: ID, messages: Set<InboundMessage> = emptySet(), state: Set<State<*>> = emptySet(), init: AggregateContext.() -> X): AggregateResult<X>