|
bpp-phyl3 3.0.0
|
Computes the probability that at least one jump occurred on a branch, given the initial and final state. More...
#include <Bpp/Phyl/Mapping/OneJumpSubstitutionCount.h>
Inheritance diagram for bpp::OneJumpSubstitutionCount:
Collaboration diagram for bpp::OneJumpSubstitutionCount:Public Member Functions | |
| OneJumpSubstitutionCount (std::shared_ptr< const SubstitutionModelInterface > model) | |
| OneJumpSubstitutionCount (std::shared_ptr< const StateMapInterface > statemap) | |
| OneJumpSubstitutionCount (const OneJumpSubstitutionCount &ojsc) | |
| OneJumpSubstitutionCount & | operator= (const OneJumpSubstitutionCount &ojsc) |
| virtual | ~OneJumpSubstitutionCount () |
| virtual OneJumpSubstitutionCount * | clone () const override |
| double | getNumberOfSubstitutions (size_t initialState, size_t finalState, double length, size_t type=1) const override |
| Get the number of susbstitutions on a branch, given the initial and final states, and the branch length. More... | |
| std::unique_ptr< Matrix< double > > | getAllNumbersOfSubstitutions (double length, size_t type=1) const override |
| Get the numbers of susbstitutions on a branch, for each initial and final states, and given the branch length. More... | |
| void | storeAllNumbersOfSubstitutions (double length, size_t type, Eigen::MatrixXd &mat) const override |
| Stores the numbers of susbstitutions on a branch, for each initial and final states, and given the branch length. More... | |
| std::vector< double > | getNumberOfSubstitutionsPerType (size_t initialState, size_t finalState, double length) const override |
| Get the numbers of susbstitutions on a branch for all types, for an initial and final states, given the branch length. More... | |
| void | setSubstitutionModel (std::shared_ptr< const SubstitutionModelInterface > model) override |
| Set the substitution model associated with this count, if relevant. More... | |
| void | setSubstitutionRegister (std::shared_ptr< const SubstitutionRegisterInterface > reg) override |
| bool | hasSubstitutionRegister () const |
| std::shared_ptr< const SubstitutionRegisterInterface > | getSubstitutionRegister () const |
| virtual size_t | getNumberOfSubstitutionTypes () const |
| Short cut function, equivalent to getSubstitutionRegister().getNumberOfSubstitutionTypes(). More... | |
| virtual std::shared_ptr< const Alphabet > | getAlphabet () const |
| Short cut function, equivalent to getSubstitutionRegister()->getAlphabet(). More... | |
| virtual size_t | getNumberOfStates () const |
| Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize(). More... | |
Protected Attributes | |
| std::shared_ptr< const SubstitutionRegisterInterface > | register_ |
Private Member Functions | |
| void | substitutionRegisterHasChanged () override |
Private Attributes | |
| std::shared_ptr< const SubstitutionModelInterface > | model_ |
| RowMatrix< double > | tmp_ |
Computes the probability that at least one jump occurred on a branch, given the initial and final state.
This probability is defined as
Definition at line 24 of file OneJumpSubstitutionCount.h.
|
inline |
Definition at line 32 of file OneJumpSubstitutionCount.h.
Referenced by clone().
|
inline |
Definition at line 36 of file OneJumpSubstitutionCount.h.
|
inline |
Definition at line 40 of file OneJumpSubstitutionCount.h.
|
inlinevirtual |
Definition at line 52 of file OneJumpSubstitutionCount.h.
|
inlineoverridevirtual |
Implements bpp::SubstitutionCountInterface.
Definition at line 54 of file OneJumpSubstitutionCount.h.
References OneJumpSubstitutionCount().
|
overridevirtual |
Get the numbers of susbstitutions on a branch, for each initial and final states, and given the branch length.
| length | The length of the branch. |
| type | The type of susbstitution to count. |
Implements bpp::SubstitutionCountInterface.
Definition at line 10 of file OneJumpSubstitutionCount.cpp.
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet().
Definition at line 78 of file SubstitutionCount.h.
References bpp::SubstitutionCountInterface::getSubstitutionRegister().
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Definition at line 85 of file SubstitutionCount.h.
References bpp::SubstitutionCountInterface::getSubstitutionRegister().
|
inlineoverridevirtual |
Get the number of susbstitutions on a branch, given the initial and final states, and the branch length.
| initialState | The initial state. |
| finalState | The final state. |
| length | The length of the branch. |
| type | The type of substitution to count. |
Implements bpp::SubstitutionCountInterface.
Definition at line 57 of file OneJumpSubstitutionCount.h.
References model_.
Referenced by getNumberOfSubstitutionsPerType().
|
inlineoverridevirtual |
Get the numbers of susbstitutions on a branch for all types, for an initial and final states, given the branch length.
| initialState | The initial state. |
| finalState | The final state. |
| length | The length of the branch. |
Implements bpp::SubstitutionCountInterface.
Definition at line 70 of file OneJumpSubstitutionCount.h.
References getNumberOfSubstitutions().
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister().getNumberOfSubstitutionTypes().
Definition at line 71 of file SubstitutionCount.h.
References bpp::SubstitutionCountInterface::getSubstitutionRegister().
Referenced by bpp::SubstitutionMappingTools::computeCounts(), bpp::DecompositionSubstitutionCount::getNumberOfSubstitutionsPerType(), bpp::NaiveSubstitutionCount::getNumberOfSubstitutionsPerType(), and bpp::UniformizationSubstitutionCount::getNumberOfSubstitutionsPerType().
|
inlinevirtualinherited |
Implements bpp::SubstitutionCountInterface.
Definition at line 170 of file SubstitutionCount.h.
References bpp::AbstractSubstitutionCount::register_.
|
inlinevirtualinherited |
Implements bpp::SubstitutionCountInterface.
Definition at line 156 of file SubstitutionCount.h.
References bpp::AbstractSubstitutionCount::register_.
|
inline |
Definition at line 44 of file OneJumpSubstitutionCount.h.
|
inlineoverridevirtual |
Set the substitution model associated with this count, if relevant.
| model | The substitution model to use with this count. |
Implements bpp::SubstitutionCountInterface.
Definition at line 77 of file OneJumpSubstitutionCount.h.
References model_.
|
inlineoverridevirtual |
| reg | The new SubstitutionRegister object to be associated to this instance. The register contains the description of the various substitutions types that are mapped. |
Implements bpp::SubstitutionCountInterface.
Definition at line 83 of file OneJumpSubstitutionCount.h.
|
overridevirtual |
Stores the numbers of susbstitutions on a branch, for each initial and final states, and given the branch length.
| length | The length of the branch. |
| type | The type of susbstitution to count. |
| mat | The matrix filled with all numbers of substitutions for each initial and final states. |
Implements bpp::SubstitutionCountInterface.
Definition at line 28 of file OneJumpSubstitutionCount.cpp.
|
inlineoverrideprivatevirtual |
Implements bpp::AbstractSubstitutionCount.
Definition at line 89 of file OneJumpSubstitutionCount.h.
|
private |
Definition at line 28 of file OneJumpSubstitutionCount.h.
Referenced by getAllNumbersOfSubstitutions(), getNumberOfSubstitutions(), operator=(), setSubstitutionModel(), and storeAllNumbersOfSubstitutions().
|
protectedinherited |
Definition at line 146 of file SubstitutionCount.h.
Referenced by bpp::UniformizationSubstitutionCount::computeCounts_(), bpp::DecompositionSubstitutionCount::distancesHaveChanged(), bpp::UniformizationSubstitutionCount::distancesHaveChanged(), bpp::DecompositionSubstitutionCount::fillBMatrices_(), bpp::UniformizationSubstitutionCount::fillBMatrices_(), bpp::NaiveSubstitutionCount::getAllNumbersOfSubstitutions(), bpp::NaiveSubstitutionCount::getNumberOfSubstitutions(), bpp::AbstractSubstitutionCount::getSubstitutionRegister(), bpp::AbstractSubstitutionCount::hasSubstitutionRegister(), bpp::UniformizationSubstitutionCount::initBMatrices_(), bpp::DecompositionSubstitutionCount::initCounts_(), bpp::UniformizationSubstitutionCount::resetBMatrices_(), bpp::DecompositionSubstitutionCount::setDistanceBMatrices_(), bpp::UniformizationSubstitutionCount::setDistanceBMatrices_(), bpp::DecompositionSubstitutionCount::setSubstitutionModel(), bpp::UniformizationSubstitutionCount::setSubstitutionModel(), bpp::AbstractSubstitutionCount::setSubstitutionRegister(), bpp::NaiveSubstitutionCount::storeAllNumbersOfSubstitutions(), bpp::DecompositionSubstitutionCount::substitutionRegisterHasChanged(), bpp::UniformizationSubstitutionCount::substitutionRegisterHasChanged(), bpp::DecompositionSubstitutionCount::weightsHaveChanged(), and bpp::UniformizationSubstitutionCount::weightsHaveChanged().
|
mutableprivate |
Definition at line 29 of file OneJumpSubstitutionCount.h.
Referenced by getAllNumbersOfSubstitutions(), operator=(), and storeAllNumbersOfSubstitutions().