5 #ifndef BPP_PHYL_LEGACY_LIKELIHOOD_ABSTRACTDISCRETERATESACROSSSITESTREELIKELIHOOD_H
6 #define BPP_PHYL_LEGACY_LIKELIHOOD_ABSTRACTDISCRETERATESACROSSSITESTREELIKELIHOOD_H
9 #include "../../Model/SubstitutionModel.h"
30 std::shared_ptr<DiscreteDistributionInterface> rDist,
Partial implementation of the DiscreteRatesAcrossSitesTreeLikelihood interface.
Vdouble getPosteriorRatePerSite() const
Get the posterior rate, i.e. averaged over all classes and weighted with posterior probabilities,...
ParameterList getRateDistributionParameters() const
Get the parameters associated to the rate distribution.
size_t getNumberOfClasses() const
Get the number of classes.
Vdouble getRateWithMaxPostProbPerSite() const
Get the posterior rate (the one with maximum posterior probability) for each site.
VVdouble getLogLikelihoodPerSitePerRateClass() const
Get the logarithm of the likelihood for each site and each rate class.
virtual ~AbstractDiscreteRatesAcrossSitesTreeLikelihood()
std::shared_ptr< const DiscreteDistributionInterface > getRateDistribution() const
Get the rate distribution used for the computation.
VVdouble getTransitionProbabilities(int nodeId, size_t siteIndex) const
Retrieves all Pij(t) for a particular branch, defined by the upper node and site.
AbstractDiscreteRatesAcrossSitesTreeLikelihood & operator=(const AbstractDiscreteRatesAcrossSitesTreeLikelihood &tl)
double getLikelihoodForASiteForAState(size_t site, int state) const
Get the likelihood for a site and for a state.
AbstractDiscreteRatesAcrossSitesTreeLikelihood(std::shared_ptr< DiscreteDistributionInterface > rDist, bool verbose=true)
ParameterList getNonDerivableParameters() const
All non derivable parameters.
VVdouble getPosteriorProbabilitiesPerRate() const
Get the posterior probability for each site of belonging to a particular rate class.
ParameterList getDerivableParameters() const
All derivable parameters.
AbstractDiscreteRatesAcrossSitesTreeLikelihood(const AbstractDiscreteRatesAcrossSitesTreeLikelihood &tl)
VVVdouble getLogLikelihoodPerSitePerRateClassPerState() const
Get the logarithm of the likelihood for each site and each rate class and each state.
double getLogLikelihoodForASiteForAState(size_t site, int state) const
Get the logarithm of the likelihood for a site and for a state.
std::shared_ptr< DiscreteDistributionInterface > rateDistribution_
static void displayLikelihoodArray(const VVVdouble &likelihoodArray)
Print the likelihood array to terminal (debugging tool).
static void resetLikelihoodArray(VVVdouble &likelihoodArray)
Set all conditional likelihoods to 1.
VVdouble getLikelihoodPerSitePerRateClass() const
Get the likelihood for each site and each rate class.
std::vector< size_t > getRateClassWithMaxPostProbPerSite() const
Get the posterior rate class (the one with maximum posterior probability) for each site.
const DiscreteDistributionInterface & rateDistribution() const
Get the rate distribution used for the computation.
DiscreteDistributionInterface & rateDistribution()
Get the rate distribution used for the computation.
std::shared_ptr< DiscreteDistributionInterface > getRateDistribution()
Get the rate distribution used for the computation.
VVVdouble getLikelihoodPerSitePerRateClassPerState() const
Get the likelihood for each site and each rate class and each state.
Partial implementation of the TreeLikelihood interface.
AbstractTreeLikelihood & operator=(const AbstractTreeLikelihood &lik)
Interface for rate across sites (RAS) implementation.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble
std::vector< VVdouble > VVVdouble
std::vector< Vdouble > VVdouble