5 #ifndef BPP_PHYL_MAPPING_DECOMPOSITIONSUBSTITUTIONCOUNT_H
6 #define BPP_PHYL_MAPPING_DECOMPOSITIONSUBSTITUTIONCOUNT_H
31 mutable std::vector< RowMatrix<double>>
counts_;
36 std::shared_ptr<const SubstitutionModelInterface> model,
37 std::shared_ptr<const SubstitutionRegisterInterface> reg,
38 std::shared_ptr<const AlphabetIndex2> weights =
nullptr,
39 std::shared_ptr<const AlphabetIndex2> distances =
nullptr);
42 std::shared_ptr<const SubstitutionRegisterInterface> reg,
43 std::shared_ptr<const AlphabetIndex2> weights =
nullptr,
44 std::shared_ptr<const AlphabetIndex2> distances =
nullptr);
57 AbstractSubstitutionCount::operator=(dsc);
71 double getNumberOfSubstitutions(
size_t initialState,
size_t finalState,
double length,
size_t type = 1)
const override;
Partial implementation of the SubstitutionCount interface.
Partial implementation of the SubstitutionDistance interface.
AbstractSubstitutionDistance & operator=(const AbstractSubstitutionDistance &index)
Partial implementation of the WeightedSubstitutionCount interface.
AbstractWeightedSubstitutionCount & operator=(const AbstractWeightedSubstitutionCount &index)
Methods useful for analytical substitution count and rewards using the eigen decomposition method.
DecompositionMethods & operator=(const DecompositionMethods &dm)
Analytical substitution count using the eigen decomposition method.
void distancesHaveChanged() override
void setDistanceBMatrices_()
double getNumberOfSubstitutions(size_t initialState, size_t finalState, double length, size_t type=1) const override
Get the number of susbstitutions on a branch, given the initial and final states, and the branch leng...
DecompositionSubstitutionCount * clone() const override
DecompositionSubstitutionCount(std::shared_ptr< const SubstitutionModelInterface > model, std::shared_ptr< const SubstitutionRegisterInterface > reg, std::shared_ptr< const AlphabetIndex2 > weights=nullptr, std::shared_ptr< const AlphabetIndex2 > distances=nullptr)
std::vector< RowMatrix< double > > counts_
std::unique_ptr< Matrix< double > > getAllNumbersOfSubstitutions(double length, size_t type=1) const override
Get the numbers of susbstitutions on a branch, for each initial and final states, and given the branc...
void substitutionRegisterHasChanged() override
std::vector< double > getNumberOfSubstitutionsPerType(size_t initialState, size_t finalState, double length) const override
Get the numbers of susbstitutions on a branch for all types, for an initial and final states,...
DecompositionSubstitutionCount & operator=(const DecompositionSubstitutionCount &dsc)
void storeAllNumbersOfSubstitutions(double length, size_t type, Eigen::MatrixXd &mat) const override
Stores the numbers of susbstitutions on a branch, for each initial and final states,...
void weightsHaveChanged() override
virtual ~DecompositionSubstitutionCount()
DecompositionSubstitutionCount(const DecompositionSubstitutionCount &dsc)
void computeCounts_(double length) const
void setSubstitutionModel(std::shared_ptr< const SubstitutionModelInterface > model) override
Set the substitution model.
Defines the basic types of data flow nodes.