|
bpp-phyl
2.2.0
|
Partial implementation of the WeightedSubstitutionCount interface. More...
#include <Bpp/Phyl/Mapping/WeightedSubstitutionCount.h>
Inheritance diagram for bpp::AbstractWeightedSubstitutionCount:
Collaboration diagram for bpp::AbstractWeightedSubstitutionCount:Public Member Functions | |
| AbstractWeightedSubstitutionCount (const AlphabetIndex2 *weights, bool ownWeights) | |
| AbstractWeightedSubstitutionCount (const AbstractWeightedSubstitutionCount &index) | |
| AbstractWeightedSubstitutionCount & | operator= (const AbstractWeightedSubstitutionCount &index) |
| virtual | ~AbstractWeightedSubstitutionCount () |
| void | setWeights (const AlphabetIndex2 *weights, bool ownWeights) |
| bool | hasWeights () const |
| const AlphabetIndex2 * | getWeights () const |
| virtual SubstitutionCount * | clone () const =0 |
| virtual bool | hasSubstitutionRegister () const =0 |
| virtual const SubstitutionRegister * | getSubstitutionRegister () const =0 |
| virtual SubstitutionRegister * | getSubstitutionRegister ()=0 |
| virtual void | setSubstitutionRegister (SubstitutionRegister *reg)=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 | weightsHaveChanged ()=0 |
Protected Attributes | |
| const AlphabetIndex2 * | weights_ |
| bool | ownWeights_ |
Partial implementation of the WeightedSubstitutionCount interface.
Definition at line 67 of file WeightedSubstitutionCount.h.
|
inline |
Definition at line 75 of file WeightedSubstitutionCount.h.
|
inline |
Definition at line 80 of file WeightedSubstitutionCount.h.
References ownWeights_, and weights_.
|
inlinevirtual |
Definition at line 97 of file WeightedSubstitutionCount.h.
References ownWeights_, and weights_.
|
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().
|
pure virtualinherited |
Implemented in bpp::AbstractSubstitutionCount.
Referenced by bpp::SubstitutionCount::getAlphabet(), bpp::SubstitutionCount::getNumberOfStates(), and bpp::SubstitutionCount::getNumberOfSubstitutionTypes().
|
pure virtualinherited |
Implemented in bpp::AbstractSubstitutionCount.
|
inlinevirtual |
Implements bpp::WeightedSubstitutionCount.
Definition at line 106 of file WeightedSubstitutionCount.h.
References weights_.
|
pure virtualinherited |
Implemented in bpp::AbstractSubstitutionCount.
|
inlinevirtual |
Implements bpp::WeightedSubstitutionCount.
Definition at line 105 of file WeightedSubstitutionCount.h.
References weights_.
|
inline |
Definition at line 88 of file WeightedSubstitutionCount.h.
References ownWeights_, and weights_.
Referenced by bpp::UniformizationSubstitutionCount::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.
|
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::AbstractSubstitutionCount, bpp::LabelSubstitutionCount, bpp::LaplaceSubstitutionCount, and bpp::OneJumpSubstitutionCount.
|
virtual |
Implements bpp::WeightedSubstitutionCount.
Definition at line 44 of file WeightedSubstitutionCount.cpp.
References ownWeights_, weights_, and weightsHaveChanged().
|
protectedpure virtual |
Implemented in bpp::DecompositionSubstitutionCount, bpp::NaiveSubstitutionCount, and bpp::UniformizationSubstitutionCount.
Referenced by setWeights().
|
protected |
Definition at line 72 of file WeightedSubstitutionCount.h.
Referenced by AbstractWeightedSubstitutionCount(), operator=(), setWeights(), and ~AbstractWeightedSubstitutionCount().
|
protected |
Definition at line 71 of file WeightedSubstitutionCount.h.
Referenced by AbstractWeightedSubstitutionCount(), bpp::UniformizationSubstitutionCount::computeCounts_(), bpp::DecompositionSubstitutionCount::computeCounts_(), bpp::NaiveSubstitutionCount::getAllNumbersOfSubstitutions(), bpp::NaiveSubstitutionCount::getNumberOfSubstitutions(), getWeights(), hasWeights(), operator=(), setWeights(), bpp::UniformizationSubstitutionCount::weightsHaveChanged(), bpp::DecompositionSubstitutionCount::weightsHaveChanged(), and ~AbstractWeightedSubstitutionCount().