CompartmentOrParameterValue
, DivideValue
, FunctionValue
, IntegerValue
, LocalParameterValue
, MinusValue
, NamedValue
, PlusValue
, PowerValue
, ReactionValue
, RootFunctionValue
, SpeciesReferenceValue
, SpeciesValue
, TimesValue
public class ASTNodeValue extends Object
ASTNode
at the current time. A new computation is only done if the
time has changed. So the computation is time-efficient.Modifier and Type | Field | Description |
---|---|---|
protected boolean |
alreadyProcessed |
Flag that tells whether a calculation of the value has already been done (important in the case of constant values)
|
protected boolean |
booleanValue |
Boolean value of the node (if the type of the value is boolean)
|
protected ASTNodeValue[] |
children |
The ASTNodeObjects of the child nodes of the corresponding ASTNode
|
protected int |
denominator |
The denominator of the corresponding ASTNode
|
protected double |
doubleValue |
Double value of the node (if the type of the value is double)
|
protected int |
exponent |
The exponent of the corresponding ASTNode
|
protected ASTNodeInterpreter |
interpreter |
The interpreter for calculating the value
|
protected boolean |
isConstant |
Flag that is true if the value of the ASTNode is constant.
|
protected boolean |
isDouble |
Flag that is true if the value has double as type and false if the value is boolean
|
protected boolean |
isInfinite |
Flag that is true if the value is positive/negative infinity
|
protected ASTNodeValue |
leftChild |
The ASTNodeObject of the left child of the corresponding ASTNode
|
static Logger |
logger |
A
Logger for this class. |
protected double |
mantissa |
The mantissa of the corresponding ASTNode
|
protected String |
name |
The name of the corresponding ASTNode
|
protected org.sbml.jsbml.ASTNode |
node |
The ASTNode this object is referring to
|
protected org.sbml.jsbml.ASTNode.Type |
nodeType |
The node type of the corresponding ASTNode
|
protected int |
numChildren |
The number of children of the corresponding ASTNode
|
protected int |
numerator |
The numerator of the corresponding ASTNode
|
protected double |
real |
The real value of the corresponding ASTNode
|
protected ASTNodeValue |
rightChild |
The ASTNodeObject of the right child of the corresponding ASTNode
|
protected double |
time |
The time of the last computation
|
protected String |
units |
The units of the corresponding ASTNode
|
Constructor | Description |
---|---|
ASTNodeValue(ASTNodeInterpreter interpreter,
org.sbml.jsbml.ASTNode node) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
compileBoolean(double time) |
Computes the boolean value if the time has changed and otherwise returns the already computed value
|
double |
compileDouble(double time,
double delay) |
Computes the double value if the time has changed and otherwise returns the already computed value
|
protected void |
computeBooleanValue() |
Computes the boolean value of the node.
|
protected void |
computeDoubleValue(double delay) |
Computes the double value of the node.
|
boolean |
getConstant() |
|
String |
getName() |
Returns the name of the corresponding ASTNode.
|
org.sbml.jsbml.ASTNode |
getNode() |
|
double |
getTime() |
|
Object |
getValue(double time) |
Returns the value as an object (double or boolean)
|
boolean |
isName() |
Returns true if the corresponding ASTNode is of type name.
|
void |
reset() |
Resets the node
|
void |
setTime(double time) |
protected double time
protected boolean isConstant
protected boolean isInfinite
protected boolean booleanValue
protected double doubleValue
protected boolean isDouble
protected org.sbml.jsbml.ASTNode node
protected org.sbml.jsbml.ASTNode.Type nodeType
protected ASTNodeValue[] children
protected ASTNodeValue leftChild
protected ASTNodeValue rightChild
protected String name
protected int numChildren
protected boolean alreadyProcessed
protected ASTNodeInterpreter interpreter
protected double real
protected double mantissa
protected int exponent
protected int numerator
protected int denominator
protected String units
public ASTNodeValue(ASTNodeInterpreter interpreter, org.sbml.jsbml.ASTNode node)
interpreter
- node
- public void reset()
public double getTime()
public void setTime(double time)
time
- public boolean getConstant()
public org.sbml.jsbml.ASTNode getNode()
public Object getValue(double time)
time
- public double compileDouble(double time, double delay)
time
- delay
- public boolean compileBoolean(double time)
time
- protected void computeDoubleValue(double delay)
delay
- protected void computeBooleanValue()
public boolean isName()
public String getName()
Copyright © 2007–2018. All rights reserved.