Class IndependentUpdate
- java.lang.Object
-
- bio.singa.simulation.model.modules.concentration.scope.IndependentUpdate
-
- All Implemented Interfaces:
UpdateScope
public class IndependentUpdate extends Object implements UpdateScope
Independent UpdatableConcentrationBasedModules require the integer state of the currently calculatedUpdatable. Therefore the update for the current updatable can be calculated and instantly compared with the associated half step delta (e.g.Reaction).- Author:
- cl
-
-
Constructor Summary
Constructors Constructor Description IndependentUpdate(ConcentrationBasedModule module)Initializes the update scope for the corresponding module.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPotentialDeltas()Clears all concentration deltas that may be assigned by this moduleConcentrationContainergetHalfStepConcentration(Updatable updatable)Return the half step concentration of a node after the full update has been calculated for the full step and the resulting delta is known.voidprocessAllUpdatables(Collection<? extends Updatable> updatables)Processes all given updatables.voidprocessUpdatable(Updatable updatable)Calculates the given updatable.
-
-
-
Constructor Detail
-
IndependentUpdate
public IndependentUpdate(ConcentrationBasedModule module)
Initializes the update scope for the corresponding module.- Parameters:
module- The module.
-
-
Method Detail
-
processAllUpdatables
public void processAllUpdatables(Collection<? extends Updatable> updatables)
Description copied from interface:UpdateScopeProcesses all given updatables. This includes calculating the delta functions of the corresponding module, calculating the current numerical error and pushing potential Deltas to the updatables, ready to be applied.- Specified by:
processAllUpdatablesin interfaceUpdateScope- Parameters:
updatables- The updatables to be processed.
-
processUpdatable
public void processUpdatable(Updatable updatable)
Description copied from interface:UpdateScopeCalculates the given updatable. If it is required to calculate other updatables to evaluate the state of this updatable this will be done depending on the implementation of the scope.- Specified by:
processUpdatablein interfaceUpdateScope- Parameters:
updatable- The updatable.
-
clearPotentialDeltas
public void clearPotentialDeltas()
Description copied from interface:UpdateScopeClears all concentration deltas that may be assigned by this module- Specified by:
clearPotentialDeltasin interfaceUpdateScope
-
getHalfStepConcentration
public ConcentrationContainer getHalfStepConcentration(Updatable updatable)
Description copied from interface:UpdateScopeReturn the half step concentration of a node after the full update has been calculated for the full step and the resulting delta is known.- Specified by:
getHalfStepConcentrationin interfaceUpdateScope- Parameters:
updatable- The updatable.- Returns:
- A concentration container with the concentrations at the half time step.
-
-