SBMLConverter
public class ExpandFunctionDefinitionConverter extends java.lang.Object implements SBMLConverter
FunctionDefinition
in an SBML document.
When invoked, it performs the following operations:
FunctionDefinition
in mathematical expressions
throughout the model.For example, suppose the model contains a function definition
representing the function f(x, y) = x * y
. Further,
suppose this function invoked somewhere else in the model, in
a mathematical formula, as f(s, p)
, the converter will replace
it with the expression s * p
.
Constructor | Description |
---|---|
ExpandFunctionDefinitionConverter() |
Modifier and Type | Method | Description |
---|---|---|
SBMLDocument |
convert(SBMLDocument doc) |
Converts a given
SBMLDocument . |
static void |
expandFunctionDefinition(MathContainer mathcontainer) |
Expands the
FunctionDefinition used in the given MathContainer . |
static ASTNode |
expandFunctionDefinition(Model m,
ASTNode math) |
Expands the
FunctionDefinition used in the given ASTNode . |
static void |
main(java.lang.String[] args) |
|
void |
setOption(java.lang.String name,
java.lang.String value) |
Sets options
|
public SBMLDocument convert(SBMLDocument doc) throws SBMLException
SBMLConverter
SBMLDocument
.convert
in interface SBMLConverter
doc
- the document that need to be converted, it should not be modifiedSBMLDocument
SBMLException
- if a problem occurred during conversionpublic static void expandFunctionDefinition(MathContainer mathcontainer)
FunctionDefinition
used in the given MathContainer
.
The given MathContainer
can be modified so make sure that you
clone it beforehand if you don't want that to happen.
mathcontainer
- the math container to expandspublic static ASTNode expandFunctionDefinition(Model m, ASTNode math)
FunctionDefinition
used in the given ASTNode
.
The given ASTNode
can be modified so make sure that you
clone it beforehand if you don't want that to happen. Make sure to use the returned
ASTNode as it can be different from the given one if the top level ASTNode is of type
ASTNode.Type.FUNCTION
.
math
- the ASTNode to expands.public static void main(java.lang.String[] args) throws javax.xml.stream.XMLStreamException, java.io.IOException
args
- javax.xml.stream.XMLStreamException
java.io.IOException
public void setOption(java.lang.String name, java.lang.String value)
SBMLConverter
setOption
in interface SBMLConverter