COPASI API  4.40.278
CMathEventQueue Class Reference

#include <CMathEventQueue.h>

Classes

class  CAction
 
class  CKey
 

Public Types

typedef std::multimap< CKey, CAction >::const_iterator const_iterator
 
typedef std::multimap< CKey, CAction >::iterator iterator
 
typedef std::pair< std::multimap< CKey, CAction >::iterator, std::multimap< CKey, CAction >::iteratorrange
 

Public Member Functions

bool addAssignment (const C_FLOAT64 &executionTime, const bool &equality, const CVectorCore< C_FLOAT64 > &values, CMathEvent *pEvent)
 
bool addCalculation (const C_FLOAT64 &executionTime, const bool &equality, CMathEvent *pEvent)
 
 CMathEventQueue (CMathContainer &mathContainer)
 
const C_FLOAT64getProcessQueueExecutionTime () const
 
void printDebug () const
 
CMath::StateChange process (const bool &priorToOutput)
 
void removeAction (const std::pair< CMathEventQueue::CKey, CMathEventQueue::CAction > &action)
 
void start ()
 
 ~CMathEventQueue ()
 

Private Member Functions

 CMathEventQueue ()
 
CMath::StateChange executeAction (CMathEventQueue::iterator itAction)
 
iterator getAction ()
 
bool rootsFound ()
 

Private Attributes

std::multimap< CKey, CActionmActions
 
size_t mCascadingLevel
 
bool mEquality
 
size_t mExecutionCounter
 
size_t mExecutionLimit
 
CMathContainermpContainer
 
CVector< C_FLOAT64 > * mpRootValuesAfter
 
CVector< C_FLOAT64 > * mpRootValuesBefore
 
const C_FLOAT64mpTime
 
CVector< C_INTmRootsFound
 
CVector< C_FLOAT64mRootValues1
 
CVector< C_FLOAT64mRootValues2
 
CCore::CUpdateSequence mUpdateSequence
 

Friends

std::ostream & operator<< (std::ostream &os, const CAction &o)
 
std::ostream & operator<< (std::ostream &os, const CKey &o)
 
std::ostream & operator<< (std::ostream &os, const CMathEventQueue &o)
 

Member Typedef Documentation

◆ const_iterator

◆ iterator

typedef std::multimap< CKey, CAction >::iterator CMathEventQueue::iterator

◆ range

typedef std::pair< std::multimap< CKey, CAction >::iterator, std::multimap< CKey, CAction >::iterator > CMathEventQueue::range

Constructor & Destructor Documentation

◆ CMathEventQueue() [1/2]

CMathEventQueue::CMathEventQueue ( )
private

Default constructor

◆ CMathEventQueue() [2/2]

CMathEventQueue::CMathEventQueue ( CMathContainer mathContainer)

Default constructor

Parameters
CMathContainer& mathContainer

◆ ~CMathEventQueue()

CMathEventQueue::~CMathEventQueue ( )

Destructor

Member Function Documentation

◆ addAssignment()

bool CMathEventQueue::addAssignment ( const C_FLOAT64 executionTime,
const bool &  equality,
const CVectorCore< C_FLOAT64 > &  values,
CMathEvent pEvent 
)

Add an assignment to the process queue.

Parameters
constC_FLOAT64 & executionTime
constbool & equality
constCVectorCore< C_FLOAT64 > & values
CMathEventN* pEvent
Returns
bool success

References CMathEvent::addPendingAction(), C_FLOAT64, CMathEvent::getPriority(), CMathObject::getValuePointer(), mActions, mCascadingLevel, and mpTime.

Referenced by CMathEvent::fire().

◆ addCalculation()

bool CMathEventQueue::addCalculation ( const C_FLOAT64 executionTime,
const bool &  equality,
CMathEvent pEvent 
)

Add a calculation to the process queue.

Parameters
constC_FLOAT64 & executionTime
constbool & equality
CMathEventN* pEvent
Returns
bool success

References CMathEvent::addPendingAction(), C_FLOAT64, CMathEvent::getPriority(), CMathObject::getValuePointer(), mActions, mCascadingLevel, and mpTime.

Referenced by CMathEvent::fire().

◆ executeAction()

CMath::StateChange CMathEventQueue::executeAction ( CMathEventQueue::iterator  itAction)
private

Execute the calculations

Parameters
CMathEventQueue::iteratoritAction
Returns
CMath::StateChange stateChange

References mActions, and mExecutionCounter.

Referenced by process().

◆ getAction()

CMathEventQueue::iterator CMathEventQueue::getAction ( )
private

Retrieve the currently pending actions

Returns
CMathEventQueue::iterator itAction

References C_FLOAT64, CMathContainer::getRandomGenerator(), CRandom::getRandomU(), mActions, mCascadingLevel, mEquality, mpContainer, and mpTime.

Referenced by process().

◆ getProcessQueueExecutionTime()

const C_FLOAT64 & CMathEventQueue::getProcessQueueExecutionTime ( ) const

Retrieve the next execution time scheduled in the process queue

Returns
const C_FLOAT64 & processQueueExecutionTime

References C_FLOAT64, and mActions.

Referenced by CMathContainer::getProcessQueueExecutionTime(), and process().

◆ printDebug()

void CMathEventQueue::printDebug ( ) const
inline

This prints debugging info to stdout

◆ process()

◆ removeAction()

void CMathEventQueue::removeAction ( const std::pair< CMathEventQueue::CKey, CMathEventQueue::CAction > &  action)

Remove an action from queue

Parameters
conststd::pair< CMathEventQueue::CKey, CMathEventQueue::CAction > & action

References mActions.

Referenced by CMathEvent::fire().

◆ rootsFound()

bool CMathEventQueue::rootsFound ( )
private

Check whether the executions of assignment lead to newly found roots

Returns
bool rootsFound

References CVectorCore< CType >::array(), C_FLOAT64, C_INT, CMathContainer::getRootProcessors(), CMathContainer::getRoots(), mpContainer, mpRootValuesAfter, mpRootValuesBefore, mRootsFound, and CVectorCore< CType >::size().

Referenced by process().

◆ start()

Friends And Related Function Documentation

◆ operator<< [1/3]

std::ostream& operator<< ( std::ostream &  os,
const CAction o 
)
friend

◆ operator<< [2/3]

std::ostream& operator<< ( std::ostream &  os,
const CKey o 
)
friend

◆ operator<< [3/3]

std::ostream& operator<< ( std::ostream &  os,
const CMathEventQueue o 
)
friend

Member Data Documentation

◆ mActions

std::multimap< CKey, CAction > CMathEventQueue::mActions
private

An ordered list of calculations in the queue.

Referenced by addAssignment(), addCalculation(), executeAction(), getAction(), getProcessQueueExecutionTime(), process(), removeAction(), and start().

◆ mCascadingLevel

size_t CMathEventQueue::mCascadingLevel
private

The cascading level of events

Referenced by addAssignment(), addCalculation(), getAction(), CMathEventQueue::CKey::operator<(), and process().

◆ mEquality

bool CMathEventQueue::mEquality
private

Indicate whether we processing equality or inequality

Referenced by getAction(), CMathEventQueue::CKey::operator<(), and process().

◆ mExecutionCounter

size_t CMathEventQueue::mExecutionCounter
private

A counter of the execution steps for the current process

Referenced by executeAction(), and process().

◆ mExecutionLimit

size_t CMathEventQueue::mExecutionLimit
private

The limit of execution steps allowed for call to process

◆ mpContainer

CMathContainer* CMathEventQueue::mpContainer
private

A pointer to the math container the event queue belongs to.

Referenced by getAction(), process(), rootsFound(), and start().

◆ mpRootValuesAfter

CVector< C_FLOAT64 >* CMathEventQueue::mpRootValuesAfter
private

Referenced by rootsFound(), and start().

◆ mpRootValuesBefore

CVector< C_FLOAT64 >* CMathEventQueue::mpRootValuesBefore
private

Referenced by process(), rootsFound(), and start().

◆ mpTime

const C_FLOAT64* CMathEventQueue::mpTime
private

A pointer to the current container time

Referenced by addAssignment(), addCalculation(), getAction(), process(), and start().

◆ mRootsFound

CVector< C_INT > CMathEventQueue::mRootsFound
private

Referenced by process(), rootsFound(), and start().

◆ mRootValues1

CVector< C_FLOAT64 > CMathEventQueue::mRootValues1
private

Referenced by start().

◆ mRootValues2

CVector< C_FLOAT64 > CMathEventQueue::mRootValues2
private

Referenced by start().

◆ mUpdateSequence

CCore::CUpdateSequence CMathEventQueue::mUpdateSequence
private

The update sequence which need to be applied to update all roots and total moieties


The documentation for this class was generated from the following files: