bpp-phyl3
3.0.0
|
Partial implementation of the SubstitutionCount interface. More...
#include <Bpp/Phyl/Mapping/SubstitutionCount.h>
Public Member Functions | |
AbstractSubstitutionCount (std::shared_ptr< const SubstitutionRegisterInterface > reg) | |
virtual | ~AbstractSubstitutionCount () |
bool | hasSubstitutionRegister () const |
void | setSubstitutionRegister (std::shared_ptr< const SubstitutionRegisterInterface > reg) |
attribution of a SubstitutionRegister More... | |
std::shared_ptr< const SubstitutionRegisterInterface > | getSubstitutionRegister () const |
virtual SubstitutionCountInterface * | clone () const =0 |
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... | |
virtual double | getNumberOfSubstitutions (size_t initialState, size_t finalState, double length, size_t type) const =0 |
Get the number of susbstitutions on a branch, given the initial and final states, and the branch length. More... | |
virtual std::unique_ptr< Matrix< double > > | getAllNumbersOfSubstitutions (double length, size_t type) const =0 |
Get the numbers of susbstitutions on a branch, for each initial and final states, and given the branch length. More... | |
virtual void | storeAllNumbersOfSubstitutions (double length, size_t type, Eigen::MatrixXd &mat) const =0 |
Stores the numbers of susbstitutions on a branch, for each initial and final states, and given the branch length. More... | |
virtual std::vector< double > | getNumberOfSubstitutionsPerType (size_t initialState, size_t finalState, double length) const =0 |
Get the numbers of susbstitutions on a branch for all types, for an initial and final states, given the branch length. More... | |
virtual void | setSubstitutionModel (std::shared_ptr< const SubstitutionModelInterface > model)=0 |
Set the substitution model associated with this count, if relevant. More... | |
Protected Member Functions | |
virtual void | substitutionRegisterHasChanged ()=0 |
Protected Attributes | |
std::shared_ptr< const SubstitutionRegisterInterface > | register_ |
Partial implementation of the SubstitutionCount interface.
Definition at line 142 of file SubstitutionCount.h.
|
inline |
Definition at line 149 of file SubstitutionCount.h.
|
inlinevirtual |
Definition at line 153 of file SubstitutionCount.h.
|
pure virtualinherited |
Implements bpp::Clonable.
Implemented in bpp::UniformizationSubstitutionCount, bpp::OneJumpSubstitutionCount, bpp::LabelSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::DecompositionSubstitutionCount.
Referenced by bpp::SubstitutionMappingTools::computeCounts().
|
pure virtualinherited |
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. |
Implemented in bpp::UniformizationSubstitutionCount, bpp::OneJumpSubstitutionCount, bpp::LabelSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::DecompositionSubstitutionCount.
|
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().
|
pure virtualinherited |
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. |
Implemented in bpp::UniformizationSubstitutionCount, bpp::OneJumpSubstitutionCount, bpp::LabelSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::DecompositionSubstitutionCount.
|
pure virtualinherited |
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. |
Implemented in bpp::UniformizationSubstitutionCount, bpp::OneJumpSubstitutionCount, bpp::LabelSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::DecompositionSubstitutionCount.
|
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().
|
inlinevirtual |
Implements bpp::SubstitutionCountInterface.
Definition at line 170 of file SubstitutionCount.h.
References register_.
|
inlinevirtual |
Implements bpp::SubstitutionCountInterface.
Definition at line 156 of file SubstitutionCount.h.
References register_.
|
pure virtualinherited |
Set the substitution model associated with this count, if relevant.
model | The substitution model to use with this count. |
Implemented in bpp::UniformizationSubstitutionCount, bpp::OneJumpSubstitutionCount, bpp::LabelSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::DecompositionSubstitutionCount.
|
inlinevirtual |
attribution of a SubstitutionRegister
reg | pointer to a SubstitutionRegister |
Implements bpp::SubstitutionCountInterface.
Definition at line 164 of file SubstitutionCount.h.
References register_, and substitutionRegisterHasChanged().
|
pure virtualinherited |
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. |
Implemented in bpp::UniformizationSubstitutionCount, bpp::OneJumpSubstitutionCount, bpp::LabelSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::DecompositionSubstitutionCount.
|
protectedpure virtual |
|
protected |
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(), getSubstitutionRegister(), hasSubstitutionRegister(), bpp::UniformizationSubstitutionCount::initBMatrices_(), bpp::DecompositionSubstitutionCount::initCounts_(), bpp::UniformizationSubstitutionCount::resetBMatrices_(), bpp::DecompositionSubstitutionCount::setDistanceBMatrices_(), bpp::UniformizationSubstitutionCount::setDistanceBMatrices_(), bpp::DecompositionSubstitutionCount::setSubstitutionModel(), bpp::UniformizationSubstitutionCount::setSubstitutionModel(), setSubstitutionRegister(), bpp::DecompositionSubstitutionCount::substitutionRegisterHasChanged(), bpp::UniformizationSubstitutionCount::substitutionRegisterHasChanged(), bpp::DecompositionSubstitutionCount::weightsHaveChanged(), and bpp::UniformizationSubstitutionCount::weightsHaveChanged().