COPASI API
4.40.278
|
#include <CState.h>
Public Member Functions | |
void | add (const CModelEntity *entity) |
const CModelEntity *const * | beginDependent () const |
const CModelEntity *const * | beginFixed () const |
const CModelEntity *const * | beginIndependent () const |
CStateTemplate (CModel &model) | |
const CModelEntity *const * | endDependent () const |
const CModelEntity *const * | endFixed () const |
const CModelEntity *const * | endIndependent () const |
const CVector< const CModelEntity * > & | getEntities () const |
size_t | getIndex (const CModelEntity *entity) const |
size_t | getNumDependent () const |
size_t | getNumFixed () const |
size_t | getNumIndependent () const |
size_t | getNumVariable () const |
const CVector< size_t > & | getUserOrder () const |
void | remove (const CModelEntity *entity) |
void | reorder (const CVector< CModelEntity * > &newOrder) |
void | setUserOrder (const CVector< const CModelEntity * > &userOrder) |
const size_t & | size () const |
~CStateTemplate () | |
Protected Member Functions | |
void | resize () |
Private Member Functions | |
CStateTemplate () | |
Private Attributes | |
CVector< const CModelEntity * > | mEntities |
std::map< const CModelEntity *, size_t > | mIndexMap |
size_t | mInsert |
CModel & | mModel |
const CModelEntity *const * | mpBeginDependent |
const CModelEntity *const * | mpBeginFixed |
const CModelEntity *const * | mpBeginIndependent |
const CModelEntity *const * | mpEnd |
size_t | mSize |
CVector< size_t > | mUserOrder |
|
private |
Default Constructor (inaccessible)
CStateTemplate::~CStateTemplate | ( | ) |
Destructor
void CStateTemplate::add | ( | const CModelEntity * | entity | ) |
Add an entity to the template.
const | CModelEntity * entity |
References mEntities, mIndexMap, mInsert, mModel, mSize, resize(), and CModel::setCompileFlag().
Referenced by CModel::addModelEntity(), and CModel::initObjects().
const CModelEntity *const * CStateTemplate::beginDependent | ( | ) | const |
Retrieve the array of pointers to all dependent entities, which are only dependent species for a reduced model.
References mpBeginDependent.
Referenced by CMathContainer::initializeObjects().
const CModelEntity *const * CStateTemplate::beginFixed | ( | ) | const |
Retrieve the array of pointers to all fixed entities.
References mpBeginFixed.
Referenced by CMathContainer::allocate(), and CMathContainer::initializeObjects().
const CModelEntity *const * CStateTemplate::beginIndependent | ( | ) | const |
Retrieve the array of pointers to all independent entities.
References mpBeginIndependent.
Referenced by CCSPMethod::CSPOutput(), CModel::initializeAtolVector(), CMathContainer::initializeObjects(), CCSPMethod::initializeOutput(), CModel::isStateVariable(), CCSPMethod::printResult(), and CCSPMethod::setAnnotationM().
const CModelEntity *const * CStateTemplate::endDependent | ( | ) | const |
Retrieve pointer just beyond the dependent entities.
References mpBeginFixed.
Referenced by CMathContainer::initializeObjects(), and CModel::isStateVariable().
const CModelEntity *const * CStateTemplate::endFixed | ( | ) | const |
Retrieve pointer just beyond the fixed entities.
References mpEnd.
Referenced by CMathContainer::allocate(), and CMathContainer::initializeObjects().
const CModelEntity *const * CStateTemplate::endIndependent | ( | ) | const |
Retrieve pointer just beyond the independent entities.
References mpBeginDependent.
Referenced by CMathContainer::initializeObjects().
const CVector< const CModelEntity * > & CStateTemplate::getEntities | ( | ) | const |
Retrieve the array of pointers to all entities.
References mEntities.
Referenced by CModel::buildUserOrder(), CFixLocalReactionParameters::checkModel(), CModel::getTreesWithDiscontinuities(), and CCopasiXML::saveModel().
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 |
References C_INVALID_INDEX, and mIndexMap.
Referenced by setUserOrder().
size_t CStateTemplate::getNumDependent | ( | ) | const |
Retrieve the number of dependent entities.
References mpBeginDependent, and mpBeginFixed.
Referenced by CMathContainer::allocate().
size_t CStateTemplate::getNumFixed | ( | ) | const |
Retrieve the number of fixed entities.
References mpBeginFixed, and mpEnd.
Referenced by CMathContainer::allocate().
size_t CStateTemplate::getNumIndependent | ( | ) | const |
Retrieve the number of independent entities.
References mpBeginDependent, and mpBeginIndependent.
Referenced by CMathContainer::allocate(), CModel::buildUserOrder(), and CModel::initializeAtolVector().
size_t CStateTemplate::getNumVariable | ( | ) | const |
Retrieve the number of variable entities, i.e., the sum of independent and dependent variables.
References mpBeginFixed, and mpBeginIndependent.
const CVector< size_t > & CStateTemplate::getUserOrder | ( | ) | const |
Retrieve a pivot vector which can be used to reconstruct the user order.
References mUserOrder.
Referenced by CModel::buildUserOrder().
void CStateTemplate::remove | ( | const CModelEntity * | entity | ) |
Remove an entity from the template.
const | CModelEntity * entity |
References mEntities, mIndexMap, mModel, and CModel::setCompileFlag().
Referenced by CModel::removeModelEntity().
void CStateTemplate::reorder | ( | const CVector< CModelEntity * > & | newOrder | ) |
Reorder the template.
const | CVector< const CModelEntity * > & newOrder |
References CModelEntity::__SIZE, CVectorCore< CType >::array(), CModelEntity::ASSIGNMENT, CModelEntity::FIXED, CMetab::isDependent(), mEntities, mIndexMap, mInsert, mpBeginDependent, mpBeginFixed, mpBeginIndependent, mpEnd, CModelEntity::ODE, CModelEntity::REACTIONS, CVectorCore< CType >::size(), and CModelEntity::TIME.
Referenced by CModel::buildStateTemplate().
|
protected |
Resize the template
References mEntities, mSize, and CVector< CType >::resize().
Referenced by add().
void CStateTemplate::setUserOrder | ( | const CVector< const CModelEntity * > & | userOrder | ) |
Set the user preferred order of the entities.
const | CVector< const CModelEntity * > & userOrder |
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.
References mInsert.
Referenced by CFixLocalReactionParameters::checkModel(), CModel::getTreesWithDiscontinuities(), and CCopasiXML::saveModel().
|
private |
The array of entities
Referenced by add(), getEntities(), remove(), reorder(), and resize().
|
private |
A map of pointer to entities to the index it appear in the template
Referenced by add(), getIndex(), remove(), and reorder().
|
private |
|
private |
A pointer to the dependent entities
Referenced by beginDependent(), endIndependent(), getNumDependent(), getNumIndependent(), and reorder().
|
private |
A pointer to the fixed entities
Referenced by beginFixed(), endDependent(), getNumDependent(), getNumFixed(), getNumVariable(), and reorder().
|
private |
A pointer to the independent entities
Referenced by beginIndependent(), getNumIndependent(), getNumVariable(), and reorder().
|
private |
A pointer just beyond the entities
Referenced by endFixed(), getNumFixed(), and reorder().
|
private |
|
private |
A pivot vector storing the user order of the entities
Referenced by getUserOrder(), and setUserOrder().