EuclideanEnvironment

interface EuclideanEnvironment<T, P : Position<P>, Vector<P>> : Environment<T, P>

An Euclidean space, where Positions P are valid Vectors, supporting any concentration type T.

Functions

Link copied to clipboard
abstract fun addLayer(m: Molecule, l: Layer<T, P>)
Link copied to clipboard
abstract fun addNode(node: Node<T>, p: P)
Link copied to clipboard
abstract fun addTerminator(terminator: Predicate<Environment<T, P>>)
Link copied to clipboard
open fun forEach(p0: Consumer<in Node<T>>)
Link copied to clipboard
abstract fun getDimensions(): Int
Link copied to clipboard
abstract fun getDistanceBetweenNodes(n1: Node<T>, n2: Node<T>): Double
Link copied to clipboard
abstract fun getIncarnation(): Optional<Incarnation<T, P>>
Link copied to clipboard
abstract fun getLayer(m: Molecule): Optional<Layer<T, P>>
Link copied to clipboard
abstract fun getLayers(): ListSet<Layer<T, P>>
Link copied to clipboard
abstract fun getLinkingRule(): LinkingRule<T, P>
Link copied to clipboard
abstract fun getNeighborhood(center: Node<T>): Neighborhood<T>
Link copied to clipboard
abstract fun getNodeByID(id: Int): Node<T>
Link copied to clipboard
abstract fun getNodeCount(): Int
Link copied to clipboard
abstract fun getNodes(): ListSet<Node<T>>
Link copied to clipboard
abstract fun getNodesWithinRange(center: P, range: Double): ListSet<Node<T>>
abstract fun getNodesWithinRange(center: Node<T>, range: Double): ListSet<Node<T>>
Link copied to clipboard
abstract fun getOffset(): DoubleArray
Link copied to clipboard
abstract fun getPosition(node: Node<T>): P
Link copied to clipboard
abstract fun getSimulation(): Simulation<T, P>
Link copied to clipboard
abstract fun getSize(): DoubleArray
Link copied to clipboard
abstract fun getSizeInDistanceUnits(): DoubleArray
Link copied to clipboard
abstract fun isTerminated(): Boolean
Link copied to clipboard
abstract operator override fun iterator(): MutableIterator<Node<T>>
Link copied to clipboard
abstract fun makePosition(vararg coordinates: Number): P

abstract fun makePosition(vararg coordinates: Double): P

Creates a Position compatible with this environment given its coordinates.

Link copied to clipboard
open fun moveNode(node: Node<T>, direction: P)

This method moves a node in the environment toward some direction. If node move is unsupported, it does nothing. Subclasses may override this method if they want to change the way a node moves towards some direction. The current implementation internally calls {@link #moveNodeToPosition(Node, Position2D)}, as such, overriding that method may suffice.

Link copied to clipboard
abstract fun moveNodeToPosition(node: Node<T>, position: P)
Link copied to clipboard
abstract fun removeNode(node: Node<T>)
Link copied to clipboard
abstract fun setLinkingRule(rule: LinkingRule<T, P>)
Link copied to clipboard
abstract fun setSimulation(s: Simulation<T, P>)
Link copied to clipboard
open fun spliterator(): Spliterator<Node<T>>

Properties

Link copied to clipboard
open val origin: P

Create a position corresponding to the origin of this environment.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
fun <T, P : Position<P>, Vector<P>> EuclideanEnvironment<T, P>.startSimulation(onceInitialized: (EuclideanEnvironment<T, P>) -> Unit = { }, atEachStep: (EuclideanEnvironment<T, P>, Reaction<T>?, Time, Long) -> Unit = { _, _, _, _ -> }, whenFinished: (EuclideanEnvironment<T, P>, Time, Long) -> Unit = { _, _, _ -> }, steps: Long = 10000): EuclideanEnvironment<T, P>

Run the simulation this environment owns.