Toggle Molecule Randomly
open class ToggleMoleculeRandomly<T>(node: Node<T>, randomGenerator: RandomGenerator, molecule: Molecule, concentration: T, odds: Double) : ToggleMolecule<T>
Content copied to clipboard
Treats molecule as a probabilistic switch:
if it is present, then with probability odds it's removed from node;
otherwise, with probability odds it is inserted in node with the provided concentration.
Parameters
node
the node containing the molecule to toggle
random Generator
random number generator to use
molecule
the molecule to toggle
concentration
the concentration to use for the "on" state
odds
probability to toggle the molecule every time the action is triggered
Constructors
Functions
Link copied to clipboard
open override fun cloneAction(node: Node<T>, reaction: Reaction<T>): ToggleMoleculeRandomly<T>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard