bpp-phyl
2.2.0
|
Labelling substitution count. More...
#include <Bpp/Phyl/Mapping/NaiveSubstitutionCount.h>
Public Member Functions | |
LabelSubstitutionCount (const SubstitutionModel *model) | |
virtual | ~LabelSubstitutionCount () |
LabelSubstitutionCount * | 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 | |
LinearMatrix< double > | label_ |
std::vector< int > | supportedChars_ |
Labelling substitution count.
This substitution count return a distinct number for each possible mutation.
Definition at line 134 of file NaiveSubstitutionCount.h.
LabelSubstitutionCount::LabelSubstitutionCount | ( | const SubstitutionModel * | model | ) |
Definition at line 58 of file NaiveSubstitutionCount.cpp.
References label_, and supportedChars_.
Referenced by clone().
|
inlinevirtual |
Definition at line 144 of file NaiveSubstitutionCount.h.
|
inlinevirtual |
Implements bpp::SubstitutionCount.
Definition at line 146 of file NaiveSubstitutionCount.h.
References LabelSubstitutionCount().
|
inlinevirtual |
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 154 of file NaiveSubstitutionCount.h.
References label_.
|
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 149 of file NaiveSubstitutionCount.h.
References label_.
|
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 159 of file NaiveSubstitutionCount.h.
References label_.
|
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_.
|
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 166 of file NaiveSubstitutionCount.h.
References bpp::SubstitutionModel::getAlphabetStates(), and supportedChars_.
|
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 171 of file NaiveSubstitutionCount.h.
|
inlineprivatevirtual |
Implements bpp::AbstractSubstitutionCount.
Definition at line 176 of file NaiveSubstitutionCount.h.
|
private |
Definition at line 138 of file NaiveSubstitutionCount.h.
Referenced by getAllNumbersOfSubstitutions(), getNumberOfSubstitutions(), getNumberOfSubstitutionsForEachType(), and LabelSubstitutionCount().
|
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().
|
private |
Definition at line 139 of file NaiveSubstitutionCount.h.
Referenced by LabelSubstitutionCount(), and setSubstitutionModel().