bpp-phyl3
3.0.0
|
Partial implementation of the SubstitutionDistance interface. More...
#include <Bpp/Phyl/Mapping/SubstitutionDistance.h>
Public Member Functions | |
AbstractSubstitutionDistance (std::shared_ptr< const AlphabetIndex2 > distances) | |
AbstractSubstitutionDistance (const AbstractSubstitutionDistance &index) | |
AbstractSubstitutionDistance & | operator= (const AbstractSubstitutionDistance &index) |
virtual | ~AbstractSubstitutionDistance () |
void | setDistances (std::shared_ptr< const AlphabetIndex2 > distances) |
bool | hasDistances () const |
std::shared_ptr< const AlphabetIndex2 > | getDistances () const |
virtual SubstitutionCountInterface * | clone () const =0 |
virtual bool | hasSubstitutionRegister () const =0 |
virtual std::shared_ptr< const SubstitutionRegisterInterface > | getSubstitutionRegister () const =0 |
virtual void | setSubstitutionRegister (std::shared_ptr< const SubstitutionRegisterInterface > reg)=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 | distancesHaveChanged ()=0 |
Protected Attributes | |
std::shared_ptr< const AlphabetIndex2 > | distances_ |
Partial implementation of the SubstitutionDistance interface.
Definition at line 39 of file SubstitutionDistance.h.
|
inline |
Definition at line 46 of file SubstitutionDistance.h.
|
inline |
Definition at line 50 of file SubstitutionDistance.h.
|
inlinevirtual |
Definition at line 61 of file SubstitutionDistance.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().
|
protectedpure virtual |
Implemented in bpp::UniformizationSubstitutionCount, and bpp::DecompositionSubstitutionCount.
Referenced by setDistances().
|
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().
|
inlinevirtual |
Implements bpp::SubstitutionDistance.
Definition at line 67 of file SubstitutionDistance.h.
References distances_.
|
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().
|
pure virtualinherited |
Implemented in bpp::AbstractSubstitutionCount.
Referenced by bpp::SubstitutionCountInterface::getAlphabet(), bpp::SubstitutionCountInterface::getNumberOfStates(), and bpp::SubstitutionCountInterface::getNumberOfSubstitutionTypes().
|
inlinevirtual |
Implements bpp::SubstitutionDistance.
Definition at line 66 of file SubstitutionDistance.h.
References distances_.
|
pure virtualinherited |
Implemented in bpp::AbstractSubstitutionCount.
|
inline |
Definition at line 54 of file SubstitutionDistance.h.
References distances_.
Referenced by bpp::DecompositionSubstitutionCount::operator=(), and bpp::UniformizationSubstitutionCount::operator=().
|
virtual |
Implements bpp::SubstitutionDistance.
Definition at line 9 of file SubstitutionDistance.cpp.
References distances_, and distancesHaveChanged().
|
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.
|
pure virtualinherited |
reg | The new SubstitutionRegister object to be associated to this instance. The register contains the description of the various substitutions types that are mapped. |
Implemented in bpp::OneJumpSubstitutionCount, bpp::LabelSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::AbstractSubstitutionCount.
|
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.
|
protected |
Definition at line 43 of file SubstitutionDistance.h.
Referenced by bpp::DecompositionSubstitutionCount::distancesHaveChanged(), bpp::UniformizationSubstitutionCount::distancesHaveChanged(), bpp::DecompositionSubstitutionCount::fillBMatrices_(), bpp::UniformizationSubstitutionCount::fillBMatrices_(), getDistances(), hasDistances(), operator=(), bpp::DecompositionSubstitutionCount::setDistanceBMatrices_(), bpp::UniformizationSubstitutionCount::setDistanceBMatrices_(), and setDistances().