Class LsaCountNeighborsAction
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,it.unibo.alchemist.model.sapere.ILsaAction
,java.io.Serializable
public final class LsaCountNeighborsAction extends SAPERELocalAgent
-
-
Constructor Summary
Constructors Constructor Description LsaCountNeighborsAction(Environment<List<ILsaMolecule>, out Object> environment, ILsaNode node, ILsaMolecule molToCount, HashString countVar, RandomGenerator rand)
Builds a new action that counts neighbors which contain in their lsaSpace an lsaMolecule matching mol. LsaCountNeighborsAction(Environment<List<ILsaMolecule>, out Object> environment, ILsaNode node, ILsaMolecule molToCount, String countVar, RandomGenerator rand)
Builds a new action that counts neighbors which contain in their lsaSpace an lsaMolecule matching mol.
-
Method Summary
Modifier and Type Method Description LsaCountNeighborsAction
cloneAction(Node<List<ILsaMolecule>> node, Reaction<List<ILsaMolecule>> reaction)
void
execute()
String
toString()
-
Methods inherited from class it.unibo.alchemist.model.sapere.actions.SAPERELocalAgent
getContext
-
Methods inherited from class it.unibo.alchemist.model.sapere.actions.LsaAbstractAction
cloneAction, getNode, setExecutionContext
-
Methods inherited from class it.unibo.alchemist.model.actions.AbstractAction
getOutboundDependencies, toString
-
Methods inherited from class it.unibo.alchemist.model.sapere.ILsaAction
cloneAction, getOutboundDependencies, setExecutionContext
-
Methods inherited from class it.unibo.alchemist.model.Action
cloneAction, getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LsaCountNeighborsAction
LsaCountNeighborsAction(Environment<List<ILsaMolecule>, out Object> environment, ILsaNode node, ILsaMolecule molToCount, HashString countVar, RandomGenerator rand)
Builds a new action that counts neighbors which contain in their lsaSpace an lsaMolecule matching mol.- Parameters:
environment
- The environment to usenode
- The source nodemolToCount
- The IlsaMolecule instance you want to search in neighbor lsa space.countVar
- The String representing the name of the counting var.rand
- Random engine
-
LsaCountNeighborsAction
LsaCountNeighborsAction(Environment<List<ILsaMolecule>, out Object> environment, ILsaNode node, ILsaMolecule molToCount, String countVar, RandomGenerator rand)
Builds a new action that counts neighbors which contain in their lsaSpace an lsaMolecule matching mol.- Parameters:
environment
- The environment to usenode
- The source nodemolToCount
- The IlsaMolecule instance you want to search in neighbor lsa space.countVar
- The String representing the name of the counting var.rand
- Random engine
-
-
Method Detail
-
cloneAction
LsaCountNeighborsAction cloneAction(Node<List<ILsaMolecule>> node, Reaction<List<ILsaMolecule>> reaction)
-
execute
void execute()
-
-
-
-