5 #ifndef BPP_PHYL_MAPPING_PROBABILISTICREWARDMAPPING_H
6 #define BPP_PHYL_MAPPING_PROBABILISTICREWARDMAPPING_H
10 #include "../Likelihood/DataFlow/DataFlowCWise.h"
11 #include "../Tree/PhyloTreeExceptions.h"
70 for ( ; !nIT->end(); nIT->next())
83 for ( ; !nIT->end(); nIT->next())
152 virtual double getReward(
int branchId,
size_t site)
const
165 virtual double operator()(uint branchId,
size_t siteIndex)
const override
167 return (*
getEdge(branchId))(siteIndex);
176 virtual double&
operator()(uint branchId,
size_t siteIndex)
override
178 return (*
getEdge(branchId))(siteIndex);
AbstractMapping & operator=(const AbstractMapping &absm)=default
Partial implementation of the substitution mapping interface.
size_t getNumberOfEdges() const
virtual std::unique_ptr< EdgeIterator > allEdgesIterator()=0
virtual std::shared_ptr< E > getEdge(EdgeIndex edgeIndex) const=0
AssociationTreeGraphImplObserver< N, E, TreeGraphImpl > & operator=(bpp::AssociationTreeGraphImplObserver< N, E, TreeGraphImpl > const &treeGraphObserver)
Data storage class for probabilistic rewards mappings.
PhyloBranch & getBranch(unsigned int branchIndex) override
size_t numberOfDistinctSites_
virtual double getReward(int branchId, size_t site) const
Retrieve the rewards, with compressed site positions.
ProbabilisticRewardMapping * clone() const override
size_t getNumberOfBranches() const override
ProbabilisticRewardMapping(const PhyloTree &tree, size_t numberOfSites)
Build a new ProbabilisticRewardMapping object.
mapTree::EdgeIterator EdgeIterator
virtual void setNumberOfSites(size_t numberOfSites) override
ProbabilisticRewardMapping(const PhyloTree &tree, const PatternType &rootpatterns, size_t nbDistinctSites)
the same with rootPatternLinks
ProbabilisticRewardMapping(const ProbabilisticRewardMapping &prm)
virtual double & operator()(uint branchId, size_t siteIndex) override
Direct access to rewards, with COMPRESSED site positions (ie site indexes).
const PhyloBranch & getBranch(unsigned int branchIndex) const override
ProbabilisticRewardMapping(const PhyloTree &tree)
Build a new ProbabilisticRewardMapping object.
mapTree::NodeIterator NodeIterator
ProbabilisticRewardMapping & operator=(const ProbabilisticRewardMapping &prm)
size_t getNumberOfDistinctSites() const
const PatternType & getPatterns() const
returns the vector of site patterns
virtual ~ProbabilisticRewardMapping()
bool usePatterns() const
Does it use site patterns?
virtual double operator()(uint branchId, size_t siteIndex) const override
Direct access to rewards, with COMPRESSED site positions (ie site indexes)
const size_t getSiteIndex(size_t site) const
AssociationTreeGlobalGraphObserver< PhyloNode, PhyloBranchReward > mapTree
PatternType rootPatternLinks_
Links between sites and patterns.
Defines the basic types of data flow nodes.
Eigen::Matrix< size_t, -1, 1 > PatternType