EnvironmentNode

A node of the biochemistry incarnation that is not a cell, representing a portion of the environment.

Inheritors

Properties

Link copied to clipboard

Utilities for Nodes.

Functions

Link copied to clipboard
abstract fun addProperty(capability: Capability<T>)

Adds a capability to the node. Properties are part of the node setup: adding one fails once the node is in an environment, so properties can be read without being observed.

Link copied to clipboard
abstract fun addReaction(reaction: Reaction<T>)

Registers reaction and notifies the running simulation when it was not already present. Fails if this is not the Reaction.host of reaction.

Link copied to clipboard
open fun <C : Capability<T>?> asProperty(superType: KClass<C>): C

returns a Capability of the provided superType.

Link copied to clipboard
inline fun <T, C : Capability<T>> Node<T>.asProperty(): C

Returns the node property of the reified type C.

Link copied to clipboard
open fun <C : Capability<T>?> asPropertyOrNull(superType: Class<in C>): C

returns a Capability of the provided superType.

Link copied to clipboard
inline fun <T, C : Capability<T>> Node<T>.asPropertyOrNull(): C?

Returns the node property of the reified type C, or null if the node does not have a compatible property.

Link copied to clipboard
abstract fun cloneNode(): Node<T>

Creates a new Node which is a clone of the current Node. The new Node will have all the current Node's properties, such as reactions and molecules, but it will also have a different ID. Its reactions are cloned through NodeReaction.cloneOnNewNode.

Link copied to clipboard
abstract fun compareTo(p: T): Int
Link copied to clipboard
abstract fun concentrationOf(molecule: Molecule): Observable<Option<T>>

Observe the concentration calculated with the given molecule. The result of this computation is wrapped into an Option and some if the value is present, otherwise none.

Link copied to clipboard
abstract fun contains(molecule: Molecule): Boolean

Tests whether a node contains a Molecule.

Link copied to clipboard
abstract fun containsMolecule(molecule: Molecule): Observable<Boolean>

Observes whether a node contains a Molecule.

Link copied to clipboard
abstract fun dispose()

Disposes and releases the resources held by this object.

Link copied to clipboard
abstract fun equals(other: Any): Boolean
Link copied to clipboard
abstract fun get(molecule: Molecule): Option<T>

The concentration of a molecule, some if the molecule is present in this node, none otherwise.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getId(): Int
Link copied to clipboard

Observes the count of different molecules in this node.

Link copied to clipboard
abstract fun getProperties(): List<Capability<T>>
Link copied to clipboard

This method allows to access all the reaction of the node.

Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
open fun remove($this$remove: Reaction<T>)

Unregisters this reaction from its host, see removeReaction.

Link copied to clipboard
abstract fun removeAllConcentrationOf(moleculeToRemove: Molecule)
Link copied to clipboard
abstract fun removeReaction(reaction: Reaction<T>)

Unregisters reaction and notifies the running simulation when it was actually present.

Link copied to clipboard
abstract fun set(molecule: Molecule, concentration: T)

Sets the concentration of mol to c.

Link copied to clipboard
infix fun Node<*>.shouldEqual(other: Node<*>)
Link copied to clipboard
Link copied to clipboard
fun <T, P : Position<out P>, TS : Any, PS : PositionSurrogate> Node<T>.toNodeSurrogate(environment: Environment<T, P>, toConcentrationSurrogate: (T) -> TS, toPositionSurrogate: (P) -> PS): NodeSurrogate<TS, PS>