Class NumericalError
- java.lang.Object
-
- bio.singa.simulation.model.simulation.error.NumericalError
-
public class NumericalError extends Object
The LocalError object stores the error as an result of the currently applied time step. Additionally it stores in which node and for which chemical entity it occurred.- Author:
- cl
-
-
Field Summary
Fields Modifier and Type Field Description static NumericalErrorMINIMAL_EMPTY_ERRORThe minimal possible error not assigned to any node or chemical entity.
-
Constructor Summary
Constructors Constructor Description NumericalError(Updatable updatable, ChemicalEntity entity, double value)Creates a new LocalError.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChemicalEntitygetChemicalEntity()Returns the chemical entity where the error occurred.UpdatablegetUpdatable()Returns the node where the error occurred.doublegetValue()Returns the actual value of the error.booleanisLargerThan(NumericalError error)booleanisSmallerThan(NumericalError error)voidsetUpdatable(Updatable updatable)StringtoString()
-
-
-
Field Detail
-
MINIMAL_EMPTY_ERROR
public static final NumericalError MINIMAL_EMPTY_ERROR
The minimal possible error not assigned to any node or chemical entity.
-
-
Constructor Detail
-
NumericalError
public NumericalError(Updatable updatable, ChemicalEntity entity, double value)
Creates a new LocalError.- Parameters:
updatable- The node where the error occurred.entity- The chemical entity where the error occurred.value- The actual value of the error.
-
-
Method Detail
-
getUpdatable
public Updatable getUpdatable()
Returns the node where the error occurred.- Returns:
- The node where the error occurred.
-
setUpdatable
public void setUpdatable(Updatable updatable)
-
getChemicalEntity
public ChemicalEntity getChemicalEntity()
Returns the chemical entity where the error occurred.- Returns:
- The chemical entity where the error occurred.
-
getValue
public double getValue()
Returns the actual value of the error.- Returns:
- The actual value of the error.
-
isLargerThan
public boolean isLargerThan(NumericalError error)
-
isSmallerThan
public boolean isSmallerThan(NumericalError error)
-
-