org.simulator.sbml.astnode
Class ASTNodeInterpreterWithTime
java.lang.Object
org.simulator.sbml.astnode.ASTNodeInterpreterWithTime
public class ASTNodeInterpreterWithTime
- extends java.lang.Object
This class is an efficient ASTNodeInterpreter that takes the time of the calculation into account. It contains functions similar to the interface, which have the current time as additional argument.
- Since:
- 1.0
- Version:
- $Rev: 22 $
- Author:
- Roland Keller
Field Summary |
static java.util.logging.Logger |
logger
A logger. |
Method Summary |
double |
abs(ASTNodeObject userObject,
double time)
|
boolean |
and(java.util.List<ASTNodeObject> nodes,
int size,
double time)
|
double |
arccos(ASTNodeObject userObject,
double time)
|
double |
arccosh(ASTNodeObject userObject,
double time)
|
double |
arccot(ASTNodeObject userObject,
double time)
|
double |
arccoth(ASTNodeObject userObject,
double time)
|
double |
arccsc(ASTNodeObject userObject,
double time)
|
double |
arccsch(ASTNodeObject userObject,
double time)
|
double |
arcsec(ASTNodeObject userObject,
double time)
|
double |
arcsech(ASTNodeObject userObject,
double time)
|
double |
arcsin(ASTNodeObject userObject,
double time)
|
double |
arcsinh(ASTNodeObject userObject,
double time)
|
double |
arctan(ASTNodeObject userObject,
double time)
|
double |
arctanh(ASTNodeObject userObject,
double time)
|
double |
ceiling(ASTNodeObject userObject,
double time)
|
double |
compile(double mantissa,
int exponent,
java.lang.String units)
|
double |
compile(double value,
java.lang.String units)
|
boolean |
compileBoolean(org.sbml.jsbml.CallableSBase nsb,
double time)
|
double |
compileDouble(org.sbml.jsbml.CallableSBase nsb,
double time)
|
double |
compileDouble(java.lang.String name,
double time)
|
java.lang.String |
compileString(org.sbml.jsbml.ASTNode child)
|
java.lang.String |
compileString(ASTNodeObject child)
|
double |
cos(ASTNodeObject userObject,
double time)
|
double |
cosh(ASTNodeObject userObject,
double time)
|
double |
cot(ASTNodeObject userObject,
double time)
|
double |
coth(ASTNodeObject userObject,
double time)
|
double |
csc(ASTNodeObject userObject,
double time)
|
double |
csch(ASTNodeObject userObject,
double time)
|
double |
delay(java.lang.String delayName,
ASTNodeObject x,
ASTNodeObject delay,
java.lang.String timeUnits,
double time)
|
boolean |
eq(ASTNodeObject left,
ASTNodeObject right,
double time)
|
double |
exp(ASTNodeObject userObject,
double time)
|
double |
factorial(ASTNodeObject userObject,
double time)
|
double |
floor(ASTNodeObject userObject,
double time)
|
double |
frac(ASTNodeObject left,
ASTNodeObject right,
double time)
|
double |
frac(int numerator,
int denominator)
|
boolean |
functionBoolean(ASTNodeObject rightChild,
java.util.List<java.lang.String> variables,
java.util.List<ASTNodeObject> arguments,
double[] values,
double time)
|
boolean |
functionBoolean(java.lang.String name,
java.util.List<ASTNodeObject> children)
|
double |
functionDouble(ASTNodeObject rightChild,
java.util.List<java.lang.String> variables,
java.util.List<ASTNodeObject> arguments,
int nArguments,
double[] values,
double time)
|
double |
functionDouble(java.lang.String functionDefinitionName,
java.util.List<ASTNodeObject> args,
double time)
|
boolean |
geq(ASTNodeObject left,
ASTNodeObject right,
double time)
|
boolean |
gt(ASTNodeObject left,
ASTNodeObject right,
double time)
|
boolean |
lambdaBoolean(java.util.List<ASTNodeObject> nodes,
double time)
|
double |
lambdaDouble(java.util.List<ASTNodeObject> nodes,
double time)
|
boolean |
leq(ASTNodeObject left,
ASTNodeObject right,
double time)
|
double |
ln(ASTNodeObject userObject,
double time)
|
double |
log(ASTNodeObject left,
ASTNodeObject right,
double time)
|
double |
log(ASTNodeObject userObject,
double time)
|
boolean |
lt(ASTNodeObject left,
ASTNodeObject right,
double time)
|
double |
minus(java.util.List<ASTNodeObject> nodes,
int size,
double time)
|
boolean |
neq(ASTNodeObject left,
ASTNodeObject right,
double time)
|
boolean |
not(ASTNodeObject node,
double time)
|
boolean |
or(java.util.List<ASTNodeObject> nodes,
double time)
|
double |
piecewise(java.util.List<ASTNodeObject> nodes,
double time)
|
double |
plus(java.util.List<ASTNodeObject> nodes,
int size,
double time)
|
double |
pow(ASTNodeObject left,
ASTNodeObject right,
double time)
|
double |
root(ASTNodeObject rootExponent,
ASTNodeObject radiant,
double time)
|
double |
root(double rootExponent,
ASTNodeObject userObject,
double time)
|
double |
sec(ASTNodeObject userObject,
double time)
|
double |
sech(ASTNodeObject userObject,
double time)
|
double |
sin(ASTNodeObject userObject,
double time)
|
double |
sinh(ASTNodeObject userObject,
double time)
|
double |
sqrt(ASTNodeObject userObject,
double time)
|
double |
symbolTime(java.lang.String name)
|
double |
tan(ASTNodeObject userObject,
double time)
|
double |
tanh(ASTNodeObject userObject,
double time)
|
double |
times(java.util.List<ASTNodeObject> nodes,
int size,
double time)
|
java.lang.String |
toString(org.sbml.jsbml.ASTNode value)
|
double |
uMinus(ASTNodeObject userObject,
double time)
|
boolean |
xor(java.util.List<ASTNodeObject> nodes,
double time)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static final java.util.logging.Logger logger
- A logger.
ASTNodeInterpreterWithTime
public ASTNodeInterpreterWithTime(ValueHolder valueHolder)
- Parameters:
valueHolder
-
toString
public final java.lang.String toString(org.sbml.jsbml.ASTNode value)
- Parameters:
value
-
- Returns:
compileDouble
public double compileDouble(java.lang.String name,
double time)
- Parameters:
name
- time
-
- Returns:
compileDouble
public double compileDouble(org.sbml.jsbml.CallableSBase nsb,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nsb
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
compileBoolean
public boolean compileBoolean(org.sbml.jsbml.CallableSBase nsb,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nsb
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
functionDouble
public double functionDouble(ASTNodeObject rightChild,
java.util.List<java.lang.String> variables,
java.util.List<ASTNodeObject> arguments,
int nArguments,
double[] values,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
rightChild
- variables
- arguments
- nArguments
- values
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
compileString
public java.lang.String compileString(ASTNodeObject child)
- Parameters:
child
-
- Returns:
compileString
public java.lang.String compileString(org.sbml.jsbml.ASTNode child)
- Parameters:
child
-
- Returns:
lambdaDouble
public double lambdaDouble(java.util.List<ASTNodeObject> nodes,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
lambdaBoolean
public boolean lambdaBoolean(java.util.List<ASTNodeObject> nodes,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
piecewise
public double piecewise(java.util.List<ASTNodeObject> nodes,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
log
public double log(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
log
public double log(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
functionDouble
public double functionDouble(java.lang.String functionDefinitionName,
java.util.List<ASTNodeObject> args,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
functionDefinitionName
- args
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
tanh
public double tanh(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
tan
public double tan(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
sinh
public double sinh(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
sin
public double sin(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
sech
public double sech(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
sec
public double sec(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
root
public double root(ASTNodeObject rootExponent,
ASTNodeObject radiant,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
rootExponent
- radiant
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
root
public double root(double rootExponent,
ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
rootExponent
- userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
ln
public double ln(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
floor
public double floor(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
factorial
public double factorial(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
exp
public double exp(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
csch
public double csch(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
csc
public double csc(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
coth
public double coth(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
cot
public double cot(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
cosh
public double cosh(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
cos
public double cos(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
ceiling
public double ceiling(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arctanh
public double arctanh(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
functionBoolean
public boolean functionBoolean(java.lang.String name,
java.util.List<ASTNodeObject> children)
- Parameters:
name
- children
-
- Returns:
functionBoolean
public boolean functionBoolean(ASTNodeObject rightChild,
java.util.List<java.lang.String> variables,
java.util.List<ASTNodeObject> arguments,
double[] values,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
rightChild
- variables
- arguments
- values
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
lt
public boolean lt(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
leq
public boolean leq(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
neq
public boolean neq(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
gt
public boolean gt(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
geq
public boolean geq(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
eq
public boolean eq(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
not
public boolean not(ASTNodeObject node,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
node
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
or
public boolean or(java.util.List<ASTNodeObject> nodes,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
xor
public boolean xor(java.util.List<ASTNodeObject> nodes,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
and
public boolean and(java.util.List<ASTNodeObject> nodes,
int size,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arctan
public double arctan(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arcsinh
public double arcsinh(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arcsin
public double arcsin(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arcsech
public double arcsech(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arcsec
public double arcsec(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arccsch
public double arccsch(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arccsc
public double arccsc(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arccoth
public double arccoth(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arccot
public double arccot(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arccosh
public double arccosh(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
arccos
public double arccos(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
abs
public double abs(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
compile
public double compile(double mantissa,
int exponent,
java.lang.String units)
- Parameters:
mantissa
- exponent
- units
-
- Returns:
delay
public final double delay(java.lang.String delayName,
ASTNodeObject x,
ASTNodeObject delay,
java.lang.String timeUnits,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
delayName
- x
- delay
- timeUnits
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
symbolTime
public double symbolTime(java.lang.String name)
- Parameters:
name
-
- Returns:
frac
public double frac(int numerator,
int denominator)
- Parameters:
numerator
- denominator
-
- Returns:
frac
public double frac(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
times
public double times(java.util.List<ASTNodeObject> nodes,
int size,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- size
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
minus
public double minus(java.util.List<ASTNodeObject> nodes,
int size,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- size
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
plus
public double plus(java.util.List<ASTNodeObject> nodes,
int size,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
nodes
- size
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
pow
public double pow(ASTNodeObject left,
ASTNodeObject right,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
left
- right
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
compile
public double compile(double value,
java.lang.String units)
- Parameters:
value
- units
-
- Returns:
sqrt
public double sqrt(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException
uMinus
public double uMinus(ASTNodeObject userObject,
double time)
throws org.sbml.jsbml.SBMLException
- Parameters:
userObject
- time
-
- Returns:
-
- Throws:
org.sbml.jsbml.SBMLException