43 #include "../Model/SubstitutionModel.h" 45 #include <Bpp/Numeric/Matrix/Matrix.h> 46 #include <Bpp/Seq/AlphabetIndex/AlphabetIndex1.h> 71 public virtual Clonable
127 virtual double getReward(
size_t initialState,
size_t finalState,
double length)
const = 0;
136 virtual Matrix<double>*
getAllRewards(
double length)
const = 0;
virtual size_t getNumberOfStates() const
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Interface for all substitution models.
AlphabetIndex1 * alphIndex_
bool hasAlphabetIndex() const
virtual void setAlphabetIndex(AlphabetIndex1 *alphind)=0
AbstractReward & operator=(const AbstractReward &ar)
virtual void setSubstitutionModel(const SubstitutionModel *model)=0
Set the substitution model associated with this reward, if relevant.
AbstractReward(const AbstractReward &ar)
virtual const Alphabet * getAlphabet() const
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet().
Basic implementation of the the Reward interface.
virtual const AlphabetIndex1 * getAlphabetIndex() const =0
const AlphabetIndex1 * getAlphabetIndex() const
virtual Reward * clone() const =0
virtual bool hasAlphabetIndex() 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...
AlphabetIndex1 * getAlphabetIndex()
AbstractReward(AlphabetIndex1 *alphIndex)
void setAlphabetIndex(AlphabetIndex1 *alphIndex)
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 void alphabetIndexHasChanged()=0