COPASI API
4.16.103
|
#include <CDimension.h>
Public Member Functions | |
CFindDimensions (const CFunction *function, bool d1, bool d2, bool d3, bool d4, bool d5) | |
void | findDimensions (CDimension rootDim) |
void | findDimensions (bool isMulticompartment) |
std::vector< std::string > | findDimensionsBoth (const CModel *pModel) |
const std::vector< CDimension > & | getDimensions () const |
void | setChemicalEquation (const CChemEq *eq) |
void | setMolecularitiesForMassAction (const size_t &m1, const size_t &m2) |
void | setupDimensions () |
void | setUseHeuristics (bool flag) |
Private Member Functions | |
CFindDimensions () | |
void | findDimension (size_t index) |
find dim for one parameter More... | |
CDimension | findDimension (const CEvaluationNode *node, const CEvaluationNode *requestingNode=NULL) |
void | findDimensions () |
find dim for all parameters More... | |
void | findDimensionsMassAction () |
Private Attributes | |
bool | mD1 |
bool | mD2 |
bool | mD3 |
bool | mD4 |
bool | mD5 |
std::vector< CDimension > | mDimensions |
C_FLOAT64 | mM1 |
C_FLOAT64 | mM2 |
const CFunction * | mpFunction |
CDimension | mRootDimension |
bool | mUseHeuristics |
CFindDimensions class. The class tries to find the dimensions of the "PARAMETER" variable nodes in a function tree.
The function is specified in the constructor. After that the dimension of the root node has to be specified. This can be done with either of the two public findDimensions() methods. The result can be retrieved using the getDimensions() method.
Definition at line 107 of file CDimension.h.
|
private |
CFindDimensions::CFindDimensions | ( | const CFunction * | function, |
bool | d1, | ||
bool | d2, | ||
bool | d3, | ||
bool | d4, | ||
bool | d5 | ||
) |
construct the class for a given function. d1,d2,d3, d4, d5 indicate if the base unit (for quantity, volume, time, area, length) is dimensionless
Definition at line 285 of file CDimension.cpp.
References setupDimensions().
|
private |
find dim for one parameter
Definition at line 453 of file CDimension.cpp.
References CDimension::compare(), CEvaluationTree::getNodeList(), mDimensions, mpFunction, and CEvaluationNode::VARIABLE.
Referenced by findDimension(), and findDimensions().
|
private |
Definition at line 486 of file CDimension.cpp.
References CDimension::compare(), CEvaluationNodeOperator::DIVIDE, fatalError, findDimension(), CEvaluationNodeVariable::getIndex(), CEvaluationNodeOperator::getLeft(), CCopasiNode< _Data >::getParent(), CEvaluationNodeOperator::getRight(), CEvaluationNode::getType(), CEvaluationNode::getValue(), mDimensions, CEvaluationNodeOperator::MINUS, mRootDimension, CEvaluationNodeOperator::MULTIPLY, mUseHeuristics, CEvaluationNodeOperator::PLUS, CDimension::setDimension(), and CDimension::setUnknown().
void CFindDimensions::findDimensions | ( | CDimension | rootDim | ) |
find the dimensions from explicitly given root node dimension
Definition at line 340 of file CDimension.cpp.
References findDimensions(), and mRootDimension.
void CFindDimensions::findDimensions | ( | bool | isMulticompartment | ) |
find the dimensions for a function that is used in a reaction the dimension of the root node depends on the number of compartments that are involved in the reaction
Definition at line 346 of file CDimension.cpp.
References findDimensions(), CDimension::fixDimensionless(), mD1, mD2, mD3, mD4, mD5, mRootDimension, and CDimension::setDimension().
|
private |
find dim for all parameters
Definition at line 383 of file CDimension.cpp.
References findDimension(), findDimensionsMassAction(), CFunction::getVariables(), mDimensions, mpFunction, and CFunctionParameters::size().
Referenced by findDimensions(), and findDimensionsBoth().
std::vector< std::string > CFindDimensions::findDimensionsBoth | ( | const CModel * | pModel | ) |
find the dimensions for both a one-compartment and a multi-compartment reaction
Definition at line 358 of file CDimension.cpp.
References findDimensions(), mDimensions, and setupDimensions().
|
private |
determine dimensions for mass action kinetics chemical equation needs to be known
Definition at line 430 of file CDimension.cpp.
References CDimension::fixDimensionless(), mD1, mD2, mD3, mD4, mD5, mDimensions, mM1, mM2, mRootDimension, and CDimension::setDimension().
Referenced by findDimensions().
const std::vector< CDimension > & CFindDimensions::getDimensions | ( | ) | const |
tell about chemical equation. This is needed only for mass action kinetics. It is ignored otherwise.
Definition at line 410 of file CDimension.cpp.
References C_FLOAT64, CChemEq::getMolecularity(), mM1, mM2, CChemEq::PRODUCT, and CChemEq::SUBSTRATE.
void CFindDimensions::setMolecularitiesForMassAction | ( | const size_t & | m1, |
const size_t & | m2 | ||
) |
void CFindDimensions::setupDimensions | ( | ) |
initialize the known dimensions (from the parameter roles) and set the others to "unknown". This is called by the constructor.
Definition at line 295 of file CDimension.cpp.
References CFunction::getVariables(), mD1, mD2, mD3, mD4, mD5, mDimensions, CFunctionParameter::MODIFIER, mpFunction, CFunctionParameter::PRODUCT, CFunctionParameters::size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, and CFunctionParameter::VOLUME.
Referenced by CFindDimensions(), and findDimensionsBoth().
void CFindDimensions::setUseHeuristics | ( | bool | flag | ) |
Definition at line 330 of file CDimension.cpp.
References mUseHeuristics.
Referenced by CModelParameter::getUnit(), FunctionWidget1::loadParameterTable(), CModel::printParameterOverview(), and ParameterTable::updateTable().
|
private |
Definition at line 171 of file CDimension.h.
Referenced by findDimensions(), findDimensionsMassAction(), and setupDimensions().
|
private |
Definition at line 172 of file CDimension.h.
Referenced by findDimensions(), findDimensionsMassAction(), and setupDimensions().
|
private |
Definition at line 173 of file CDimension.h.
Referenced by findDimensions(), findDimensionsMassAction(), and setupDimensions().
|
private |
Definition at line 174 of file CDimension.h.
Referenced by findDimensions(), findDimensionsMassAction(), and setupDimensions().
|
private |
Definition at line 175 of file CDimension.h.
Referenced by findDimensions(), findDimensionsMassAction(), and setupDimensions().
|
private |
Definition at line 164 of file CDimension.h.
Referenced by findDimension(), findDimensions(), findDimensionsBoth(), findDimensionsMassAction(), getDimensions(), and setupDimensions().
|
private |
Definition at line 168 of file CDimension.h.
Referenced by findDimensionsMassAction(), setChemicalEquation(), and setMolecularitiesForMassAction().
|
private |
Definition at line 169 of file CDimension.h.
Referenced by findDimensionsMassAction(), setChemicalEquation(), and setMolecularitiesForMassAction().
|
private |
Definition at line 163 of file CDimension.h.
Referenced by findDimension(), findDimensions(), and setupDimensions().
|
private |
Definition at line 165 of file CDimension.h.
Referenced by findDimension(), findDimensions(), and findDimensionsMassAction().
|
private |
Definition at line 166 of file CDimension.h.
Referenced by findDimension(), and setUseHeuristics().