Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
|
#include <CellCycleTimesGenerator.hpp>
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 CellCycleTimesGenerator * | Instance () |
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< double > | mCellCycleTimes |
unsigned | mCurrentIndex |
double | mRate |
bool | mVectorCreated |
Static Private Attributes | |
static CellCycleTimesGenerator * | mpInstance = NULL |
Friends | |
class | boost::serialization::access |
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.
|
protected |
Protected constructor. Use Instance() to access the random number generator.
Definition at line 41 of file CellCycleTimesGenerator.cpp.
References mpInstance.
Referenced by Instance().
|
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.
void CellCycleTimesGenerator::GenerateCellCycleTimeSequence | ( | ) |
Generate the cell cycle time sequence
Definition at line 78 of file CellCycleTimesGenerator.cpp.
References EXCEPTION, RandomNumberGenerator::ExponentialRandomDeviate(), RandomNumberGenerator::Instance(), mCellCycleTimes, mCurrentIndex, mRandomSeed, mRate, mVectorCreated, and RandomNumberGenerator::Reseed().
double CellCycleTimesGenerator::GetNextCellCycleTime | ( | ) |
Get the next cell cycle time
Definition at line 119 of file CellCycleTimesGenerator.cpp.
References EXCEPTION, mCellCycleTimes, mCurrentIndex, and mVectorCreated.
Referenced by FixedSequenceCellCycleModel::SetG1Duration().
unsigned CellCycleTimesGenerator::GetRandomSeed | ( | ) |
Get the random seed for generating the sequence.
Definition at line 73 of file CellCycleTimesGenerator.cpp.
References mRandomSeed.
double CellCycleTimesGenerator::GetRate | ( | ) |
Get the rate of the exponential distribution.
Definition at line 114 of file CellCycleTimesGenerator.cpp.
References mRate.
Referenced by FixedSequenceCellCycleModel::GetRate(), and FixedSequenceCellCycleModel::OutputCellCycleModelParameters().
|
static |
Definition at line 50 of file CellCycleTimesGenerator.cpp.
References CellCycleTimesGenerator(), and mpInstance.
Referenced by FixedSequenceCellCycleModel::GetRate(), FixedSequenceCellCycleModel::OutputCellCycleModelParameters(), FixedSequenceCellCycleModel::serialize(), FixedSequenceCellCycleModel::SetG1Duration(), and FixedSequenceCellCycleModel::SetRate().
|
inlineprivate |
Serialization of a CellCycleTimesGenerator object must be done with care. Do not serialize this singleton directly. Instead, serialize the object returned by GetSerializationWrapper.
archive | the archive |
version | the current version of this class |
Definition at line 98 of file CellCycleTimesGenerator.hpp.
References mCellCycleTimes, mCurrentIndex, mRandomSeed, mRate, and mVectorCreated.
void CellCycleTimesGenerator::SetRandomSeed | ( | unsigned | randomSeed | ) |
Set the random seed for generating the sequence of G1 Durations.
randomSeed | the new seed |
Definition at line 68 of file CellCycleTimesGenerator.cpp.
References mRandomSeed.
void CellCycleTimesGenerator::SetRate | ( | double | rate | ) |
Set the rate of the exponential distribution.
rate |
Definition at line 102 of file CellCycleTimesGenerator.cpp.
References EXCEPTION, mRate, and mVectorCreated.
Referenced by FixedSequenceCellCycleModel::SetRate().
|
friend |
Needed for serialization.
Definition at line 87 of file CellCycleTimesGenerator.hpp.
|
private |
The actual sequence of cell cycle times
Definition at line 64 of file CellCycleTimesGenerator.hpp.
Referenced by GenerateCellCycleTimeSequence(), GetNextCellCycleTime(), and serialize().
|
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().
|
staticprivate |
The singleton definition
Definition at line 54 of file CellCycleTimesGenerator.hpp.
Referenced by CellCycleTimesGenerator(), Destroy(), and Instance().
|
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().
|
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().
|
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().