COPASI API
4.16.103
|
#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!
Definition at line 44 of file CFunctionAnalyzer.h.
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 |
Definition at line 204 of file CFunctionAnalyzer.h.
|
inline |
Definition at line 193 of file CFunctionAnalyzer.h.
References checkKineticFunction().
void CFunctionAnalyzer::checkKineticFunction | ( | const CFunction * | f, |
const CReaction * | reaction = NULL |
||
) |
Definition at line 1220 of file CFunctionAnalyzer.cpp.
References CFunctionAnalyzer::Result::clear(), constructCallParameters(), constructCallParametersActualValues(), evaluateNode(), CFunctionParameters::getNumberOfParametersByUsage(), CCopasiObject::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
Definition at line 994 of file CFunctionAnalyzer.cpp.
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.
Definition at line 1023 of file CFunctionAnalyzer.cpp.
References CModelEntity::FIXED, CKeyFactory::get(), CReaction::getFunctionParameters(), CModelEntity::getInitialValue(), CCopasiRootContainer::getKeyFactory(), CReaction::getParameterMappings(), CModelEntity::getStatus(), CCopasiParameter::getValue(), CFunctionParameter::MODIFIER, CFunctionParameter::PARAMETER, CCopasiParameter::Value::pDOUBLE, 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.
Definition at line 1072 of file CFunctionAnalyzer.cpp.
References CEvaluationNode::CALL, CEvaluationNode::CHOICE, CNodeContextIterator< Node, Context >::context(), CEvaluationNodeOperator::DIVIDE, CNodeContextIterator< Node, Context >::end(), CEvaluationNode::FUNCTION, CEvaluationNodeCall::getCalledTree(), CEvaluationNodeVariable::getIndex(), CEvaluationNodeCall::getListOfChildNodes(), CEvaluationTree::getRoot(), CEvaluationNode::getType(), CEvaluationNode::getValue(), CFunction::getVariables(), CFunctionAnalyzer::CValue::invalid, CEvaluationNodeOperator::MINUS, CEvaluationNodeFunction::MINUS, CEvaluationNodeOperator::MULTIPLY, CNodeContextIterator< Node, Context >::next(), NOOBJECT, CEvaluationNode::NUMBER, CEvaluationNode::OBJECT, CEvaluationNode::OPERATOR, CNodeContextIterator< Node, Context >::parentContextPtr(), CEvaluationNodeOperator::PLUS, CFunctionAnalyzer::CValue::positive, POSITIVE, CEvaluationNodeOperator::POWER, CFunctionParameters::size(), CEvaluationNode::subType(), CEvaluationNode::type(), CFunctionAnalyzer::CValue::unknown, and CEvaluationNode::VARIABLE.
Referenced by checkKineticFunction(), and CEvaluationNode::findTopMinus().
|
inline |
Definition at line 196 of file CFunctionAnalyzer.h.
References mResult.
Referenced by checkKineticFunction().
|
static |
Definition at line 1364 of file CFunctionAnalyzer.cpp.
Referenced by CFunctionAnalyzer::Result::FunctionInformation::writeAnalysis(), CModelAnalyzer::ReactionResult::writeResult(), and CFunctionAnalyzer::Result::writeResult().
|
protected |
Definition at line 220 of file CFunctionAnalyzer.h.
Referenced by checkKineticFunction(), and getResult().