5 #ifndef BPP_PHYL_LEGACY_LIKELIHOOD_DRHOMOGENEOUSMIXEDTREELIKELIHOOD_H
6 #define BPP_PHYL_LEGACY_LIKELIHOOD_DRHOMOGENEOUSMIXEDTREELIKELIHOOD_H
11 #include "../../Model/MixedTransitionModel.h"
12 #include "../../Model/SubstitutionModel.h"
58 std::shared_ptr<TransitionModelInterface> model,
59 std::shared_ptr<DiscreteDistributionInterface> rDist,
60 bool checkRooted =
true,
62 bool rootArray =
false);
83 std::shared_ptr<TransitionModelInterface> model,
84 std::shared_ptr<DiscreteDistributionInterface> rDist,
85 bool checkRooted =
true,
87 bool rootArray =
false);
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).
A class to compute the average of several DRHomogeneousTreeLikelihood defined from a Mixed Substituti...
virtual void displayLikelihood(const Node *node)
This method is mainly for debugging purpose.
double getSecondOrderDerivative(const std::string &variable) const
DRHomogeneousMixedTreeLikelihood * clone() const
double getLogLikelihoodForASite(size_t site) const
Get the logarithm of the likelihood for a site.
virtual void computeTreeD2Likelihoods()
virtual ~DRHomogeneousMixedTreeLikelihood()
std::vector< double > probas_
double getLogLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
Get the logarithm of the likelihood for a site knowing its rate class.
double getFirstOrderDerivative(const std::string &variable) const
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.
std::vector< DRHomogeneousTreeLikelihood * > treeLikelihoodsContainer_
double getLikelihood() const
Get the likelihood for the whole dataset.
double getLogLikelihood() const
Get the logarithm of the likelihood for the whole dataset.
virtual void computeTreeDLikelihoods()
virtual void computeLikelihoodAtNode_(const Node *node, VVVdouble &likelihoodArray, const Node *sonNode=0) const
void computeTreeLikelihood()
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.
void fireParameterChanged(const ParameterList ¶ms)
void resetLikelihoodArrays(const Node *node)
DRHomogeneousMixedTreeLikelihood & operator=(const DRHomogeneousMixedTreeLikelihood &lik)
virtual void computeRootLikelihood()
void setData(const AlignmentDataInterface &sites)
Set the dataset for which the likelihood must be evaluated.
virtual void computeSubtreeLikelihoodPrefix(const Node *node)
double getLikelihoodForASiteForARateClass(size_t site, size_t rateClass) const
Get the likelihood for a site knowing its rate class.
virtual void computeTreeD2LikelihoodAtNode(const Node *)
double getSecondOrderDerivative(const std::string &variable1, const std::string &variable2) const
virtual void computeSubtreeLikelihoodPostfix(const Node *node)
Compute the likelihood for a subtree defined by the Tree::Node node.
double getLikelihoodForASite(size_t site) const
Get the likelihood for a site.
void initialize()
Init the likelihood object.
This class implements the likelihood computation for a tree using the double-recursive algorithm.
friend class DRHomogeneousMixedTreeLikelihood
The phylogenetic node class.
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.
std::vector< VVdouble > VVVdouble