ASTNodeCompilerValidationUnitsCompilerpublic class UnitsCompiler extends java.lang.Object implements ASTNodeCompiler
| Constructor | Description |
|---|---|
UnitsCompiler() |
|
UnitsCompiler(int level,
int version) |
|
UnitsCompiler(Model model) |
|
UnitsCompiler(Model model,
boolean allowInvalidModel) |
|
UnitsCompiler(Model model,
ValidationContext ctx) |
| Modifier and Type | Method | Description |
|---|---|---|
ASTNodeValue |
abs(ASTNode value) |
The absolute value represented by the given
ASTNode. |
ASTNodeValue |
and(java.util.List<ASTNode> values) |
|
ASTNodeValue |
arccos(ASTNode value) |
|
ASTNodeValue |
arccosh(ASTNode value) |
|
ASTNodeValue |
arccot(ASTNode value) |
|
ASTNodeValue |
arccoth(ASTNode value) |
|
ASTNodeValue |
arccsc(ASTNode value) |
|
ASTNodeValue |
arccsch(ASTNode value) |
|
ASTNodeValue |
arcsec(ASTNode value) |
|
ASTNodeValue |
arcsech(ASTNode value) |
|
ASTNodeValue |
arcsin(ASTNode value) |
|
ASTNodeValue |
arcsinh(ASTNode value) |
|
ASTNodeValue |
arctan(ASTNode value) |
|
ASTNodeValue |
arctanh(ASTNode value) |
|
ASTNodeValue |
ceiling(ASTNode value) |
|
ASTNodeValue |
compile(boolean b) |
Compile boolean values
|
ASTNodeValue |
compile(double mantissa,
int exponent,
java.lang.String units) |
Creates an
ASTNodeValue that represents a real number in
scientific notation, i.e., mantissa * 10^exponent, and the given units. |
ASTNodeValue |
compile(double real,
java.lang.String units) |
|
ASTNodeValue |
compile(int integer,
java.lang.String units) |
|
ASTNodeValue |
compile(java.lang.String name) |
A compiler will also have to deal with a name.
|
ASTNodeValue |
compile(CallableSBase variable) |
|
ASTNodeValue |
compile(Compartment c) |
|
ASTNodeValue |
cos(ASTNode value) |
|
ASTNodeValue |
cosh(ASTNode value) |
|
ASTNodeValue |
cot(ASTNode value) |
|
ASTNodeValue |
coth(ASTNode value) |
|
ASTNodeValue |
csc(ASTNode value) |
|
ASTNodeValue |
csch(ASTNode value) |
|
ASTNodeValue |
delay(java.lang.String delayName,
ASTNode x,
ASTNode delay,
java.lang.String units) |
Evaluates delay functions.
|
ASTNodeValue |
eq(ASTNode left,
ASTNode right) |
Equal.
|
ASTNodeValue |
exp(ASTNode value) |
|
ASTNodeValue |
factorial(ASTNode value) |
|
ASTNodeValue |
floor(ASTNode value) |
|
ASTNodeValue |
frac(int numerator,
int denominator) |
A fraction of two int values.
|
ASTNodeValue |
frac(ASTNode numerator,
ASTNode denominator) |
Fraction of two
ASTNodes |
ASTNodeValue |
function(java.lang.String functionDefinitionName,
java.util.List<ASTNode> args) |
|
ASTNodeValue |
function(FunctionDefinition function,
java.util.List<ASTNode> args) |
|
ASTNodeValue |
functionCsymbol(ASTNode csymbol) |
Process an ASTNode that contain an extended csymbol function.
|
ASTNodeValue |
geq(ASTNode left,
ASTNode right) |
Greater equal.
|
ASTNodeValue |
getConstantAvogadro(java.lang.String name) |
Creates an
ASTNodeValue that represent's Avogadro's number. |
ASTNodeValue |
getConstantE() |
|
ASTNodeValue |
getConstantFalse() |
|
ASTNodeValue |
getConstantPi() |
|
ASTNodeValue |
getConstantTrue() |
|
ASTNodeValue |
getNegativeInfinity() |
|
ASTNodeValue |
getPositiveInfinity() |
|
ASTNodeValue |
getRateOf(ASTNode nameAST) |
Returns the instantaneous rate of change, with respect to time, of an entity in the model.
|
ASTNodeValue |
gt(ASTNode left,
ASTNode right) |
Greater than.
|
ASTNodeValue |
implies(java.util.List<ASTNode> values) |
Returns the logical implies between two
ASTNode. |
ASTNodeValue |
lambda(java.util.List<ASTNode> values) |
The body of a
FunctionDefinition. |
ASTNodeValue |
leq(ASTNode left,
ASTNode right) |
Less equal.
|
ASTNodeValue |
ln(ASTNode value) |
Natural logarithm.
|
ASTNodeValue |
log(ASTNode value) |
Logarithm of the given value to base 10.
|
ASTNodeValue |
log(ASTNode number,
ASTNode base) |
Logarithm of the given value to the given base.
|
ASTNodeValue |
lt(ASTNode left,
ASTNode right) |
Less than.
|
ASTNodeValue |
max(java.util.List<ASTNode> values) |
Returns the maximum of the values.
|
ASTNodeValue |
min(java.util.List<ASTNode> values) |
Returns the minimum of the values.
|
ASTNodeValue |
minus(java.util.List<ASTNode> values) |
Subtraction.
|
ASTNodeValue |
neq(ASTNode left,
ASTNode right) |
Not equal.
|
ASTNodeValue |
not(ASTNode value) |
|
ASTNodeValue |
or(java.util.List<ASTNode> values) |
|
ASTNodeValue |
piecewise(java.util.List<ASTNode> values) |
|
ASTNodeValue |
plus(java.util.List<ASTNode> values) |
|
ASTNodeValue |
pow(ASTNode base,
ASTNode exponent) |
|
ASTNodeValue |
quotient(java.util.List<ASTNode> values) |
Returns the quotient of the division of the values.
|
ASTNodeValue |
rem(java.util.List<ASTNode> values) |
Returns the remainder of the division of the values.
|
ASTNodeValue |
root(double rootExponent,
ASTNode radiant) |
|
ASTNodeValue |
root(ASTNode rootExponent,
ASTNode radiant) |
|
ASTNodeValue |
sec(ASTNode value) |
|
ASTNodeValue |
sech(ASTNode value) |
|
ASTNodeValue |
selector(java.util.List<ASTNode> nodes) |
|
ASTNodeValue |
sin(ASTNode value) |
|
ASTNodeValue |
sinh(ASTNode value) |
|
ASTNodeValue |
sqrt(ASTNode value) |
Square root.
|
ASTNodeValue |
symbolTime(java.lang.String time) |
The simulation time.
|
ASTNodeValue |
tan(ASTNode value) |
|
ASTNodeValue |
tanh(ASTNode value) |
|
ASTNodeValue |
times(java.util.List<ASTNode> values) |
Product of all given
ASTNodes. |
ASTNodeValue |
uMinus(ASTNode value) |
Unary minus, i.e., negation of the given
ASTNode. |
ASTNodeValue |
unknownValue() |
Dealing with a malformed
ASTNode. |
ASTNodeValue |
vector(java.util.List<ASTNode> nodes) |
Dealing with a vector.
|
ASTNodeValue |
xor(java.util.List<ASTNode> values) |
Exclusive or.
|
public UnitsCompiler()
public UnitsCompiler(int level,
int version)
level - version - public UnitsCompiler(Model model)
model - public UnitsCompiler(Model model, boolean allowInvalidModel)
model - public UnitsCompiler(Model model, ValidationContext ctx)
model - public ASTNodeValue abs(ASTNode value) throws SBMLException
ASTNodeCompilerASTNode.abs in interface ASTNodeCompilervalue - Must be interpretable as a Number.SBMLExceptionpublic ASTNodeValue and(java.util.List<ASTNode> values) throws SBMLException
and in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arccos(ASTNode value) throws SBMLException
arccos in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arccosh(ASTNode value) throws SBMLException
arccosh in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arccot(ASTNode value) throws SBMLException
arccot in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arccoth(ASTNode value) throws SBMLException
arccoth in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arccsc(ASTNode value) throws SBMLException
arccsc in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arccsch(ASTNode value) throws SBMLException
arccsch in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arcsec(ASTNode value) throws SBMLException
arcsec in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arcsech(ASTNode value) throws SBMLException
arcsech in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arcsin(ASTNode value) throws SBMLException
arcsin in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arcsinh(ASTNode value) throws SBMLException
arcsinh in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arctan(ASTNode value) throws SBMLException
arctan in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue arctanh(ASTNode value) throws SBMLException
arctanh in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue ceiling(ASTNode value) throws SBMLException
ceiling in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue compile(boolean b)
b - public ASTNodeValue compile(Compartment c)
compile in interface ASTNodeCompilerpublic ASTNodeValue compile(double mantissa, int exponent, java.lang.String units)
ASTNodeCompilerASTNodeValue that represents a real number in
scientific notation, i.e., mantissa * 10^exponent, and the given units.compile in interface ASTNodeCompilermantissa - 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.public ASTNodeValue compile(double real, java.lang.String units)
compile in interface ASTNodeCompilerunits - 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.public ASTNodeValue compile(int integer, java.lang.String units)
compile in interface ASTNodeCompilerunits - 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.public ASTNodeValue compile(CallableSBase variable)
compile in interface ASTNodeCompilerpublic ASTNodeValue compile(java.lang.String name)
ASTNodeCompilerSpecies in the
system. In case of numerical computation, the ASTNodeCompiler
must create an ASTNodeValue representing the current value of
this Species.compile in interface ASTNodeCompilerpublic ASTNodeValue cos(ASTNode value) throws SBMLException
cos in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue cosh(ASTNode value) throws SBMLException
cosh in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue cot(ASTNode value) throws SBMLException
cot in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue coth(ASTNode value) throws SBMLException
coth in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue csc(ASTNode value) throws SBMLException
csc in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue csch(ASTNode value) throws SBMLException
csch in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue delay(java.lang.String delayName, ASTNode x, ASTNode delay, java.lang.String units) throws SBMLException
ASTNodeCompilerdelay in interface ASTNodeCompilerdelayName - the name of this delay function.delay - an expression of a positive duration time (the amoutn of
delay)units - the units for the delay.SBMLExceptionpublic ASTNodeValue eq(ASTNode left, ASTNode right) throws SBMLException
ASTNodeCompilereq in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue exp(ASTNode value) throws SBMLException
exp in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue factorial(ASTNode value) throws SBMLException
factorial in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue floor(ASTNode value) throws SBMLException
floor in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue frac(ASTNode numerator, ASTNode denominator) throws SBMLException
ASTNodeCompilerASTNodesfrac in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue frac(int numerator, int denominator)
ASTNodeCompilerfrac in interface ASTNodeCompilerpublic ASTNodeValue function(FunctionDefinition function, java.util.List<ASTNode> args) throws SBMLException
function in interface ASTNodeCompilerargs - Values to be inserted into the parameter list of the
function.SBMLExceptionpublic ASTNodeValue function(java.lang.String functionDefinitionName, java.util.List<ASTNode> args) throws SBMLException
function in interface ASTNodeCompilerargs - Values to be inserted into the parameter list of the
function.SBMLExceptionpublic ASTNodeValue functionCsymbol(ASTNode csymbol) throws SBMLException
ASTNodeCompilerfunctionCsymbol in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue geq(ASTNode left, ASTNode right) throws SBMLException
ASTNodeCompilergeq in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue getConstantAvogadro(java.lang.String name)
ASTNodeCompilerASTNodeValue that represent's Avogadro's number.
Optionally, the compiler may associate the given name with this number.getConstantAvogadro in interface ASTNodeCompilername - An optional name for Avogadro's number.public ASTNodeValue getConstantE()
getConstantE in interface ASTNodeCompilerpublic ASTNodeValue getConstantFalse()
getConstantFalse in interface ASTNodeCompilerpublic ASTNodeValue getConstantPi()
getConstantPi in interface ASTNodeCompilerpublic ASTNodeValue getConstantTrue()
getConstantTrue in interface ASTNodeCompilerpublic ASTNodeValue getNegativeInfinity()
getNegativeInfinity in interface ASTNodeCompilerpublic ASTNodeValue getPositiveInfinity()
getPositiveInfinity in interface ASTNodeCompilerpublic ASTNodeValue gt(ASTNode left, ASTNode right) throws SBMLException
ASTNodeCompilergt in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue lambda(java.util.List<ASTNode> values) throws SBMLException
ASTNodeCompilerFunctionDefinition.lambda in interface ASTNodeCompilervalues - Place holders for arguments.SBMLExceptionpublic ASTNodeValue leq(ASTNode left, ASTNode right) throws SBMLException
ASTNodeCompilerleq in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue ln(ASTNode value) throws SBMLException
ASTNodeCompilerln in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue log(ASTNode value) throws SBMLException
ASTNodeCompilerlog in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue log(ASTNode number, ASTNode base) throws SBMLException
ASTNodeCompilerlog in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue lt(ASTNode left, ASTNode right) throws SBMLException
ASTNodeCompilerlt in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue minus(java.util.List<ASTNode> values) throws SBMLException
ASTNodeCompilerminus in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue neq(ASTNode left, ASTNode right) throws SBMLException
ASTNodeCompilerneq in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue not(ASTNode value) throws SBMLException
not in interface ASTNodeCompilervalue - This value must be interpretable as a Boolean.SBMLExceptionpublic ASTNodeValue or(java.util.List<ASTNode> values) throws SBMLException
or in interface ASTNodeCompilervalues - These values must be interpretable as a Boolean.SBMLExceptionpublic ASTNodeValue piecewise(java.util.List<ASTNode> values) throws SBMLException
piecewise in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue plus(java.util.List<ASTNode> values) throws SBMLException
plus in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue pow(ASTNode base, ASTNode exponent) throws SBMLException
pow in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue root(ASTNode rootExponent, ASTNode radiant) throws SBMLException
root in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue root(double rootExponent, ASTNode radiant) throws SBMLException
root in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue sec(ASTNode value) throws SBMLException
sec in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue sech(ASTNode value) throws SBMLException
sech in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue sin(ASTNode value) throws SBMLException
sin in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue sinh(ASTNode value) throws SBMLException
sinh in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue sqrt(ASTNode value) throws SBMLException
ASTNodeCompilersqrt in interface ASTNodeCompilervalue - This value must be interpretable as a Number.SBMLExceptionpublic ASTNodeValue symbolTime(java.lang.String time)
ASTNodeCompilersymbolTime in interface ASTNodeCompilertime - The name of the time symbol.ASTNodeValue that represents the current time.public ASTNodeValue tan(ASTNode value) throws SBMLException
tan in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue tanh(ASTNode value) throws SBMLException
tanh in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue times(java.util.List<ASTNode> values) throws SBMLException
ASTNodeCompilerASTNodes.times in interface ASTNodeCompilervalues - These values must be interpretable to Number.SBMLExceptionpublic ASTNodeValue uMinus(ASTNode value) throws SBMLException
ASTNodeCompilerASTNode.uMinus in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue unknownValue()
ASTNodeCompilerASTNode.unknownValue in interface ASTNodeCompilerpublic ASTNodeValue xor(java.util.List<ASTNode> values) throws SBMLException
ASTNodeCompilerxor in interface ASTNodeCompilervalues - It must be possible to evaluate the given values to
Boolean.SBMLExceptionpublic ASTNodeValue selector(java.util.List<ASTNode> nodes) throws SBMLException
selector in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue vector(java.util.List<ASTNode> nodes) throws SBMLException
ASTNodeCompilervector in interface ASTNodeCompilerSBMLExceptionpublic ASTNodeValue max(java.util.List<ASTNode> values)
ASTNodeCompilermax in interface ASTNodeCompilerpublic ASTNodeValue min(java.util.List<ASTNode> values)
ASTNodeCompilermin in interface ASTNodeCompilerpublic ASTNodeValue quotient(java.util.List<ASTNode> values)
ASTNodeCompilerquotient in interface ASTNodeCompilerpublic ASTNodeValue rem(java.util.List<ASTNode> values)
ASTNodeCompilerrem in interface ASTNodeCompilerpublic ASTNodeValue implies(java.util.List<ASTNode> values)
ASTNodeCompilerimplies in interface ASTNodeCompilerASTNode.public ASTNodeValue getRateOf(ASTNode nameAST)
ASTNodeCompilerIt is a function that takes a single argument, an identifier of
type SId . The allowable identifiers for use with rateOf in SBML Level 3 Version 2 Core are restricted
to those of Compartment, LocalParameter, Parameter, Species, and SpeciesReference objects in the
enclosing model; in addition, SBML Level 3 packages may define entities with mathematical meaning
whose rateOf 's can be referenced. Note that rateOf is not allowed for Reaction objects, because their
identifiers already represent the rate of change of the reaction, and calculating second derivatives is
beyond the scope of this construct. Likewise, there is no sensible meaning to be given to the rateOf of
a FunctionDefinition, Event, Priority, Delay, or other SBML entities.
getRateOf in interface ASTNodeCompilernameAST - an ASTNode representing an identifier