5 #ifndef BPP_PHYL_LEGACY_LIKELIHOOD_RNONHOMOGENEOUSMIXEDTREELIKELIHOOD_H
6 #define BPP_PHYL_LEGACY_LIKELIHOOD_RNONHOMOGENEOUSMIXEDTREELIKELIHOOD_H
11 #include "../Model/MixedSubstitutionModelSet.h"
41 std::map<int, std::vector< std::shared_ptr<RNonHomogeneousMixedTreeLikelihood>>>
mvTreeLikelihoods_;
87 std::shared_ptr<MixedSubstitutionModelSet> modelSet,
90 std::shared_ptr<DiscreteDistributionInterface> rDist,
118 std::shared_ptr<MixedSubstitutionModelSet> modelSet,
121 std::shared_ptr<DiscreteDistributionInterface> rDist,
129 void init(
bool usePatterns);
150 std::shared_ptr<MixedSubstitutionModelSet> modelSet,
151 std::shared_ptr<DiscreteDistributionInterface> rDist,
153 bool usePatterns =
true);
173 std::shared_ptr<MixedSubstitutionModelSet> modelSet,
174 std::shared_ptr<DiscreteDistributionInterface> rDist,
176 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.
void computeTransitionProbabilitiesForNode(const Node *node)
Fill the pxy_, dpxy_ and d2pxy_ arrays for one node.
void computeTreeD2Likelihood(const std::string &variable)
virtual void computeSubtreeLikelihood(const Node *node)
Compute the likelihood for a subtree defined by the Tree::Node node.
void init(bool usePatterns)
const MixedSubstitutionModelSet::HyperNode & getHyperNode()
returns the HyperNode describing the owned submodels.
RNonHomogeneousMixedTreeLikelihood & operator=(const RNonHomogeneousMixedTreeLikelihood &lik)
RNonHomogeneousMixedTreeLikelihood * clone() const
std::map< int, std::vector< std::shared_ptr< RNonHomogeneousMixedTreeLikelihood > > > mvTreeLikelihoods_
the map of the branch numbers to the vectors of the TreeLikelihoods for the expanded model on this br...
void setData(const AlignmentDataInterface &sites)
Set the dataset for which the likelihood must be evaluated.
virtual void computeDownSubtreeD2Likelihood(const Node *)
void computeTreeDLikelihood(const std::string &variable)
void fireParameterChanged(const ParameterList ¶ms)
double getProbability() const
returns the probability of this object in the hierarchy
void setProbability(double x)
sets the probability of this object in the hierarchy
MixedSubstitutionModelSet::HyperNode hyperNode_
A specific HyperNode in which the computation is processed. If the probability of this HyperNode is -...
bool main_
a flag to say if this object is the head of the hierarchy
virtual ~RNonHomogeneousMixedTreeLikelihood()
virtual void computeDownSubtreeDLikelihood(const Node *)
int upperNode_
the number of the node under which tree the Treelikelihood is computed.
void initialize()
Init the likelihood object.
This class implement the 'traditional' way of computing likelihood for a tree, allowing for non-homog...
friend class RNonHomogeneousMixedTreeLikelihood
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.