bpp-phyl3
3.0.0
|
#include <Bpp/Phyl/Mapping/Reward.h>
Public Member Functions | |
Reward () | |
virtual | ~Reward () |
virtual Reward * | clone () const =0 |
virtual bool | hasAlphabetIndex () const =0 |
virtual std::shared_ptr< const AlphabetIndex1 > | getAlphabetIndex () const =0 |
virtual void | setAlphabetIndex (std::shared_ptr< const AlphabetIndex1 > alphind)=0 |
virtual std::shared_ptr< 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 | 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 length. More... | |
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. More... | |
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. More... | |
virtual void | setSubstitutionModel (std::shared_ptr< const SubstitutionModelInterface > model)=0 |
Set the substitution model associated with this reward, if relevant. More... | |
The Reward interface.
Provide a method to compute the reward of a real-valued function of the states on a branch. Namely, on a branch of length , with initial state and final state , if is the time spent in each state , the reward of is .
See: Minin, V.N. and Suchard, M.A., Fast, accurate and simulation-free stochastic mapping Philosophical Transactions of the Royal Society B 2008 363:3985-95.
|
pure virtual |
Implements bpp::Clonable.
Implemented in bpp::DecompositionReward.
Referenced by bpp::RewardMappingTools::computeRewardVectors().
|
pure virtual |
Get the rewards on a branch, for each initial and final states, and given the branch length.
length | The length of the branch. |
Implemented in bpp::DecompositionReward.
|
inlinevirtual |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet().
Definition at line 65 of file Reward.h.
References getAlphabetIndex().
Referenced by getNumberOfStates().
|
pure virtual |
Implemented in bpp::AbstractReward.
Referenced by getAlphabet().
|
inlinevirtual |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Definition at line 75 of file Reward.h.
References getAlphabet().
|
pure virtual |
Get the reward 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. |
Implemented in bpp::DecompositionReward.
|
pure virtual |
Implemented in bpp::AbstractReward.
|
pure virtual |
alphind | The new AlphabetIndex1 object to be associated to this instance. |
Implemented in bpp::AbstractReward.
|
pure virtual |
Set the substitution model associated with this reward, if relevant.
model | The substitution model to use with this reward. |
Implemented in bpp::DecompositionReward.
|
pure virtual |
Store the rewards on a branch, for each initial and final states, and given the branch length.
length | The length of the branch. |
mat | A matrix to store all rewards for each initial and final states. |
Implemented in bpp::DecompositionReward.