bpp-phyl3
3.0.0
|
This class adds support for NNI topology estimation to the DRHomogeneousTreeLikelihood class. More...
#include <Bpp/Phyl/Legacy/Likelihood/NNIHomogeneousTreeLikelihood.h>
Public Member Functions | |
NNIHomogeneousTreeLikelihood (const Tree &tree, std::shared_ptr< TransitionModelInterface > model, std::shared_ptr< DiscreteDistributionInterface > rDist, bool checkRooted=true, bool verbose=true) | |
Build a new NNIHomogeneousTreeLikelihood object. More... | |
NNIHomogeneousTreeLikelihood (const Tree &tree, const AlignmentDataInterface &data, std::shared_ptr< TransitionModelInterface > model, std::shared_ptr< DiscreteDistributionInterface > rDist, bool checkRooted=true, bool verbose=true) | |
Build a new NNIHomogeneousTreeLikelihood object. More... | |
NNIHomogeneousTreeLikelihood (const NNIHomogeneousTreeLikelihood &lik) | |
Copy constructor. More... | |
NNIHomogeneousTreeLikelihood & | operator= (const NNIHomogeneousTreeLikelihood &lik) |
virtual | ~NNIHomogeneousTreeLikelihood () |
NNIHomogeneousTreeLikelihood * | clone () const override |
void | setData (const AlignmentDataInterface &sites) override |
Set the dataset for which the likelihood must be evaluated. More... | |
void | computeTreeLikelihood () |
void | setParameters (const ParameterList ¶meters) override |
Implements the Function interface. More... | |
double | getValue () const override |
Function and NNISearchable interface. More... | |
DRASDRTreeLikelihoodData & | likelihoodData () override |
const DRASDRTreeLikelihoodData & | likelihoodData () 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 SubstitutionModelInterface > | getSubstitutionModel () const |
Get a SubstitutionModel pointer toward the model associated to this instance, if possible. More... | |
virtual std::shared_ptr< const SubstitutionModelInterface > | getSubstitutionModel (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 TransitionModelInterface > | getModelForSite (int nodeId, size_t siteIndex) const |
Get the substitution model associated to a given node and alignment column. More... | |
std::shared_ptr< TransitionModelInterface > | getModelForSite (int nodeId, size_t siteIndex) |
Get the substitution model associated to a given node and alignment column. More... | |
virtual const AlignmentDataInterface & | data () 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 Tree & | tree () 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 Alphabet > | getAlphabet () 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 ¶meters) |
virtual double | d2f (const std::string &variable1, const std::string &variable2, const ParameterList ¶meters) |
virtual void | enableFirstOrderDerivatives (bool yn)=0 |
virtual bool | enableFirstOrderDerivatives () const=0 |
virtual double | df (const std::string &variable, const ParameterList ¶meters) |
virtual double | f (const ParameterList ¶meters) |
virtual bool | hasParameter (const std::string &name) const=0 |
bool | hasParameter (const std::string &name) const override |
virtual const ParameterList & | getParameters () const=0 |
const ParameterList & | getParameters () const override |
virtual const Parameter & | parameter (const std::string &name) const=0 |
const Parameter & | parameter (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 ¶meters)=0 |
void | setAllParametersValues (const ParameterList ¶meters) 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 ¶meters)=0 |
void | setParametersValues (const ParameterList ¶meters) override |
virtual bool | matchParametersValues (const ParameterList ¶meters)=0 |
bool | matchParametersValues (const ParameterList ¶meters) 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 |
virtual void | topologyChangePerformed (const TopologyChangeEvent &event) |
Notify a topology change event. More... | |
The NNISearchable interface. | |
Current implementation: When testing a particular NNI, only the branch length of the parent node is optimized (and roughly). All other parameters (substitution model, rate distribution and other branch length are kept at there current value. When performing a NNI, only the topology change is performed. This is up to the user to re-initialize the underlying likelihood data to match the new topology. Usually, this is achieved by calling the topologyChangePerformed() method, which call the reInit() method of the LikelihoodData object. | |
const Tree & | topology () const override |
Get the tree associated to this NNISearchable object. More... | |
double | getTopologyValue () const override |
Get the current score of this NNISearchable object. More... | |
double | testNNI (int nodeId) const override |
Send the score of a NNI movement, without performing it. More... | |
void | doNNI (int nodeId) override |
Perform a NNI movement. More... | |
void | topologyChangeTested (const TopologyChangeEvent &event) override |
Notify a topology change event. More... | |
void | topologyChangeSuccessful (const TopologyChangeEvent &event) override |
Tell that a topology change is definitive. More... | |
The TreeLikelihood interface. | |
Other methods are implemented in the AbstractTreeLikelihood class. | |
double | getLikelihood () const override |
Get the likelihood for the whole dataset. More... | |
double | getLogLikelihood () const override |
Get the logarithm of the likelihood for the whole dataset. More... | |
double | getLikelihoodForASite (size_t site) const override |
Get the likelihood for a site. More... | |
double | getLogLikelihoodForASite (size_t site) const override |
Get the logarithm of the likelihood for a site. More... | |
size_t | getSiteIndex (size_t site) const override |
Get the index (used for inner computations) of a given site (original alignment column). More... | |
The DiscreteRatesAcrossSites interface implementation: | |
double | getLikelihoodForASiteForARateClass (size_t site, size_t rateClass) const override |
Get the likelihood for a site knowing its rate class. More... | |
double | getLogLikelihoodForASiteForARateClass (size_t site, size_t rateClass) const override |
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 override |
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 override |
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 override |
DerivableSecondOrder interface. | |
double | getSecondOrderDerivative (const std::string &variable) const override |
double | getSecondOrderDerivative (const std::string &variable1, const std::string &variable2) const override |
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 |
void | initialize () |
Init the likelihood object. More... | |
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... | |
ConstBranchModelIterator * | getNewBranchModelIterator (int nodeId) const |
ConstSiteModelIterator * | getNewSiteModelIterator (size_t siteIndex) const |
The HomogeneousTreeLikelihood interface. | |
Other methods are implemented in the AbstractTreeLikelihood class. | |
std::shared_ptr< const TransitionModelInterface > | getModel () const |
std::shared_ptr< const TransitionModelInterface > | getModel (int nodeId, size_t siteIndex) const |
std::shared_ptr< TransitionModelInterface > | getModel () |
std::shared_ptr< TransitionModelInterface > | getModel (int nodeId, size_t siteIndex) |
void | setModel (std::shared_ptr< TransitionModelInterface > model) |
The TreeLikelihood interface. | |
const AlignmentDataInterface & | data () 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 Tree & | tree () 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 Alphabet > | getAlphabet () 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 DiscreteDistributionInterface > | getRateDistribution () const |
Get the rate distribution used for the computation. More... | |
std::shared_ptr< DiscreteDistributionInterface > | getRateDistribution () |
Get the rate distribution used for the computation. More... | |
const DiscreteDistributionInterface & | rateDistribution () const |
Get the rate distribution used for the computation. More... | |
DiscreteDistributionInterface & | rateDistribution () |
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) |
virtual void | computeSubtreeLikelihoodPrefix (const Node *node) |
virtual void | computeRootLikelihood () |
virtual void | computeTreeDLikelihoodAtNode (const Node *node) |
virtual void | computeTreeDLikelihoods () |
virtual void | computeTreeD2LikelihoodAtNode (const Node *node) |
virtual void | computeTreeD2Likelihoods () |
virtual void | fireParameterChanged (const ParameterList ¶ms) override |
virtual void | resetLikelihoodArrays (const Node *node) |
virtual void | displayLikelihood (const Node *node) |
This method is mainly for debugging purpose. More... | |
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 ParameterList & | getParameters_ ()=0 |
ParameterList & | getParameters_ () 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 ¶meters) |
virtual void | shareParameter_ (const std::shared_ptr< Parameter > ¶meter) |
virtual void | shareParameters_ (const ParameterList ¶meters) |
virtual void | includeParameters_ (const ParameterList ¶meters) |
virtual void | deleteParameter_ (size_t index) |
virtual void | deleteParameter_ (std::string &name) |
virtual void | deleteParameters_ (const std::vector< std::string > &names) |
void | resetParameters_ () |
Parameter & | getParameter_ (const std::string &name) |
Parameter & | getParameter_ (size_t index) |
const Parameter & | getParameter_ (size_t index) const |
Parameter & | getParameterWithNamespace_ (const std::string &name) |
const Parameter & | getParameterWithNamespace_ (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... | |
Private Member Functions | |
void | init_ () |
Method called by constructors. More... | |
Private Attributes | |
std::unique_ptr< DRASDRTreeLikelihoodData > | likelihoodData_ |
ParameterList | parameters_ |
std::string | prefix_ |
This class adds support for NNI topology estimation to the DRHomogeneousTreeLikelihood class.
Definition at line 131 of file NNIHomogeneousTreeLikelihood.h.
NNIHomogeneousTreeLikelihood::NNIHomogeneousTreeLikelihood | ( | const Tree & | tree, |
std::shared_ptr< TransitionModelInterface > | model, | ||
std::shared_ptr< DiscreteDistributionInterface > | rDist, | ||
bool | checkRooted = true , |
||
bool | verbose = true |
||
) |
Build a new NNIHomogeneousTreeLikelihood object.
tree | The tree to use. |
model | The substitution model to use. |
rDist | The rate across sites distribution to use. |
checkRooted | Tell if we have to check for the tree to be unrooted. If true, any rooted tree will be unrooted before likelihood computation. |
verbose | Should I display some info? |
Exception | in an error occurred. |
Definition at line 91 of file NNIHomogeneousTreeLikelihood.cpp.
References brentOptimizer_, and bpp::AutoParameter::CONSTRAINTS_AUTO.
Referenced by clone().
NNIHomogeneousTreeLikelihood::NNIHomogeneousTreeLikelihood | ( | const Tree & | tree, |
const AlignmentDataInterface & | data, | ||
std::shared_ptr< TransitionModelInterface > | model, | ||
std::shared_ptr< DiscreteDistributionInterface > | rDist, | ||
bool | checkRooted = true , |
||
bool | verbose = true |
||
) |
Build a new NNIHomogeneousTreeLikelihood object.
tree | The tree to use. |
data | Sequences to use. |
model | The substitution model to use. |
rDist | The rate across sites distribution to use. |
checkRooted | Tell if we have to check for the tree to be unrooted. If true, any rooted tree will be unrooted before likelihood computation. |
verbose | Should I display some info? |
Exception | in an error occurred. |
Definition at line 112 of file NNIHomogeneousTreeLikelihood.cpp.
References brentOptimizer_, brLikFunction_, bpp::AutoParameter::CONSTRAINTS_AUTO, and bpp::DRHomogeneousTreeLikelihood::likelihoodData().
NNIHomogeneousTreeLikelihood::NNIHomogeneousTreeLikelihood | ( | const NNIHomogeneousTreeLikelihood & | lik | ) |
Copy constructor.
Definition at line 136 of file NNIHomogeneousTreeLikelihood.cpp.
References brentOptimizer_, brLenNNIParams_, brLenNNIValues_, and brLikFunction_.
|
virtual |
Definition at line 163 of file NNIHomogeneousTreeLikelihood.cpp.
|
virtualinherited |
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.
Definition at line 249 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::AbstractParametrizable::getParameters(), bpp::Parameter::getValue(), bpp::AbstractTreeLikelihood::initialized_, bpp::AbstractHomogeneousTreeLikelihood::model_, bpp::AbstractHomogeneousTreeLikelihood::nbNodes_, bpp::AbstractHomogeneousTreeLikelihood::nodes_, bpp::AbstractParametrizable::parameter(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_, bpp::AbstractHomogeneousTreeLikelihood::rootFreqs_, and bpp::TextTools::toString().
Referenced by bpp::DRHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::RHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::RHomogeneousTreeLikelihood::fireParameterChanged(), and bpp::DRHomogeneousTreeLikelihood::fireParameterChanged().
|
inlineoverridevirtual |
Reimplemented from bpp::DRHomogeneousTreeLikelihood.
Definition at line 198 of file NNIHomogeneousTreeLikelihood.h.
References NNIHomogeneousTreeLikelihood().
|
protectedvirtualinherited |
Fill the pxy_, dpxy_ and d2pxy_ arrays for all nodes.
Reimplemented in bpp::RHomogeneousMixedTreeLikelihood.
Definition at line 306 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractHomogeneousTreeLikelihood::model_, bpp::AbstractHomogeneousTreeLikelihood::nbNodes_, bpp::AbstractHomogeneousTreeLikelihood::nodes_, and bpp::AbstractHomogeneousTreeLikelihood::rootFreqs_.
Referenced by bpp::RHomogeneousTreeLikelihood::fireParameterChanged(), and bpp::DRHomogeneousTreeLikelihood::fireParameterChanged().
|
inlineoverridevirtualinherited |
Compute the likelihood array at a given node.
nodeId | The id of the node to consider. |
likelihoodArray | The 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_.
|
protectedvirtualinherited |
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 682 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeLikelihoodFromArrays(), bpp::Node::getFather(), bpp::Node::getId(), bpp::Node::getNumberOfSons(), bpp::Node::getSon(), bpp::Node::hasFather(), bpp::Node::isLeaf(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, bpp::AbstractHomogeneousTreeLikelihood::pxy_, and bpp::AbstractHomogeneousTreeLikelihood::rootFreqs_.
Referenced by bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), and bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode().
|
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!
iLik | A vector of likelihood arrays, one for each conditional node. |
tProb | A vector of transition probabilities, one for each node. |
iLikR | The likelihood array for the subtree containing the root of the tree. |
tProbR | The transition probabilities for thr subtree containing the root of the tree. |
oLik | The likelihood array to store the computed likelihoods. |
nbNodes | The number of nodes = the size of the input vectors. |
nbDistinctSites | The number of distinct sites (the first dimension of the likelihood array). |
nbClasses | The number of rate classes (the second dimension of the likelihood array). |
nbStates | The number of states (the third dimension of the likelihood array). |
reset | Tell 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().
|
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!
iLik | A vector of likelihood arrays, one for each conditional node. |
tProb | A vector of transition probabilities, one for each node. |
oLik | The likelihood array to store the computed likelihoods. |
nbNodes | The number of nodes = the size of the input vectors. |
nbDistinctSites | The number of distinct sites (the first dimension of the likelihood array). |
nbClasses | The number of rate classes (the second dimension of the likelihood array). |
nbStates | The number of states (the third dimension of the likelihood array). |
reset | Tell 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 testNNI().
|
protectedvirtualinherited |
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 612 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeLikelihoodFromArrays(), bpp::Node::getId(), bpp::Node::getNumberOfSons(), bpp::Node::getSon(), bpp::Node::isLeaf(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, bpp::AbstractHomogeneousTreeLikelihood::pxy_, bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_, bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::resetLikelihoodArray(), bpp::AbstractHomogeneousTreeLikelihood::rootFreqs_, and bpp::AbstractTreeLikelihood::tree_.
Referenced by bpp::DRHomogeneousTreeLikelihood::computeTreeLikelihood().
|
protectedvirtualinherited |
Initialize the arrays corresponding to each son node for the node passed as argument. The method is called for each son node and the result stored in the corresponding array.
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 442 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeLikelihoodFromArrays(), bpp::Node::getId(), bpp::Node::getNumberOfSons(), bpp::Node::getSon(), bpp::Node::isLeaf(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, bpp::AbstractHomogeneousTreeLikelihood::pxy_, and bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays().
Referenced by bpp::DRHomogeneousTreeLikelihood::computeTreeLikelihood().
|
protectedvirtualinherited |
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 in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 502 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeLikelihoodFromArrays(), bpp::Node::getFather(), bpp::Node::getId(), bpp::Node::getNumberOfSons(), bpp::Node::getSon(), bpp::Node::hasFather(), bpp::Node::isLeaf(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, bpp::AbstractHomogeneousTreeLikelihood::pxy_, bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::resetLikelihoodArray(), and bpp::AbstractHomogeneousTreeLikelihood::rootFreqs_.
Referenced by bpp::DRHomogeneousTreeLikelihood::computeTreeLikelihood().
|
protectedvirtualinherited |
Fill the pxy_, dpxy_ and d2pxy_ arrays for one node.
Reimplemented in bpp::RHomogeneousMixedTreeLikelihood.
Definition at line 319 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::AbstractTreeLikelihood::computeFirstOrderDerivatives_, bpp::AbstractTreeLikelihood::computeSecondOrderDerivatives_, bpp::AbstractHomogeneousTreeLikelihood::d2pxy_, bpp::AbstractHomogeneousTreeLikelihood::dpxy_, bpp::Node::getDistanceToFather(), bpp::Node::getId(), bpp::AbstractHomogeneousTreeLikelihood::model_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, bpp::AbstractHomogeneousTreeLikelihood::pxy_, and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::computeAllTransitionProbabilities(), bpp::RHomogeneousTreeLikelihood::fireParameterChanged(), and bpp::DRHomogeneousTreeLikelihood::fireParameterChanged().
|
protectedvirtualinherited |
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 332 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::AbstractHomogeneousTreeLikelihood::d2pxy_, bpp::Node::getFather(), bpp::Node::getId(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
Referenced by bpp::DRHomogeneousTreeLikelihood::computeTreeD2Likelihoods().
|
protectedvirtualinherited |
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 374 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::AbstractHomogeneousTreeLikelihood::nbNodes_, and bpp::AbstractHomogeneousTreeLikelihood::nodes_.
Referenced by bpp::DRHomogeneousTreeLikelihood::fireParameterChanged().
|
protectedvirtualinherited |
Definition at line 243 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::AbstractHomogeneousTreeLikelihood::dpxy_, bpp::Node::getFather(), bpp::Node::getId(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
Referenced by bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoods().
|
protectedvirtualinherited |
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 288 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::AbstractHomogeneousTreeLikelihood::nbNodes_, and bpp::AbstractHomogeneousTreeLikelihood::nodes_.
Referenced by bpp::DRHomogeneousTreeLikelihood::fireParameterChanged().
|
inherited |
Definition at line 433 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), and bpp::AbstractTreeLikelihood::tree_.
Referenced by bpp::DRHomogeneousTreeLikelihood::fireParameterChanged().
|
inlinevirtualinherited |
Get the dataset for which the likelihood must be evaluated.
Implements bpp::TreeLikelihoodInterface.
Definition at line 262 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::data_.
Referenced by bpp::DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::DRHomogeneousTreeLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::DRNonHomogeneousTreeLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::init(), bpp::RHomogeneousMixedTreeLikelihood::RHomogeneousMixedTreeLikelihood(), bpp::RHomogeneousTreeLikelihood::RHomogeneousTreeLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::RNonHomogeneousMixedTreeLikelihood(), and bpp::RNonHomogeneousTreeLikelihood::RNonHomogeneousTreeLikelihood().
|
pure virtualinherited |
Get the dataset for which the likelihood must be evaluated.
Implemented in bpp::AbstractTreeLikelihood.
|
protectedvirtualinherited |
This method is mainly for debugging purpose.
node | The node at which likelihood values must be displayed. |
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 913 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::displayLikelihoodArray(), bpp::Node::getFather(), bpp::Node::getId(), bpp::Node::getNumberOfSons(), bpp::Node::getSon(), bpp::Node::hasFather(), and bpp::DRHomogeneousTreeLikelihood::likelihoodData_.
|
staticinherited |
Print the likelihood array to terminal (debugging tool).
likelihoodArray | the likelihood array. |
Definition at line 251 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
Referenced by bpp::DRHomogeneousTreeLikelihood::displayLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::displayLikelihood(), bpp::RHomogeneousTreeLikelihood::displayLikelihood(), and bpp::RNonHomogeneousTreeLikelihood::displayLikelihood().
|
overridevirtual |
Perform a NNI movement.
nodeId | The id of the node defining the NNI movement. |
NodeException | If the node does not define a valid NNI. |
Implements bpp::NNISearchable.
Definition at line 278 of file NNIHomogeneousTreeLikelihood.cpp.
References bpp::ParameterList::addParameter(), bpp::Node::addSon(), brLenNNIParams_, brLenNNIValues_, bpp::AbstractHomogeneousTreeLikelihood::brLenParameters_, bpp::Node::getFather(), bpp::Node::getId(), bpp::AbstractParametrizable::getParameter_(), bpp::Node::getSon(), bpp::Node::getSonPosition(), bpp::Node::hasFather(), bpp::AbstractHomogeneousTreeLikelihood::nodes_, bpp::ParameterList::parameter(), bpp::ParameterList::printParameters(), bpp::Node::removeSon(), bpp::Node::setDistanceToFather(), bpp::ParameterList::setParameterValue(), bpp::Parameter::setValue(), bpp::ParameterList::size(), bpp::TextTools::toString(), and bpp::AbstractTreeLikelihood::tree_.
|
inlinevirtualinherited |
Tell if derivatives must be computed.
This methods calls the enableFirstOrderDerivatives and enableSecondOrderDerivatives.
yn | Yes 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().
|
pure virtualinherited |
Tell if derivatives must be computed.
This methods calls the enableFirstOrderDerivatives and enableSecondOrderDerivatives.
yn | Yes or no. |
Implemented in bpp::AbstractTreeLikelihood.
|
inlinevirtualinherited |
Implements bpp::SecondOrderDerivable.
Definition at line 273 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::computeFirstOrderDerivatives_.
|
inlinevirtualinherited |
Implements bpp::SecondOrderDerivable.
Definition at line 271 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::computeFirstOrderDerivatives_.
|
inlinevirtualinherited |
Implements bpp::SecondOrderDerivable.
Definition at line 274 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::computeSecondOrderDerivatives_.
|
inlinevirtualinherited |
Implements bpp::SecondOrderDerivable.
Definition at line 272 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::computeFirstOrderDerivatives_, and bpp::AbstractTreeLikelihood::computeSecondOrderDerivatives_.
|
overrideprotectedvirtualinherited |
Reimplemented from bpp::AbstractParametrizable.
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 194 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractHomogeneousTreeLikelihood::computeAllTransitionProbabilities(), bpp::AbstractTreeLikelihood::computeFirstOrderDerivatives_, bpp::AbstractTreeLikelihood::computeSecondOrderDerivatives_, bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2Likelihoods(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoods(), bpp::DRHomogeneousTreeLikelihood::computeTreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihood(), bpp::DRHomogeneousTreeLikelihood::minusLogLik_, bpp::AbstractHomogeneousTreeLikelihood::model_, bpp::AbstractHomogeneousTreeLikelihood::nodes_, bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_, and bpp::ParameterList::size().
Referenced by topologyChangeTested().
|
inlinevirtualinherited |
Get the alphabet associated to the dataset.
Implements bpp::TreeLikelihoodInterface.
Definition at line 263 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::data_.
|
pure virtualinherited |
Get the alphabet associated to the dataset.
Implemented in bpp::AbstractTreeLikelihood.
|
inlinevirtualinherited |
Implements bpp::TreeLikelihoodInterface.
Definition at line 132 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
inlinevirtualinherited |
Implements bpp::TreeLikelihoodInterface.
Definition at line 130 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
inlinevirtualinherited |
Implements bpp::TreeLikelihoodInterface.
Definition at line 128 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
virtualinherited |
Get the branch lengths parameters.
Implements bpp::TreeLikelihoodInterface.
Definition at line 213 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::AbstractHomogeneousTreeLikelihood::brLenParameters_, bpp::ParameterList::getCommonParametersWith(), bpp::AbstractParametrizable::getParameters(), and bpp::AbstractTreeLikelihood::initialized_.
|
virtualinherited |
All derivable parameters.
Usually, this contains all branch lengths parameters.
Implements bpp::TreeLikelihoodInterface.
Definition at line 37 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::TreeLikelihoodInterface::getBranchLengthsParameters(), and bpp::AbstractTreeLikelihood::initialized_.
|
pure virtualinherited |
All derivable parameters.
Usually, this contains all branch lengths parameters.
Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.
|
overridevirtualinherited |
Implements bpp::SecondOrderDerivable.
Definition at line 298 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::Node::getId(), bpp::AbstractHomogeneousTreeLikelihood::getRateDistributionParameters(), bpp::AbstractHomogeneousTreeLikelihood::getSubstitutionModelParameters(), bpp::AbstractParametrizable::hasParameter(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, and bpp::AbstractHomogeneousTreeLikelihood::nodes_.
|
overridevirtualinherited |
Get the likelihood for the whole dataset.
Implements bpp::TreeLikelihoodInterface.
Definition at line 110 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, and bpp::pow().
|
overridevirtualinherited |
Get the likelihood for a site.
site | The site index to analyse. |
Implements bpp::TreeLikelihoodInterface.
Definition at line 146 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_.
|
overridevirtualinherited |
Get the likelihood for a site knowing its rate class.
site | The site index. |
rateClass | The rate class index. |
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 159 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_.
|
overridevirtualinherited |
Get the likelihood for a site knowing its rate class and its ancestral state.
site | The site index. |
rateClass | The rate class index. |
state | The ancestral state. |
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 173 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_.
|
virtualinherited |
Get the likelihood for a site and for a state.
site | The site index to analyse. |
state | The state to consider. |
Implements bpp::TreeLikelihoodInterface.
Definition at line 75 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getLikelihoodForASiteForARateClassForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
pure virtualinherited |
Get the likelihood for a site and for a state.
site | The site index to analyse. |
state | The state to consider. |
Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.
Referenced by bpp::AbstractTreeLikelihood::getLikelihoodPerSitePerState().
|
virtualinherited |
Get the likelihood for each site.
Implements bpp::TreeLikelihoodInterface.
Definition at line 11 of file AbstractTreeLikelihood.cpp.
References bpp::TreeLikelihoodInterface::getLikelihoodForASite(), and bpp::AbstractTreeLikelihood::getNumberOfSites().
Referenced by bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorProbabilitiesPerRate(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorRatePerSite().
|
pure virtualinherited |
Get the likelihood for each site.
Implemented in bpp::AbstractTreeLikelihood.
|
virtualinherited |
Get the likelihood for each site and each rate class.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 57 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getLikelihoodForASiteForARateClass(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), and bpp::AbstractTreeLikelihood::getNumberOfSites().
Referenced by bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorProbabilitiesPerRate(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorRatePerSite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateClassWithMaxPostProbPerSite(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateWithMaxPostProbPerSite().
|
virtualinherited |
Get the likelihood for each site and each rate class and each state.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 120 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getLikelihoodForASiteForARateClassForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), bpp::AbstractTreeLikelihood::getNumberOfSites(), and bpp::TreeLikelihoodInterface::getNumberOfStates().
|
virtualinherited |
Get the likelihood 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().
|
pure virtualinherited |
Get the likelihood for each site and for each state.
Implemented in bpp::AbstractTreeLikelihood.
|
overridevirtualinherited |
Get the logarithm of the likelihood for the whole dataset.
Implements bpp::TreeLikelihoodInterface.
Definition at line 125 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::log(), and bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_.
Referenced by bpp::DRHomogeneousTreeLikelihood::fireParameterChanged().
|
overridevirtualinherited |
Get the logarithm of the likelihood for a site.
site | The site index to analyse. |
Implements bpp::TreeLikelihoodInterface.
Definition at line 153 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_, and bpp::log().
|
overridevirtualinherited |
Get the logarithm of the likelihood for a site knowing its rate class.
site | The site index. |
rateClass | The rate class index. |
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 166 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_, and bpp::log().
|
overridevirtualinherited |
Get the logarithm of the likelihood for a site knowing its rate class and its ancestral state.
site | The site index. |
rateClass | The rate class index. |
state | The ancestral state. |
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 180 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_, and bpp::log().
|
virtualinherited |
Get the logarithm of the likelihood for a site and for a state.
site | The site index to analyse. |
state | The state to consider. |
Implements bpp::TreeLikelihoodInterface.
Definition at line 88 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface::getLikelihoodForASiteForARateClassForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), bpp::log(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
pure virtualinherited |
Get the logarithm of the likelihood for a site and for a state.
site | The site index to analyse. |
state | The state to consider. |
Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.
Referenced by bpp::AbstractTreeLikelihood::getLogLikelihoodPerSitePerState().
|
virtualinherited |
Get the logarithm of the likelihood for each site.
Implements bpp::TreeLikelihoodInterface.
Definition at line 23 of file AbstractTreeLikelihood.cpp.
References bpp::TreeLikelihoodInterface::getLogLikelihoodForASite(), and bpp::AbstractTreeLikelihood::getNumberOfSites().
|
pure virtualinherited |
Get the logarithm of the likelihood for each site.
Implemented in bpp::AbstractTreeLikelihood.
Referenced by bpp::PairedSiteLikelihoods::appendModel().
|
virtualinherited |
Get the logarithm of the likelihood for each site and each rate class.
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().
|
virtualinherited |
Get the logarithm of the likelihood for each site and each rate class and each state.
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().
|
virtualinherited |
Get the logarithm of the likelihood 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().
|
pure virtualinherited |
Get the logarithm of the likelihood for each site and for each state.
Implemented in bpp::AbstractTreeLikelihood.
|
inlinevirtualinherited |
Definition at line 239 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::maximumBrLen_.
|
inlinevirtualinherited |
Definition at line 238 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::minimumBrLen_.
|
inlinevirtualinherited |
Implements bpp::HomogeneousTreeLikelihood.
Definition at line 171 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
inlinevirtualinherited |
Implements bpp::HomogeneousTreeLikelihood.
Definition at line 168 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
inlineinherited |
Definition at line 172 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
inlineinherited |
Definition at line 169 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
inlinevirtualinherited |
Get the substitution model associated to a given node and alignment column.
nodeId | The id of the request node. |
siteIndex | The index of the alignment position. |
NodeNotFoundException | This 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().
|
inlinevirtualinherited |
Get the substitution model associated to a given node and alignment column.
nodeId | The id of the request node. |
siteIndex | The index of the alignment position. |
Implements bpp::TreeLikelihoodInterface.
Definition at line 30 of file HomogeneousTreeLikelihood.h.
References bpp::HomogeneousTreeLikelihood::getModel().
|
inlinevirtualinherited |
Implements bpp::TreeLikelihoodInterface.
Definition at line 149 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_, and bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_.
|
inlinevirtualinherited |
Implements bpp::TreeLikelihoodInterface.
Definition at line 154 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_, and bpp::AbstractTreeLikelihood::tree_.
|
virtualinherited |
All non derivable parameters.
Usually, this contains all substitution model parameters and rate distribution.
Implements bpp::TreeLikelihoodInterface.
Definition at line 46 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::ParameterList::addParameters(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateDistributionParameters(), bpp::TreeLikelihoodInterface::getSubstitutionModelParameters(), and bpp::AbstractTreeLikelihood::initialized_.
|
pure virtualinherited |
All non derivable parameters.
Usually, this contains all substitution model parameters and rate distribution.
Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.
|
inlinevirtualinherited |
Get the number of classes.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 90 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
Referenced by bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodForASiteForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClass(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClassPerState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodForASiteForAState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodPerSitePerRateClass(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodPerSitePerRateClassPerState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorProbabilitiesPerRate(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorRatePerSite(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getTransitionProbabilities().
|
inlinevirtualinherited |
Get the number of sites in the dataset.
Implements bpp::TreeLikelihoodInterface.
Definition at line 268 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::data_.
Referenced by bpp::AbstractTreeLikelihood::getLikelihoodPerSite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClass(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClassPerState(), bpp::AbstractTreeLikelihood::getLikelihoodPerSitePerState(), bpp::AbstractTreeLikelihood::getLogLikelihoodPerSite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodPerSitePerRateClass(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLogLikelihoodPerSitePerRateClassPerState(), bpp::AbstractTreeLikelihood::getLogLikelihoodPerSitePerState(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorProbabilitiesPerRate(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getPosteriorRatePerSite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateClassWithMaxPostProbPerSite(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateWithMaxPostProbPerSite().
|
pure virtualinherited |
Get the number of sites in the dataset.
Implemented in bpp::AbstractTreeLikelihood.
|
inlinevirtualinherited |
Implements bpp::TreeLikelihoodInterface.
Definition at line 126 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
virtualinherited |
Get the posterior probability for each site of belonging to a particular rate class.
V[i][j] =
probability for site i of belonging to rate class j. Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 166 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::AbstractTreeLikelihood::getLikelihoodPerSite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClass(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), bpp::AbstractTreeLikelihood::getNumberOfSites(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
virtualinherited |
Get the posterior rate, i.e. averaged over all classes and weighted with posterior probabilities, for each site.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 184 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::AbstractTreeLikelihood::getLikelihoodPerSite(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClass(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNumberOfClasses(), bpp::AbstractTreeLikelihood::getNumberOfSites(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
virtualinherited |
Get the posterior rate class (the one with maximum posterior probability) for each site.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 203 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClass(), and bpp::AbstractTreeLikelihood::getNumberOfSites().
|
inlinevirtualinherited |
Get the rate distribution used for the computation.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 75 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
inlinevirtualinherited |
Get the rate distribution used for the computation.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 70 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
inlinevirtualinherited |
Get the parameters associated to the rate distribution.
Reimplemented from bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.
Definition at line 140 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateDistributionParameters().
Referenced by bpp::DRHomogeneousMixedTreeLikelihood::getFirstOrderDerivative(), bpp::RHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousMixedTreeLikelihood::getSecondOrderDerivative(), bpp::RHomogeneousTreeLikelihood::getSecondOrderDerivative(), and bpp::DRHomogeneousTreeLikelihood::getSecondOrderDerivative().
|
virtualinherited |
Get the posterior rate (the one with maximum posterior probability) for each site.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 217 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getLikelihoodPerSitePerRateClass(), bpp::AbstractTreeLikelihood::getNumberOfSites(), and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
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.
siteIndex | The index of the alignment position. |
Implements bpp::TreeLikelihoodInterface.
Definition at line 145 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
overridevirtualinherited |
Implements bpp::SecondOrderDerivable.
Definition at line 384 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::Node::getId(), bpp::AbstractHomogeneousTreeLikelihood::getRateDistributionParameters(), bpp::AbstractHomogeneousTreeLikelihood::getSubstitutionModelParameters(), bpp::AbstractParametrizable::hasParameter(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::AbstractHomogeneousTreeLikelihood::nodes_, and bpp::pow().
|
inlineoverridevirtualinherited |
Implements bpp::SecondOrderDerivable.
Definition at line 161 of file DRHomogeneousTreeLikelihood.h.
|
inlineoverridevirtualinherited |
Get the index (used for inner computations) of a given site (original alignment column).
site | An alignment position. |
Implements bpp::TreeLikelihoodInterface.
Definition at line 112 of file DRHomogeneousTreeLikelihood.h.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_.
|
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.
Implements bpp::HomogeneousTreeLikelihood.
Definition at line 183 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
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.
nodeId | Id of the node |
siteIndex | Position of the site |
Implements bpp::HomogeneousTreeLikelihood.
Definition at line 197 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::model_.
|
virtualinherited |
Get the parameters associated to substitution model(s).
Implements bpp::TreeLikelihoodInterface.
Definition at line 222 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::AbstractParametrizable::getParameters(), bpp::AbstractTreeLikelihood::initialized_, and bpp::AbstractHomogeneousTreeLikelihood::model_.
Referenced by bpp::DRHomogeneousMixedTreeLikelihood::getFirstOrderDerivative(), bpp::RHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousMixedTreeLikelihood::getSecondOrderDerivative(), bpp::RHomogeneousTreeLikelihood::getSecondOrderDerivative(), and bpp::DRHomogeneousTreeLikelihood::getSecondOrderDerivative().
|
inlineoverridevirtual |
Get the current score of this NNISearchable object.
Implements bpp::NNISearchable.
Definition at line 220 of file NNIHomogeneousTreeLikelihood.h.
References bpp::DRHomogeneousTreeLikelihood::getValue().
|
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.
nodeId | The node defining the branch of interest. |
siteIndex | The index of the alignment position. |
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_.
|
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.
nodeId | The node defining the branch of interest. |
siteIndex | The index of the alignment position. |
Implemented in bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood.
Referenced by bpp::TreeLikelihoodTools::getAncestralFrequencies_().
|
inlinevirtualinherited |
Retrieves all Pij(t) for a particular branch, defined by the upper node.
These intermediate results may be used by other methods.
nodeId | The node defining the branch of interest. |
siteIndex | The position in the alignment. |
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 147 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::pxy_.
|
overridevirtualinherited |
Function and NNISearchable interface.
Implements bpp::SecondOrderDerivable.
Definition at line 233 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::AbstractTreeLikelihood::isInitialized(), and bpp::DRHomogeneousTreeLikelihood::minusLogLik_.
Referenced by getTopologyValue(), and testNNI().
|
inlinevirtualinherited |
Implements bpp::TreeLikelihoodInterface.
Definition at line 261 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::data_.
Referenced by bpp::RNonHomogeneousMixedTreeLikelihood::init().
|
pure virtualinherited |
Implemented in bpp::AbstractTreeLikelihood.
|
privateinherited |
Method called by constructors.
Definition at line 57 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_, bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_, and bpp::AbstractTreeLikelihood::tree_.
Referenced by bpp::DRHomogeneousTreeLikelihood::DRHomogeneousTreeLikelihood().
|
virtualinherited |
Definition at line 270 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::ParameterList::addParameter(), bpp::AbstractHomogeneousTreeLikelihood::brLenConstraint_, bpp::AbstractHomogeneousTreeLikelihood::brLenParameters_, bpp::ApplicationTools::displayWarning(), bpp::AbstractHomogeneousTreeLikelihood::maximumBrLen_, bpp::AbstractHomogeneousTreeLikelihood::minimumBrLen_, bpp::AbstractHomogeneousTreeLikelihood::nbNodes_, bpp::AbstractHomogeneousTreeLikelihood::nodes_, bpp::ParameterList::reset(), and bpp::TextTools::toString().
Referenced by bpp::AbstractHomogeneousTreeLikelihood::initParameters(), bpp::AbstractHomogeneousTreeLikelihood::setMaximumBranchLength(), and bpp::AbstractHomogeneousTreeLikelihood::setMinimumBranchLength().
|
virtualinherited |
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.
Exception | if something bad happened, for instance if no data are associated to the likelihood function. |
Implements bpp::TreeLikelihoodInterface.
Reimplemented in bpp::RHomogeneousMixedTreeLikelihood, and bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 200 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::AbstractTreeLikelihood::data_, bpp::AbstractParametrizable::fireParameterChanged(), bpp::AbstractParametrizable::getParameters(), bpp::AbstractTreeLikelihood::initialized_, and bpp::AbstractHomogeneousTreeLikelihood::initParameters().
Referenced by bpp::DRHomogeneousMixedTreeLikelihood::initialize(), and bpp::RHomogeneousMixedTreeLikelihood::initialize().
|
virtualinherited |
This builds the parameters list from all parametrizable objects, i.e. substitution model, rate distribution and tree.
Definition at line 231 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::AbstractParametrizable::addParameters_(), bpp::AbstractHomogeneousTreeLikelihood::brLenParameters_, bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::model_, bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_, and bpp::AbstractParametrizable::resetParameters_().
Referenced by bpp::AbstractHomogeneousTreeLikelihood::initialize().
|
inlinevirtualinherited |
Implements bpp::TreeLikelihoodInterface.
Definition at line 275 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::initialized_.
Referenced by bpp::DRNonHomogeneousTreeLikelihood::getValue(), bpp::RHomogeneousTreeLikelihood::getValue(), bpp::RNonHomogeneousTreeLikelihood::getValue(), and bpp::DRHomogeneousTreeLikelihood::getValue().
|
pure virtualinherited |
Implemented in bpp::AbstractTreeLikelihood.
|
inlineoverridevirtualinherited |
Implements bpp::DRTreeLikelihoodInterface.
Definition at line 168 of file DRHomogeneousTreeLikelihood.h.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_.
|
inlineoverridevirtualinherited |
Implements bpp::DRTreeLikelihoodInterface.
Definition at line 167 of file DRHomogeneousTreeLikelihood.h.
References bpp::DRHomogeneousTreeLikelihood::likelihoodData_.
Referenced by NNIHomogeneousTreeLikelihood(), setData(), testNNI(), and topologyChangeTested().
NNIHomogeneousTreeLikelihood & NNIHomogeneousTreeLikelihood::operator= | ( | const NNIHomogeneousTreeLikelihood & | lik | ) |
Definition at line 151 of file NNIHomogeneousTreeLikelihood.cpp.
References brentOptimizer_, brLenNNIParams_, brLenNNIValues_, brLikFunction_, and bpp::DRHomogeneousTreeLikelihood::operator=().
|
inlinevirtualinherited |
Get the rate distribution used for the computation.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 85 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
inlinevirtualinherited |
Get the rate distribution used for the computation.
Implements bpp::DiscreteRatesAcrossSitesTreeLikelihoodInterface.
Definition at line 80 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.h.
References bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_.
|
staticinherited |
Set all conditional likelihoods to 1.
likelihoodArray | the likelihood array. |
Definition at line 231 of file AbstractDiscreteRatesAcrossSitesTreeLikelihood.cpp.
Referenced by bpp::DRHomogeneousTreeLikelihood::computeLikelihoodFromArrays(), bpp::DRNonHomogeneousTreeLikelihood::computeLikelihoodFromArrays(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::DRNonHomogeneousTreeLikelihood::resetLikelihoodArrays(), and testNNI().
|
protectedvirtualinherited |
Reimplemented in bpp::DRHomogeneousMixedTreeLikelihood.
Definition at line 417 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::Node::getFather(), bpp::Node::getId(), bpp::Node::getNumberOfSons(), bpp::Node::getSon(), bpp::Node::hasFather(), bpp::DRHomogeneousTreeLikelihood::likelihoodData_, and bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::resetLikelihoodArray().
Referenced by bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix().
|
inlineoverridevirtual |
Set the dataset for which the likelihood must be evaluated.
sites | The data set to use. |
Reimplemented from bpp::DRHomogeneousTreeLikelihood.
Definition at line 201 of file NNIHomogeneousTreeLikelihood.h.
References brLikFunction_, bpp::DRHomogeneousTreeLikelihood::likelihoodData(), and bpp::DRHomogeneousTreeLikelihood::setData().
|
inlinevirtualinherited |
Definition at line 229 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::brLenConstraint_, bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::maximumBrLen_, bpp::AbstractHomogeneousTreeLikelihood::minimumBrLen_, and bpp::TextTools::toString().
|
inlinevirtualinherited |
Definition at line 220 of file AbstractHomogeneousTreeLikelihood.h.
References bpp::AbstractHomogeneousTreeLikelihood::brLenConstraint_, bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::maximumBrLen_, bpp::AbstractHomogeneousTreeLikelihood::minimumBrLen_, and bpp::TextTools::toString().
|
virtualinherited |
Exception | If the model could not be set (for instance, because of a wrong alphabet type). |
Implements bpp::HomogeneousTreeLikelihood.
Definition at line 135 of file AbstractHomogeneousTreeLikelihood.cpp.
References bpp::AbstractHomogeneousTreeLikelihood::d2pxy_, bpp::AbstractTreeLikelihood::data_, bpp::AbstractHomogeneousTreeLikelihood::dpxy_, bpp::Node::getId(), bpp::AbstractHomogeneousTreeLikelihood::model_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbNodes_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, bpp::AbstractHomogeneousTreeLikelihood::nodes_, bpp::AbstractHomogeneousTreeLikelihood::pxy_, and bpp::TreeLikelihoodInterface::setData().
Referenced by bpp::AbstractHomogeneousTreeLikelihood::init_().
|
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 | The parameter list to pass to the function. |
Implements bpp::SecondOrderDerivable.
Definition at line 187 of file DRHomogeneousTreeLikelihood.cpp.
References bpp::AbstractParametrizable::setParametersValues().
|
overridevirtual |
Send the score of a NNI movement, without performing it.
This methods sends the score variation. This variation must be negative if the new point is better, i.e. the object is to be used with a minimizing optimization (for consistence with Optimizer objects).
nodeId | The id of the node defining the NNI movement. |
NodeException | If the node does not define a valid NNI. |
Implements bpp::NNISearchable.
Definition at line 167 of file NNIHomogeneousTreeLikelihood.cpp.
References bpp::ParameterList::addParameter(), brentOptimizer_, brLenNNIValues_, brLikFunction_, bpp::DRHomogeneousTreeLikelihood::computeLikelihoodFromArrays(), bpp::Node::getFather(), bpp::Node::getId(), bpp::DRASDRTreeLikelihoodNodeData::getLikelihoodArrayForNeighbor(), bpp::DRASDRTreeLikelihoodData::getNodeData(), bpp::TreeTemplateTools::getRemainingNeighbors(), bpp::Node::getSon(), bpp::Node::getSonPosition(), bpp::Parameter::getValue(), bpp::DRHomogeneousTreeLikelihood::getValue(), bpp::Node::hasFather(), bpp::DRHomogeneousTreeLikelihood::likelihoodData(), bpp::AbstractHomogeneousTreeLikelihood::model_, bpp::AbstractHomogeneousTreeLikelihood::nbClasses_, bpp::AbstractHomogeneousTreeLikelihood::nbDistinctSites_, bpp::AbstractHomogeneousTreeLikelihood::nbStates_, bpp::AbstractHomogeneousTreeLikelihood::nodes_, bpp::AbstractParametrizable::parameter(), bpp::AbstractHomogeneousTreeLikelihood::pxy_, bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::rateDistribution_, bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::resetLikelihoodArray(), bpp::AbstractHomogeneousTreeLikelihood::rootFreqs_, bpp::Parameter::setName(), bpp::TextTools::toString(), and bpp::AbstractTreeLikelihood::tree_.
|
inlineoverridevirtual |
Get the tree associated to this NNISearchable object.
Implements bpp::NNISearchable.
Definition at line 218 of file NNIHomogeneousTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::tree().
|
inlinevirtualinherited |
Notify a topology change event.
This method is to be invoked after one or several NNI are performed. It allows appropriate recomputations.
In most case, this is the same as topologyChangeTested() + topologyChangeSuccessful().
event | The topology change event. |
Definition at line 67 of file TopologySearch.h.
References bpp::TopologyListener::topologyChangeSuccessful(), and bpp::TopologyListener::topologyChangeTested().
|
inlineoverridevirtual |
Tell that a topology change is definitive.
This method is called after the topologyChangeTested() method.
event | The topology change event. |
Implements bpp::TopologyListener.
Definition at line 234 of file NNIHomogeneousTreeLikelihood.h.
References brLenNNIValues_.
|
inlineoverridevirtual |
Notify a topology change event.
event | The topology change event. |
Implements bpp::TopologyListener.
Definition at line 226 of file NNIHomogeneousTreeLikelihood.h.
References brLenNNIParams_, bpp::DRHomogeneousTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousTreeLikelihood::likelihoodData(), bpp::DRASDRTreeLikelihoodData::reInit(), and bpp::ParameterList::reset().
|
inlinevirtualinherited |
Get the tree (topology and branch lengths).
Implements bpp::TreeLikelihoodInterface.
Definition at line 269 of file AbstractTreeLikelihood.h.
References bpp::AbstractTreeLikelihood::tree_.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::AbstractHomogeneousTreeLikelihood(), bpp::AbstractNonHomogeneousTreeLikelihood::AbstractNonHomogeneousTreeLikelihood(), bpp::DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::DRNonHomogeneousTreeLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::init(), bpp::AbstractNonHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::RHomogeneousMixedTreeLikelihood::RHomogeneousMixedTreeLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::RNonHomogeneousMixedTreeLikelihood(), bpp::RNonHomogeneousTreeLikelihood::RNonHomogeneousTreeLikelihood(), and topology().
|
pure virtualinherited |
Get the tree (topology and branch lengths).
Implemented in bpp::AbstractTreeLikelihood.
Referenced by bpp::PairedSiteLikelihoods::appendModel(), bpp::TreeLikelihoodTools::getAncestralFrequencies(), bpp::TreeLikelihoodTools::getAncestralFrequencies_(), and bpp::DRTreeLikelihoodTools::getPosteriorProbabilitiesPerStatePerRate().
|
protected |
Optimizer used for testing NNI.
Definition at line 141 of file NNIHomogeneousTreeLikelihood.h.
Referenced by NNIHomogeneousTreeLikelihood(), operator=(), and testNNI().
|
protectedinherited |
Definition at line 82 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::AbstractHomogeneousTreeLikelihood::setMaximumBranchLength(), and bpp::AbstractHomogeneousTreeLikelihood::setMinimumBranchLength().
|
protected |
Definition at line 148 of file NNIHomogeneousTreeLikelihood.h.
Referenced by doNNI(), NNIHomogeneousTreeLikelihood(), operator=(), and topologyChangeTested().
|
mutableprotected |
Hash used for backing up branch lengths when testing NNIs.
Definition at line 146 of file NNIHomogeneousTreeLikelihood.h.
Referenced by doNNI(), NNIHomogeneousTreeLikelihood(), operator=(), testNNI(), and topologyChangeSuccessful().
|
protectedinherited |
Definition at line 53 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by doNNI(), bpp::AbstractHomogeneousTreeLikelihood::getBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::initParameters(), and bpp::AbstractHomogeneousTreeLikelihood::operator=().
|
protected |
Definition at line 136 of file NNIHomogeneousTreeLikelihood.h.
Referenced by NNIHomogeneousTreeLikelihood(), operator=(), setData(), and testNNI().
|
protectedinherited |
Definition at line 210 of file AbstractTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractNonHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractTreeLikelihood::enableDerivatives(), bpp::AbstractTreeLikelihood::enableFirstOrderDerivatives(), bpp::AbstractTreeLikelihood::enableSecondOrderDerivatives(), bpp::DRNonHomogeneousTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousTreeLikelihood::fireParameterChanged(), and bpp::AbstractTreeLikelihood::operator=().
|
protectedinherited |
Definition at line 211 of file AbstractTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractNonHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractTreeLikelihood::enableDerivatives(), bpp::AbstractTreeLikelihood::enableSecondOrderDerivatives(), bpp::DRNonHomogeneousTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousTreeLikelihood::fireParameterChanged(), and bpp::AbstractTreeLikelihood::operator=().
|
mutableprotectedinherited |
Definition at line 59 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), and bpp::AbstractHomogeneousTreeLikelihood::setModel().
|
protectedinherited |
Definition at line 208 of file AbstractTreeLikelihood.h.
Referenced by bpp::AbstractTreeLikelihood::AbstractTreeLikelihood(), bpp::AbstractTreeLikelihood::data(), bpp::AbstractTreeLikelihood::getAlphabet(), bpp::AbstractTreeLikelihood::getNumberOfSites(), bpp::AbstractTreeLikelihood::hasLikelihoodData(), bpp::AbstractHomogeneousTreeLikelihood::initialize(), bpp::AbstractNonHomogeneousTreeLikelihood::initialize(), bpp::AbstractTreeLikelihood::operator=(), bpp::DRNonHomogeneousTreeLikelihood::setData(), bpp::RHomogeneousTreeLikelihood::setData(), bpp::RNonHomogeneousTreeLikelihood::setData(), bpp::DRHomogeneousTreeLikelihood::setData(), bpp::AbstractHomogeneousTreeLikelihood::setModel(), and bpp::AbstractNonHomogeneousTreeLikelihood::setSubstitutionModelSet().
|
mutableprotectedinherited |
Definition at line 57 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), and bpp::AbstractHomogeneousTreeLikelihood::setModel().
|
protectedinherited |
Definition at line 212 of file AbstractTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractNonHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractHomogeneousTreeLikelihood::getBranchLengthsParameters(), bpp::AbstractNonHomogeneousTreeLikelihood::getBranchLengthsParameters(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getDerivableParameters(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getNonDerivableParameters(), bpp::AbstractDiscreteRatesAcrossSitesTreeLikelihood::getRateDistributionParameters(), bpp::AbstractHomogeneousTreeLikelihood::getSubstitutionModelParameters(), bpp::AbstractNonHomogeneousTreeLikelihood::getSubstitutionModelParameters(), bpp::AbstractHomogeneousTreeLikelihood::initialize(), bpp::AbstractTreeLikelihood::initialize(), bpp::AbstractNonHomogeneousTreeLikelihood::initialize(), bpp::AbstractTreeLikelihood::isInitialized(), bpp::AbstractTreeLikelihood::operator=(), bpp::DRNonHomogeneousTreeLikelihood::setData(), bpp::RHomogeneousTreeLikelihood::setData(), bpp::RNonHomogeneousTreeLikelihood::setData(), bpp::DRHomogeneousTreeLikelihood::setData(), and bpp::AbstractNonHomogeneousTreeLikelihood::setSubstitutionModelSet().
|
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(), bpp::DRHomogeneousMixedTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousMixedTreeLikelihood::getLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLikelihoodForASite(), bpp::DRHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClass(), bpp::DRHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClassForAState(), bpp::DRHomogeneousMixedTreeLikelihood::getLogLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihoodForASite(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClass(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClassForAState(), bpp::DRHomogeneousMixedTreeLikelihood::getSecondOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getSiteIndex(), bpp::DRHomogeneousTreeLikelihood::init_(), bpp::DRHomogeneousTreeLikelihood::likelihoodData(), bpp::DRHomogeneousTreeLikelihood::operator=(), bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays(), and bpp::DRHomogeneousTreeLikelihood::setData().
|
protectedinherited |
Definition at line 81 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::getMaximumBranchLength(), bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::AbstractHomogeneousTreeLikelihood::setMaximumBranchLength(), and bpp::AbstractHomogeneousTreeLikelihood::setMinimumBranchLength().
|
protectedinherited |
Definition at line 80 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::getMinimumBranchLength(), bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::AbstractHomogeneousTreeLikelihood::setMaximumBranchLength(), and bpp::AbstractHomogeneousTreeLikelihood::setMinimumBranchLength().
|
protectedinherited |
Definition at line 36 of file DRHomogeneousTreeLikelihood.h.
Referenced by bpp::DRHomogeneousTreeLikelihood::DRHomogeneousTreeLikelihood(), bpp::DRHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousTreeLikelihood::getValue(), and bpp::DRHomogeneousTreeLikelihood::operator=().
|
protectedinherited |
Definition at line 52 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractHomogeneousTreeLikelihood::computeAllTransitionProbabilities(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood(), bpp::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 testNNI().
|
protectedinherited |
Definition at line 74 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::RHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::DRHomogeneousMixedTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::RHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::RHomogeneousTreeLikelihood::getD2LikelihoodForASite(), bpp::RHomogeneousTreeLikelihood::getDLikelihoodForASite(), bpp::RHomogeneousTreeLikelihood::getLikelihoodForASite(), bpp::RHomogeneousTreeLikelihood::getLogLikelihoodForASite(), bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::AbstractHomogeneousTreeLikelihood::setModel(), and testNNI().
|
protectedinherited |
Definition at line 73 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::DRHomogeneousMixedTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::DRHomogeneousMixedTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousMixedTreeLikelihood::getLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLikelihood(), bpp::DRHomogeneousMixedTreeLikelihood::getLogLikelihood(), bpp::DRHomogeneousTreeLikelihood::getLogLikelihood(), bpp::AbstractHomogeneousTreeLikelihood::getNewBranchModelIterator(), bpp::DRHomogeneousMixedTreeLikelihood::getSecondOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::RHomogeneousTreeLikelihood::setData(), bpp::DRHomogeneousTreeLikelihood::setData(), and testNNI().
|
protectedinherited |
Definition at line 76 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractHomogeneousTreeLikelihood::computeAllTransitionProbabilities(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2Likelihoods(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoods(), bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), and bpp::AbstractHomogeneousTreeLikelihood::setModel().
|
protectedinherited |
Definition at line 72 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::RHomogeneousTreeLikelihood::getD2LogLikelihood(), bpp::RHomogeneousTreeLikelihood::getDLogLikelihood(), bpp::RHomogeneousTreeLikelihood::getLikelihood(), bpp::RHomogeneousTreeLikelihood::getLogLikelihood(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::RHomogeneousTreeLikelihood::setData(), and bpp::DRHomogeneousTreeLikelihood::setData().
|
protectedinherited |
Definition at line 75 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::RHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::DRHomogeneousMixedTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::RHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::RHomogeneousTreeLikelihood::getD2LikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getDLikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClass(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::RHomogeneousTreeLikelihood::setData(), bpp::DRHomogeneousTreeLikelihood::setData(), bpp::AbstractHomogeneousTreeLikelihood::setModel(), and testNNI().
|
protectedinherited |
Pointer toward all nodes in the tree.
The position in the array is the number used in the parameter name. This may be different from the node id, unless you used the resetNodeId method on the input tree.
Definition at line 69 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::AbstractHomogeneousTreeLikelihood(), bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractHomogeneousTreeLikelihood::computeAllTransitionProbabilities(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2Likelihoods(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoods(), doNNI(), bpp::RHomogeneousTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousMixedTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousMixedTreeLikelihood::getSecondOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::initBranchLengthsParameters(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::AbstractHomogeneousTreeLikelihood::setModel(), and testNNI().
|
mutableprotectedinherited |
Definition at line 55 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::RHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::RHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::AbstractHomogeneousTreeLikelihood::getTransitionProbabilitiesPerRateClass(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::AbstractHomogeneousTreeLikelihood::setModel(), and testNNI().
|
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 testNNI().
|
protectedinherited |
Definition at line 61 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractHomogeneousTreeLikelihood::computeAllTransitionProbabilities(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::RHomogeneousTreeLikelihood::fireParameterChanged(), bpp::RHomogeneousTreeLikelihood::getD2LikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getDLikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getLikelihoodForASiteForARateClass(), bpp::RHomogeneousTreeLikelihood::getLogLikelihoodForASiteForARateClass(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), and testNNI().
|
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(), 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(), testNNI(), and bpp::AbstractTreeLikelihood::tree().
|
protectedinherited |
Definition at line 78 of file AbstractHomogeneousTreeLikelihood.h.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::init_(), bpp::AbstractHomogeneousTreeLikelihood::operator=(), bpp::RHomogeneousTreeLikelihood::setData(), and bpp::DRHomogeneousTreeLikelihood::setData().