40 #ifndef _ABSTRACTDISCRETERATEACROSSSITESTREELIKELIHOOD_H_ 41 #define _ABSTRACTDISCRETERATEACROSSSITESTREELIKELIHOOD_H_ 45 #include "../Model/SubstitutionModel.h" 65 DiscreteDistribution* rDist,
146 #endif //_ABSTRACTDISCRETERATEACROSSSITESTREELIKELIHOOD_H_ Vdouble getRateWithMaxPostProbOfEachSite() const
Get the posterior rate (the one with maximum posterior probability) for each site.
Partial implementation of the DiscreteRatesAcrossSitesTreeLikelihood interface.
double getLogLikelihoodForASiteForAState(size_t site, int state) const
Get the logarithm of the likelihood for a site and for a state.
const DiscreteDistribution * getRateDistribution() const
Get the rate distribution used for the computation.
ParameterList getRateDistributionParameters() const
Get the parameters associated to the rate distirbution.
double getLikelihoodForASiteForAState(size_t site, int state) const
Get the likelihood for a site and for a state.
VVdouble getTransitionProbabilities(int nodeId, size_t siteIndex) const
Retrieves all Pij(t) for a particular branch, defined by the upper node and site. ...
static void displayLikelihoodArray(const VVVdouble &likelihoodArray)
Print the likelihood array to terminal (debugging tool).
VVdouble getPosteriorProbabilitiesOfEachRate() const
Get the posterior probability for each site of belonging to a particular rate class.
AbstractTreeLikelihood & operator=(const AbstractTreeLikelihood &lik)
virtual ~AbstractDiscreteRatesAcrossSitesTreeLikelihood()
DiscreteDistribution * getRateDistribution()
Get the rate distribution used for the computation.
Partial implementation of the TreeLikelihood interface.
Vdouble getPosteriorRateOfEachSite() const
Get the posterior rate, i.e. averaged over all classes and weighted with posterior probabilities...
Interface for rate across sites (RAS) implementation.
VVVdouble getLogLikelihoodForEachSiteForEachRateClassForEachState() const
Get the logarithm of the likelihood for each site and each rate class and each state.
std::vector< size_t > getRateClassWithMaxPostProbOfEachSite() const
Get the posterior rate class (the one with maximum posterior probability) for each site...
static void resetLikelihoodArray(VVVdouble &likelihoodArray)
Set all conditional likelihoods to 1.
ParameterList getNonDerivableParameters() const
All non derivable parameters.
AbstractDiscreteRatesAcrossSitesTreeLikelihood & operator=(const AbstractDiscreteRatesAcrossSitesTreeLikelihood &tl)
VVVdouble getLikelihoodForEachSiteForEachRateClassForEachState() const
Get the likelihood for each site and each rate class and each state.
size_t getNumberOfClasses() const
Get the number of classes.
DiscreteDistribution * rateDistribution_
AbstractDiscreteRatesAcrossSitesTreeLikelihood(DiscreteDistribution *rDist, bool verbose=true)
VVdouble getLogLikelihoodForEachSiteForEachRateClass() const
Get the logarithm of the likelihood for each site and each rate class.
ParameterList getDerivableParameters() const
All derivable parameters.
VVdouble getLikelihoodForEachSiteForEachRateClass() const
Get the likelihood for each site and each rate class.