bpp-phyl
2.2.0
|
Basic implementation of the the Reward interface. More...
#include <Bpp/Phyl/Mapping/Reward.h>
Public Member Functions | |
AbstractReward (AlphabetIndex1 *alphIndex) | |
AbstractReward (const AbstractReward &ar) | |
AbstractReward & | operator= (const AbstractReward &ar) |
~AbstractReward () | |
bool | hasAlphabetIndex () const |
void | setAlphabetIndex (AlphabetIndex1 *alphIndex) |
const AlphabetIndex1 * | getAlphabetIndex () const |
AlphabetIndex1 * | getAlphabetIndex () |
virtual Reward * | clone () const =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... | |
Protected Member Functions | |
virtual void | alphabetIndexHasChanged ()=0 |
Protected Attributes | |
AlphabetIndex1 * | alphIndex_ |
Basic implementation of the the Reward interface.
This partial implementation deals with the AlphabetIndex1 gestion, by maintaining a pointer.
|
inline |
|
inline |
|
protectedpure virtual |
Implemented in bpp::DecompositionReward.
Referenced by setAlphabetIndex().
|
pure virtualinherited |
Implemented in bpp::DecompositionReward.
|
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 108 of file Reward.h.
References bpp::Reward::getAlphabetIndex().
Referenced by bpp::Reward::getNumberOfStates().
|
inlinevirtual |
Implements bpp::Reward.
Definition at line 194 of file Reward.h.
References alphIndex_.
Referenced by bpp::DecompositionReward::computeBMatrice_().
|
inlinevirtual |
Implements bpp::Reward.
Definition at line 196 of file Reward.h.
References alphIndex_.
|
inlinevirtualinherited |
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Definition at line 115 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 179 of file Reward.h.
References alphIndex_.
|
inline |
Definition at line 166 of file Reward.h.
References alphIndex_.
Referenced by bpp::DecompositionReward::operator=().
|
inlinevirtual |
alphind | The new AlphabetIndex1 object to be associated to this instance. |
Implements bpp::Reward.
Definition at line 188 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.
|
protected |
Definition at line 155 of file Reward.h.
Referenced by bpp::DecompositionReward::alphabetIndexHasChanged(), bpp::DecompositionReward::DecompositionReward(), getAlphabetIndex(), hasAlphabetIndex(), operator=(), setAlphabetIndex(), and bpp::DecompositionReward::setSubstitutionModel().