5 #ifndef BPP_PHYL_LEGACY_LIKELIHOOD_DISCRETERATESACROSSSITESTREELIKELIHOOD_H
6 #define 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 ~DiscreteRatesAcrossSitesTreeLikelihoodInterface()
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.
DiscreteRatesAcrossSitesTreeLikelihoodInterface()
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