bpp-phyl3
3.0.0
|
This class is mainly for testing purpose. It allow "self" mutation of the kind i->i;. More...
#include <Bpp/Phyl/Simulation/MutationProcess.h>
Public Member Functions | |
SelfMutationProcess (size_t alphabetSize) | |
virtual | ~SelfMutationProcess () |
size_t | mutate (size_t state) const |
Mutate a character in state i. More... | |
size_t | mutate (size_t state, unsigned int n) const |
Mutate a character in state i n times. More... | |
double | getTimeBeforeNextMutationEvent (size_t state) const |
Get the time before next mutation event. More... | |
size_t | evolve (size_t initialState, double time) const |
Simulation a character evolution during a specified time according to the given substitution model and send the final state. More... | |
MutationPath | detailedEvolve (size_t initialState, double time) const |
Simulation a character evolution during a specified time according to the given substitution model and send the total path with all intermediate states and times between mutation events. More... | |
MutationPath | detailedEvolve (size_t initialState, size_t finalState, double time) const |
Simulation a character evolution during a specified time according to the given substitution model and send the total path with all intermediate states and times between mutation events, conditional to the final state.q. More... | |
std::shared_ptr< const SubstitutionModelInterface > | getSubstitutionModel () const |
Get the substitution model associated to the mutation process. More... | |
Protected Attributes | |
std::shared_ptr< const SubstitutionModelInterface > | model_ |
The substitution model to use: More... | |
size_t | size_ |
The number of states allowed for the character to mutate. More... | |
VVdouble | repartition_ |
The repartition function for states probabilities. More... | |
This class is mainly for testing purpose. It allow "self" mutation of the kind i->i;.
Definition at line 354 of file MutationProcess.h.
SelfMutationProcess::SelfMutationProcess | ( | size_t | alphabetSize | ) |
Definition at line 202 of file MutationProcess.cpp.
References bpp::AbstractMutationProcess::repartition_, and bpp::AbstractMutationProcess::size_.
|
virtual |
Definition at line 222 of file MutationProcess.cpp.
|
virtualinherited |
Simulation a character evolution during a specified time according to the given substitution model and send the total path with all intermediate states and times between mutation events.
initialState | The state before beginning evolution. |
time | The time during which evolution must occur. |
Implements bpp::MutationProcess.
Definition at line 70 of file MutationProcess.cpp.
References bpp::MutationPath::addEvent().
Referenced by bpp::NonHomogeneousSequenceSimulator::dEvolveInternal(), and bpp::SimpleSubstitutionProcessSiteSimulator::evolveInternal().
|
virtualinherited |
Simulation a character evolution during a specified time according to the given substitution model and send the total path with all intermediate states and times between mutation events, conditional to the final state.q.
initialState | The state before beginning evolution. |
finalState | The state after evolution. |
time | The time during which evolution must occur. |
Implements bpp::MutationProcess.
Definition at line 89 of file MutationProcess.cpp.
References bpp::MutationPath::addEvent(), bpp::MutationPath::clear(), bpp::exp(), bpp::RandomTools::giveRandomNumberBetweenZeroAndEntry(), and bpp::log().
|
virtualinherited |
Simulation a character evolution during a specified time according to the given substitution model and send the final state.
initialState | The state before beginning evolution. |
time | The time during which evolution must occur. |
Implements bpp::MutationProcess.
Reimplemented in bpp::SimpleMutationProcess.
Definition at line 55 of file MutationProcess.cpp.
|
inlinevirtualinherited |
Get the substitution model associated to the mutation process.
Implements bpp::MutationProcess.
Definition at line 309 of file MutationProcess.h.
References bpp::AbstractMutationProcess::model_.
|
virtualinherited |
Get the time before next mutation event.
state | The actual state of the chain; |
Implements bpp::MutationProcess.
Definition at line 48 of file MutationProcess.cpp.
References bpp::RandomTools::randExponential().
|
virtualinherited |
Mutate a character in state i.
state | The current state of the character. |
Implements bpp::MutationProcess.
Definition at line 15 of file MutationProcess.cpp.
References bpp::RandomTools::giveRandomNumberBetweenZeroAndEntry(), and bpp::TextTools::toString().
|
virtualinherited |
Mutate a character in state i n times.
state | The current state of the character. |
n | The number of mutations to perform. |
Implements bpp::MutationProcess.
Definition at line 28 of file MutationProcess.cpp.
References bpp::RandomTools::giveRandomNumberBetweenZeroAndEntry().
|
protectedinherited |
The substitution model to use:
Definition at line 282 of file MutationProcess.h.
Referenced by bpp::SimpleMutationProcess::evolve(), and bpp::AbstractMutationProcess::getSubstitutionModel().
|
protectedinherited |
The repartition function for states probabilities.
repartition_[i][j] = probability that, being in state i at time t, we'll be in state <= j at time t+1.
Definition at line 295 of file MutationProcess.h.
Referenced by SelfMutationProcess(), and bpp::SimpleMutationProcess::SimpleMutationProcess().
|
protectedinherited |
The number of states allowed for the character to mutate.
Definition at line 287 of file MutationProcess.h.
Referenced by bpp::SimpleMutationProcess::evolve(), SelfMutationProcess(), and bpp::SimpleMutationProcess::SimpleMutationProcess().