|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simulator.sbml.astnode.ASTNodeObject
public class ASTNodeObject
This class can compute and store the interpreted value (double or boolean) of an ASTNode at the current time. A new computation is only done if the time has changed. So the computation is time-efficient.
Field Summary | |
---|---|
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 java.util.List<ASTNodeObject> |
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 ASTNodeInterpreterWithTime |
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 ASTNodeObject |
leftChild
The ASTNodeObject of the left child of the corresponding ASTNode |
static java.util.logging.Logger |
logger
A logger |
protected double |
mantissa
The mantissa of the corresponding ASTNode |
protected java.lang.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 ASTNodeObject |
rightChild
The ASTNodeObject of the right child of the corresponding ASTNode |
protected double |
time
The time of the last computation |
protected java.lang.String |
units
The units of the corresponding ASTNode |
Constructor Summary | |
---|---|
ASTNodeObject(ASTNodeInterpreterWithTime interpreter,
org.sbml.jsbml.ASTNode node)
|
Method Summary | |
---|---|
boolean |
compileBoolean(double time)
Computes the boolean value if the time has changed and otherwise returns the already computed value |
double |
compileDouble(double time)
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()
Computes the double value of the node. |
boolean |
getConstant()
|
java.lang.String |
getName()
Returns the name of the corresponding ASTNode. |
double |
getTime()
|
java.lang.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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 java.util.List<ASTNodeObject> children
protected ASTNodeObject leftChild
protected ASTNodeObject rightChild
protected java.lang.String name
protected int numChildren
protected boolean alreadyProcessed
protected ASTNodeInterpreterWithTime interpreter
protected double real
protected double mantissa
protected int exponent
protected int numerator
protected int denominator
protected java.lang.String units
public static final java.util.logging.Logger logger
Constructor Detail |
---|
public ASTNodeObject(ASTNodeInterpreterWithTime interpreter, org.sbml.jsbml.ASTNode node)
interpreter
- node
- Method Detail |
---|
public void reset()
public double getTime()
public void setTime(double time)
time
- public boolean getConstant()
public java.lang.Object getValue(double time)
time
-
public double compileDouble(double time)
time
-
public boolean compileBoolean(double time)
time
-
protected void computeDoubleValue()
protected void computeBooleanValue()
public boolean isName()
public java.lang.String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |