5 #ifndef BPP_PHYL_LEGACY_LIKELIHOOD_RHOMOGENEOUSMIXEDTREELIKELIHOOD_H
6 #define BPP_PHYL_LEGACY_LIKELIHOOD_RHOMOGENEOUSMIXEDTREELIKELIHOOD_H
11 #include "../../Model/MixedTransitionModel.h"
12 #include "../../Model/SubstitutionModel.h"
53 std::shared_ptr<TransitionModelInterface> model,
54 std::shared_ptr<DiscreteDistributionInterface> rDist,
55 bool checkRooted =
true,
57 bool usePatterns =
true);
77 std::shared_ptr<TransitionModelInterface> model,
78 std::shared_ptr<DiscreteDistributionInterface> rDist,
79 bool checkRooted =
true,
81 bool usePatterns =
true);
const AlignmentDataInterface & data() const
Get the dataset for which the likelihood must be evaluated.
const Tree & tree() const
Get the tree (topology and branch lengths).
The phylogenetic node class.
virtual double getDLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
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 ~RHomogeneousMixedTreeLikelihood()
RHomogeneousMixedTreeLikelihood * clone() const
void computeTransitionProbabilitiesForNode(const Node *node)
This method is used by fireParameterChanged method.
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.
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.
void computeAllTransitionProbabilities()
This method is used by fireParameterChanged method.
virtual double getD2LikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
RHomogeneousMixedTreeLikelihood & operator=(const RHomogeneousMixedTreeLikelihood &lik)
virtual void computeDownSubtreeD2Likelihood(const Node *)
void fireParameterChanged(const ParameterList ¶ms)
virtual void computeDownSubtreeDLikelihood(const Node *)
std::vector< std::shared_ptr< RHomogeneousTreeLikelihood > > treeLikelihoodsContainer_
void setData(const AlignmentDataInterface &sites)
Set the dataset for which the likelihood must be evaluated.
void initialize()
Init the likelihood object.
std::vector< double > probas_
double getLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
Get the likelihood for a site knowing its rate class.
void computeTreeLikelihood()
virtual void displayLikelihood(const Node *node)
This method is mainly for debugging purpose.
virtual void computeTreeDLikelihood(const std::string &variable)
double getLogLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
Get the logarithm of the likelihood for a site knowing its rate class.
This class implement the 'traditional' way of computing likelihood for a tree.
friend class RHomogeneousMixedTreeLikelihood
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.