Package-level declarations
Types
Link copied to clipboard
open class Environment<R>(val defaultRetainTime: Int = 1, val areConnected: (Environment<R>, Node<R>, Node<R>) -> Boolean = { _, _, _ -> true })
An environment with a set of nodes with a defaultRetainTime mapped into positions, which are considered connected if the areConnected function returns true for them.
Link copied to clipboard
class EnvironmentWithMeshNetwork<R>(val connectDistance: Double, defaultRetainTime: Int = 1) : Environment<R>
An environment where nodes are connected if they are within connectDistance from each other.
Link copied to clipboard
A Mailbox that serializes messages using the provided serializer. It can be used to test serialization and deserialization of messages.
Functions
Link copied to clipboard
fun <R> mooreGrid(sizeX: Int, sizeY: Int, initial: R, program: Aggregate<Int>.(Environment<R>) -> R): EnvironmentWithMeshNetwork<R>
fun <R> mooreGrid(sizeX: Int, sizeY: Int, initial: (Environment<R>, Position) -> R, program: Aggregate<Int>.(Environment<R>) -> R): EnvironmentWithMeshNetwork<R>
Creates a grid environment with Moore connections between nodes.
Link copied to clipboard
fun <R> vonNeumannGrid(sizeX: Int, sizeY: Int, initial: R, program: Aggregate<Int>.(Environment<R>) -> R): EnvironmentWithMeshNetwork<R>
fun <R> vonNeumannGrid(sizeX: Int, sizeY: Int, initial: (Environment<R>, Position) -> R, program: Aggregate<Int>.(Environment<R>) -> R): EnvironmentWithMeshNetwork<R>
Creates a grid environment with Von Neumann connections between nodes.