RandomTarget

class RandomTarget<T>(environment: Environment<T, Euclidean2DPosition>, getCurrentPosition: () -> Euclidean2DPosition, makePosition: (Double, Double) -> Euclidean2DPosition, directionRng: <Error class: unknown class>, distanceDistribution: <Error class: unknown class>) : ChangeTargetOnCollision<T, Euclidean2DPosition>

Selects a target based on a random direction extracted from directionRng, and a random distance extracted from distanceDistribution. getCurrentPosition should return the current position of the object to move. T is the type of the concentration of the node.

Constructors

Link copied to clipboard
constructor(environment: Environment<T, Euclidean2DPosition>, node: Node<T>, directionRng: <Error class: unknown class>, distanceDistribution: <Error class: unknown class>)

Handy constructor for Alchemist where the object to move is a node in the environment.

constructor(environment: Environment<T, Euclidean2DPosition>, getCurrentPosition: () -> Euclidean2DPosition, makePosition: (Double, Double) -> Euclidean2DPosition, directionRng: <Error class: unknown class>, distanceDistribution: <Error class: unknown class>)

Functions

Link copied to clipboard
open override fun cloneIfNeeded(destination: Node<T>?, reaction: Reaction<T>?): RandomTarget<T>
Link copied to clipboard
open override fun getTarget(): Euclidean2DPosition