COPASI API
4.16.103
|
#include <CState.h>
Protected Member Functions | |
void | resize () |
Private Member Functions | |
CStateTemplate () | |
Private Attributes | |
CState & | mCurrentState |
std::map< CModelEntity *, size_t > | mIndexMap |
CState & | mInitialState |
size_t | mInsert |
CModel & | mModel |
CModelEntity ** | mpBeginDependent |
CModelEntity ** | mpBeginFixed |
CModelEntity ** | mpBeginIndependent |
C_FLOAT64 * | mpCurrentValues |
CModelEntity ** | mpEnd |
CModelEntity ** | mpEntities |
C_FLOAT64 * | mpInitialValues |
size_t | mSize |
CVector< size_t > | mUserOrder |
|
private |
Default Constructor (inaccessible)
CStateTemplate::~CStateTemplate | ( | ) |
void CStateTemplate::add | ( | CModelEntity * | entity | ) |
Add an entity to the template.
CModelEntity | * entity |
Definition at line 63 of file CState.cpp.
References mIndexMap, mInsert, mModel, mpCurrentValues, mpEntities, mpInitialValues, mSize, resize(), CModel::setCompileFlag(), CModelEntity::setInitialValuePtr(), and CModelEntity::setValuePtr().
Referenced by CModelEntity::initObjects(), CModel::initObjects(), and CModelEntity::setObjectParent().
CModelEntity ** CStateTemplate::beginDependent | ( | ) |
Retrieve the array of pointers to all dependent entities, which are only dependent species for a reduced model.
Definition at line 210 of file CState.cpp.
References mpBeginDependent.
Referenced by CModel::buildSimulatedSequence(), CMathContainer::initializeObjects(), and CQUpdatesWidget::loadObjectsTable().
CModelEntity *const * CStateTemplate::beginDependent | ( | ) | const |
Retrieve the array of pointers to all dependent entities, which are only dependent species for a reduced model.
Definition at line 217 of file CState.cpp.
References mpBeginDependent.
CModelEntity ** CStateTemplate::beginFixed | ( | ) |
Retrieve the array of pointers to all fixed entities.
Definition at line 212 of file CState.cpp.
References mpBeginFixed.
Referenced by CMathContainer::initializeObjects(), and CQUpdatesWidget::loadObjectsTable().
CModelEntity *const * CStateTemplate::beginFixed | ( | ) | const |
Retrieve the array of pointers to all fixed entities.
Definition at line 219 of file CState.cpp.
References mpBeginFixed.
CModelEntity ** CStateTemplate::beginIndependent | ( | ) |
Retrieve the array of pointers to all independent entities.
Definition at line 208 of file CState.cpp.
References mpBeginIndependent.
Referenced by CSteadyStateMethod::allPositive(), CModel::buildApplyInitialValuesSequence(), CModel::buildDependencyGraphs(), CModel::buildInitialRefreshSequence(), CModel::buildInitialSequence(), CModel::buildSimulatedSequence(), CModel::buildStateTemplate(), CModel::calculateElasticityMatrix(), CCSPMethod::CSPOutput(), CCSPMethod::cspstep(), CSteadyStateTask::initialize(), CTSSAMethod::initializeAtol(), CModel::initializeAtolVector(), CMathContainer::initializeObjects(), CModel::isStateVariable(), CMCAMethod::isValidProblem(), CStochDirectMethod::isValidProblem(), CTrajAdaptiveSA::isValidProblem(), CQUpdatesWidget::loadObjectsTable(), CCSPMethod::predifineAnnotation(), CCSPMethod::printResult(), CCSPMethod::setAnnotationM(), CNewtonMethod::solveJacobianXeqB(), CTauLeapMethod::start(), CStochDirectMethod::start(), CCSPMethod::start(), CTrajAdaptiveSA::start(), CTrajectoryMethodDsaLsodar::start(), CNewtonMethod::targetFunction(), and CSteadyStateTask::updateMatrices().
CModelEntity *const * CStateTemplate::beginIndependent | ( | ) | const |
Retrieve the array of pointers to all independent entities.
Definition at line 215 of file CState.cpp.
References mpBeginIndependent.
CModelEntity ** CStateTemplate::endDependent | ( | ) |
Retrieve pointer just beyond the dependent entities.
Definition at line 211 of file CState.cpp.
References mpBeginFixed.
Referenced by CModel::buildSimulatedSequence(), CModel::calculateElasticityMatrix(), CMathModel::compile(), CMathContainer::initializeObjects(), CModel::isStateVariable(), and CQUpdatesWidget::loadObjectsTable().
CModelEntity *const * CStateTemplate::endDependent | ( | ) | const |
Retrieve pointer just beyond the dependent entities.
Definition at line 218 of file CState.cpp.
References mpBeginFixed.
CModelEntity ** CStateTemplate::endFixed | ( | ) |
Retrieve pointer just beyond the fixed entities.
Definition at line 213 of file CState.cpp.
References mpEnd.
Referenced by CModel::buildApplyInitialValuesSequence(), DataModelGUI::buildChangedObjects(), CModel::buildDependencyGraphs(), CModel::buildInitialRefreshSequence(), CModel::buildInitialSequence(), CModel::buildSimulatedSequence(), CModel::buildStateTemplate(), CTimeSeries::compile(), CMathContainer::initializeObjects(), CQUpdatesWidget::loadObjectsTable(), CTauLeapMethod::start(), CStochDirectMethod::start(), CTrajAdaptiveSA::start(), and CTrajectoryMethodDsaLsodar::start().
CModelEntity *const * CStateTemplate::endFixed | ( | ) | const |
Retrieve pointer just beyond the fixed entities.
Definition at line 220 of file CState.cpp.
References mpEnd.
CModelEntity ** CStateTemplate::endIndependent | ( | ) |
Retrieve pointer just beyond the independent entities.
Definition at line 209 of file CState.cpp.
References mpBeginDependent.
Referenced by CModel::buildSimulatedSequence(), CMathContainer::initializeObjects(), CMCAMethod::isValidProblem(), CStochDirectMethod::isValidProblem(), CTrajAdaptiveSA::isValidProblem(), and CQUpdatesWidget::loadObjectsTable().
CModelEntity *const * CStateTemplate::endIndependent | ( | ) | const |
Retrieve pointer just beyond the independent entities.
Definition at line 216 of file CState.cpp.
References mpBeginDependent.
CModelEntity ** CStateTemplate::getEntities | ( | ) |
Retrieve the array of pointers to all entities.
Definition at line 204 of file CState.cpp.
References mpEntities.
Referenced by DataModelGUI::buildChangedObjects(), CMathModel::buildDependendRefreshList(), CModel::buildUserOrder(), CModel::calculateDerivatives(), CModel::calculateDerivativesX(), CFixLocalReactionParameters::checkModel(), CMathModel::compile(), CTimeSeries::compile(), CModel::getTreesWithDiscontinuities(), CSteadyStateTask::initialize(), CQUpdatesWidget::loadObjectsTable(), CCopasiXML::saveModel(), and CSteadyStateTask::updateMatrices().
CModelEntity *const * CStateTemplate::getEntities | ( | ) | const |
Retrieve the array of pointers to all entities.
Definition at line 205 of file CState.cpp.
References mpEntities.
size_t CStateTemplate::getIndex | ( | const CModelEntity * | entity | ) | const |
Retrieve the index of an entity in the template. Returns C_INVALID_INDEX if the entity is not found.
const | CModelEntity * entity |
Definition at line 231 of file CState.cpp.
References C_INVALID_INDEX, and mIndexMap.
Referenced by CTimeSeries::compile(), CCopasiXMLParser::InitialStateElement::end(), setUserOrder(), CTauLeapMethod::start(), CHybridMethod::start(), CStochDirectMethod::start(), CTrajAdaptiveSA::start(), CStochMethod::start(), and CTrajectoryMethodDsaLsodar::start().
size_t CStateTemplate::getNumDependent | ( | ) | const |
Retrieve the number of dependent entities.
Definition at line 224 of file CState.cpp.
References mpBeginDependent, and mpBeginFixed.
Referenced by CSteadyStateTask::updateMatrices().
size_t CStateTemplate::getNumFixed | ( | ) | const |
Retrieve the number of fixed entities.
Definition at line 228 of file CState.cpp.
References mpBeginFixed, and mpEnd.
size_t CStateTemplate::getNumIndependent | ( | ) | const |
Retrieve the number of independent entities.
Definition at line 222 of file CState.cpp.
References mpBeginDependent, and mpBeginIndependent.
Referenced by CModel::buildUserOrder(), CModel::calculateDerivatives(), CModel::calculateDerivativesX(), CMathModel::calculateRootDerivatives(), CNewtonMethod::initialize(), CModel::initializeAtolVector(), and CSteadyStateTask::updateMatrices().
size_t CStateTemplate::getNumVariable | ( | ) | const |
Retrieve the number of variable entities, i.e., the sum of independent and dependent variables.
Definition at line 226 of file CState.cpp.
References mpBeginFixed, and mpBeginIndependent.
const CVector< size_t > & CStateTemplate::getUserOrder | ( | ) | const |
Retrieve a pivot vector which can be used to reconstruct the user order.
Definition at line 201 of file CState.cpp.
References mUserOrder.
Referenced by CModel::buildUserOrder(), CTimeSeries::compile(), CSteadyStateTask::initialize(), and CSteadyStateTask::updateMatrices().
void CStateTemplate::remove | ( | CModelEntity * | entity | ) |
Remove an entity from the template.
CModelEntity | * entity |
Definition at line 80 of file CState.cpp.
References mIndexMap, mModel, mpEntities, CModel::setCompileFlag(), CModelEntity::setInitialValuePtr(), and CModelEntity::setValuePtr().
Referenced by CModelEntity::setObjectParent(), and CModelEntity::~CModelEntity().
void CStateTemplate::reorder | ( | const CVector< CModelEntity * > & | newOrder | ) |
Reorder the template.
const | CVector< CModelEntity * > & newOrder |
Definition at line 98 of file CState.cpp.
References CVectorCore< CType >::array(), CModelEntity::ASSIGNMENT, C_FLOAT64, CModelEntity::FIXED, mCurrentState, mIndexMap, mInitialState, mInsert, mpBeginDependent, mpBeginFixed, mpBeginIndependent, mpCurrentValues, mpEnd, mpEntities, mpInitialValues, CModelEntity::ODE, CModelEntity::REACTIONS, CVectorCore< CType >::size(), CModelEntity::TIME, and CState::updateIterator().
Referenced by CModel::buildSimulatedSequence(), and CModel::buildStateTemplate().
|
protected |
Resize the template
Definition at line 245 of file CState.cpp.
References C_FLOAT64, mCurrentState, mInitialState, mInsert, mpCurrentValues, mpEntities, mpInitialValues, mSize, pdeletev, and CState::resize().
Referenced by add().
void CStateTemplate::setUserOrder | ( | const CVector< CModelEntity * > & | userOrder | ) |
Set the user preferred order of the entities.
const | CVector< CModelEntity * > & userOrder |
Definition at line 189 of file CState.cpp.
References CVectorCore< CType >::array(), getIndex(), mUserOrder, CVector< CType >::resize(), and CVectorCore< CType >::size().
Referenced by CModel::buildUserOrder().
const size_t & CStateTemplate::size | ( | ) | const |
Retrieve size of the template, i.e., the number of entities.
Definition at line 242 of file CState.cpp.
References mInsert.
Referenced by CMathContainer::allocate(), CMathModel::buildDependendRefreshList(), CModel::buildSimulatedSequence(), CFixLocalReactionParameters::checkModel(), CModel::getTreesWithDiscontinuities(), CQUpdatesWidget::loadObjectsTable(), and CCopasiXML::saveModel().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
A pointer to the dependent entities
Definition at line 267 of file CState.h.
Referenced by beginDependent(), endIndependent(), getNumDependent(), getNumIndependent(), and reorder().
|
private |
A pointer to the fixed entities
Definition at line 272 of file CState.h.
Referenced by beginFixed(), endDependent(), getNumDependent(), getNumFixed(), getNumVariable(), and reorder().
|
private |
A pointer to the independent entities
Definition at line 262 of file CState.h.
Referenced by beginIndependent(), getNumIndependent(), getNumVariable(), and reorder().
|
private |
|
private |
A pointer just beyond the entities
Definition at line 277 of file CState.h.
Referenced by endFixed(), getNumFixed(), and reorder().
|
private |
The array of entities
Definition at line 252 of file CState.h.
Referenced by add(), getEntities(), remove(), reorder(), resize(), and ~CStateTemplate().
|
private |
|
private |
|
private |
A pivot vector storing the user order of the entities
Definition at line 292 of file CState.h.
Referenced by getUserOrder(), and setUserOrder().