Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
CellCycleTimesGenerator Class Reference

#include <CellCycleTimesGenerator.hpp>

+ Inheritance diagram for CellCycleTimesGenerator:
+ Collaboration diagram for CellCycleTimesGenerator:

Public Member Functions

void SetRandomSeed (unsigned randomSeed)
 
unsigned GetRandomSeed ()
 
void SetRate (double rate)
 
double GetRate ()
 
void GenerateCellCycleTimeSequence ()
 
double GetNextCellCycleTime ()
 
- Public Member Functions inherited from SerializableSingleton< CellCycleTimesGenerator >
SerializableSingleton< CellCycleTimesGenerator > * GetSerializationWrapper () const
 

Static Public Member Functions

static CellCycleTimesGeneratorInstance ()
 
static void Destroy ()
 

Protected Member Functions

 CellCycleTimesGenerator ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Private Attributes

unsigned mRandomSeed
 
std::vector< doublemCellCycleTimes
 
unsigned mCurrentIndex
 
double mRate
 
bool mVectorCreated
 

Static Private Attributes

static CellCycleTimesGeneratormpInstance = NULL
 

Friends

class boost::serialization::access
 

Detailed Description

This is a helper class for FixedSequenceCellCycleModel. It comprises a singleton class for producing a fixed stream of exponentially distributed G1 durations.

Definition at line 49 of file CellCycleTimesGenerator.hpp.

Constructor & Destructor Documentation

◆ CellCycleTimesGenerator()

CellCycleTimesGenerator::CellCycleTimesGenerator ( )
protected

Protected constructor. Use Instance() to access the random number generator.

Definition at line 41 of file CellCycleTimesGenerator.cpp.

References mpInstance.

Referenced by Instance().

Member Function Documentation

◆ Destroy()

void CellCycleTimesGenerator::Destroy ( )
static

Destroy the current instance of the cell cycle times generator. The next call to Instance will create a new instance. This method *must* be called before program exit, to avoid a memory leak.

Definition at line 59 of file CellCycleTimesGenerator.cpp.

References mpInstance.

◆ GenerateCellCycleTimeSequence()

void CellCycleTimesGenerator::GenerateCellCycleTimeSequence ( )

◆ GetNextCellCycleTime()

double CellCycleTimesGenerator::GetNextCellCycleTime ( )

Get the next cell cycle time

Returns
next_cell_cycle_time the next cell cycle time in the sequence

Definition at line 119 of file CellCycleTimesGenerator.cpp.

References EXCEPTION, mCellCycleTimes, mCurrentIndex, and mVectorCreated.

Referenced by FixedSequenceCellCycleModel::SetG1Duration().

◆ GetRandomSeed()

unsigned CellCycleTimesGenerator::GetRandomSeed ( )

Get the random seed for generating the sequence.

Returns
seed The random seed

Definition at line 73 of file CellCycleTimesGenerator.cpp.

References mRandomSeed.

◆ GetRate()

double CellCycleTimesGenerator::GetRate ( )

Get the rate of the exponential distribution.

Returns
rate The rate of the distribution.

Definition at line 114 of file CellCycleTimesGenerator.cpp.

References mRate.

Referenced by FixedSequenceCellCycleModel::GetRate(), and FixedSequenceCellCycleModel::OutputCellCycleModelParameters().

◆ Instance()

◆ serialize()

template<class Archive >
void CellCycleTimesGenerator::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Serialization of a CellCycleTimesGenerator object must be done with care. Do not serialize this singleton directly. Instead, serialize the object returned by GetSerializationWrapper.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 98 of file CellCycleTimesGenerator.hpp.

References mCellCycleTimes, mCurrentIndex, mRandomSeed, mRate, and mVectorCreated.

◆ SetRandomSeed()

void CellCycleTimesGenerator::SetRandomSeed ( unsigned  randomSeed)

Set the random seed for generating the sequence of G1 Durations.

Parameters
randomSeedthe new seed

Definition at line 68 of file CellCycleTimesGenerator.cpp.

References mRandomSeed.

◆ SetRate()

void CellCycleTimesGenerator::SetRate ( double  rate)

Set the rate of the exponential distribution.

Parameters
rate

Definition at line 102 of file CellCycleTimesGenerator.cpp.

References EXCEPTION, mRate, and mVectorCreated.

Referenced by FixedSequenceCellCycleModel::SetRate().

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 87 of file CellCycleTimesGenerator.hpp.

Member Data Documentation

◆ mCellCycleTimes

std::vector<double> CellCycleTimesGenerator::mCellCycleTimes
private

The actual sequence of cell cycle times

Definition at line 64 of file CellCycleTimesGenerator.hpp.

Referenced by GenerateCellCycleTimeSequence(), GetNextCellCycleTime(), and serialize().

◆ mCurrentIndex

unsigned CellCycleTimesGenerator::mCurrentIndex
private

This index is used to keep track of where in the sequence mCellCycleTimes the simulation currently is. Whenever a cell divides, a new cell cycle time gets drawn from mCellCycleTimes and this counter is incremented by one.

Definition at line 72 of file CellCycleTimesGenerator.hpp.

Referenced by GenerateCellCycleTimeSequence(), GetNextCellCycleTime(), and serialize().

◆ mpInstance

CellCycleTimesGenerator * CellCycleTimesGenerator::mpInstance = NULL
staticprivate

The singleton definition

Definition at line 54 of file CellCycleTimesGenerator.hpp.

Referenced by CellCycleTimesGenerator(), Destroy(), and Instance().

◆ mRandomSeed

unsigned CellCycleTimesGenerator::mRandomSeed
private

The random seed used to generate the series of cell cycle times.

Definition at line 59 of file CellCycleTimesGenerator.hpp.

Referenced by GenerateCellCycleTimeSequence(), GetRandomSeed(), serialize(), and SetRandomSeed().

◆ mRate

double CellCycleTimesGenerator::mRate
private

The rate constant of the exponential distribution used to generate mCellCycleTimes.

Definition at line 78 of file CellCycleTimesGenerator.hpp.

Referenced by GenerateCellCycleTimeSequence(), GetRate(), serialize(), and SetRate().

◆ mVectorCreated

bool CellCycleTimesGenerator::mVectorCreated
private

A flag that changes from False to True when mCellCycleTimes has been generated.

Definition at line 84 of file CellCycleTimesGenerator.hpp.

Referenced by GenerateCellCycleTimeSequence(), GetNextCellCycleTime(), serialize(), and SetRate().


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