40 #ifndef _PROBABILISTICSUBSTITUTIONMAPPING_H_ 41 #define _PROBABILISTICSUBSTITUTIONMAPPING_H_ 45 #include "../TreeExceptions.h" 47 #include <Bpp/Text/TextTools.h> 73 std::vector< std::vector< std::vector<double> > >
mapping_;
150 virtual double&
operator()(
size_t nodeIndex,
size_t siteIndex,
size_t type)
152 return mapping_[siteIndex][nodeIndex][type];
160 virtual const double&
operator()(
size_t nodeIndex,
size_t siteIndex,
size_t type)
const 162 return mapping_[siteIndex][nodeIndex][type];
170 std::vector< std::vector<double> >&
operator[](
size_t siteIndex)
180 const std::vector< std::vector<double> >&
operator[](
size_t siteIndex)
const 188 #endif //_PROBABILISTICSUBSTITUTIONMAPPING_H_ Partial implementation of the substitution mapping interface.
virtual void setNumberOfSites(size_t numberOfSites)
virtual const double & operator()(size_t nodeIndex, size_t siteIndex, size_t type) const
Direct access to substitution numbers.
virtual void setTree(const Tree &tree)
(Re)-set the phylogenetic tree associated to this mapping.
virtual std::vector< double > getNumberOfSubstitutions(int nodeId, size_t siteIndex) const
Data storage class for probabilistic substitution mappings.
ProbabilisticSubstitutionMapping(const Tree &tree)
Build a new ProbabilisticSubstitutionMapping object.
size_t getNumberOfSubstitutionTypes() const
ProbabilisticSubstitutionMapping(const ProbabilisticSubstitutionMapping &psm)
Interface for phylogenetic tree objects.
virtual double & operator()(size_t nodeIndex, size_t siteIndex, size_t type)
Direct access to substitution numbers.
ProbabilisticSubstitutionMapping & operator=(const ProbabilisticSubstitutionMapping &psm)
std::vector< std::vector< std::vector< double > > > mapping_
Substitution numbers storage.
const std::vector< std::vector< double > > & operator[](size_t siteIndex) const
Direct access to substitution numbers.
const SubstitutionCount * substitutionCount_
virtual ~ProbabilisticSubstitutionMapping()
virtual size_t getNumberOfSubstitutionTypes() const
Short cut function, equivalent to getSubstitutionRegister().getNumberOfSubstitutionTypes().
virtual double getNumberOfSubstitutions(int nodeId, size_t siteIndex, size_t type) const
The SubstitutionsCount interface.
ProbabilisticSubstitutionMapping(const Tree &tree, const SubstitutionCount *sc, size_t numberOfSites)
Build a new ProbabilisticSubstitutionMapping object.
std::vector< std::vector< double > > & operator[](size_t siteIndex)
Direct access to substitution numbers.
virtual size_t getNodeIndex(int nodeId) const
Partial implementation of the mapping interface.
ProbabilisticSubstitutionMapping * clone() const
AbstractSubstitutionMapping & operator=(const AbstractSubstitutionMapping &absm)