#include <RandomCellKiller.hpp>
Public Member Functions | |
RandomCellKiller (AbstractTissue< DIM > *pTissue, double probabilityOfDeathInAnHour) | |
double | GetDeathProbabilityInAnHour () const |
void | TestAndLabelSingleCellForApoptosis (TissueCell &rCell) |
void | TestAndLabelCellsForApoptosisOrDeath () |
Private Member Functions | |
template<class Archive> | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
double | mProbabilityOfDeathInAnHour |
Friends | |
class | boost::serialization::access |
The probability passed into the constructor will be the probability of any cell dying whenever TestAndLabelCellsForApoptosis() is called.
Note this does take into account timesteps - the input probability is the probability that in an hour's worth of trying, the cell killer will have successfully killed a given cell. In the method TestAndLabelSingleCellForApoptosis() this probability is used to calculate the probability that the cell is killed at a given time step.
Definition at line 51 of file RandomCellKiller.hpp.
RandomCellKiller< DIM >::RandomCellKiller | ( | AbstractTissue< DIM > * | pTissue, | |
double | probabilityOfDeathInAnHour | |||
) | [inline] |
Default constructor.
pTissue | pointer to the tissue | |
probabilityOfDeathInAnHour | probability that a cell is labelled for apoptosis in one hour's worth of trying |
Definition at line 32 of file RandomCellKiller.cpp.
References RandomCellKiller< DIM >::mProbabilityOfDeathInAnHour.
void RandomCellKiller< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the object and its member variables.
Serialization of singleton objects must be done with care. Before the object is serialized via a pointer, it *MUST* be serialized directly, or an assertion will trip when a second instance of the class is created on de-serialization.
archive | the archive | |
version | the current version of this class |
Reimplemented from AbstractCellKiller< DIM >.
Definition at line 75 of file RandomCellKiller.hpp.
References RandomNumberGenerator::Instance().
double RandomCellKiller< DIM >::GetDeathProbabilityInAnHour | ( | ) | const [inline] |
Definition at line 43 of file RandomCellKiller.cpp.
References RandomCellKiller< DIM >::mProbabilityOfDeathInAnHour.
void RandomCellKiller< DIM >::TestAndLabelSingleCellForApoptosis | ( | TissueCell & | rCell | ) | [inline] |
Overridden method to test a given cell for apoptosis.
rCell | the cell to test for apoptosis |
Definition at line 49 of file RandomCellKiller.cpp.
References TissueCell::HasApoptosisBegun(), RandomNumberGenerator::Instance(), SimulationTime::Instance(), RandomCellKiller< DIM >::mProbabilityOfDeathInAnHour, RandomNumberGenerator::ranf(), and TissueCell::StartApoptosis().
Referenced by RandomCellKiller< DIM >::TestAndLabelCellsForApoptosisOrDeath().
void RandomCellKiller< DIM >::TestAndLabelCellsForApoptosisOrDeath | ( | ) | [inline, virtual] |
Loop over cells and start apoptosis randomly, based on the user-set probability
Implements AbstractCellKiller< DIM >.
Definition at line 62 of file RandomCellKiller.cpp.
References AbstractTissue< DIM >::Begin(), AbstractTissue< DIM >::End(), AbstractCellKiller< DIM >::mpTissue, and RandomCellKiller< DIM >::TestAndLabelSingleCellForApoptosis().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractCellKiller< DIM >.
Definition at line 62 of file RandomCellKiller.hpp.
double RandomCellKiller< DIM >::mProbabilityOfDeathInAnHour [private] |
Probability that in an hour's worth of trying, the cell killer will have successfully killed a given cell.
Definition at line 59 of file RandomCellKiller.hpp.
Referenced by RandomCellKiller< DIM >::GetDeathProbabilityInAnHour(), RandomCellKiller< DIM >::RandomCellKiller(), and RandomCellKiller< DIM >::TestAndLabelSingleCellForApoptosis().