LsaMolecule

This class realizes an LsaMolecule, where arguments are of type Expression.

Constructors

Link copied to clipboard
constructor()
Empty molecule, no arguments.
constructor(@Nonnull listArgs: List<IExpression>)
Builds a new LsaMolecule by interpreting a list of IExpressions.
constructor(m: LsaMolecule)
Very fast constructor, produces a copy of an LsaMolecule.
constructor(argsString: String)
Builds an LsaMolecule by parsing the passed String.
constructor(argsString: String, description: String)
Builds an LsaMolecule by parsing the passed String.

Properties

Link copied to clipboard
Synthetic property representing the distance.
Link copied to clipboard
Synthetic property representing an LSA ID.
Link copied to clipboard
Synthetic property representing the current neighborhood.
Link copied to clipboard
Synthetic property representing the local node id.
Link copied to clipboard
Synthetic property representing the orientation.
Link copied to clipboard
Synthetic property representing a random value.
Link copied to clipboard
Synthetic property representing the distance.
Link copied to clipboard
Synthetic property representing the current selected neighbor ("+" conditions on the left).
Link copied to clipboard
Synthetic property representing the current simulation time.

Functions

Link copied to clipboard
open fun allocateVar(matches: Map<HashString, ITreeNode<out Any>>): List<IExpression>
Allocates the variables of this molecule using the provided bindings.
Link copied to clipboard
open fun argsNumber(): Int
Returns the number of arguments of this molecule.
Link copied to clipboard
open fun compareTo(o: ILsaMolecule): Int
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun forEach(action: Consumer<in IExpression>)
Link copied to clipboard
Generalizes this molecule by replacing its non-atomic and non-numeric values with variables.
Link copied to clipboard
open fun getArg(i: Int): IExpression
Returns the argument at the provided position.
Link copied to clipboard
abstract fun getName(): String

The name of this Molecule.

The name of this Molecule.
Link copied to clipboard
Checks whether this molecule reuses its own variables.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
context(incarnation: Incarnation<T, *>, node: Node<T>)
operator fun <T> Molecule.invoke(concentration: T = incarnation.createConcentration())

Assigns the given concentration to this Molecule on the current Node.

Link copied to clipboard
Checks whether this molecule is identical to the provided one.
Link copied to clipboard
open fun isIstance(): Boolean
Checks whether this molecule is an instance, namely it has no variables in its arguments.
Link copied to clipboard
Link copied to clipboard
open fun matches(mol: ILsaMolecule): Boolean
Checks whether this molecule matches the provided one.
open fun matches(mol: List<out IExpression>, duplicateVariables: Boolean): Boolean
Checks whether this molecule matches the provided list of arguments.
Link copied to clipboard
Checks whether this molecule is more generic than the provided one.
Link copied to clipboard
open fun size(): Int
Returns the number of arguments of this molecule.
Link copied to clipboard
Link copied to clipboard
Returns a HashString representation of this molecule.
Link copied to clipboard
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
context(incarnation: Incarnation<T, *>, _: Node<T>)
operator fun <T> Molecule.unaryMinus()

Assigns a default concentration for this Molecule to the current Node.