5 #ifndef _LEGACY_PROBABILISTIC_SUBSTITUTION_MAPPING_H_
6 #define _LEGACY_PROBABILISTIC_SUBSTITUTION_MAPPING_H_
9 #include "../../Mapping/SubstitutionCount.h"
10 #include "../../Tree/TreeExceptions.h"
38 std::vector<std::vector<std::vector<double>>>
mapping_;
112 virtual double&
operator()(
size_t nodeIndex,
size_t siteIndex,
size_t type)
override
114 return mapping_[siteIndex][nodeIndex][type];
122 virtual const double&
operator()(
size_t nodeIndex,
size_t siteIndex,
size_t type)
const override
124 return mapping_[siteIndex][nodeIndex][type];
132 std::vector< std::vector<double>>&
operator[](
size_t siteIndex)
142 const std::vector< 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 substitution mapping interface.
Legacy data storage class for probabilistic substitution mappings.
std::vector< std::vector< double > > & operator[](size_t siteIndex)
Direct access to substitution numbers.
const std::vector< std::vector< double > > & operator[](size_t siteIndex) const
Direct access to substitution numbers.
virtual void setNumberOfSites(size_t numberOfSites) override
virtual ~LegacyProbabilisticSubstitutionMapping()
LegacyProbabilisticSubstitutionMapping(const Tree &tree, std::shared_ptr< const SubstitutionCountInterface > sc, size_t numberOfSites)
Build a new LegacyProbabilisticSubstitutionMapping object.
std::shared_ptr< const SubstitutionCountInterface > substitutionCount_
LegacyProbabilisticSubstitutionMapping(const Tree &tree)
Build a new ProbabilisticSubstitutionMapping object.
virtual const double & operator()(size_t nodeIndex, size_t siteIndex, size_t type) const override
Direct access to substitution numbers.
size_t getNumberOfSubstitutionTypes() const override
double getNumberOfSubstitutions(int nodeId, size_t siteIndex, size_t type) const
std::vector< std::vector< std::vector< double > > > mapping_
Substitution numbers storage.
LegacyProbabilisticSubstitutionMapping(const LegacyProbabilisticSubstitutionMapping &psm)=default
virtual void setTree(const Tree &tree)
(Re)-set the phylogenetic tree associated to this mapping.
virtual double & operator()(size_t nodeIndex, size_t siteIndex, size_t type) override
Direct access to substitution numbers.
virtual std::vector< double > getNumberOfSubstitutions(int nodeId, size_t siteIndex) const
LegacyProbabilisticSubstitutionMapping * clone() const override
LegacyProbabilisticSubstitutionMapping & operator=(const LegacyProbabilisticSubstitutionMapping &psm)=default
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.