|
bpp-phyl
2.2.0
|
This class is used by MutationProcess to store detailed results of simulations. More...
#include <Bpp/Phyl/Simulation/MutationProcess.h>
Collaboration diagram for bpp::MutationPath:Public Member Functions | |
| MutationPath (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 () |
| const Alphabet * | getAlphabet () const |
| void | addEvent (size_t state, double time) |
| Add a new mutation event. More... | |
| 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 SubstitutionRegister ®) 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 | |
| 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 56 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 93 of file MutationProcess.h.
|
inline |
Definition at line 96 of file MutationProcess.h.
|
inlinevirtual |
Definition at line 108 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 123 of file MutationProcess.h.
|
inline |
Definition at line 115 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 155 of file MutationProcess.h.
References alphabet_, 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 174 of file MutationProcess.h.
References bpp::SubstitutionRegister::getNumberOfSubstitutionTypes(), bpp::SubstitutionRegister::getType(), initialState_, and states_.
|
inline |
Retrieve the final state of this path.
Definition at line 191 of file MutationProcess.h.
References initialState_, and states_.
Referenced by bpp::SiteSimulationResult::addNode().
|
inline |
Retrieve the initial state.
Definition at line 133 of file MutationProcess.h.
References initialState_.
|
inline |
Retrieve the number of substitution events.
Definition at line 147 of file MutationProcess.h.
References states_.
|
inline |
Retrieve the total time of evolution.
Definition at line 140 of file MutationProcess.h.
References totalTime_.
|
inline |
Definition at line 99 of file MutationProcess.h.
References alphabet_, initialState_, states_, times_, and totalTime_.
|
private |
Definition at line 60 of file MutationProcess.h.
Referenced by getAlphabet(), getEventCounts(), and operator=().
|
private |
The initial state.
Definition at line 76 of file MutationProcess.h.
Referenced by getEventCounts(), getFinalState(), getInitialState(), and operator=().
|
private |
The states taken, without initial state.
Definition at line 65 of file MutationProcess.h.
Referenced by addEvent(), 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 71 of file MutationProcess.h.
Referenced by addEvent(), and operator=().
|
private |
Total time of evolution. Typically, this is a branch length.
Definition at line 82 of file MutationProcess.h.
Referenced by getTotalTime(), and operator=().