|
bpp-phyl
2.2.0
|
Computes the probability that at least one jump occured 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 (const SubstitutionModel *model) | |
| OneJumpSubstitutionCount (const OneJumpSubstitutionCount &ojsc) | |
| OneJumpSubstitutionCount & | operator= (const OneJumpSubstitutionCount &ojsc) |
| virtual | ~OneJumpSubstitutionCount () |
| virtual OneJumpSubstitutionCount * | clone () const |
| double | getNumberOfSubstitutions (size_t initialState, size_t finalState, double length, size_t type=1) const |
| Get the number of susbstitutions on a branch, given the initial and final states, and the branch length. More... | |
| Matrix< double > * | getAllNumbersOfSubstitutions (double length, size_t type=1) const |
| Get the numbers of susbstitutions on a branch, for each initial and final states, and given the branch length. More... | |
| std::vector< double > | getNumberOfSubstitutionsForEachType (size_t initialState, size_t finalState, double length) const |
| Get the numbers of susbstitutions on a branch for all types, for an initial and final states, given the branch length. More... | |
| void | setSubstitutionModel (const SubstitutionModel *model) |
| Set the substitution model associated with this count, if relevent. More... | |
| void | setSubstitutionRegister (SubstitutionRegister *reg) throw (Exception) |
| bool | hasSubstitutionRegister () const |
| const SubstitutionRegister * | getSubstitutionRegister () const |
| SubstitutionRegister * | getSubstitutionRegister () |
| virtual size_t | getNumberOfSubstitutionTypes () const |
| Short cut function, equivalent to getSubstitutionRegister().getNumberOfSubstitutionTypes(). More... | |
| virtual 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::auto_ptr< SubstitutionRegister > | register_ |
Private Member Functions | |
| void | substitutionRegisterHasChanged () |
Private Attributes | |
| const SubstitutionModel * | model_ |
| RowMatrix< double > | tmp_ |
Computes the probability that at least one jump occured on a branch, given the initial and final state.
This probability is defined as
Definition at line 59 of file OneJumpSubstitutionCount.h.
|
inline |
Definition at line 67 of file OneJumpSubstitutionCount.h.
Referenced by clone().
|
inline |
Definition at line 71 of file OneJumpSubstitutionCount.h.
|
inlinevirtual |
Definition at line 83 of file OneJumpSubstitutionCount.h.
|
inlinevirtual |
Implements bpp::SubstitutionCount.
Definition at line 85 of file OneJumpSubstitutionCount.h.
References OneJumpSubstitutionCount().
|
virtual |
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::SubstitutionCount.
Definition at line 44 of file OneJumpSubstitutionCount.cpp.
References bpp::SubstitutionModel::getNumberOfStates(), bpp::SubstitutionModel::getPij_t(), model_, and tmp_.
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet().
Definition at line 112 of file SubstitutionCount.h.
References bpp::SubstitutionRegister::getAlphabet(), and bpp::SubstitutionCount::getSubstitutionRegister().
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Definition at line 119 of file SubstitutionCount.h.
References bpp::SubstitutionRegister::getAlphabet(), and bpp::SubstitutionCount::getSubstitutionRegister().
|
inlinevirtual |
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::SubstitutionCount.
Definition at line 88 of file OneJumpSubstitutionCount.h.
References model_, and bpp::SubstitutionModel::Pij_t().
Referenced by getNumberOfSubstitutionsForEachType().
|
inlinevirtual |
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::SubstitutionCount.
Definition at line 96 of file OneJumpSubstitutionCount.h.
References getNumberOfSubstitutions().
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister().getNumberOfSubstitutionTypes().
Definition at line 105 of file SubstitutionCount.h.
References bpp::SubstitutionRegister::getNumberOfSubstitutionTypes(), and bpp::SubstitutionCount::getSubstitutionRegister().
Referenced by bpp::NaiveSubstitutionCount::getNumberOfSubstitutionsForEachType(), bpp::UniformizationSubstitutionCount::getNumberOfSubstitutionsForEachType(), bpp::DecompositionSubstitutionCount::getNumberOfSubstitutionsForEachType(), and bpp::ProbabilisticSubstitutionMapping::getNumberOfSubstitutionTypes().
|
inlinevirtualinherited |
Implements bpp::SubstitutionCount.
Definition at line 206 of file SubstitutionCount.h.
References bpp::AbstractSubstitutionCount::register_.
|
inlinevirtualinherited |
Implements bpp::SubstitutionCount.
Definition at line 208 of file SubstitutionCount.h.
References bpp::AbstractSubstitutionCount::register_.
|
inlinevirtualinherited |
Implements bpp::SubstitutionCount.
Definition at line 192 of file SubstitutionCount.h.
References bpp::AbstractSubstitutionCount::register_.
|
inline |
Definition at line 75 of file OneJumpSubstitutionCount.h.
References model_, bpp::AbstractSubstitutionCount::operator=(), and tmp_.
|
inlinevirtual |
Set the substitution model associated with this count, if relevent.
| model | The substitution model to use with this count. |
Implements bpp::SubstitutionCount.
Definition at line 103 of file OneJumpSubstitutionCount.h.
References model_.
|
inlinevirtual | ||||||||||||||
| 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::SubstitutionCount.
Definition at line 110 of file OneJumpSubstitutionCount.h.
|
inlineprivatevirtual |
Implements bpp::AbstractSubstitutionCount.
Definition at line 115 of file OneJumpSubstitutionCount.h.
|
private |
Definition at line 63 of file OneJumpSubstitutionCount.h.
Referenced by getAllNumbersOfSubstitutions(), getNumberOfSubstitutions(), operator=(), and setSubstitutionModel().
|
protectedinherited |
Definition at line 170 of file SubstitutionCount.h.
Referenced by bpp::UniformizationSubstitutionCount::computeCounts_(), bpp::DecompositionSubstitutionCount::computeCounts_(), bpp::DecompositionSubstitutionCount::computeProducts_(), bpp::UniformizationSubstitutionCount::fillBMatrices_(), bpp::DecompositionSubstitutionCount::fillBMatrices_(), bpp::NaiveSubstitutionCount::getAllNumbersOfSubstitutions(), bpp::NaiveSubstitutionCount::getNumberOfSubstitutions(), bpp::AbstractSubstitutionCount::getSubstitutionRegister(), bpp::AbstractSubstitutionCount::hasSubstitutionRegister(), bpp::UniformizationSubstitutionCount::initBMatrices_(), bpp::DecompositionSubstitutionCount::initBMatrices_(), bpp::AbstractSubstitutionCount::operator=(), bpp::UniformizationSubstitutionCount::resetBMatrices_(), bpp::DecompositionSubstitutionCount::resetBMatrices_(), bpp::UniformizationSubstitutionCount::setSubstitutionModel(), bpp::DecompositionSubstitutionCount::setSubstitutionModel(), bpp::AbstractSubstitutionCount::setSubstitutionRegister(), bpp::UniformizationSubstitutionCount::substitutionRegisterHasChanged(), bpp::DecompositionSubstitutionCount::substitutionRegisterHasChanged(), bpp::UniformizationSubstitutionCount::weightsHaveChanged(), and bpp::DecompositionSubstitutionCount::weightsHaveChanged().
|
mutableprivate |
Definition at line 64 of file OneJumpSubstitutionCount.h.
Referenced by getAllNumbersOfSubstitutions(), and operator=().