|
bpp-phyl
2.2.0
|
#include <Bpp/Phyl/Mapping/Reward.h>
Inheritance diagram for bpp::Reward:
Collaboration diagram for bpp::Reward:Public Member Functions | |
| Reward () | |
| virtual | ~Reward () |
| virtual Reward * | clone () const =0 |
| virtual bool | hasAlphabetIndex () const =0 |
| virtual const AlphabetIndex1 * | getAlphabetIndex () const =0 |
| virtual AlphabetIndex1 * | getAlphabetIndex ()=0 |
| virtual void | setAlphabetIndex (AlphabetIndex1 *alphind)=0 |
| virtual 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 | setSubstitutionModel (const SubstitutionModel *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 |
Implemented in bpp::DecompositionReward.
|
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 108 of file Reward.h.
References getAlphabetIndex().
Referenced by getNumberOfStates().
|
pure virtual |
Implemented in bpp::AbstractReward.
Referenced by getAlphabet().
|
pure virtual |
Implemented in bpp::AbstractReward.
|
inlinevirtual |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Definition at line 115 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.