COPASI API
4.40.278
|
#include <CFunctionAnalyzer.h>
Classes | |
class | CValue |
class | Result |
Public Types | |
enum | Mode { NOOBJECT , GENERAL , POSITIVE , ACTUAL } |
Public Member Functions | |
CFunctionAnalyzer (const CFunction *f, const CReaction *reaction=NULL) | |
void | checkKineticFunction (const CFunction *f, const CReaction *reaction=NULL) |
const Result & | getResult () const |
Static Public Member Functions | |
static void | constructCallParameters (const CFunctionParameters &fp, std::vector< CValue > &callParameters, bool posi) |
static CValue | evaluateNode (const CEvaluationNode *node, const std::vector< CValue > &callParameters, Mode mode) |
static std::string | write (int level, bool rt, const std::string &text, const std::string &longText) |
Static Protected Member Functions | |
static void | constructCallParametersActualValues (std::vector< CValue > &callParameters, const CReaction *reaction) |
Protected Attributes | |
Result | mResult |
This class performs an analysis of a kinetic function. The function to analyze is passed to the constructor. The result can be retrieved with the getResult() method. The Result class has methods for reporting. The reporting methods may assume that the function (and possibly the reaction) still exists, so don't delete the function between the analysis and the reporting of the results!
Mode tells how to interpret an object in CValue arithmetics. NOOBJECT means objects are invalid (e.g. for functions, where no object nodes should occur). GENERAL means concentrations and volumes are positive, all other values positive, zero, or negative. POSITIVE means all objects are positive. ACTUAL means the actual value is used for local parameters and constant values.
Enumerator | |
---|---|
NOOBJECT | |
GENERAL | |
POSITIVE | |
ACTUAL |
References checkKineticFunction().
void CFunctionAnalyzer::checkKineticFunction | ( | const CFunction * | f, |
const CReaction * | reaction = NULL |
||
) |
References CFunctionAnalyzer::Result::clear(), constructCallParameters(), constructCallParametersActualValues(), evaluateNode(), CFunctionParameters::getNumberOfParametersByUsage(), CDataObject::getObjectName(), getResult(), CEvaluationTree::getRoot(), CFunction::getVariables(), CFunction::isReversible(), CFunctionAnalyzer::Result::mBPart, CFunctionAnalyzer::Result::mFPart, CFunctionAnalyzer::Result::mIrreversibleKineticsWithProducts, CFunctionAnalyzer::Result::mOriginalFunction, CFunctionAnalyzer::Result::mpFunction, CFunctionAnalyzer::Result::FunctionInformation::mProductZero, mResult, CFunctionAnalyzer::Result::mReversibleNonSplitable, CFunctionAnalyzer::Result::FunctionInformation::mSubstrateZero, CFunctionAnalyzer::Result::FunctionInformation::mUnchangedParameters, NOOBJECT, pdelete, CFunctionParameter::PRODUCT, CFunctionParameters::size(), CFunction::splitFunction(), CFunctionParameter::SUBSTRATE, TriFalse, TriTrue, and CFunctionAnalyzer::CValue::zero.
Referenced by CFunctionAnalyzer().
|
static |
constructs call parameters for use with the evaluateNode() method
References CFunctionParameter::MODIFIER, CFunctionParameter::PARAMETER, CFunctionAnalyzer::CValue::positive, CFunctionParameter::PRODUCT, CFunctionParameters::size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TEMPORARY, CFunctionParameter::TIME, CFunctionAnalyzer::CValue::unknown, CFunctionParameter::VARIABLE, and CFunctionParameter::VOLUME.
Referenced by checkKineticFunction(), and CFunction::splitFunction().
|
staticprotected |
constructs call parameters for use with the evaluateNode() method, using the actual values for local parameters and fixed entities.
References C_FLOAT64, CModelEntity::FIXED, CReaction::getFunctionParameters(), CModelEntity::getInitialValue(), CReaction::getParameterObjects(), CModelEntity::getStatus(), CCopasiParameter::getValue(), CFunctionParameter::MODIFIER, CFunctionParameter::PARAMETER, CFunctionAnalyzer::CValue::positive, CFunctionParameter::PRODUCT, CFunctionParameters::size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TEMPORARY, CFunctionParameter::TIME, CFunctionAnalyzer::CValue::unknown, CFunctionParameter::VARIABLE, and CFunctionParameter::VOLUME.
Referenced by checkKineticFunction().
|
static |
Do the CValue arithmetics of a tree. The callParameters contain the CValues corresponding to the CEvaluationNodeVariable nodes. The value of mode should not have an effect if this is called for a function tree.
References CEvaluationNode::CALL, CEvaluationNode::CHOICE, CNodeContextIterator< Node, Context >::context(), CEvaluationNode::DIVIDE, CNodeContextIterator< Node, Context >::end(), CEvaluationNode::FUNCTION, CEvaluationNodeCall::getCalledTree(), CEvaluationNodeVariable::getIndex(), CEvaluationNodeCall::getListOfChildNodes(), CEvaluationTree::getRoot(), CFunction::getVariables(), CFunctionAnalyzer::CValue::invalid, CEvaluationNode::MINUS, CEvaluationNode::MULTIPLY, CNodeContextIterator< Node, Context >::next(), NOOBJECT, CEvaluationNode::NUMBER, CEvaluationNode::OBJECT, CEvaluationNode::OPERATOR, CNodeContextIterator< Node, Context >::parentContextPtr(), CEvaluationNode::PLUS, CFunctionAnalyzer::CValue::positive, POSITIVE, CEvaluationNode::POWER, CFunctionParameters::size(), CFunctionAnalyzer::CValue::unknown, and CEvaluationNode::VARIABLE.
Referenced by checkKineticFunction(), and CEvaluationNode::findTopMinus().
const CFunctionAnalyzer::Result & CFunctionAnalyzer::getResult | ( | ) | const |
References mResult.
Referenced by checkKineticFunction(), and CModelAnalyzer::checkReaction().
|
static |
|
protected |
Referenced by checkKineticFunction(), and getResult().