bpp-phyl3  3.0.0
DiscreteRatesAcrossSitesTreeLikelihood.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_PHYL_LEGACY_LIKELIHOOD_DISCRETERATESACROSSSITESTREELIKELIHOOD_H
6 #define BPP_PHYL_LEGACY_LIKELIHOOD_DISCRETERATESACROSSSITESTREELIKELIHOOD_H
7 
10 
11 #include "TreeLikelihood.h"
12 
13 namespace bpp
14 {
21  public virtual TreeLikelihoodInterface
22 {
23 public:
26 
27 public:
33  virtual std::shared_ptr<const DiscreteDistributionInterface> getRateDistribution() const = 0;
34 
40  virtual std::shared_ptr<DiscreteDistributionInterface> getRateDistribution() = 0;
41 
47  virtual const DiscreteDistributionInterface& rateDistribution() const = 0;
48 
55 
63  virtual double getLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const = 0;
64 
72  virtual double getLogLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const = 0;
73 
82  virtual double getLikelihoodForASiteForARateClassForAState(size_t site, size_t rateClass, int state) const = 0;
83 
92  virtual double getLogLikelihoodForASiteForARateClassForAState(size_t site, size_t rateClass, int state) const = 0;
93 
100 
108 
115 
123 
132 
139  virtual std::vector<size_t> getRateClassWithMaxPostProbPerSite() const = 0;
140 
148 
155  virtual Vdouble getPosteriorRatePerSite() const = 0;
156 
163 
169  virtual size_t getNumberOfClasses() const = 0;
170 
180  virtual VVVdouble getTransitionProbabilitiesPerRateClass(int nodeId, size_t siteIndex) const = 0;
181 };
182 } // end of namespace bpp.
183 #endif // BPP_PHYL_LEGACY_LIKELIHOOD_DISCRETERATESACROSSSITESTREELIKELIHOOD_H
Interface for rate across sites (RAS) implementation.
virtual Vdouble getRateWithMaxPostProbPerSite() const =0
Get the posterior rate (the one with maximum posterior probability) for each site.
virtual double getLogLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const =0
Get the logarithm of the likelihood for a site knowing its rate class.
virtual VVVdouble getLikelihoodPerSitePerRateClassPerState() const =0
Get the likelihood for each site and each rate class and each state.
virtual double getLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const =0
Get the likelihood for a site knowing its rate class.
virtual size_t getNumberOfClasses() const =0
Get the number of classes.
virtual VVVdouble getTransitionProbabilitiesPerRateClass(int nodeId, size_t siteIndex) const =0
Retrieves all Pij(t) for a particular branch, defined by the upper node.
virtual VVVdouble getLogLikelihoodPerSitePerRateClassPerState() const =0
Get the logarithm of the likelihood for each site and each rate class and each state.
virtual double getLogLikelihoodForASiteForARateClassForAState(size_t site, size_t rateClass, int state) const =0
Get the logarithm of the likelihood for a site knowing its rate class and its ancestral state.
virtual std::shared_ptr< const DiscreteDistributionInterface > getRateDistribution() const =0
Get the rate distribution used for the computation.
virtual Vdouble getPosteriorRatePerSite() const =0
Get the posterior rate, i.e. averaged over all classes and weighted with posterior probabilities,...
virtual ParameterList getRateDistributionParameters() const =0
Get the parameters associated to the rate distribution.
virtual VVdouble getLikelihoodPerSitePerRateClass() const =0
Get the likelihood for each site and each rate class.
virtual std::vector< size_t > getRateClassWithMaxPostProbPerSite() const =0
Get the posterior rate class (the one with maximum posterior probability) for each site.
virtual const DiscreteDistributionInterface & rateDistribution() const =0
Get the rate distribution used for the computation.
virtual VVdouble getPosteriorProbabilitiesPerRate() const =0
Get the posterior probability for each site of belonging to a particular rate class.
virtual std::shared_ptr< DiscreteDistributionInterface > getRateDistribution()=0
Get the rate distribution used for the computation.
virtual VVdouble getLogLikelihoodPerSitePerRateClass() const =0
Get the logarithm of the likelihood for each site and each rate class.
virtual double getLikelihoodForASiteForARateClassForAState(size_t site, size_t rateClass, int state) const =0
Get the likelihood for a site knowing its rate class and its ancestral state.
virtual DiscreteDistributionInterface & rateDistribution()=0
Get the rate distribution used for the computation.
The TreeLikelihood interface.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble
std::vector< VVdouble > VVVdouble
std::vector< Vdouble > VVdouble