Environment

interface Environment<T, P : Position<out P>?> : Serializable, Iterable<T> (source)

Interface for an environment. Every environment must implement this specification.

Parameters

<P>

Concentration type

<T>

Position type

Inheritors

Functions

Link copied to clipboard
abstract fun addGlobalReaction(reaction: GlobalReaction<T>)
Link copied to clipboard
abstract fun addLayer(m: Molecule, l: Layer<T, P>)
Add a Layer to the Environment.
Link copied to clipboard
abstract fun addNode(node: Node<T>, p: P): Boolean
This method allows to add a new node to this environment.
Link copied to clipboard
abstract fun addTerminator(terminator: Predicate<Environment<T, P>>)
Link copied to clipboard
open fun forEach(p: Consumer<in T>)
Link copied to clipboard
abstract fun getDimensions(): Int
The number of dimensions of this environment.
Link copied to clipboard
abstract fun getDistanceBetweenNodes(n1: Node<T>, n2: Node<T>): Double
Measures the distance between two nodes in the environment.
Link copied to clipboard
abstract fun getGlobalReactions(): ListSet<GlobalReaction<T>>
Link copied to clipboard
@Nonnull
abstract fun getIncarnation(): Incarnation<T, P>
Link copied to clipboard
abstract fun getLayer(m: Molecule): Optional<Layer<T, P>>
Get the layer associate to the given molecule.
Link copied to clipboard
abstract fun getLayers(): ListSet<Layer<T, P>>
Return all the Layers in this Environment.
Link copied to clipboard
abstract fun getLinkingRule(): LinkingRule<T, P>
Link copied to clipboard
abstract fun getNeighborhood(center: Node<T>): Neighborhood<T>
Given a node, this method returns its neighborhood.
Link copied to clipboard
abstract fun getNodeByID(id: Int): Node<T>
Allows to access a node known its id.
Link copied to clipboard
abstract fun getNodeCount(): Int
Link copied to clipboard
abstract fun getNodes(): ListSet<Node<T>>
All the nodes that exist in current environment.
Link copied to clipboard
abstract fun getNodesWithinRange(center: P, range: Double): ListSet<Node<T>>
Given a Position(center) this method returns a list of all the surroundings nodes within the given range.
abstract fun getNodesWithinRange(center: Node<T>, range: Double): ListSet<Node<T>>
Given a node (center) this method returns a list of all the surroundings nodes within the given range.
Link copied to clipboard
abstract fun getOffset(): Array<Double>
This method allows to know which are the smallest coordinates represented.
Link copied to clipboard
@Nonnull
abstract fun getPosition(node: Node<T>): P
Calculates the position of a node.
Link copied to clipboard
abstract fun getSimulation(): Simulation<T, P>
Link copied to clipboard
abstract fun getSize(): Array<Double>
This method returns the size of the environment as an array of length getDimensions.
Link copied to clipboard
This method returns the size of the environment as an array of length getDimensions.
Link copied to clipboard
abstract fun isTerminated(): Boolean
Link copied to clipboard
abstract fun iterator(): Iterator<T>
Link copied to clipboard
abstract fun makePosition(coordinates: Array<Number>): P
Link copied to clipboard
@Nonnull
abstract fun moveNodeToPosition(@Nonnull node: Node<T>, @Nonnull position: P)
This method moves a node in the environment to some position.
Link copied to clipboard
abstract fun removeGlobalReaction(reaction: GlobalReaction<T>)
Remove a GlobalReaction from the Environment.
Link copied to clipboard
abstract fun removeNode(node: Node<T>)
This method allows to remove a node.
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