bpp-phyl3
3.0.0
|
Labelling substitution count. More...
#include <Bpp/Phyl/Mapping/NaiveSubstitutionCount.h>
Public Member Functions | |
LabelSubstitutionCount (std::shared_ptr< const SubstitutionModelInterface > model) | |
LabelSubstitutionCount (std::shared_ptr< const StateMapInterface > statemap) | |
virtual | ~LabelSubstitutionCount () |
LabelSubstitutionCount * | 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 | |
LinearMatrix< double > | label_ |
std::vector< int > | supportedChars_ |
Labelling substitution count.
This substitution count return a distinct number for each possible mutation.
Definition at line 119 of file NaiveSubstitutionCount.h.
LabelSubstitutionCount::LabelSubstitutionCount | ( | std::shared_ptr< const SubstitutionModelInterface > | model | ) |
Definition at line 39 of file NaiveSubstitutionCount.cpp.
References count(), label_, and supportedChars_.
Referenced by clone().
LabelSubstitutionCount::LabelSubstitutionCount | ( | std::shared_ptr< const StateMapInterface > | statemap | ) |
Definition at line 60 of file NaiveSubstitutionCount.cpp.
References count(), label_, and supportedChars_.
|
inlinevirtual |
Definition at line 131 of file NaiveSubstitutionCount.h.
|
inlineoverridevirtual |
Implements bpp::SubstitutionCountInterface.
Definition at line 133 of file NaiveSubstitutionCount.h.
References LabelSubstitutionCount().
|
inlineoverridevirtual |
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 141 of file NaiveSubstitutionCount.h.
References bpp::LinearMatrix< class >::clone(), and label_.
|
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 136 of file NaiveSubstitutionCount.h.
References label_.
|
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 162 of file NaiveSubstitutionCount.h.
References label_.
|
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_.
|
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 169 of file NaiveSubstitutionCount.h.
References supportedChars_.
|
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 175 of file NaiveSubstitutionCount.h.
|
inlineoverridevirtual |
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 146 of file NaiveSubstitutionCount.h.
References label_, and supportedChars_.
|
inlineoverrideprivatevirtual |
Implements bpp::AbstractSubstitutionCount.
Definition at line 181 of file NaiveSubstitutionCount.h.
|
private |
Definition at line 123 of file NaiveSubstitutionCount.h.
Referenced by getAllNumbersOfSubstitutions(), getNumberOfSubstitutions(), getNumberOfSubstitutionsPerType(), LabelSubstitutionCount(), 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::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::DecompositionSubstitutionCount::substitutionRegisterHasChanged(), bpp::UniformizationSubstitutionCount::substitutionRegisterHasChanged(), bpp::DecompositionSubstitutionCount::weightsHaveChanged(), and bpp::UniformizationSubstitutionCount::weightsHaveChanged().
|
private |
Definition at line 124 of file NaiveSubstitutionCount.h.
Referenced by LabelSubstitutionCount(), setSubstitutionModel(), and storeAllNumbersOfSubstitutions().