5 #ifndef BPP_PHYL_MAPPING_DECOMPOSITIONREWARD_H
6 #define BPP_PHYL_MAPPING_DECOMPOSITIONREWARD_H
38 std::shared_ptr<const SubstitutionModelInterface> model,
39 std::shared_ptr<const AlphabetIndex1> alphIndex);
43 std::shared_ptr<const AlphabetIndex1> alphIndex);
67 double getReward(
size_t initialState,
size_t finalState,
double length)
const override;
71 void storeAllRewards(
double length, Eigen::MatrixXd& mat)
const override;
Basic implementation of the the Reward interface.
AbstractReward & operator=(const AbstractReward &ar)
Methods useful for analytical substitution count and rewards using the eigen decomposition method.
DecompositionMethods & operator=(const DecompositionMethods &dm)
Analytical reward using the eigen decomposition method.
DecompositionReward(const DecompositionReward &dr)
void storeAllRewards(double length, Eigen::MatrixXd &mat) const override
Store the rewards on a branch, for each initial and final states, and given the branch length.
Matrix< double > * getAllRewards(double length) const override
Get the rewards on a branch, for each initial and final states, and given the branch length.
void computeRewards_(double length) const
DecompositionReward(std::shared_ptr< const SubstitutionModelInterface > model, std::shared_ptr< const AlphabetIndex1 > alphIndex)
void alphabetIndexHasChanged() override
void setSubstitutionModel(std::shared_ptr< const SubstitutionModelInterface > model) override
Set the substitution model.
DecompositionReward * clone() const override
DecompositionReward & operator=(const DecompositionReward &dr)
RowMatrix< double > rewards_
double getReward(size_t initialState, size_t finalState, double length) const override
Get the reward of susbstitutions on a branch, given the initial and final states, and the branch leng...
virtual ~DecompositionReward()
Map the states of a given alphabet which have a model state.
Defines the basic types of data flow nodes.