39 #ifndef _RHOMOGENEOUSMIXEDTREELIKELIHOOD_H_ 40 #define _RHOMOGENEOUSMIXEDTREELIKELIHOOD_H_ 43 #include "../Model/SubstitutionModel.h" 44 #include "../Model/MixedSubstitutionModel.h" 46 #include <Bpp/Numeric/VectorTools.h> 47 #include <Bpp/Numeric/Prob/DiscreteDistribution.h> 88 DiscreteDistribution* rDist,
89 bool checkRooted =
true,
91 bool usePatterns =
true)
111 const SiteContainer& data,
113 DiscreteDistribution* rDist,
114 bool checkRooted = true,
116 bool usePatterns = true)
135 void setData(
const SiteContainer& sites)
throw (Exception);
210 #endif // _RHOMOGENEOUSMIXEDTREELIKELIHOOD_H_ virtual void computeTreeDLikelihood(const std::string &variable)
double getLikelihoodForASiteForARateClassForAState(size_t site, size_t rateClass, int state) const
Get the likelihood for a site knowing its rate class and its ancestral state.
Interface for all substitution models.
void initialize()
Init the likelihood object.
double getLogLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
Get the logarithm of the likelihood for a site knowing its rate class.
virtual void computeDownSubtreeDLikelihood(const Node *)
Interface for phylogenetic tree objects.
std::vector< RHomogeneousTreeLikelihood * > treeLikelihoodsContainer_
This class implement the 'traditional' way of computing likelihood for a tree.
virtual double getD2LikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
void setData(const SiteContainer &sites)
Set the dataset for which the likelihood must be evaluated.
virtual void computeDownSubtreeD2Likelihood(const Node *)
void computeAllTransitionProbabilities()
This method is used by fireParameterChanged method.
double getLogLikelihoodForASiteForARateClassForAState(size_t site, size_t rateClass, int state) const
Get the logarithm of the likelihood for a site knowing its rate class and its ancestral state...
virtual double getDLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
void fireParameterChanged(const ParameterList ¶ms)
virtual void setMinimumBranchLength(double brlen)
RHomogeneousMixedTreeLikelihood(const Tree &tree, SubstitutionModel *model, DiscreteDistribution *rDist, bool checkRooted=true, bool verbose=true, bool usePatterns=true)
Build a new RHomogeneousMixedTreeLikelihood object without data.
double getLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
Get the likelihood for a site knowing its rate class.
The phylogenetic node class.
void computeTreeLikelihood()
virtual void displayLikelihood(const Node *node)
This method is mainly for debugging purpose.
std::vector< double > probas_
void computeTransitionProbabilitiesForNode(const Node *node)
This method is used by fireParameterChanged method.
virtual void setMaximumBranchLength(double brlen)
virtual void computeTreeD2Likelihood(const std::string &variable)
virtual void computeSubtreeLikelihood(const Node *node)
Compute the likelihood for a subtree defined by the Tree::Node node.
RHomogeneousMixedTreeLikelihood * clone() const