bpp-phyl3  3.0.0
bpp::DRHomogeneousMixedTreeLikelihood Class Referenceabstract

A class to compute the average of several DRHomogeneousTreeLikelihood defined from a Mixed Substitution Model. More...

#include <Bpp/Phyl/Legacy/Likelihood/DRHomogeneousMixedTreeLikelihood.h>

+ Inheritance diagram for bpp::DRHomogeneousMixedTreeLikelihood:
+ Collaboration diagram for bpp::DRHomogeneousMixedTreeLikelihood:

Public Member Functions

 DRHomogeneousMixedTreeLikelihood (const Tree &tree, std::shared_ptr< TransitionModelInterface > model, std::shared_ptr< DiscreteDistributionInterface > rDist, bool checkRooted=true, bool verbose=true, bool rootArray=false)
 Build a new DRHomogeneousMixedTreeLikelihood object without data. More...
 
 DRHomogeneousMixedTreeLikelihood (const Tree &tree, const AlignmentDataInterface &data, std::shared_ptr< TransitionModelInterface > model, std::shared_ptr< DiscreteDistributionInterface > rDist, bool checkRooted=true, bool verbose=true, bool rootArray=false)
 Build a new DRHomogeneousMixedTreeLikelihood object with data. More...
 
 DRHomogeneousMixedTreeLikelihood (const DRHomogeneousMixedTreeLikelihood &lik)
 
DRHomogeneousMixedTreeLikelihoodoperator= (const DRHomogeneousMixedTreeLikelihood &lik)
 
virtual ~DRHomogeneousMixedTreeLikelihood ()
 
DRHomogeneousMixedTreeLikelihoodclone () const
 
void initialize ()
 Init the likelihood object. More...
 
void fireParameterChanged (const ParameterList &params)
 
void computeTreeLikelihood ()
 
virtual void computeTreeDLikelihoods ()
 
void setParameters (const ParameterList &parameters) override
 Implements the Function interface. More...
 
double getValue () const override
 Function and NNISearchable interface. More...
 
DRASDRTreeLikelihoodDatalikelihoodData () override
 
const DRASDRTreeLikelihoodDatalikelihoodData () const override
 
virtual void computeLikelihoodAtNode (int nodeId, VVVdouble &likelihoodArray) const override
 Compute the likelihood array at a given node. More...
 
virtual std::shared_ptr< const SubstitutionModelInterfacegetSubstitutionModel () const
 Get a SubstitutionModel pointer toward the model associated to this instance, if possible. More...
 
virtual std::shared_ptr< const SubstitutionModelInterfacegetSubstitutionModel (int nodeId, size_t siteIndex) const
 Get a SubstitutionModel pointer toward the model associated to this instance, if possible. More...
 
virtual void initParameters ()
 This builds the parameters list from all parametrizable objects, i.e. substitution model, rate distribution and tree. More...
 
virtual void applyParameters ()
 All parameters are stored in a parameter list. This function apply these parameters to the substitution model, to the rate distribution and to the branch lengths. More...
 
virtual void initBranchLengthsParameters (bool verbose=true)
 
virtual void setMinimumBranchLength (double minimum)
 
virtual void setMaximumBranchLength (double maximum)
 
virtual double getMinimumBranchLength () const
 
virtual double getMaximumBranchLength () const
 
std::shared_ptr< const TransitionModelInterfacegetModelForSite (int nodeId, size_t siteIndex) const
 Get the substitution model associated to a given node and alignment column. More...
 
std::shared_ptr< TransitionModelInterfacegetModelForSite (int nodeId, size_t siteIndex)
 Get the substitution model associated to a given node and alignment column. More...
 
virtual const AlignmentDataInterfacedata () const =0
 Get the dataset for which the likelihood must be evaluated. More...
 
virtual bool isInitialized () const =0
 
virtual bool hasLikelihoodData () const =0
 
virtual double getLikelihoodForASiteForAState (size_t site, int state) const =0
 Get the likelihood for a site and for a state. More...
 
virtual double getLogLikelihoodForASiteForAState (size_t site, int state) const =0
 Get the logarithm of the likelihood for a site and for a state. More...
 
virtual Vdouble getLikelihoodPerSite () const =0
 Get the likelihood for each site. More...
 
virtual Vdouble getLogLikelihoodPerSite () const =0
 Get the logarithm of the likelihood for each site. More...
 
virtual VVdouble getLikelihoodPerSitePerState () const =0
 Get the likelihood for each site and for each state. More...
 
virtual VVdouble getLogLikelihoodPerSitePerState () const =0
 Get the logarithm of the likelihood for each site and for each state. More...
 
virtual const Treetree () const =0
 Get the tree (topology and branch lengths). More...
 
virtual size_t getNumberOfSites () const =0
 Get the number of sites in the dataset. More...
 
virtual std::shared_ptr< const AlphabetgetAlphabet () const =0
 Get the alphabet associated to the dataset. More...
 
virtual void enableDerivatives (bool yn)=0
 Tell if derivatives must be computed. More...
 
virtual ParameterList getDerivableParameters () const =0
 All derivable parameters. More...
 
virtual ParameterList getNonDerivableParameters () const =0
 All non derivable parameters. More...
 
virtual void enableSecondOrderDerivatives (bool yn)=0
 
virtual bool enableSecondOrderDerivatives () const=0
 
virtual double d2f (const std::string &variable, const ParameterList &parameters)
 
virtual double d2f (const std::string &variable1, const std::string &variable2, const ParameterList &parameters)
 
virtual void enableFirstOrderDerivatives (bool yn)=0
 
virtual bool enableFirstOrderDerivatives () const=0
 
virtual double df (const std::string &variable, const ParameterList &parameters)
 
virtual double f (const ParameterList &parameters)
 
virtual bool hasParameter (const std::string &name) const=0
 
bool hasParameter (const std::string &name) const override
 
virtual const ParameterListgetParameters () const=0
 
const ParameterListgetParameters () const override
 
virtual const Parameterparameter (const std::string &name) const=0
 
const Parameterparameter (const std::string &name) const override
 
virtual double getParameterValue (const std::string &name) const=0
 
double getParameterValue (const std::string &name) const override
 
virtual void setAllParametersValues (const ParameterList &parameters)=0
 
void setAllParametersValues (const ParameterList &parameters) override
 
virtual void setParameterValue (const std::string &name, double value)=0
 
void setParameterValue (const std::string &name, double value) override
 
virtual void setParametersValues (const ParameterList &parameters)=0
 
void setParametersValues (const ParameterList &parameters) override
 
virtual bool matchParametersValues (const ParameterList &parameters)=0
 
bool matchParametersValues (const ParameterList &parameters) override
 
virtual void removeConstraint (const std::string &name)=0
 
void removeConstraint (const std::string &name) override
 
virtual void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0
 
void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
 
virtual size_t getNumberOfParameters () const=0
 
size_t getNumberOfParameters () const override
 
virtual void setNamespace (const std::string &prefix)=0
 
void setNamespace (const std::string &prefix) override
 
virtual std::string getNamespace () const=0
 
std::string getNamespace () const override
 
virtual std::string getParameterNameWithoutNamespace (const std::string &name) const=0
 
std::string getParameterNameWithoutNamespace (const std::string &name) const override
 
const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 
The TreeLikelihood interface.

Other methods are implemented in the DRHomogeneousTreeLikelihood class.

double getLikelihood () const
 Get the likelihood for the whole dataset. More...
 
double getLogLikelihood () const
 Get the logarithm of the likelihood for the whole dataset. More...
 
void setData (const AlignmentDataInterface &sites)
 Set the dataset for which the likelihood must be evaluated. More...
 
double getLikelihoodForASite (size_t site) const
 Get the likelihood for a site. More...
 
double getLogLikelihoodForASite (size_t site) const
 Get the logarithm of the likelihood for a site. More...
 
The DiscreteRatesAcrossSites interface implementation:
double getLikelihoodForASiteForARateClass (size_t site, size_t rateClass) const
 Get the likelihood for a site knowing its rate class. More...
 
double getLogLikelihoodForASiteForARateClass (size_t site, size_t rateClass) const
 Get the logarithm of the likelihood for a site knowing its rate class. More...
 
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. More...
 
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. More...
 
DerivableFirstOrder interface.
double getFirstOrderDerivative (const std::string &variable) const
 
DerivableSecondOrder interface.
double getSecondOrderDerivative (const std::string &variable) const
 
double getSecondOrderDerivative (const std::string &variable1, const std::string &variable2) const
 
The TreeLikelihood interface.

Other methods are implemented in the AbstractTreeLikelihood class.

size_t getSiteIndex (size_t site) const override
 Get the index (used for inner computations) of a given site (original alignment column). More...
 
The TreeLikelihood interface.

Other methods are implemented in the AbstractTreeLikelihood class.

size_t getNumberOfStates () const
 
const std::vector< int > & getAlphabetStates () const
 
int getAlphabetStateAsInt (size_t i) const
 
std::string getAlphabetStateAsChar (size_t i) const
 
ParameterList getBranchLengthsParameters () const
 Get the branch lengths parameters. More...
 
ParameterList getSubstitutionModelParameters () const
 Get the parameters associated to substitution model(s). More...
 
ParameterList getRateDistributionParameters () const
 Get the parameters associated to the rate distribution. More...
 
const std::vector< double > & getRootFrequencies (size_t siteIndex) const
 Get the values of the frequencies for each state in the alphabet at the root node. More...
 
VVVdouble getTransitionProbabilitiesPerRateClass (int nodeId, size_t siteIndex) const
 Retrieves all Pij(t) for a particular branch, defined by the upper node. More...
 
ConstBranchModelIteratorgetNewBranchModelIterator (int nodeId) const
 
ConstSiteModelIteratorgetNewSiteModelIterator (size_t siteIndex) const
 
The HomogeneousTreeLikelihood interface.

Other methods are implemented in the AbstractTreeLikelihood class.

std::shared_ptr< const TransitionModelInterfacegetModel () const
 
std::shared_ptr< const TransitionModelInterfacegetModel (int nodeId, size_t siteIndex) const
 
std::shared_ptr< TransitionModelInterfacegetModel ()
 
std::shared_ptr< TransitionModelInterfacegetModel (int nodeId, size_t siteIndex)
 
void setModel (std::shared_ptr< TransitionModelInterface > model)
 
The TreeLikelihood interface.
const AlignmentDataInterfacedata () const
 Get the dataset for which the likelihood must be evaluated. More...
 
bool isInitialized () const
 
bool hasLikelihoodData () const
 
Vdouble getLikelihoodPerSite () const
 Get the likelihood for each site. More...
 
Vdouble getLogLikelihoodPerSite () const
 Get the logarithm of the likelihood for each site. More...
 
VVdouble getLikelihoodPerSitePerState () const
 Get the likelihood for each site and for each state. More...
 
VVdouble getLogLikelihoodPerSitePerState () const
 Get the logarithm of the likelihood for each site and for each state. More...
 
const Treetree () const
 Get the tree (topology and branch lengths). More...
 
size_t getNumberOfSites () const
 Get the number of sites in the dataset. More...
 
std::shared_ptr< const AlphabetgetAlphabet () const
 Get the alphabet associated to the dataset. More...
 
void enableDerivatives (bool yn)
 Tell if derivatives must be computed. More...
 
void enableSecondOrderDerivatives (bool yn)
 
bool enableSecondOrderDerivatives () const
 
void enableFirstOrderDerivatives (bool yn)
 
bool enableFirstOrderDerivatives () const
 
The TreeLikelihood interface.

Other methods are implemented in the AbstractTreeLikelihood class.

double getLikelihoodForASiteForAState (size_t site, int state) const
 Get the likelihood for a site and for a state. More...
 
double getLogLikelihoodForASiteForAState (size_t site, int state) const
 Get the logarithm of the likelihood for a site and for a state. More...
 
VVdouble getTransitionProbabilities (int nodeId, size_t siteIndex) const
 Retrieves all Pij(t) for a particular branch, defined by the upper node and site. More...
 
ParameterList getDerivableParameters () const
 All derivable parameters. More...
 
ParameterList getNonDerivableParameters () const
 All non derivable parameters. More...
 
Retrieve some particular parameters subsets.
virtual VVdouble getTransitionProbabilities (int nodeId, size_t siteIndex) const =0
 Retrieves all Pij(t) for a particular branch, defined by the upper node and site. More...
 
The DiscreteRatesAcrossSites interface implementation:
std::shared_ptr< const DiscreteDistributionInterfacegetRateDistribution () const
 Get the rate distribution used for the computation. More...
 
std::shared_ptr< DiscreteDistributionInterfacegetRateDistribution ()
 Get the rate distribution used for the computation. More...
 
const DiscreteDistributionInterfacerateDistribution () const
 Get the rate distribution used for the computation. More...
 
DiscreteDistributionInterfacerateDistribution ()
 Get the rate distribution used for the computation. More...
 
size_t getNumberOfClasses () const
 Get the number of classes. More...
 
VVdouble getLikelihoodPerSitePerRateClass () const
 Get the likelihood for each site and each rate class. More...
 
VVdouble getLogLikelihoodPerSitePerRateClass () const
 Get the logarithm of the likelihood for each site and each rate class. More...
 
VVVdouble getLikelihoodPerSitePerRateClassPerState () const
 Get the likelihood for each site and each rate class and each state. More...
 
VVVdouble getLogLikelihoodPerSitePerRateClassPerState () const
 Get the logarithm of the likelihood for each site and each rate class and each state. More...
 
VVdouble getPosteriorProbabilitiesPerRate () const
 Get the posterior probability for each site of belonging to a particular rate class. More...
 
Vdouble getRateWithMaxPostProbPerSite () const
 Get the posterior rate (the one with maximum posterior probability) for each site. More...
 
std::vector< size_t > getRateClassWithMaxPostProbPerSite () const
 Get the posterior rate class (the one with maximum posterior probability) for each site. More...
 
Vdouble getPosteriorRatePerSite () const
 Get the posterior rate, i.e. averaged over all classes and weighted with posterior probabilities, for each site. More...
 

Static Public Member Functions

Generic tools to deal with likelihood arrays
static void resetLikelihoodArray (VVVdouble &likelihoodArray)
 Set all conditional likelihoods to 1. More...
 
static void displayLikelihoodArray (const VVVdouble &likelihoodArray)
 Print the likelihood array to terminal (debugging tool). More...
 

Protected Member Functions

virtual void computeLikelihoodAtNode_ (const Node *node, VVVdouble &likelihoodArray, const Node *sonNode=0) const
 
virtual void computeSubtreeLikelihoodPostfix (const Node *node)
 Compute the likelihood for a subtree defined by the Tree::Node node. More...
 
virtual void computeSubtreeLikelihoodPrefix (const Node *node)
 
virtual void computeRootLikelihood ()
 
virtual void computeTreeD2LikelihoodAtNode (const Node *)
 
virtual void computeTreeD2Likelihoods ()
 
void resetLikelihoodArrays (const Node *node)
 
virtual void displayLikelihood (const Node *node)
 This method is mainly for debugging purpose. More...
 
virtual void computeTreeDLikelihoodAtNode (const Node *node)
 
virtual void computeAllTransitionProbabilities ()
 Fill the pxy_, dpxy_ and d2pxy_ arrays for all nodes. More...
 
virtual void computeTransitionProbabilitiesForNode (const Node *node)
 Fill the pxy_, dpxy_ and d2pxy_ arrays for one node. More...
 
virtual ParameterListgetParameters_ ()=0
 
ParameterListgetParameters_ () override
 
const std::shared_ptr< Parameter > & getParameter (size_t i) const
 
std::shared_ptr< Parameter > & getParameter (size_t i)
 
virtual void addParameter_ (Parameter *parameter)
 
virtual void addParameters_ (const ParameterList &parameters)
 
virtual void shareParameter_ (const std::shared_ptr< Parameter > &parameter)
 
virtual void shareParameters_ (const ParameterList &parameters)
 
virtual void includeParameters_ (const ParameterList &parameters)
 
virtual void deleteParameter_ (size_t index)
 
virtual void deleteParameter_ (std::string &name)
 
virtual void deleteParameters_ (const std::vector< std::string > &names)
 
void resetParameters_ ()
 
ParametergetParameter_ (const std::string &name)
 
ParametergetParameter_ (size_t index)
 
const ParametergetParameter_ (size_t index) const
 
ParametergetParameterWithNamespace_ (const std::string &name)
 
const ParametergetParameterWithNamespace_ (const std::string &name) const
 

Static Protected Member Functions

static void computeLikelihoodFromArrays (const std::vector< const VVVdouble * > &iLik, const std::vector< const VVVdouble * > &tProb, VVVdouble &oLik, size_t nbNodes, size_t nbDistinctSites, size_t nbClasses, size_t nbStates, bool reset=true)
 Compute conditional likelihoods. More...
 
static void computeLikelihoodFromArrays (const std::vector< const VVVdouble * > &iLik, const std::vector< const VVVdouble * > &tProb, const VVVdouble *iLikR, const VVVdouble *tProbR, VVVdouble &oLik, size_t nbNodes, size_t nbDistinctSites, size_t nbClasses, size_t nbStates, bool reset=true)
 Compute conditional likelihoods. More...
 

Protected Attributes

double minusLogLik_
 
std::shared_ptr< TransitionModelInterfacemodel_
 
ParameterList brLenParameters_
 
std::map< int, VVVdoublepxy_
 
std::map< int, VVVdoubledpxy_
 
std::map< int, VVVdoubled2pxy_
 
std::vector< double > rootFreqs_
 
std::vector< Node * > nodes_
 Pointer toward all nodes in the tree. More...
 
size_t nbSites_
 
size_t nbDistinctSites_
 
size_t nbClasses_
 
size_t nbStates_
 
size_t nbNodes_
 
bool verbose_
 
double minimumBrLen_
 
double maximumBrLen_
 
std::shared_ptr< ConstraintInterfacebrLenConstraint_
 
std::shared_ptr< DiscreteDistributionInterfacerateDistribution_
 
std::unique_ptr< const AlignmentDataInterfacedata_
 
std::shared_ptr< TreeTemplate< Node > > tree_
 
bool computeFirstOrderDerivatives_
 
bool computeSecondOrderDerivatives_
 
bool initialized_
 

Private Member Functions

void init_ ()
 Method called by constructors. More...
 

Private Attributes

std::vector< DRHomogeneousTreeLikelihood * > treeLikelihoodsContainer_
 
std::vector< double > probas_
 
bool rootArray_
 
std::unique_ptr< DRASDRTreeLikelihoodDatalikelihoodData_
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

A class to compute the average of several DRHomogeneousTreeLikelihood defined from a Mixed Substitution Model.

In all computations, the average of the likelihoods, probabilities are computed.

Definition at line 25 of file DRHomogeneousMixedTreeLikelihood.h.

Constructor & Destructor Documentation

◆ DRHomogeneousMixedTreeLikelihood() [1/3]

DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood ( const Tree tree,
std::shared_ptr< TransitionModelInterface model,
std::shared_ptr< DiscreteDistributionInterface rDist,
bool  checkRooted = true,
bool  verbose = true,
bool  rootArray = false 
)

Build a new DRHomogeneousMixedTreeLikelihood object without data.

This constructor only initialize the parameters. To compute a likelihood, you will need to call the setData() and the computeTreeLikelihood() methods.

Parameters
treeThe tree to use.
modelThe mixed substitution model to use.
rDistThe rate across sites distribution to use.
checkRootedTell if we have to check for the tree to be unrooted. If true, any rooted tree will be unrooted before likelihood computation.
verboseShould I display some info?
rootArrayis true if the array of the likelihoods at the root should be computed (useful for ancestral reconstruction).
Exceptions
Exceptionin an error occurred.

Definition at line 19 of file DRHomogeneousMixedTreeLikelihood.cpp.

References bpp::DRHomogeneousTreeLikelihood::DRHomogeneousTreeLikelihood(), bpp::AbstractHomogeneousTreeLikelihood::model_, probas_, bpp::AbstractTreeLikelihood::tree(), and treeLikelihoodsContainer_.

◆ DRHomogeneousMixedTreeLikelihood() [2/3]

DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood ( const Tree tree,
const AlignmentDataInterface data,
std::shared_ptr< TransitionModelInterface model,
std::shared_ptr< DiscreteDistributionInterface rDist,
bool  checkRooted = true,
bool  verbose = true,
bool  rootArray = false 
)

Build a new DRHomogeneousMixedTreeLikelihood object with data.

This constructor initializes all parameters, data, and likelihood arrays.

Parameters
treeThe tree to use.
dataSequences to use.
modelThe mixed substitution model to use.
rDistThe rate across sites distribution to use.
checkRootedTell if we have to check for the tree to be unrooted. If true, any rooted tree will be unrooted before likelihood computation.
verboseShould I display some info?
rootArrayis true if the array of the likelihoods at the root should be computed (useful for ancestral reconstruction).
Exceptions
Exceptionin an error occurred.

Definition at line 45 of file DRHomogeneousMixedTreeLikelihood.cpp.

References bpp::AbstractTreeLikelihood::data(), bpp::DRHomogeneousTreeLikelihood::DRHomogeneousTreeLikelihood(), bpp::AbstractHomogeneousTreeLikelihood::model_, probas_, setData(), bpp::AbstractTreeLikelihood::tree(), and treeLikelihoodsContainer_.

◆ DRHomogeneousMixedTreeLikelihood() [3/3]

DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood ( const DRHomogeneousMixedTreeLikelihood lik)

Definition at line 93 of file DRHomogeneousMixedTreeLikelihood.cpp.

References probas_, and treeLikelihoodsContainer_.

◆ ~DRHomogeneousMixedTreeLikelihood()

DRHomogeneousMixedTreeLikelihood::~DRHomogeneousMixedTreeLikelihood ( )
virtual

Definition at line 106 of file DRHomogeneousMixedTreeLikelihood.cpp.

References treeLikelihoodsContainer_.

Member Function Documentation

◆ applyParameters()

◆ clone()

DRHomogeneousMixedTreeLikelihood* bpp::DRHomogeneousMixedTreeLikelihood::clone ( ) const
inlinevirtual

◆ computeAllTransitionProbabilities()

◆ computeLikelihoodAtNode()

virtual void bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode ( int  nodeId,
VVVdouble likelihoodArray 
) const
inlineoverridevirtualinherited

Compute the likelihood array at a given node.

Parameters
nodeIdThe id of the node to consider.
likelihoodArrayThe array where to store the results.

Implements bpp::DRTreeLikelihoodInterface.

Definition at line 170 of file DRHomogeneousTreeLikelihood.h.

References bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), and bpp::AbstractTreeLikelihood::tree_.

◆ computeLikelihoodAtNode_()

void DRHomogeneousMixedTreeLikelihood::computeLikelihoodAtNode_ ( const Node node,
VVVdouble likelihoodArray,
const Node sonNode = 0 
) const
protectedvirtual

◆ computeLikelihoodFromArrays() [1/2]

void DRHomogeneousTreeLikelihood::computeLikelihoodFromArrays ( const std::vector< const VVVdouble * > &  iLik,
const std::vector< const VVVdouble * > &  tProb,
const VVVdouble iLikR,
const VVVdouble tProbR,
VVVdouble oLik,
size_t  nbNodes,
size_t  nbDistinctSites,
size_t  nbClasses,
size_t  nbStates,
bool  reset = true 
)
staticprotectedinherited

Compute conditional likelihoods.

This method is the "core" likelihood computation function, performing all the product upon all nodes, the summation for each ancestral state and each rate class. This function is specific to non-reversible models: the subtree containing the root is specified separately. It is designed for inner usage, and a maximum efficiency, so no checking is performed on the input parameters. Use with care!

Parameters
iLikA vector of likelihood arrays, one for each conditional node.
tProbA vector of transition probabilities, one for each node.
iLikRThe likelihood array for the subtree containing the root of the tree.
tProbRThe transition probabilities for thr subtree containing the root of the tree.
oLikThe likelihood array to store the computed likelihoods.
nbNodesThe number of nodes = the size of the input vectors.
nbDistinctSitesThe number of distinct sites (the first dimension of the likelihood array).
nbClassesThe number of rate classes (the second dimension of the likelihood array).
nbStatesThe number of states (the third dimension of the likelihood array).
resetTell if the output likelihood array must be initialized prior to computation. If true, the resetLikelihoodArray method will be called.

Definition at line 831 of file DRHomogeneousTreeLikelihood.cpp.

References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::resetLikelihoodArray().

◆ computeLikelihoodFromArrays() [2/2]

void DRHomogeneousTreeLikelihood::computeLikelihoodFromArrays ( const std::vector< const VVVdouble * > &  iLik,
const std::vector< const VVVdouble * > &  tProb,
VVVdouble oLik,
size_t  nbNodes,
size_t  nbDistinctSites,
size_t  nbClasses,
size_t  nbStates,
bool  reset = true 
)
staticprotectedinherited

Compute conditional likelihoods.

This method is the "core" likelihood computation function, performing all the product upon all nodes, the summation for each ancestral state and each rate class. It is designed for inner usage, and a maximum efficiency, so no checking is performed on the input parameters. Use with care!

Parameters
iLikA vector of likelihood arrays, one for each conditional node.
tProbA vector of transition probabilities, one for each node.
oLikThe likelihood array to store the computed likelihoods.
nbNodesThe number of nodes = the size of the input vectors.
nbDistinctSitesThe number of distinct sites (the first dimension of the likelihood array).
nbClassesThe number of rate classes (the second dimension of the likelihood array).
nbStatesThe number of states (the third dimension of the likelihood array).
resetTell if the output likelihood array must be initialized prior to computation. If true, the resetLikelihoodArray method will be called.

Definition at line 782 of file DRHomogeneousTreeLikelihood.cpp.

References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::resetLikelihoodArray().

Referenced by bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), and bpp::NNIHomogeneousTreeLikelihood::testNNI().

◆ computeRootLikelihood()

void DRHomogeneousMixedTreeLikelihood::computeRootLikelihood ( )
protectedvirtual

◆ computeSubtreeLikelihoodPostfix()

void DRHomogeneousMixedTreeLikelihood::computeSubtreeLikelihoodPostfix ( const Node node)
protectedvirtual

Compute the likelihood for a subtree defined by the Tree::Node node.

Parameters
nodeThe root of the subtree.

Reimplemented from bpp::DRHomogeneousTreeLikelihood.

Definition at line 293 of file DRHomogeneousMixedTreeLikelihood.cpp.

References treeLikelihoodsContainer_.

◆ computeSubtreeLikelihoodPrefix()

void DRHomogeneousMixedTreeLikelihood::computeSubtreeLikelihoodPrefix ( const Node node)
protectedvirtual

This method initialize the remaining likelihood arrays, corresponding to father nodes. It must be called after the postfix method because it requires that the arrays for son nodes to be be computed.

Reimplemented from bpp::DRHomogeneousTreeLikelihood.

Definition at line 301 of file DRHomogeneousMixedTreeLikelihood.cpp.

References treeLikelihoodsContainer_.

◆ computeTransitionProbabilitiesForNode()

◆ computeTreeD2LikelihoodAtNode()

void DRHomogeneousMixedTreeLikelihood::computeTreeD2LikelihoodAtNode ( const Node node)
protectedvirtual

Reimplemented from bpp::DRHomogeneousTreeLikelihood.

Definition at line 415 of file DRHomogeneousMixedTreeLikelihood.cpp.

References treeLikelihoodsContainer_.

◆ computeTreeD2Likelihoods()

void DRHomogeneousMixedTreeLikelihood::computeTreeD2Likelihoods ( )
protectedvirtual

Reimplemented from bpp::DRHomogeneousTreeLikelihood.

Definition at line 423 of file DRHomogeneousMixedTreeLikelihood.cpp.

References treeLikelihoodsContainer_.

◆ computeTreeDLikelihoodAtNode()

◆ computeTreeDLikelihoods()

void DRHomogeneousMixedTreeLikelihood::computeTreeDLikelihoods ( )
virtual

Reimplemented from bpp::DRHomogeneousTreeLikelihood.

Definition at line 361 of file DRHomogeneousMixedTreeLikelihood.cpp.

References treeLikelihoodsContainer_.

◆ computeTreeLikelihood()

void DRHomogeneousMixedTreeLikelihood::computeTreeLikelihood ( )

◆ data() [1/2]

◆ data() [2/2]

virtual const AlignmentDataInterface& bpp::TreeLikelihoodInterface::data ( ) const
pure virtualinherited

Get the dataset for which the likelihood must be evaluated.

Returns
The site container where the sequences are stored.

Implemented in bpp::AbstractTreeLikelihood.

◆ displayLikelihood()

void DRHomogeneousMixedTreeLikelihood::displayLikelihood ( const Node node)
protectedvirtual

This method is mainly for debugging purpose.

Parameters
nodeThe node at which likelihood values must be displayed.

Reimplemented from bpp::DRHomogeneousTreeLikelihood.

Definition at line 481 of file DRHomogeneousMixedTreeLikelihood.cpp.

References treeLikelihoodsContainer_.

◆ displayLikelihoodArray()

void AbstractDiscreteRatesAcrossSitesTreeLikelihood::displayLikelihoodArray ( const VVVdouble likelihoodArray)
staticinherited

◆ enableDerivatives() [1/2]

void bpp::AbstractTreeLikelihood::enableDerivatives ( bool  yn)
inlinevirtualinherited

Tell if derivatives must be computed.

This methods calls the enableFirstOrderDerivatives and enableSecondOrderDerivatives.

Parameters
ynYes or no.

Implements bpp::TreeLikelihoodInterface.

Definition at line 270 of file AbstractTreeLikelihood.h.

References bpp::AbstractTreeLikelihood::computeFirstOrderDerivatives_, and bpp::AbstractTreeLikelihood::computeSecondOrderDerivatives_.

Referenced by bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::AbstractDiscreteRatesAcrossSitesTreeLikelihood().

◆ enableDerivatives() [2/2]

virtual void bpp::TreeLikelihoodInterface::enableDerivatives ( bool  yn)
pure virtualinherited

Tell if derivatives must be computed.

This methods calls the enableFirstOrderDerivatives and enableSecondOrderDerivatives.

Parameters
ynYes or no.

Implemented in bpp::AbstractTreeLikelihood.

◆ enableFirstOrderDerivatives() [1/2]

bool bpp::AbstractTreeLikelihood::enableFirstOrderDerivatives ( ) const
inlinevirtualinherited

◆ enableFirstOrderDerivatives() [2/2]

void bpp::AbstractTreeLikelihood::enableFirstOrderDerivatives ( bool  yn)
inlinevirtualinherited

◆ enableSecondOrderDerivatives() [1/2]

bool bpp::AbstractTreeLikelihood::enableSecondOrderDerivatives ( ) const
inlinevirtualinherited

◆ enableSecondOrderDerivatives() [2/2]

void bpp::AbstractTreeLikelihood::enableSecondOrderDerivatives ( bool  yn)
inlinevirtualinherited

◆ fireParameterChanged()

◆ getAlphabet() [1/2]

std::shared_ptr<const Alphabet> bpp::AbstractTreeLikelihood::getAlphabet ( ) const
inlinevirtualinherited

Get the alphabet associated to the dataset.

Returns
the alphabet associated to the dataset.

Implements bpp::TreeLikelihoodInterface.

Definition at line 263 of file AbstractTreeLikelihood.h.

References bpp::AbstractTreeLikelihood::data_.

◆ getAlphabet() [2/2]

virtual std::shared_ptr<const Alphabet> bpp::TreeLikelihoodInterface::getAlphabet ( ) const
pure virtualinherited

Get the alphabet associated to the dataset.

Returns
the alphabet associated to the dataset.

Implemented in bpp::AbstractTreeLikelihood.

◆ getAlphabetStateAsChar()

std::string bpp::AbstractHomogeneousTreeLikelihood::getAlphabetStateAsChar ( size_t  i) const
inlinevirtualinherited
Returns
the alphabet state corresponding to the given model state.

Implements bpp::TreeLikelihoodInterface.

Definition at line 132 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getAlphabetStateAsInt()

int bpp::AbstractHomogeneousTreeLikelihood::getAlphabetStateAsInt ( size_t  i) const
inlinevirtualinherited
Returns
the alphabet state corresponding to the given model state.

Implements bpp::TreeLikelihoodInterface.

Definition at line 130 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getAlphabetStates()

const std::vector<int>& bpp::AbstractHomogeneousTreeLikelihood::getAlphabetStates ( ) const
inlinevirtualinherited
Returns
the alphabet states corresponding to all model states.

Implements bpp::TreeLikelihoodInterface.

Definition at line 128 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getBranchLengthsParameters()

ParameterList AbstractHomogeneousTreeLikelihood::getBranchLengthsParameters ( ) const
virtualinherited

◆ getDerivableParameters() [1/2]

ParameterList AbstractDiscreteRatesAcrossSitesTreeLikelihood::getDerivableParameters ( ) const
virtualinherited

All derivable parameters.

Usually, this contains all branch lengths parameters.

Returns
A ParameterList.

Implements bpp::TreeLikelihoodInterface.

Definition at line 37 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.

References bpp::TreeLikelihoodInterface::getBranchLengthsParameters(), and bpp::AbstractTreeLikelihood::initialized_.

◆ getDerivableParameters() [2/2]

virtual ParameterList bpp::TreeLikelihoodInterface::getDerivableParameters ( ) const
pure virtualinherited

All derivable parameters.

Usually, this contains all branch lengths parameters.

Returns
A ParameterList.

Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.

◆ getFirstOrderDerivative()

◆ getLikelihood()

double DRHomogeneousMixedTreeLikelihood::getLikelihood ( ) const
virtual

Get the likelihood for the whole dataset.

Returns
The likelihood of the dataset.

Implements bpp::TreeLikelihoodInterface.

Definition at line 179 of file DRHomogeneousMixedTreeLikelihood.cpp.

References bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::pow(), probas_, and treeLikelihoodsContainer_.

◆ getLikelihoodForASite()

double DRHomogeneousMixedTreeLikelihood::getLikelihoodForASite ( size_t  site) const
virtual

Get the likelihood for a site.

Parameters
siteThe site index to analyse.
Returns
The likelihood for site site.

Implements bpp::TreeLikelihoodInterface.

Definition at line 234 of file DRHomogeneousMixedTreeLikelihood.cpp.

References probas_, and treeLikelihoodsContainer_.

Referenced by getLogLikelihoodForASite().

◆ getLikelihoodForASiteForARateClass()

double DRHomogeneousMixedTreeLikelihood::getLikelihoodForASiteForARateClass ( size_t  site,
size_t  rateClass 
) const
virtual

Get the likelihood for a site knowing its rate class.

Parameters
siteThe site index.
rateClassThe rate class index.
Returns
The likelihood for the specified site and rate class.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 253 of file DRHomogeneousMixedTreeLikelihood.cpp.

References probas_, and treeLikelihoodsContainer_.

Referenced by getLogLikelihoodForASiteForARateClass().

◆ getLikelihoodForASiteForARateClassForAState()

double DRHomogeneousMixedTreeLikelihood::getLikelihoodForASiteForARateClassForAState ( size_t  site,
size_t  rateClass,
int  state 
) const
virtual

Get the likelihood for a site knowing its rate class and its ancestral state.

Parameters
siteThe site index.
rateClassThe rate class index.
stateThe ancestral state.
Returns
The likelihood for the specified site and rate class and ancestral state.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 272 of file DRHomogeneousMixedTreeLikelihood.cpp.

References probas_, and treeLikelihoodsContainer_.

Referenced by getLogLikelihoodForASiteForARateClassForAState().

◆ getLikelihoodForASiteForAState() [1/2]

double AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodForASiteForAState ( size_t  site,
int  state 
) const
virtualinherited

Get the likelihood for a site and for a state.

Parameters
siteThe site index to analyse.
stateThe state to consider.
Returns
The likelihood for site site and state state.

Implements bpp::TreeLikelihoodInterface.

Definition at line 75 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.

References bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getLikelihoodForASiteForARateClassForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.

◆ getLikelihoodForASiteForAState() [2/2]

virtual double bpp::TreeLikelihoodInterface::getLikelihoodForASiteForAState ( size_t  site,
int  state 
) const
pure virtualinherited

Get the likelihood for a site and for a state.

Parameters
siteThe site index to analyse.
stateThe state to consider.
Returns
The likelihood for site site and state state.

Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.

Referenced by bpp::AbstractTreeLikelihood::getLikelihoodPerSitePerState().

◆ getLikelihoodPerSite() [1/2]

Vdouble AbstractTreeLikelihood::getLikelihoodPerSite ( ) const
virtualinherited

◆ getLikelihoodPerSite() [2/2]

virtual Vdouble bpp::TreeLikelihoodInterface::getLikelihoodPerSite ( ) const
pure virtualinherited

Get the likelihood for each site.

Returns
A vector with all likelihoods for each site.

Implemented in bpp::AbstractTreeLikelihood.

◆ getLikelihoodPerSitePerRateClass()

◆ getLikelihoodPerSitePerRateClassPerState()

VVVdouble AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClassPerState ( ) const
virtualinherited

◆ getLikelihoodPerSitePerState() [1/2]

VVdouble AbstractTreeLikelihood::getLikelihoodPerSitePerState ( ) const
virtualinherited

Get the likelihood for each site and for each state.

Returns
A 2d vector with all likelihoods for each site and for each state.

Implements bpp::TreeLikelihoodInterface.

Definition at line 35 of file AbstractTreeLikelihood.cpp.

References bpp::TreeLikelihoodInterface::getLikelihoodForASiteForAState(), bpp::AbstractTreeLikelihood::getNumberOfSites(), and bpp::TreeLikelihoodInterface::getNumberOfStates().

◆ getLikelihoodPerSitePerState() [2/2]

virtual VVdouble bpp::TreeLikelihoodInterface::getLikelihoodPerSitePerState ( ) const
pure virtualinherited

Get the likelihood for each site and for each state.

Returns
A 2d vector with all likelihoods for each site and for each state.

Implemented in bpp::AbstractTreeLikelihood.

◆ getLogLikelihood()

double DRHomogeneousMixedTreeLikelihood::getLogLikelihood ( ) const
virtual

Get the logarithm of the likelihood for the whole dataset.

Returns
The logarithm of the likelihood of the dataset.

Implements bpp::TreeLikelihoodInterface.

Definition at line 202 of file DRHomogeneousMixedTreeLikelihood.cpp.

References bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::log(), bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, probas_, and treeLikelihoodsContainer_.

Referenced by fireParameterChanged().

◆ getLogLikelihoodForASite()

double DRHomogeneousMixedTreeLikelihood::getLogLikelihoodForASite ( size_t  site) const
virtual

Get the logarithm of the likelihood for a site.

Parameters
siteThe site index to analyse.
Returns
The logarithm of the likelihood for site site.

Implements bpp::TreeLikelihoodInterface.

Definition at line 245 of file DRHomogeneousMixedTreeLikelihood.cpp.

References getLikelihoodForASite(), and bpp::log().

◆ getLogLikelihoodForASiteForARateClass()

double DRHomogeneousMixedTreeLikelihood::getLogLikelihoodForASiteForARateClass ( size_t  site,
size_t  rateClass 
) const
virtual

Get the logarithm of the likelihood for a site knowing its rate class.

Parameters
siteThe site index.
rateClassThe rate class index.
Returns
The logarithm of the likelihood for the specified site and rate class.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 264 of file DRHomogeneousMixedTreeLikelihood.cpp.

References getLikelihoodForASiteForARateClass(), and bpp::log().

◆ getLogLikelihoodForASiteForARateClassForAState()

double DRHomogeneousMixedTreeLikelihood::getLogLikelihoodForASiteForARateClassForAState ( size_t  site,
size_t  rateClass,
int  state 
) const
virtual

Get the logarithm of the likelihood for a site knowing its rate class and its ancestral state.

Parameters
siteThe site index.
rateClassThe rate class index.
stateThe ancestral state.
Returns
The logarithm of the likelihood for the specified site and rate class and ancestral state..

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 284 of file DRHomogeneousMixedTreeLikelihood.cpp.

References getLikelihoodForASiteForARateClassForAState(), and bpp::log().

◆ getLogLikelihoodForASiteForAState() [1/2]

double AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodForASiteForAState ( size_t  site,
int  state 
) const
virtualinherited

Get the logarithm of the likelihood for a site and for a state.

Parameters
siteThe site index to analyse.
stateThe state to consider.
Returns
The logarithm of the likelihood for site site and state state.

Implements bpp::TreeLikelihoodInterface.

Definition at line 88 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.

References bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getLikelihoodForASiteForARateClassForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), bpp::log(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.

◆ getLogLikelihoodForASiteForAState() [2/2]

virtual double bpp::TreeLikelihoodInterface::getLogLikelihoodForASiteForAState ( size_t  site,
int  state 
) const
pure virtualinherited

Get the logarithm of the likelihood for a site and for a state.

Parameters
siteThe site index to analyse.
stateThe state to consider.
Returns
The logarithm of the likelihood for site site and state state.

Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.

Referenced by bpp::AbstractTreeLikelihood::getLogLikelihoodPerSitePerState().

◆ getLogLikelihoodPerSite() [1/2]

Vdouble AbstractTreeLikelihood::getLogLikelihoodPerSite ( ) const
virtualinherited

Get the logarithm of the likelihood for each site.

Returns
A vector with all log likelihoods for each site.

Implements bpp::TreeLikelihoodInterface.

Definition at line 23 of file AbstractTreeLikelihood.cpp.

References bpp::TreeLikelihoodInterface::getLogLikelihoodForASite(), and bpp::AbstractTreeLikelihood::getNumberOfSites().

◆ getLogLikelihoodPerSite() [2/2]

virtual Vdouble bpp::TreeLikelihoodInterface::getLogLikelihoodPerSite ( ) const
pure virtualinherited

Get the logarithm of the likelihood for each site.

Returns
A vector with all log likelihoods for each site.

Implemented in bpp::AbstractTreeLikelihood.

Referenced by bpp::PairedSiteLikelihoods::appendModel().

◆ getLogLikelihoodPerSitePerRateClass()

VVdouble AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodPerSitePerRateClass ( ) const
virtualinherited

Get the logarithm of the likelihood for each site and each rate class.

Returns
A two-dimension vector with all log likelihoods: V[i][j] = likelihood of site i and rate class j.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 102 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.

References bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getLogLikelihoodForASiteForARateClass(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), and bpp::AbstractTreeLikelihood::getNumberOfSites().

◆ getLogLikelihoodPerSitePerRateClassPerState()

VVVdouble AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodPerSitePerRateClassPerState ( ) const
virtualinherited

Get the logarithm of the likelihood for each site and each rate class and each state.

Returns
A three-dimension vector with all log likelihoods: V[i][j][k} = likelihood of site i and rate class j and state k.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 143 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.

References bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getLogLikelihoodForASiteForARateClassForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), bpp::AbstractTreeLikelihood::getNumberOfSites(), and bpp::TreeLikelihoodInterface::getNumberOfStates().

◆ getLogLikelihoodPerSitePerState() [1/2]

VVdouble AbstractTreeLikelihood::getLogLikelihoodPerSitePerState ( ) const
virtualinherited

Get the logarithm of the likelihood for each site and for each state.

Returns
A 2d vector with all log likelihoods for each site and for each state.

Implements bpp::TreeLikelihoodInterface.

Definition at line 52 of file AbstractTreeLikelihood.cpp.

References bpp::TreeLikelihoodInterface::getLogLikelihoodForASiteForAState(), bpp::AbstractTreeLikelihood::getNumberOfSites(), and bpp::TreeLikelihoodInterface::getNumberOfStates().

◆ getLogLikelihoodPerSitePerState() [2/2]

virtual VVdouble bpp::TreeLikelihoodInterface::getLogLikelihoodPerSitePerState ( ) const
pure virtualinherited

Get the logarithm of the likelihood for each site and for each state.

Returns
A 2d vector with all log likelihoods for each site and for each state.

Implemented in bpp::AbstractTreeLikelihood.

◆ getMaximumBranchLength()

virtual double bpp::AbstractHomogeneousTreeLikelihood::getMaximumBranchLength ( ) const
inlinevirtualinherited

◆ getMinimumBranchLength()

virtual double bpp::AbstractHomogeneousTreeLikelihood::getMinimumBranchLength ( ) const
inlinevirtualinherited

◆ getModel() [1/4]

std::shared_ptr<TransitionModelInterface> bpp::AbstractHomogeneousTreeLikelihood::getModel ( )
inlinevirtualinherited
Returns
The substitution model attached to this instance.

Implements bpp::HomogeneousTreeLikelihood.

Definition at line 171 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getModel() [2/4]

std::shared_ptr<const TransitionModelInterface> bpp::AbstractHomogeneousTreeLikelihood::getModel ( ) const
inlinevirtualinherited
Returns
The substitution model attached to this instance.

Implements bpp::HomogeneousTreeLikelihood.

Definition at line 168 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getModel() [3/4]

std::shared_ptr<TransitionModelInterface> bpp::AbstractHomogeneousTreeLikelihood::getModel ( int  nodeId,
size_t  siteIndex 
)
inlineinherited

◆ getModel() [4/4]

std::shared_ptr<const TransitionModelInterface> bpp::AbstractHomogeneousTreeLikelihood::getModel ( int  nodeId,
size_t  siteIndex 
) const
inlineinherited

◆ getModelForSite() [1/2]

std::shared_ptr<TransitionModelInterface> bpp::HomogeneousTreeLikelihood::getModelForSite ( int  nodeId,
size_t  siteIndex 
)
inlinevirtualinherited

Get the substitution model associated to a given node and alignment column.

Parameters
nodeIdThe id of the request node.
siteIndexThe index of the alignment position.
See also
getSiteIndex
Returns
A pointer toward the corresponding model.
Exceptions
NodeNotFoundExceptionThis exception may be thrown if the node is not found (depending on the implementation).

Implements bpp::TreeLikelihoodInterface.

Definition at line 35 of file HomogeneousTreeLikelihood.h.

References bpp::HomogeneousTreeLikelihood::getModel().

◆ getModelForSite() [2/2]

std::shared_ptr<const TransitionModelInterface> bpp::HomogeneousTreeLikelihood::getModelForSite ( int  nodeId,
size_t  siteIndex 
) const
inlinevirtualinherited

Get the substitution model associated to a given node and alignment column.

Parameters
nodeIdThe id of the request node.
siteIndexThe index of the alignment position.
See also
getSiteIndex
Returns
A pointer toward the corresponding model.

Implements bpp::TreeLikelihoodInterface.

Definition at line 30 of file HomogeneousTreeLikelihood.h.

References bpp::HomogeneousTreeLikelihood::getModel().

◆ getNewBranchModelIterator()

ConstBranchModelIterator* bpp::AbstractHomogeneousTreeLikelihood::getNewBranchModelIterator ( int  nodeId) const
inlinevirtualinherited

◆ getNewSiteModelIterator()

ConstSiteModelIterator* bpp::AbstractHomogeneousTreeLikelihood::getNewSiteModelIterator ( size_t  siteIndex) const
inlinevirtualinherited

◆ getNonDerivableParameters() [1/2]

ParameterList AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNonDerivableParameters ( ) const
virtualinherited

◆ getNonDerivableParameters() [2/2]

virtual ParameterList bpp::TreeLikelihoodInterface::getNonDerivableParameters ( ) const
pure virtualinherited

All non derivable parameters.

Usually, this contains all substitution model parameters and rate distribution.

Returns
A ParameterList.

Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.

◆ getNumberOfClasses()

◆ getNumberOfSites() [1/2]

◆ getNumberOfSites() [2/2]

virtual size_t bpp::TreeLikelihoodInterface::getNumberOfSites ( ) const
pure virtualinherited

Get the number of sites in the dataset.

Returns
the number of sites in the dataset.

Implemented in bpp::AbstractTreeLikelihood.

◆ getNumberOfStates()

size_t bpp::AbstractHomogeneousTreeLikelihood::getNumberOfStates ( ) const
inlinevirtualinherited
Returns
the number of model states of the underlying Markov chain.

Implements bpp::TreeLikelihoodInterface.

Definition at line 126 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getPosteriorProbabilitiesPerRate()

VVdouble AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorProbabilitiesPerRate ( ) const
virtualinherited

◆ getPosteriorRatePerSite()

Vdouble AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorRatePerSite ( ) const
virtualinherited

◆ getRateClassWithMaxPostProbPerSite()

vector< size_t > AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateClassWithMaxPostProbPerSite ( ) const
virtualinherited

Get the posterior rate class (the one with maximum posterior probability) for each site.

Returns
A vector with all rate classes indexes.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 203 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.

References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClass(), and bpp::AbstractTreeLikelihood::getNumberOfSites().

◆ getRateDistribution() [1/2]

std::shared_ptr<DiscreteDistributionInterface> bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateDistribution ( )
inlinevirtualinherited

Get the rate distribution used for the computation.

Returns
A pointer toward the rate distribution of this instance.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 75 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.

References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.

◆ getRateDistribution() [2/2]

std::shared_ptr<const DiscreteDistributionInterface> bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateDistribution ( ) const
inlinevirtualinherited

Get the rate distribution used for the computation.

Returns
A const pointer toward the rate distribution of this instance.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 70 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.

References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.

◆ getRateDistributionParameters()

◆ getRateWithMaxPostProbPerSite()

Vdouble AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateWithMaxPostProbPerSite ( ) const
virtualinherited

◆ getRootFrequencies()

const std::vector<double>& bpp::AbstractHomogeneousTreeLikelihood::getRootFrequencies ( size_t  siteIndex) const
inlinevirtualinherited

Get the values of the frequencies for each state in the alphabet at the root node.

For reversible models, these are the equilibrium frequencies. For non-reversible models, these usually are distinct parameters.

For models without site partitioning, the set of frequencies is the same for all positions. For partition models, the frequencies may differ from one site to another.

Parameters
siteIndexThe index of the alignment position.
See also
getSiteIndex
Returns
A vector with ancestral frequencies for each state in the alphabet;

Implements bpp::TreeLikelihoodInterface.

Definition at line 145 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getSecondOrderDerivative() [1/2]

◆ getSecondOrderDerivative() [2/2]

double bpp::DRHomogeneousMixedTreeLikelihood::getSecondOrderDerivative ( const std::string &  variable1,
const std::string &  variable2 
) const
inlinevirtual

Implements bpp::SecondOrderDerivable.

Definition at line 139 of file DRHomogeneousMixedTreeLikelihood.h.

◆ getSiteIndex()

size_t bpp::DRHomogeneousTreeLikelihood::getSiteIndex ( size_t  site) const
inlineoverridevirtualinherited

Get the index (used for inner computations) of a given site (original alignment column).

Parameters
siteAn alignment position.
Returns
The site index corresponding to the given input alignment position.

Implements bpp::TreeLikelihoodInterface.

Definition at line 112 of file DRHomogeneousTreeLikelihood.h.

References bpp::DRHomogeneousTreeLikelihood::likelihoodData_.

◆ getSubstitutionModel() [1/2]

virtual std::shared_ptr<const SubstitutionModelInterface> bpp::AbstractHomogeneousTreeLikelihood::getSubstitutionModel ( ) const
inlinevirtualinherited

Get a SubstitutionModel pointer toward the model associated to this instance, if possible.

Performs a cast operation on the pointer. Return NULL if cast failed.

Returns
A SubstitutionModel pointer toward the model associated to this instance.

Implements bpp::HomogeneousTreeLikelihood.

Definition at line 183 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getSubstitutionModel() [2/2]

virtual std::shared_ptr<const SubstitutionModelInterface> bpp::AbstractHomogeneousTreeLikelihood::getSubstitutionModel ( int  nodeId,
size_t  siteIndex 
) const
inlinevirtualinherited

Get a SubstitutionModel pointer toward the model associated to this instance, if possible.

Performs a cast operation on the pointer. Return NULL if cast failed.

Returns
A SubstitutionModel pointer toward the model associated to this instance.
Parameters
nodeIdId of the node
siteIndexPosition of the site

Implements bpp::HomogeneousTreeLikelihood.

Definition at line 197 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::model_.

◆ getSubstitutionModelParameters()

◆ getTransitionProbabilities() [1/2]

VVdouble AbstractDiscreteRatesAcrossSitesTreeLikelihood::getTransitionProbabilities ( int  nodeId,
size_t  siteIndex 
) const
virtualinherited

Retrieves all Pij(t) for a particular branch, defined by the upper node and site.

These intermediate results may be used by other methods.

Parameters
nodeIdThe node defining the branch of interest.
siteIndexThe index of the alignment position.
See also
getSiteIndex
Returns
An array of dimension 2, where a[x][y] is the probability of substituting from x to y.

Implements bpp::TreeLikelihoodInterface.

Definition at line 275 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.

References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), bpp::TreeLikelihoodInterface::getNumberOfStates(), bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getTransitionProbabilitiesPerRateClass(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.

◆ getTransitionProbabilities() [2/2]

virtual VVdouble bpp::TreeLikelihoodInterface::getTransitionProbabilities ( int  nodeId,
size_t  siteIndex 
) const
pure virtualinherited

Retrieves all Pij(t) for a particular branch, defined by the upper node and site.

These intermediate results may be used by other methods.

Parameters
nodeIdThe node defining the branch of interest.
siteIndexThe index of the alignment position.
See also
getSiteIndex
Returns
An array of dimension 2, where a[x][y] is the probability of substituting from x to y.

Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.

Referenced by bpp::TreeLikelihoodTools::getAncestralFrequencies_().

◆ getTransitionProbabilitiesPerRateClass()

VVVdouble bpp::AbstractHomogeneousTreeLikelihood::getTransitionProbabilitiesPerRateClass ( int  nodeId,
size_t  siteIndex 
) const
inlinevirtualinherited

Retrieves all Pij(t) for a particular branch, defined by the upper node.

These intermediate results may be used by other methods.

Parameters
nodeIdThe node defining the branch of interest.
siteIndexThe position in the alignment.
Returns
An array of dimension 3, where a[c][x][y] is the probability of substituting from x to y while being in rate class c.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 147 of file AbstractHomogeneousTreeLikelihood.h.

References bpp::AbstractHomogeneousTreeLikelihood::pxy_.

◆ getValue()

double DRHomogeneousTreeLikelihood::getValue ( ) const
overridevirtualinherited

◆ hasLikelihoodData() [1/2]

bool bpp::AbstractTreeLikelihood::hasLikelihoodData ( ) const
inlinevirtualinherited
Returns
True if the TreeLikelihood object has a LikelihoodData.

Implements bpp::TreeLikelihoodInterface.

Definition at line 261 of file AbstractTreeLikelihood.h.

References bpp::AbstractTreeLikelihood::data_.

Referenced by bpp::RNonHomogeneousMixedTreeLikelihood::init().

◆ hasLikelihoodData() [2/2]

virtual bool bpp::TreeLikelihoodInterface::hasLikelihoodData ( ) const
pure virtualinherited
Returns
True if the TreeLikelihood object has a LikelihoodData.

Implemented in bpp::AbstractTreeLikelihood.

◆ init_()

◆ initBranchLengthsParameters()

◆ initialize()

void DRHomogeneousMixedTreeLikelihood::initialize ( )
virtual

Init the likelihood object.

This method is used to initialize all parameters. It is typically called after the constructor and the setData method. It contains virtual methods that can't be called in the constructor.

Exceptions
Exceptionif something bad happened, for instance if no data are associated to the likelihood function.

Reimplemented from bpp::AbstractHomogeneousTreeLikelihood.

Definition at line 115 of file DRHomogeneousMixedTreeLikelihood.cpp.

References computeRootLikelihood(), bpp::AbstractHomogeneousTreeLikelihood::initialize(), rootArray_, and treeLikelihoodsContainer_.

◆ initParameters()

◆ isInitialized() [1/2]

bool bpp::AbstractTreeLikelihood::isInitialized ( ) const
inlinevirtualinherited

◆ isInitialized() [2/2]

virtual bool bpp::TreeLikelihoodInterface::isInitialized ( ) const
pure virtualinherited
Returns
'true' is the likelihood function has been initialized.

Implemented in bpp::AbstractTreeLikelihood.

◆ likelihoodData() [1/2]

const DRASDRTreeLikelihoodData& bpp::DRHomogeneousTreeLikelihood::likelihoodData ( ) const
inlineoverridevirtualinherited
Returns
The underlying likelihood data structure.

Implements bpp::DRTreeLikelihoodInterface.

Definition at line 168 of file DRHomogeneousTreeLikelihood.h.

References bpp::DRHomogeneousTreeLikelihood::likelihoodData_.

◆ likelihoodData() [2/2]

◆ operator=()

◆ rateDistribution() [1/2]

DiscreteDistributionInterface& bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution ( )
inlinevirtualinherited

Get the rate distribution used for the computation.

Returns
A reference toward the rate distribution of this instance.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 85 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.

References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.

◆ rateDistribution() [2/2]

const DiscreteDistributionInterface& bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution ( ) const
inlinevirtualinherited

Get the rate distribution used for the computation.

Returns
A const reference toward the rate distribution of this instance.

Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.

Definition at line 80 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.

References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.

◆ resetLikelihoodArray()

◆ resetLikelihoodArrays()

void DRHomogeneousMixedTreeLikelihood::resetLikelihoodArrays ( const Node node)
protectedvirtual

Reimplemented from bpp::DRHomogeneousTreeLikelihood.

Definition at line 158 of file DRHomogeneousMixedTreeLikelihood.cpp.

References treeLikelihoodsContainer_.

◆ setData()

void DRHomogeneousMixedTreeLikelihood::setData ( const AlignmentDataInterface sites)
virtual

Set the dataset for which the likelihood must be evaluated.

Parameters
sitesThe data set to use.

Implements bpp::TreeLikelihoodInterface.

Definition at line 126 of file DRHomogeneousMixedTreeLikelihood.cpp.

References bpp::DRHomogeneousTreeLikelihood::setData(), and treeLikelihoodsContainer_.

Referenced by DRHomogeneousMixedTreeLikelihood().

◆ setMaximumBranchLength()

◆ setMinimumBranchLength()

◆ setModel()

◆ setParameters()

void DRHomogeneousTreeLikelihood::setParameters ( const ParameterList parameters)
overridevirtualinherited

Implements the Function interface.

Update the parameter list and call the fireParameterChanged() method.

If a subset of the whole parameter list is passed to the function, only these parameters are updated and the other remain constant (i.e. equal to their last value).

Parameters
parametersThe parameter list to pass to the function.

Implements bpp::SecondOrderDerivable.

Definition at line 187 of file DRHomogeneousTreeLikelihood.cpp.

References bpp::AbstractParametrizable::setParametersValues().

◆ tree() [1/2]

◆ tree() [2/2]

virtual const Tree& bpp::TreeLikelihoodInterface::tree ( ) const
pure virtualinherited

Member Data Documentation

◆ brLenConstraint_

◆ brLenParameters_

◆ computeFirstOrderDerivatives_

◆ computeSecondOrderDerivatives_

◆ d2pxy_

◆ data_

◆ dpxy_

◆ initialized_

◆ likelihoodData_

std::unique_ptr<DRASDRTreeLikelihoodData> bpp::DRHomogeneousTreeLikelihood::likelihoodData_
mutableprivateinherited

Definition at line 33 of file DRHomogeneousTreeLikelihood.h.

Referenced by bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::DRHomogeneousTreeLikelihood::displayLikelihood(), bpp::DRHomogeneousTreeLikelihood::DRHomogeneousTreeLikelihood(), getFirstOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getFirstOrderDerivative(), getLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLikelihoodForASite(), bpp::DRHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClass(), bpp::DRHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClassForAState(), getLogLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihoodForASite(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClass(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClassForAState(), getSecondOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getSiteIndex(), bpp::DRHomogeneousTreeLikelihood::init_(), bpp::DRHomogeneousTreeLikelihood::likelihoodData(), bpp::DRHomogeneousTreeLikelihood::operator=(), bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays(), and bpp::DRHomogeneousTreeLikelihood::setData().

◆ maximumBrLen_

◆ minimumBrLen_

◆ minusLogLik_

◆ model_

std::shared_ptr<TransitionModelInterface> bpp::AbstractHomogeneousTreeLikelihood::model_
protectedinherited

Definition at line 52 of file AbstractHomogeneousTreeLikelihood.h.

Referenced by bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractHomogeneousTreeLikelihood::computeAllTransitionProbabilities(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), DRHomogeneousMixedTreeLikelihood(), fireParameterChanged(), bpp::RHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::RHomogeneousTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousTreeLikelihood::fireParameterChanged(), bpp::AbstractHomogeneousTreeLikelihood::getAlphabetStateAsChar(), bpp::AbstractHomogeneousTreeLikelihood::getAlphabetStateAsInt(), bpp::AbstractHomogeneousTreeLikelihood::getAlphabetStates(), bpp::AbstractHomogeneousTreeLikelihood::getModel(), bpp::AbstractHomogeneousTreeLikelihood::getNewBranchModelIterator(), bpp::AbstractHomogeneousTreeLikelihood::getNewSiteModelIterator(), bpp::AbstractHomogeneousTreeLikelihood::getNumberOfStates(), bpp::AbstractHomogeneousTreeLikelihood::getRootFrequencies(), bpp::AbstractHomogeneousTreeLikelihood::getSubstitutionModel(), bpp::AbstractHomogeneousTreeLikelihood::getSubstitutionModelParameters(), bpp::AbstractHomogeneousTreeLikelihood::initParameters(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::RHomogeneousMixedTreeLikelihood::RHomogeneousMixedTreeLikelihood(), bpp::RHomogeneousTreeLikelihood::setData(), bpp::DRHomogeneousTreeLikelihood::setData(), bpp::AbstractHomogeneousTreeLikelihood::setModel(), and bpp::NNIHomogeneousTreeLikelihood::testNNI().

◆ nbClasses_

◆ nbDistinctSites_

◆ nbNodes_

◆ nbSites_

◆ nbStates_

size_t bpp::AbstractHomogeneousTreeLikelihood::nbStates_
protectedinherited

◆ nodes_

◆ probas_

◆ pxy_

◆ rateDistribution_

std::shared_ptr<DiscreteDistributionInterface> bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_
protectedinherited

Definition at line 26 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.

Referenced by bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractNonHomogeneousTreeLikelihood::applyParameters(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractNonHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::DRNonHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::DRNonHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::DRNonHomogeneousTreeLikelihood::fireParameterChanged(), bpp::RHomogeneousTreeLikelihood::fireParameterChanged(), bpp::RNonHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::RNonHomogeneousTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousTreeLikelihood::fireParameterChanged(), bpp::RHomogeneousTreeLikelihood::getD2LikelihoodForASite(), bpp::RNonHomogeneousTreeLikelihood::getD2LikelihoodForASite(), bpp::RHomogeneousTreeLikelihood::getDLikelihoodForASite(), bpp::RNonHomogeneousTreeLikelihood::getDLikelihoodForASite(), bpp::RHomogeneousTreeLikelihood::getLikelihoodForASite(), bpp::RNonHomogeneousTreeLikelihood::getLikelihoodForASite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodForASiteForAState(), bpp::RHomogeneousTreeLikelihood::getLogLikelihoodForASite(), bpp::RNonHomogeneousTreeLikelihood::getLogLikelihoodForASite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodForASiteForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorProbabilitiesPerRate(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorRatePerSite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateDistribution(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateDistributionParameters(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateWithMaxPostProbPerSite(), bpp::DRNonHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getTransitionProbabilities(), bpp::RNonHomogeneousMixedTreeLikelihood::init(), bpp::DRHomogeneousTreeLikelihood::init_(), bpp::DRNonHomogeneousTreeLikelihood::init_(), bpp::RHomogeneousTreeLikelihood::init_(), bpp::RNonHomogeneousTreeLikelihood::init_(), bpp::AbstractNonHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::initParameters(), bpp::AbstractNonHomogeneousTreeLikelihood::initParameters(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::operator=(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution(), and bpp::NNIHomogeneousTreeLikelihood::testNNI().

◆ rootArray_

bool bpp::DRHomogeneousMixedTreeLikelihood::rootArray_
private

Definition at line 35 of file DRHomogeneousMixedTreeLikelihood.h.

Referenced by computeTreeLikelihood(), initialize(), and operator=().

◆ rootFreqs_

◆ tree_

std::shared_ptr< TreeTemplate<Node> > bpp::AbstractTreeLikelihood::tree_
mutableprotectedinherited

Definition at line 209 of file AbstractTreeLikelihood.h.

Referenced by bpp::AbstractHomogeneousTreeLikelihood::AbstractHomogeneousTreeLikelihood(), bpp::AbstractNonHomogeneousTreeLikelihood::AbstractNonHomogeneousTreeLikelihood(), bpp::AbstractTreeLikelihood::AbstractTreeLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeLikelihoodAtNode(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeTreeLikelihood(), bpp::RHomogeneousTreeLikelihood::computeTreeLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeLikelihood(), bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::DRHomogeneousTreeLikelihood::DRHomogeneousTreeLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::DRNonHomogeneousTreeLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::fireParameterChanged(), bpp::RNonHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::RNonHomogeneousTreeLikelihood::fireParameterChanged(), bpp::RHomogeneousTreeLikelihood::getD2LikelihoodForASiteForARateClass(), bpp::RNonHomogeneousTreeLikelihood::getD2LikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getDLikelihoodForASiteForARateClass(), bpp::RNonHomogeneousTreeLikelihood::getDLikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClass(), bpp::RNonHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClassForAState(), bpp::RNonHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClassForAState(), bpp::RHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClass(), bpp::RNonHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClassForAState(), bpp::RNonHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClassForAState(), bpp::AbstractHomogeneousTreeLikelihood::getNewSiteModelIterator(), bpp::DRNonHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::init_(), bpp::DRNonHomogeneousTreeLikelihood::init_(), bpp::RHomogeneousTreeLikelihood::init_(), bpp::RNonHomogeneousTreeLikelihood::init_(), bpp::AbstractNonHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::AbstractNonHomogeneousTreeLikelihood::operator=(), bpp::AbstractTreeLikelihood::operator=(), bpp::DRHomogeneousTreeLikelihood::operator=(), bpp::DRNonHomogeneousTreeLikelihood::operator=(), bpp::RHomogeneousTreeLikelihood::operator=(), bpp::RNonHomogeneousTreeLikelihood::operator=(), bpp::RHomogeneousTreeLikelihood::RHomogeneousTreeLikelihood(), bpp::RNonHomogeneousTreeLikelihood::RNonHomogeneousTreeLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::setData(), bpp::RHomogeneousTreeLikelihood::setData(), bpp::RNonHomogeneousTreeLikelihood::setData(), bpp::DRHomogeneousTreeLikelihood::setData(), bpp::NNIHomogeneousTreeLikelihood::testNNI(), and bpp::AbstractTreeLikelihood::tree().

◆ treeLikelihoodsContainer_

◆ verbose_


The documentation for this class was generated from the following files: