40 #ifndef _PROBABILISTICREWARDMAPPING_H_ 41 #define _PROBABILISTICREWARDMAPPING_H_ 45 #include "../TreeExceptions.h" 47 #include <Bpp/Text/TextTools.h> 119 virtual double getReward(
int nodeId,
size_t siteIndex)
const 138 virtual double&
operator()(
size_t nodeIndex,
size_t siteIndex)
140 return mapping_[siteIndex][nodeIndex];
148 virtual const double&
operator()(
size_t nodeIndex,
size_t siteIndex)
const 150 return mapping_[siteIndex][nodeIndex];
168 const std::vector<double>&
operator[](
size_t siteIndex)
const 176 #endif //_PROBABILISTICREWARDMAPPING_H_
std::vector< double > & operator[](size_t siteIndex)
Direct access to rewards.
AbstractRewardMapping & operator=(const AbstractRewardMapping &arm)
virtual void setTree(const Tree &tree)
(Re)-set the phylogenetic tree associated to this mapping.
const std::vector< double > & operator[](size_t siteIndex) const
Direct access to rewards.
ProbabilisticRewardMapping & operator=(const ProbabilisticRewardMapping &prm)
Interface for phylogenetic tree objects.
ProbabilisticRewardMapping(const ProbabilisticRewardMapping &prm)
ProbabilisticRewardMapping(const Tree &tree, const Reward *reward, size_t numberOfSites)
Build a new ProbabilisticRewardMapping object.
virtual double getReward(int nodeId, size_t siteIndex) const
std::vector< std::vector< double > > mapping_
Rewards storage.
Partial implementation of the reward mapping interface.
Data storage class for probabilistic rewards mappings.
virtual size_t getNodeIndex(int nodeId) const
ProbabilisticRewardMapping * clone() const
virtual ~ProbabilisticRewardMapping()
ProbabilisticRewardMapping(const Tree &tree)
Build a new ProbabilisticRewardMapping object.
Partial implementation of the mapping interface.
virtual const double & operator()(size_t nodeIndex, size_t siteIndex) const
Direct access to rewards.
virtual void setNumberOfSites(size_t numberOfSites)
virtual double & operator()(size_t nodeIndex, size_t siteIndex)
Direct access to rewards.