public interface ASTNode2Compiler
ASTNode2
s. It defines how to perform mathematical or
other operations on these data types. Recursion can be performed as follows:
publicASTNode2Value> doSomeThing(ASTNode2 ast) { ... ASTNode2Value child = ast.compile(this); ... return new ASTNode2Value(doSomeThing(child), this); }
Modifier and Type | Method and Description |
---|---|
<T> ASTNode2Value<?> |
abs(ASTNode2 value)
The absolute value represented by the given
ASTNode2 . |
<T> ASTNode2Value<?> |
and(java.util.List<ASTNode2> values) |
<T> ASTNode2Value<?> |
arccos(ASTNode2 value) |
<T> ASTNode2Value<?> |
arccosh(ASTNode2 value) |
<T> ASTNode2Value<?> |
arccot(ASTNode2 value) |
<T> ASTNode2Value<?> |
arccoth(ASTNode2 value) |
<T> ASTNode2Value<?> |
arccsc(ASTNode2 value) |
<T> ASTNode2Value<?> |
arccsch(ASTNode2 value) |
<T> ASTNode2Value<?> |
arcsec(ASTNode2 value) |
<T> ASTNode2Value<?> |
arcsech(ASTNode2 value) |
<T> ASTNode2Value<?> |
arcsin(ASTNode2 value) |
<T> ASTNode2Value<?> |
arcsinh(ASTNode2 value) |
<T> ASTNode2Value<?> |
arctan(ASTNode2 value) |
<T> ASTNode2Value<?> |
arctanh(ASTNode2 value) |
<T> ASTNode2Value<?> |
ceiling(ASTNode2 value) |
<T> ASTNode2Value<?> |
compile(CallableSBase variable) |
<T> ASTNode2Value<?> |
compile(Compartment c) |
<T> ASTNode2Value<?> |
compile(double mantissa,
int exponent,
java.lang.String units)
Creates an
ASTNode2Value that represents a real number in
scientific notation, i.e., mantissa * 10^exponent, and the given units. |
<T> ASTNode2Value<?> |
compile(double real,
java.lang.String units) |
<T> ASTNode2Value<?> |
compile(int integer,
java.lang.String units) |
<T> ASTNode2Value<?> |
compile(java.lang.String name)
A compiler will also have to deal with a name.
|
<T> ASTNode2Value<?> |
cos(ASTNode2 value) |
<T> ASTNode2Value<?> |
cosh(ASTNode2 value) |
<T> ASTNode2Value<?> |
cot(ASTNode2 value) |
<T> ASTNode2Value<?> |
coth(ASTNode2 value) |
<T> ASTNode2Value<?> |
csc(ASTNode2 value) |
<T> ASTNode2Value<?> |
csch(ASTNode2 value) |
<T> ASTNode2Value<?> |
delay(java.lang.String delayName,
ASTNode2 x,
ASTNode2 delay)
Evaluates delay functions.
|
<T> ASTNode2Value<?> |
eq(ASTNode2 left,
ASTNode2 right)
Equal.
|
<T> ASTNode2Value<?> |
exp(ASTNode2 value) |
<T> ASTNode2Value<?> |
factorial(ASTNode2 value) |
<T> ASTNode2Value<?> |
floor(ASTNode2 value) |
<T> ASTNode2Value<?> |
frac(ASTNode2 numerator,
ASTNode2 denominator)
Fraction of two
ASTNode2 s |
<T> ASTNode2Value<?> |
frac(int numerator,
int denominator)
A fraction of two int values.
|
<T> ASTNode2Value<?> |
function(FunctionDefinition functionDefinition,
java.util.List<ASTNode2> args) |
<T> ASTNode2Value<?> |
function(java.lang.String functionDefinitionName,
java.util.List<ASTNode2> args) |
<T> ASTNode2Value<?> |
function(T functionDefinitionName,
java.util.List<ASTNode2> args) |
<T> ASTNode2Value<?> |
geq(ASTNode2 left,
ASTNode2 right)
Greater equal.
|
<T> ASTNode2Value<?> |
getConstantAvogadro(java.lang.String name)
Creates an
ASTNode2Value that represent's Avogadro's number. |
<T> ASTNode2Value<?> |
getConstantE() |
<T> ASTNode2Value<?> |
getConstantFalse() |
<T> ASTNode2Value<?> |
getConstantPi() |
<T> ASTNode2Value<?> |
getConstantTrue() |
<T> ASTNode2Value<?> |
getNegativeInfinity() |
<T> ASTNode2Value<?> |
getPositiveInfinity() |
<T> ASTNode2Value<?> |
gt(ASTNode2 left,
ASTNode2 right)
Greater than.
|
<T> ASTNode2Value<?> |
lambda(java.util.List<ASTNode2> values)
The body of a
FunctionDefinition . |
<T> ASTNode2Value<?> |
leq(ASTNode2 left,
ASTNode2 right)
Less equal.
|
<T> ASTNode2Value<?> |
ln(ASTNode2 value)
Natural logarithm.
|
<T> ASTNode2Value<?> |
log(ASTNode2 value)
Logarithm of the given value to base 10.
|
<T> ASTNode2Value<?> |
log(ASTNode2 base,
ASTNode2 value)
Logarithm of the given value to the given base.
|
<T> ASTNode2Value<?> |
lt(ASTNode2 left,
ASTNode2 right)
Less than.
|
<T> ASTNode2Value<?> |
minus(java.util.List<ASTNode2> values)
Subtraction.
|
<T> ASTNode2Value<?> |
neq(ASTNode2 left,
ASTNode2 right)
Not equal.
|
<T> ASTNode2Value<?> |
not(ASTNode2 value) |
<T> ASTNode2Value<?> |
or(java.util.List<ASTNode2> values) |
<T> ASTNode2Value<?> |
piecewise(java.util.List<ASTNode2> values) |
<T> ASTNode2Value<?> |
plus(java.util.List<ASTNode2> values) |
<T> ASTNode2Value<?> |
pow(ASTNode2 base,
ASTNode2 exponent) |
<T> ASTNode2Value<?> |
root(ASTNode2 rootExponent,
ASTNode2 radiant) |
<T> ASTNode2Value<?> |
root(double rootExponent,
ASTNode2 radiant) |
<T> ASTNode2Value<?> |
sec(ASTNode2 value) |
<T> ASTNode2Value<?> |
sech(ASTNode2 value) |
<T> ASTNode2Value<?> |
selector(java.util.List<ASTNode2> nodes) |
<T> ASTNode2Value<?> |
sin(ASTNode2 value) |
<T> ASTNode2Value<?> |
sinh(ASTNode2 value) |
<T> ASTNode2Value<?> |
sqrt(ASTNode2 radiant)
Square root.
|
<T> ASTNode2Value<?> |
symbolTime(java.lang.String time)
The simulation time.
|
<T> ASTNode2Value<?> |
tan(ASTNode2 value) |
<T> ASTNode2Value<?> |
tanh(ASTNode2 value) |
<T> ASTNode2Value<?> |
times(java.util.List<ASTNode2> values)
Product of all given
ASTNode2 s. |
<T> ASTNode2Value<?> |
uMinus(ASTNode2 value)
Unary minus, i.e., negation of the given
ASTNode2 . |
<T> ASTNode2Value<?> |
unknownValue()
Dealing with a malformed
ASTNode2 . |
<T> ASTNode2Value<?> |
vector(java.util.List<ASTNode2> nodes)
Dealing with a vector.
|
<T> ASTNode2Value<?> |
xor(java.util.List<ASTNode2> values)
Exclusive or.
|
<T> ASTNode2Value<?> abs(ASTNode2 value) throws SBMLException
ASTNode2
.value
- Must be interpretable as a Number
.SBMLException
<T> ASTNode2Value<?> and(java.util.List<ASTNode2> values) throws SBMLException
values
- SBMLException
<T> ASTNode2Value<?> arccos(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arccosh(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arccot(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arccoth(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arccsc(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arccsch(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arcsec(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arcsech(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arcsin(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arcsinh(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arctan(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> arctanh(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> ceiling(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> compile(Compartment c)
c
- <T> ASTNode2Value<?> compile(double mantissa, int exponent, java.lang.String units)
ASTNode2Value
that represents a real number in
scientific notation, i.e., mantissa * 10^exponent, and the given units.mantissa
- The number to be multiplied with ten to the power of the given
exponent.exponent
- The exponent for the multiplier ten.units
- The identifier of the units object associated with the number
represented by this element. Can be null if no units have been
defined.<T> ASTNode2Value<?> compile(double real, java.lang.String units)
real
- units
- A String representing the Unit
of the given number.
This can be the identifier of a UnitDefinition
in the
model or a literal in Unit.Kind
. Can be null if no units
have been defined.<T> ASTNode2Value<?> compile(int integer, java.lang.String units)
integer
- units
- A String representing the Unit
of the given number.
This can be the identifier of a UnitDefinition
in the
model or a literal in Unit.Kind
. Can be null if no units
have been defined.<T> ASTNode2Value<?> compile(CallableSBase variable) throws SBMLException
variable
- SBMLException
<T> ASTNode2Value<?> compile(java.lang.String name)
Species
in the
system. In case of numerical computation, the ASTNodeCompiler
must create an ASTNode2Value
representing the current value of
this Species
.name
- <T> ASTNode2Value<?> cos(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> cosh(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> cot(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> coth(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> csc(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> csch(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> delay(java.lang.String delayName, ASTNode2 x, ASTNode2 delay) throws SBMLException
delayName
- the name of this delay function.x
- delay
- an expression of a positive duration time (the amoutn of
delay)SBMLException
<T> ASTNode2Value<?> eq(ASTNode2 left, ASTNode2 right) throws SBMLException
left
- right
- SBMLException
<T> ASTNode2Value<?> exp(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> factorial(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> floor(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> frac(ASTNode2 numerator, ASTNode2 denominator) throws SBMLException
ASTNode2
snumerator
- denominator
- SBMLException
<T> ASTNode2Value<?> frac(int numerator, int denominator) throws SBMLException
numerator
- denominator
- SBMLException
<T> ASTNode2Value<?> function(FunctionDefinition functionDefinition, java.util.List<ASTNode2> args) throws SBMLException
functionDefinition
- args
- Values to be inserted into the parameter list of the
function.SBMLException
<T> ASTNode2Value<?> function(T functionDefinitionName, java.util.List<ASTNode2> args) throws SBMLException
functionDefinitionName
- args
- Values to be inserted into the parameter list of the
function.SBMLException
<T> ASTNode2Value<?> geq(ASTNode2 left, ASTNode2 right) throws SBMLException
left
- right
- SBMLException
<T> ASTNode2Value<?> getConstantAvogadro(java.lang.String name)
ASTNode2Value
that represent's Avogadro's number.
Optionally, the compiler may associate the given name with this number.name
- An optional name for Avogadro's number.<T> ASTNode2Value<?> getConstantE()
<T> ASTNode2Value<?> getConstantFalse()
<T> ASTNode2Value<?> getConstantPi()
<T> ASTNode2Value<?> getConstantTrue()
<T> ASTNode2Value<?> getNegativeInfinity() throws SBMLException
SBMLException
<T> ASTNode2Value<?> getPositiveInfinity()
<T> ASTNode2Value<?> gt(ASTNode2 left, ASTNode2 right) throws SBMLException
left
- right
- SBMLException
<T> ASTNode2Value<?> lambda(java.util.List<ASTNode2> values) throws SBMLException
FunctionDefinition
.values
- Place holders for arguments.SBMLException
<T> ASTNode2Value<?> leq(ASTNode2 left, ASTNode2 right) throws SBMLException
left
- right
- SBMLException
<T> ASTNode2Value<?> ln(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> log(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> log(ASTNode2 base, ASTNode2 value) throws SBMLException
base
- value
- SBMLException
<T> ASTNode2Value<?> lt(ASTNode2 left, ASTNode2 right) throws SBMLException
left
- right
- SBMLException
<T> ASTNode2Value<?> minus(java.util.List<ASTNode2> values) throws SBMLException
values
- SBMLException
<T> ASTNode2Value<?> neq(ASTNode2 left, ASTNode2 right) throws SBMLException
left
- right
- SBMLException
<T> ASTNode2Value<?> not(ASTNode2 value) throws SBMLException
value
- This value must be interpretable as a Boolean
.SBMLException
<T> ASTNode2Value<?> or(java.util.List<ASTNode2> values) throws SBMLException
values
- These values must be interpretable as a Boolean
.SBMLException
<T> ASTNode2Value<?> piecewise(java.util.List<ASTNode2> values) throws SBMLException
values
- SBMLException
<T> ASTNode2Value<?> plus(java.util.List<ASTNode2> values) throws SBMLException
values
- SBMLException
<T> ASTNode2Value<?> pow(ASTNode2 base, ASTNode2 exponent) throws SBMLException
base
- exponent
- SBMLException
<T> ASTNode2Value<?> root(ASTNode2 rootExponent, ASTNode2 radiant) throws SBMLException
rootExponent
- radiant
- SBMLException
<T> ASTNode2Value<?> root(double rootExponent, ASTNode2 radiant) throws SBMLException
rootExponent
- radiant
- SBMLException
<T> ASTNode2Value<?> sec(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> sech(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> selector(java.util.List<ASTNode2> nodes) throws SBMLException
nodes
- SBMLException
<T> ASTNode2Value<?> sin(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> sinh(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> sqrt(ASTNode2 radiant) throws SBMLException
radiant
- This value must be interpretable as a Number
.SBMLException
<T> ASTNode2Value<?> symbolTime(java.lang.String time)
time
- The name of the time symbol.ASTNode2Value
that represents the current time.<T> ASTNode2Value<?> tan(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> tanh(ASTNode2 value) throws SBMLException
value
- SBMLException
<T> ASTNode2Value<?> times(java.util.List<ASTNode2> values) throws SBMLException
ASTNode2
s.values
- These values must be interpretable to Number
.SBMLException
<T> ASTNode2Value<?> uMinus(ASTNode2 value) throws SBMLException
ASTNode2
.value
- SBMLException
<T> ASTNode2Value<?> unknownValue() throws SBMLException
ASTNode2
.SBMLException
<T> ASTNode2Value<?> vector(java.util.List<ASTNode2> nodes) throws SBMLException
nodes
- SBMLException
<T> ASTNode2Value<?> xor(java.util.List<ASTNode2> values) throws SBMLException
values
- It must be possible to evaluate the given values to
Boolean
.SBMLException
<T> ASTNode2Value<?> function(java.lang.String functionDefinitionName, java.util.List<ASTNode2> args) throws SBMLException
functionDefinitionName
- args
- SBMLException