5 #ifndef BPP_PHYL_MAPPING_REWARD_H
6 #define BPP_PHYL_MAPPING_REWARD_H
11 #include "../Model/SubstitutionModel.h"
87 virtual double getReward(
size_t initialState,
size_t finalState,
double length)
const = 0;
Basic implementation of the the Reward interface.
std::shared_ptr< const AlphabetIndex1 > alphIndex_
AbstractReward(const AbstractReward &ar)
const AlphabetIndex1 & alphabetIndex() const
bool hasAlphabetIndex() const
AbstractReward(std::shared_ptr< const AlphabetIndex1 > alphIndex)
std::shared_ptr< const AlphabetIndex1 > getAlphabetIndex() const
void setAlphabetIndex(std::shared_ptr< const AlphabetIndex1 > alphIndex)
attribution of an AlphabetIndex1
virtual ~AbstractReward()
virtual void alphabetIndexHasChanged()=0
AbstractReward & operator=(const AbstractReward &ar)
virtual std::shared_ptr< const Alphabet > getAlphabet() const
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet().
virtual size_t getNumberOfStates() const
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
virtual void setAlphabetIndex(std::shared_ptr< const AlphabetIndex1 > alphind)=0
virtual void storeAllRewards(double length, Eigen::MatrixXd &mat) const =0
Store the rewards on a branch, for each initial and final states, and given the branch length.
virtual bool hasAlphabetIndex() const =0
virtual void setSubstitutionModel(std::shared_ptr< const SubstitutionModelInterface > model)=0
Set the substitution model associated with this reward, if relevant.
virtual double getReward(size_t initialState, size_t finalState, double length) const =0
Get the reward of susbstitutions on a branch, given the initial and final states, and the branch leng...
virtual Reward * clone() const =0
virtual std::shared_ptr< const AlphabetIndex1 > getAlphabetIndex() const =0
virtual Matrix< double > * getAllRewards(double length) const =0
Get the rewards on a branch, for each initial and final states, and given the branch length.
Defines the basic types of data flow nodes.