bpp-phyl
2.2.0
|
Basic implementation of the the SubstitutionCount interface. More...
#include <Bpp/Phyl/Mapping/SubstitutionCount.h>
Public Member Functions | |
AbstractSubstitutionCount (SubstitutionRegister *reg) | |
AbstractSubstitutionCount (const AbstractSubstitutionCount &asc) | |
AbstractSubstitutionCount & | operator= (const AbstractSubstitutionCount &asc) |
~AbstractSubstitutionCount () | |
bool | hasSubstitutionRegister () const |
void | setSubstitutionRegister (SubstitutionRegister *reg) |
attribution of a SubstitutionRegister More... | |
const SubstitutionRegister * | getSubstitutionRegister () const |
SubstitutionRegister * | getSubstitutionRegister () |
virtual SubstitutionCount * | clone () const =0 |
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... | |
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 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 std::vector< double > | getNumberOfSubstitutionsForEachType (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 (const SubstitutionModel *model)=0 |
Set the substitution model associated with this count, if relevent. More... | |
Protected Member Functions | |
virtual void | substitutionRegisterHasChanged ()=0 |
Protected Attributes | |
std::auto_ptr< SubstitutionRegister > | register_ |
Basic implementation of the the SubstitutionCount interface.
This partial implementation deals with the SubstitutionRegister gestion, by maintaining a pointer.
Definition at line 166 of file SubstitutionCount.h.
|
inline |
Definition at line 173 of file SubstitutionCount.h.
|
inline |
Definition at line 177 of file SubstitutionCount.h.
|
inline |
Definition at line 189 of file SubstitutionCount.h.
|
pure virtualinherited |
|
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::LabelSubstitutionCount, bpp::DecompositionSubstitutionCount, bpp::UniformizationSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::OneJumpSubstitutionCount.
|
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().
|
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::LabelSubstitutionCount, bpp::DecompositionSubstitutionCount, bpp::UniformizationSubstitutionCount, bpp::LaplaceSubstitutionCount, bpp::NaiveSubstitutionCount, and bpp::OneJumpSubstitutionCount.
|
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::LabelSubstitutionCount, bpp::DecompositionSubstitutionCount, bpp::UniformizationSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::OneJumpSubstitutionCount.
|
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().
|
inlinevirtual |
Implements bpp::SubstitutionCount.
Definition at line 206 of file SubstitutionCount.h.
References register_.
|
inlinevirtual |
Implements bpp::SubstitutionCount.
Definition at line 208 of file SubstitutionCount.h.
References register_.
|
inlinevirtual |
Implements bpp::SubstitutionCount.
Definition at line 192 of file SubstitutionCount.h.
References register_.
|
inline |
Definition at line 181 of file SubstitutionCount.h.
References register_.
Referenced by bpp::OneJumpSubstitutionCount::operator=(), bpp::UniformizationSubstitutionCount::operator=(), bpp::LaplaceSubstitutionCount::operator=(), and bpp::DecompositionSubstitutionCount::operator=().
|
pure virtualinherited |
Set the substitution model associated with this count, if relevent.
model | The substitution model to use with this count. |
Implemented in bpp::LabelSubstitutionCount, bpp::DecompositionSubstitutionCount, bpp::NaiveSubstitutionCount, bpp::UniformizationSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::OneJumpSubstitutionCount.
|
inlinevirtual |
attribution of a SubstitutionRegister
reg | pointer to a SubstitutionRegister |
Implements bpp::SubstitutionCount.
Definition at line 201 of file SubstitutionCount.h.
References register_, and substitutionRegisterHasChanged().
|
protectedpure virtual |
|
protected |
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(), getSubstitutionRegister(), hasSubstitutionRegister(), bpp::UniformizationSubstitutionCount::initBMatrices_(), bpp::DecompositionSubstitutionCount::initBMatrices_(), operator=(), bpp::UniformizationSubstitutionCount::resetBMatrices_(), bpp::DecompositionSubstitutionCount::resetBMatrices_(), bpp::UniformizationSubstitutionCount::setSubstitutionModel(), bpp::DecompositionSubstitutionCount::setSubstitutionModel(), setSubstitutionRegister(), bpp::UniformizationSubstitutionCount::substitutionRegisterHasChanged(), bpp::DecompositionSubstitutionCount::substitutionRegisterHasChanged(), bpp::UniformizationSubstitutionCount::weightsHaveChanged(), and bpp::DecompositionSubstitutionCount::weightsHaveChanged().