|
libSBML C++ API
5.20.5
|
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.
ADD DESCRIPTION
ExpressionAnalyser is enabled by creating a ConversionProperties object with the option "inferReactions", and passing this properties object to SBMLDocument::convert( ). This converter offers no other options.
Implementation is based on the algorithm described in Fages et al, Theoretical Computer Science, 2015.
The use of all the converters follows a similar approach. First, one creates a ConversionProperties object and calls ConversionProperties::addOption( ) on this object with one argument: a text string that identifies the desired converter. (The text string is specific to each converter; consult the documentation for a given converter to find out how it should be enabled.)
Next, for some converters, the caller can optionally set some converter-specific properties using additional calls to ConversionProperties::addOption( ). Many converters provide the ability to configure their behavior to some extent; this is realized through the use of properties that offer different options. The default property values for each converter can be interrogated using the method SBMLConverter::getDefaultProperties() on the converter class in question .
Finally, the caller should invoke the method SBMLDocument::convert( ) with the ConversionProperties object as an argument.
The following code fragment illustrates an example using SBMLReactionConverter, which is invoked using the option string "replaceReactions":
In the case of SBMLReactionConverter, there are no options to affect its behavior, so the next step is simply to invoke the converter on an SBMLDocument object. Continuing the example code:
Here is an example of using a converter that offers an option. The following code invokes SBMLStripPackageConverter to remove the SBML Level 3 Layout package from a model. It sets the name of the package to be removed by adding a value for the option named "package" defined by that converter:
LibSBML provides a number of built-in converters; by convention, their names end in Converter. The following are the built-in converters provided by libSBML
Public Member Functions | |
| void | analyse () |
| Function to work through all the ODE expressions and invoke analyseNode where appropriate. | |
| bool | analyseNode (ASTNode *node, SubstitutionValues_t *value) |
| Function to work through all the mathematical expressions and create substitution values. | |
| virtual ExpressionAnalyser * | clone () const |
| Creates and returns a deep copy of this ExpressionAnalyser object. | |
| SubstitutionValues_t * | createBlankSubstitutionValues () |
| Function to create a blank substitution value. | |
| void | detectHiddenSpecies (bool testing=false) |
| Function to work through all the expressions and detect hidden species. | |
| ExpressionAnalyser () | |
| Creates a new ExpressionAnalyser object. | |
| ExpressionAnalyser (const ExpressionAnalyser &obj) | |
| Copy constructor; creates a copy of an ExpressionAnalyser object. | |
| ExpressionAnalyser (Model *m, pairODEs ode) | |
| Creates a new ExpressionAnalyser object with Model and ODEs. | |
| SubstitutionValues_t * | getExpression (unsigned int index) |
| Returns the expression at the given index Only used in testing. | |
| List * | getHiddenSpecies () |
| Returns the list of hidden species. | |
| Parameter * | getHiddenSpecies (unsigned int index) |
| unsigned int | getNumExpressions () |
| Returns the number of expressions Only used in testing. | |
| unsigned int | getNumHiddenNodes () |
| unsigned int | getNumHiddenSpecies () |
| Returns the number of hidden species. | |
| void | identifyHiddenSpeciesWithinExpressions () |
| Function to identify hidden species within expressions and substitute with the correct mathematical expression ie if we find k+v-x-y and k-x-y then replace k-x-y with newVar and replace k+v-x-y with newVar+v. | |
| ExpressionAnalyser & | operator= (const ExpressionAnalyser &rhs) |
| Assignment operator for SBMLInferUnitsConverter. | |
| void | orderExpressions () |
| Function to order the expressions by type. | |
| bool | replaceExpressionInNodeWithNode (ASTNode *node, ASTNode *replaced, ASTNode *replacement) |
| virtual | ~ExpressionAnalyser () |
| Destroy this ExpressionAnalyser object. | |
| ExpressionAnalyser::ExpressionAnalyser | ( | ) |
Creates a new ExpressionAnalyser object.
Creates a new ExpressionAnalyser object with Model and ODEs.
| ExpressionAnalyser::ExpressionAnalyser | ( | const ExpressionAnalyser & | obj | ) |
Copy constructor; creates a copy of an ExpressionAnalyser object.
| obj | the ExpressionAnalyser object to copy. |
|
virtual |
Destroy this ExpressionAnalyser object.
| void ExpressionAnalyser::analyse | ( | ) |
Function to work through all the ODE expressions and invoke analyseNode where appropriate.
| bool ExpressionAnalyser::analyseNode | ( | ASTNode * | node, |
| SubstitutionValues_t * | value | ||
| ) |
Function to work through all the mathematical expressions and create substitution values.
|
virtual |
Creates and returns a deep copy of this ExpressionAnalyser object.
| SubstitutionValues_t * ExpressionAnalyser::createBlankSubstitutionValues | ( | ) |
Function to create a blank substitution value.
| void ExpressionAnalyser::detectHiddenSpecies | ( | bool | testing = false | ) |
Function to work through all the expressions and detect hidden species.
| SubstitutionValues_t * ExpressionAnalyser::getExpression | ( | unsigned int | index | ) |
Returns the expression at the given index Only used in testing.
| List * ExpressionAnalyser::getHiddenSpecies | ( | ) |
Returns the list of hidden species.
| Parameter * ExpressionAnalyser::getHiddenSpecies | ( | unsigned int | index | ) |
| unsigned int ExpressionAnalyser::getNumExpressions | ( | ) |
Returns the number of expressions Only used in testing.
| unsigned int ExpressionAnalyser::getNumHiddenNodes | ( | ) |
| unsigned int ExpressionAnalyser::getNumHiddenSpecies | ( | ) |
Returns the number of hidden species.
| void ExpressionAnalyser::identifyHiddenSpeciesWithinExpressions | ( | ) |
Function to identify hidden species within expressions and substitute with the correct mathematical expression ie if we find k+v-x-y and k-x-y then replace k-x-y with newVar and replace k+v-x-y with newVar+v.
| ExpressionAnalyser & ExpressionAnalyser::operator= | ( | const ExpressionAnalyser & | rhs | ) |
Assignment operator for SBMLInferUnitsConverter.
| rhs | the object whose values are used as the basis of the assignment. |
| void ExpressionAnalyser::orderExpressions | ( | ) |
Function to order the expressions by type.