5 #ifndef _LEGACY_PROBABILISTIC_REWARD_MAPPING_H_
6 #define _LEGACY_PROBABILISTIC_REWARD_MAPPING_H_
9 #include "../../Mapping/Reward.h"
10 #include "../../Tree/TreeExceptions.h"
81 virtual double getReward(
int nodeId,
size_t siteIndex)
const
100 virtual double&
operator()(
size_t nodeIndex,
size_t siteIndex)
override
102 return mapping_[siteIndex][nodeIndex];
110 virtual const double&
operator()(
size_t nodeIndex,
size_t siteIndex)
const override
112 return mapping_[siteIndex][nodeIndex];
130 const std::vector<double>&
operator[](
size_t siteIndex)
const
const TreeTemplate< Node > & tree() const override
virtual size_t getNodeIndex(int nodeId) const override
Partial implementation of the reward mapping interface.
Legacy data storage class for probabilistic rewards mappings.
const std::vector< double > & operator[](size_t siteIndex) const
Direct access to rewards.
virtual const double & operator()(size_t nodeIndex, size_t siteIndex) const override
Direct access to rewards.
virtual ~LegacyProbabilisticRewardMapping()
LegacyProbabilisticRewardMapping & operator=(const LegacyProbabilisticRewardMapping &prm)=default
std::vector< double > & operator[](size_t siteIndex)
Direct access to rewards.
LegacyProbabilisticRewardMapping(const LegacyProbabilisticRewardMapping &prm)=default
LegacyProbabilisticRewardMapping * clone() const override
virtual double & operator()(size_t nodeIndex, size_t siteIndex) override
Direct access to rewards.
virtual double getReward(int nodeId, size_t siteIndex) const
LegacyProbabilisticRewardMapping(const Tree &tree)
Build a new ProbabilisticRewardMapping object.
virtual void setNumberOfSites(size_t numberOfSites) override
std::vector< std::vector< double > > mapping_
Rewards storage.
virtual void setTree(const Tree &tree)
(Re)-set the phylogenetic tree associated to this mapping.
std::shared_ptr< const Reward > reward_
LegacyProbabilisticRewardMapping(const Tree &tree, std::shared_ptr< const Reward > reward, size_t numberOfSites)
Build a new LegacyProbabilisticRewardMapping object.
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.