bpp-phyl3
3.0.0
|
Basic implementation of the the Reward interface. More...
#include <Bpp/Phyl/Mapping/Reward.h>
Public Member Functions | |
AbstractReward (std::shared_ptr< const AlphabetIndex1 > alphIndex) | |
AbstractReward (const AbstractReward &ar) | |
AbstractReward & | operator= (const AbstractReward &ar) |
virtual | ~AbstractReward () |
bool | hasAlphabetIndex () const |
void | setAlphabetIndex (std::shared_ptr< const AlphabetIndex1 > alphIndex) |
attribution of an AlphabetIndex1 More... | |
std::shared_ptr< const AlphabetIndex1 > | getAlphabetIndex () const |
const AlphabetIndex1 & | alphabetIndex () const |
virtual Reward * | clone () const =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... | |
Protected Member Functions | |
virtual void | alphabetIndexHasChanged ()=0 |
Protected Attributes | |
std::shared_ptr< const AlphabetIndex1 > | alphIndex_ |
Basic implementation of the the Reward interface.
This partial implementation deals with the AlphabetIndex1 gestion, by owning a pointer.
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
Definition at line 161 of file Reward.h.
References alphIndex_.
|
protectedpure virtual |
Implemented in bpp::DecompositionReward.
Referenced by setAlphabetIndex().
|
pure virtualinherited |
Implements bpp::Clonable.
Implemented in bpp::DecompositionReward.
Referenced by bpp::RewardMappingTools::computeRewardVectors().
|
pure virtualinherited |
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.
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet().
Definition at line 65 of file Reward.h.
References bpp::Reward::getAlphabetIndex().
Referenced by bpp::Reward::getNumberOfStates().
|
inlinevirtual |
Implements bpp::Reward.
Definition at line 159 of file Reward.h.
References alphIndex_.
Referenced by bpp::DecompositionReward::fillBMatrice_().
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Definition at line 75 of file Reward.h.
References bpp::Reward::getAlphabet().
|
pure virtualinherited |
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.
|
inlinevirtual |
Implements bpp::Reward.
Definition at line 146 of file Reward.h.
References alphIndex_.
|
inline |
Definition at line 137 of file Reward.h.
References alphIndex_.
Referenced by bpp::DecompositionReward::operator=().
|
inlinevirtual |
attribution of an AlphabetIndex1
alphIndex | pointer to a AlphabetIndex1 |
Implements bpp::Reward.
Definition at line 153 of file Reward.h.
References alphabetIndexHasChanged(), and alphIndex_.
|
pure virtualinherited |
Set the substitution model associated with this reward, if relevant.
model | The substitution model to use with this reward. |
Implemented in bpp::DecompositionReward.
|
pure virtualinherited |
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.
|
protected |
Definition at line 126 of file Reward.h.
Referenced by alphabetIndex(), bpp::DecompositionReward::alphabetIndexHasChanged(), bpp::DecompositionReward::DecompositionReward(), getAlphabetIndex(), hasAlphabetIndex(), operator=(), setAlphabetIndex(), and bpp::DecompositionReward::setSubstitutionModel().