bpp-phyl3
3.0.0
|
This class is used by MutationProcess to store detailed results of simulations. More...
#include <Bpp/Phyl/Simulation/MutationProcess.h>
Public Member Functions | |
MutationPath (std::shared_ptr< const Alphabet > alphabet, size_t initialState, double time) | |
Builds a new MutationPath object with initial state 'initialState' and total time 'time'. More... | |
MutationPath (const MutationPath &path) | |
MutationPath & | operator= (const MutationPath &path) |
virtual | ~MutationPath () |
std::shared_ptr< const Alphabet > | getAlphabet () const |
const Alphabet & | alphabet () const |
void | addEvent (size_t state, double time) |
Add a new mutation event. More... | |
void | clear () |
size_t | getInitialState () const |
Retrieve the initial state. More... | |
double | getTotalTime () const |
Retrieve the total time of evolution. More... | |
size_t | getNumberOfEvents () const |
Retrieve the number of substitution events. More... | |
template<class Scalar > | |
void | getEventCounts (Matrix< Scalar > &counts) const |
Retrieve the number of substitution events per type of substitution. More... | |
template<class Scalar > | |
void | getEventCounts (std::vector< Scalar > &counts, const SubstitutionRegisterInterface ®) const |
Retrieve the number of substitution events per type of substitution, defined by a SubstitutionRegister object. More... | |
size_t | getFinalState () const |
Retrieve the final state of this path. More... | |
Private Attributes | |
std::shared_ptr< const Alphabet > | alphabet_ |
std::vector< size_t > | states_ |
The states taken, without initial state. More... | |
std::vector< double > | times_ |
Times between states. The first element in array is the time between the initial state and the first state in states_. More... | |
size_t | initialState_ |
The initial state. More... | |
double | totalTime_ |
Total time of evolution. Typically, this is a branch length. More... | |
This class is used by MutationProcess to store detailed results of simulations.
Definition at line 20 of file MutationProcess.h.
|
inline |
Builds a new MutationPath object with initial state 'initialState' and total time 'time'.
alphabet | The alphabet associated to the states in this path. |
initialState | The initial state. |
time | The total time of evolution. |
Definition at line 55 of file MutationProcess.h.
|
inline |
Definition at line 61 of file MutationProcess.h.
|
inlinevirtual |
Definition at line 74 of file MutationProcess.h.
|
inline |
Add a new mutation event.
state | The new state after mutation event. |
time | The time between this mutation and previous mutation (or initial state). |
Definition at line 93 of file MutationProcess.h.
References states_, and times_.
Referenced by bpp::AbstractMutationProcess::detailedEvolve().
|
inline |
Definition at line 85 of file MutationProcess.h.
References alphabet_.
|
inline |
Definition at line 103 of file MutationProcess.h.
References states_, and times_.
Referenced by bpp::AbstractMutationProcess::detailedEvolve().
|
inline |
Definition at line 80 of file MutationProcess.h.
References alphabet_.
|
inline |
Retrieve the number of substitution events per type of substitution.
counts | A matrix with the same size as the alphabet. The substitution counts will be incremented according to the mutation path, which allows to efficiently sum various mutation paths with a look. |
Definition at line 136 of file MutationProcess.h.
References alphabet_, bpp::Matrix< class >::getNumberOfColumns(), bpp::Matrix< class >::getNumberOfRows(), initialState_, and states_.
|
inline |
Retrieve the number of substitution events per type of substitution, defined by a SubstitutionRegister object.
counts | A vector with the appropriate size, as defined by SubstitutionRegister::getNumberOfSubstitutionTypes(). The substitution counts will be incremented according to the mutation path, which allows to efficiently sum various mutation paths with a look. |
reg | The substitution register to use to categorize substitutions. |
Definition at line 157 of file MutationProcess.h.
References bpp::SubstitutionRegisterInterface::getNumberOfSubstitutionTypes(), bpp::SubstitutionRegisterInterface::getType(), initialState_, and states_.
|
inline |
Retrieve the final state of this path.
Definition at line 176 of file MutationProcess.h.
References initialState_, and states_.
Referenced by bpp::SiteSimulationResult::addNode(), bpp::NonHomogeneousSequenceSimulator::dEvolveInternal(), and bpp::SimpleSubstitutionProcessSiteSimulator::evolveInternal().
|
inline |
Retrieve the initial state.
Definition at line 114 of file MutationProcess.h.
References initialState_.
|
inline |
Retrieve the number of substitution events.
Definition at line 128 of file MutationProcess.h.
References states_.
|
inline |
Retrieve the total time of evolution.
Definition at line 121 of file MutationProcess.h.
References totalTime_.
|
inline |
Definition at line 64 of file MutationProcess.h.
References alphabet_, initialState_, states_, times_, and totalTime_.
|
private |
Definition at line 23 of file MutationProcess.h.
Referenced by alphabet(), getAlphabet(), getEventCounts(), and operator=().
|
private |
The initial state.
Definition at line 39 of file MutationProcess.h.
Referenced by getEventCounts(), getFinalState(), getInitialState(), and operator=().
|
private |
The states taken, without initial state.
Definition at line 28 of file MutationProcess.h.
Referenced by addEvent(), clear(), getEventCounts(), getFinalState(), getNumberOfEvents(), and operator=().
|
private |
Times between states. The first element in array is the time between the initial state and the first state in states_.
Definition at line 34 of file MutationProcess.h.
Referenced by addEvent(), clear(), and operator=().
|
private |
Total time of evolution. Typically, this is a branch length.
Definition at line 45 of file MutationProcess.h.
Referenced by getTotalTime(), and operator=().