bpp-phyl3  3.0.0
bpp::AlignedPhyloLikelihoodHmm Class Referenceabstract

Likelihood framework based on a hmm of simple likelihoods. More...

#include <Bpp/Phyl/Likelihood/PhyloLikelihoods/AlignedPhyloLikelihoodHmm.h>

+ Inheritance diagram for bpp::AlignedPhyloLikelihoodHmm:
+ Collaboration diagram for bpp::AlignedPhyloLikelihoodHmm:

Public Member Functions

 AlignedPhyloLikelihoodHmm (Context &context, std::shared_ptr< PhyloLikelihoodContainer > pC, const std::vector< size_t > &nPhylo, bool inCollection=true)
 
virtual ~AlignedPhyloLikelihoodHmm ()
 
void setNamespace (const std::string &nameSpace) override
 
void fireParameterChanged (const ParameterList &parameters) override
 
const HmmPhyloAlphabet hmmStateAlphabet () const
 
std::shared_ptr< const HmmPhyloAlphabetgetHmmStateAlphabet () const
 
bool addPhyloLikelihood (size_t nPhyl, const std::string &suff) override
 adds a PhyloLikelihood already stored in the m ap, iff it is an AlignedPhyloLikelihood of the same size More...
 
std::shared_ptr< const AlignedPhyloLikelihoodInterfacegetAlignedPhyloLikelihood (size_t nPhyl) const override
 
std::shared_ptr< AlignedPhyloLikelihoodInterfacegetAlignedPhyloLikelihood (size_t nPhyl) override
 
const AlignedPhyloLikelihoodInterfacealignedPhyloLikelihood (size_t nPhyl) const override
 
AlignedPhyloLikelihoodInterfacealignedPhyloLikelihood (size_t nPhyl) override
 
DataLik getLikelihoodForASiteForAPhyloLikelihood (size_t site, size_t nPhyl) const override
 Get the likelihood for a site for an aligned phyloLikelihood. More...
 
double getLogLikelihoodForASiteForAPhyloLikelihood (size_t site, size_t nPhyl) const override
 Get the log likelihood for a site for an aligned phyloLikelihood. More...
 
virtual std::shared_ptr< PhyloLikelihoodContainergetPhyloContainer ()=0
 
virtual std::shared_ptr< const PhyloLikelihoodContainergetPhyloContainer () const =0
 
std::shared_ptr< PhyloLikelihoodContainergetPhyloContainer () override
 
std::shared_ptr< const PhyloLikelihoodContainergetPhyloContainer () const override
 
virtual const std::vector< size_t > & getNumbersOfPhyloLikelihoods () const =0
 
const std::vector< size_t > & getNumbersOfPhyloLikelihoods () const override
 
const Contextcontext () const override
 
Contextcontext () override
 
ValueRef< DataLikgetLikelihoodNode () const override
 
virtual void enableSecondOrderDerivatives (bool yn)=0
 
virtual bool enableSecondOrderDerivatives () const=0
 
virtual void enableSecondOrderDerivatives (bool yn) override
 
bool enableSecondOrderDerivatives () const override
 
virtual double getSecondOrderDerivative (const std::string &variable) const=0
 
virtual double getSecondOrderDerivative (const std::string &variable1, const std::string &variable2) const=0
 
double getSecondOrderDerivative (const std::string &variable) const override
 
double getSecondOrderDerivative (const std::string &variable1, const std::string &variable2) const override
 
virtual double d2f (const std::string &variable, const ParameterList &parameters)
 
virtual double d2f (const std::string &variable1, const std::string &variable2, const ParameterList &parameters)
 
virtual void enableFirstOrderDerivatives (bool yn)=0
 
virtual bool enableFirstOrderDerivatives () const=0
 
virtual void enableFirstOrderDerivatives (bool yn) override
 Tell if derivatives must be computed: for Function inheritance. More...
 
bool enableFirstOrderDerivatives () const override
 
virtual double getFirstOrderDerivative (const std::string &variable) const=0
 
double getFirstOrderDerivative (const std::string &variable) const override
 
virtual double df (const std::string &variable, const ParameterList &parameters)
 
virtual void setParameters (const ParameterList &parameters)=0
 
void setParameters (const ParameterList &parameters) override
 
virtual double getValue () const=0
 
double getValue () const override
 
virtual double f (const ParameterList &parameters)
 
virtual bool hasParameter (const std::string &name) const=0
 
bool hasParameter (const std::string &name) const override
 
virtual const ParameterListgetParameters () const=0
 
const ParameterListgetParameters () const override
 
virtual const Parameterparameter (const std::string &name) const=0
 
const Parameterparameter (const std::string &name) const override
 
virtual double getParameterValue (const std::string &name) const=0
 
double getParameterValue (const std::string &name) const override
 
virtual void setAllParametersValues (const ParameterList &parameters)=0
 
void setAllParametersValues (const ParameterList &parameters) override
 
virtual void setParameterValue (const std::string &name, double value)=0
 
void setParameterValue (const std::string &name, double value) override
 
virtual void setParametersValues (const ParameterList &parameters)=0
 
void setParametersValues (const ParameterList &parameters) override
 
virtual bool matchParametersValues (const ParameterList &parameters)=0
 
bool matchParametersValues (const ParameterList &parameters) override
 
virtual void removeConstraint (const std::string &name)=0
 
void removeConstraint (const std::string &name) override
 
virtual void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0
 
void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
 
virtual size_t getNumberOfParameters () const=0
 
size_t getNumberOfParameters () const override
 
virtual 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
 
size_t getNumberOfSites () const
 Get the number of sites in the dataset. More...
 
DataLik getLikelihoodForASite (size_t site) const
 Get the likelihood for a site (on uncompressed data) More...
 
double getLogLikelihoodForASite (size_t site) const
 Get the log likelihood for a site, and its derivatives. More...
 
VDataLik getLikelihoodPerSite () const
 Get the likelihood for each site. More...
 
void shareParameters (const ParameterList &variableNodes)
 Share Parameters, that are DF_parameters. More...
 
ValueRef< DataLikfirstOrderDerivativeNode (const std::string &variable) const
 
ValueRef< DataLiksecondOrderDerivativeNode (const std::string &variable1, const std::string &variable2) const
 
const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 
The likelihood functions.
LikelihoodCalculationlikelihoodCalculation () const override
 
std::shared_ptr< LikelihoodCalculationgetLikelihoodCalculation () const override
 
AlignedLikelihoodCalculationalignedLikelihoodCalculation () const override
 
std::shared_ptr< AlignedLikelihoodCalculationgetAlignedLikelihoodCalculation () const override
 
VVdouble getPosteriorProbabilitiesPerSitePerAligned () const
 
Vdouble getPosteriorProbabilitiesForASitePerAligned (size_t site) const
 
const Eigen::MatrixXd & getHmmTransitionMatrix () const
 
The PhyloLikelihood storage.
virtual bool hasPhyloLikelihood (size_t nPhyl)=0
 
virtual std::shared_ptr< const PhyloLikelihoodInterfacegetPhyloLikelihood (size_t nPhyl) const =0
 
virtual std::shared_ptr< PhyloLikelihoodInterfacegetPhyloLikelihood (size_t nPhyl)=0
 
The PhyloLikelihood storage.
bool hasPhyloLikelihood (size_t nPhyl) override
 
std::shared_ptr< const PhyloLikelihoodInterfacegetPhyloLikelihood (size_t nPhyl) const override
 
std::shared_ptr< PhyloLikelihoodInterfacegetPhyloLikelihood (size_t nPhyl) override
 
The data functions
virtual bool isInitialized () const =0
 
virtual const Contextcontext () const =0
 
virtual Contextcontext ()=0
 
Inherited from PhyloLikelihood
bool isInitialized () const override
 
The likelihood functions.
virtual ValueRef< DataLikgetLikelihoodNode () const =0
 
double getLogLikelihood () const
 Get the logarithm of the likelihood for the whole dataset. More...
 
Retrieve some particular independent parameters subsets.

Get the derivates of the LogLikelihood.

virtual ParameterList getNonDerivableParameters () const =0
 
virtual ParameterList getDerivableParameters () const =0
 
virtual ParameterList getBranchLengthParameters () const =0
 Get the independent branch lengths parameters. More...
 
virtual ParameterList getSubstitutionModelParameters () const =0
 Get the independent parameters associated to substitution model(s). More...
 
virtual ParameterList getRateDistributionParameters () const =0
 Get the independent parameters associated to the rate distribution(s). More...
 
virtual ParameterList getRootFrequenciesParameters () const =0
 Get the independent parameters associated to the root frequencies(s). More...
 
Retrieve some particular parameters subsets.
ParameterList getNonDerivableParameters () const override
 
ParameterList getDerivableParameters () const override
 
ParameterList getBranchLengthParameters () const override
 Get the branch lengths parameters. More...
 
ParameterList getSubstitutionModelParameters () const override
 Get the parameters associated to substitution model(s). More...
 
ParameterList getRateDistributionParameters () const override
 Get the parameters associated to the rate distribution(s). More...
 
ParameterList getRootFrequenciesParameters () const override
 Get the parameters associated to the root frequencies(s). More...
 
The data functions
virtual size_t getNumberOfSites () const =0
 Get the number of sites in the dataset. More...
 
The likelihood functions.
virtual DataLik getLikelihoodForASite (size_t site) const =0
 Get the likelihood for a site. More...
 
virtual double getLogLikelihoodForASite (size_t site) const =0
 Get the log likelihood for a site, and its derivatives. More...
 
virtual VDataLik getLikelihoodPerSite () const =0
 Get the likelihood for each site. More...
 

Protected Member Functions

 AlignedPhyloLikelihoodHmm (const AlignedPhyloLikelihoodHmm &mlc)
 
AlignedPhyloLikelihoodHmmoperator= (const AlignedPhyloLikelihoodHmm &mlc)
 
AlignedPhyloLikelihoodHmmclone () const override
 
virtual ParameterListgetParameters_ ()=0
 
ParameterListgetParameters_ () override
 
Node_DFaccessVariableNode (const std::string &name) const
 
const std::shared_ptr< Parameter > & getParameter (size_t i) const
 
std::shared_ptr< Parameter > & getParameter (size_t i)
 
virtual void addParameter_ (Parameter *parameter)
 
virtual void addParameters_ (const ParameterList &parameters)
 
virtual void shareParameter_ (const std::shared_ptr< Parameter > &parameter)
 
virtual void shareParameters_ (const ParameterList &parameters)
 
virtual void includeParameters_ (const ParameterList &parameters)
 
virtual void deleteParameter_ (size_t index)
 
virtual void deleteParameter_ (std::string &name)
 
virtual void deleteParameters_ (const std::vector< std::string > &names)
 
void resetParameters_ ()
 
ParametergetParameter_ (const std::string &name)
 
ParametergetParameter_ (size_t index)
 
const ParametergetParameter_ (size_t index) const
 
ParametergetParameterWithNamespace_ (const std::string &name)
 
const ParametergetParameterWithNamespace_ (const std::string &name) const
 
void setNumberOfSites (size_t nbSites)
 

Static Protected Member Functions

static Node_DFaccessVariableNode (const Parameter &param)
 

Protected Attributes

std::shared_ptr< PhyloLikelihoodContainerpPhyloCont_
 pointer to a PhyloLikelihoodContainer More...
 
std::vector< size_t > nPhylo_
 vector of AbstractPhyloLikelihood numbers More...
 
std::vector< std::shared_ptr< LikelihoodCalculation > > vLikCal_
 
Contextcontext_
 
DataLik minusLogLik_
 the value More...
 
std::unordered_map< std::string, ValueRef< DataLik > > firstOrderDerivativeNodes_
 For Dataflow computing. More...
 
std::unordered_map< std::pair< std::string, std::string >, ValueRef< DataLik >, StringPairHashsecondOrderDerivativeNodes_
 
size_t nbSites_
 

Private Attributes

std::shared_ptr< HmmPhyloAlphabethma_
 
std::shared_ptr< FullHmmTransitionMatrixhtm_
 
std::shared_ptr< HmmPhyloEmissionProbabilitieshpep_
 
std::shared_ptr< HmmLikelihood_DFhmm_
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Likelihood framework based on a hmm of simple likelihoods.

The resulting likelihood is the likelihood of the given Hmm with the site emission probabilities proportional to the computed likelihoods of the process.

Definition at line 30 of file AlignedPhyloLikelihoodHmm.h.

Constructor & Destructor Documentation

◆ AlignedPhyloLikelihoodHmm() [1/2]

AlignedPhyloLikelihoodHmm::AlignedPhyloLikelihoodHmm ( Context context,
std::shared_ptr< PhyloLikelihoodContainer pC,
const std::vector< size_t > &  nPhylo,
bool  inCollection = true 
)

Definition at line 15 of file AlignedPhyloLikelihoodHmm.cpp.

Referenced by clone().

◆ ~AlignedPhyloLikelihoodHmm()

virtual bpp::AlignedPhyloLikelihoodHmm::~AlignedPhyloLikelihoodHmm ( )
inlinevirtual

Definition at line 49 of file AlignedPhyloLikelihoodHmm.h.

◆ AlignedPhyloLikelihoodHmm() [2/2]

bpp::AlignedPhyloLikelihoodHmm::AlignedPhyloLikelihoodHmm ( const AlignedPhyloLikelihoodHmm mlc)
inlineprotected

Definition at line 52 of file AlignedPhyloLikelihoodHmm.h.

Member Function Documentation

◆ accessVariableNode() [1/2]

◆ accessVariableNode() [2/2]

Node_DF& bpp::AbstractPhyloLikelihood::accessVariableNode ( const std::string &  name) const
inlineprotectedinherited

◆ addPhyloLikelihood()

bool AbstractAlignedPhyloLikelihoodSet::addPhyloLikelihood ( size_t  nPhyl,
const std::string &  suff 
)
overridevirtualinherited

adds a PhyloLikelihood already stored in the m ap, iff it is an AlignedPhyloLikelihood of the same size

Parameters
nPhylnumber of the phylolikelihood
sufffor parameters names if use specific parameters names
Returns
if the PhyloLikelihood has been added.

Reimplemented from bpp::AbstractPhyloLikelihoodSet.

Definition at line 60 of file AlignedPhyloLikelihoodSet.cpp.

References bpp::AbstractPhyloLikelihoodSet::addPhyloLikelihood(), bpp::AbstractAlignedPhyloLikelihoodSet::getAlignedPhyloLikelihood(), bpp::AbstractAlignedPhyloLikelihood::getNumberOfSites(), and bpp::AbstractAlignedPhyloLikelihood::setNumberOfSites().

◆ alignedLikelihoodCalculation()

AlignedLikelihoodCalculation& bpp::AlignedPhyloLikelihoodHmm::alignedLikelihoodCalculation ( ) const
inlineoverridevirtual
Returns
The LikelihoodCalculation.

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 109 of file AlignedPhyloLikelihoodHmm.h.

References hmm_.

◆ alignedPhyloLikelihood() [1/2]

◆ alignedPhyloLikelihood() [2/2]

AlignedPhyloLikelihoodInterface& bpp::AbstractAlignedPhyloLikelihoodSet::alignedPhyloLikelihood ( size_t  nPhyl)
inlineoverridevirtualinherited

◆ clone()

AlignedPhyloLikelihoodHmm* bpp::AlignedPhyloLikelihoodHmm::clone ( ) const
inlineoverrideprotectedvirtual

◆ context() [1/4]

virtual const Context& bpp::PhyloLikelihoodInterface::context ( ) const
pure virtualinherited

◆ context() [2/4]

◆ context() [3/4]

Context& bpp::AbstractPhyloLikelihood::context ( )
inlineoverridevirtualinherited

◆ context() [4/4]

virtual Context& bpp::PhyloLikelihoodInterface::context ( )
pure virtualinherited

◆ enableFirstOrderDerivatives() [1/2]

bool bpp::AbstractPhyloLikelihood::enableFirstOrderDerivatives ( ) const
inlineoverridevirtualinherited

Implements bpp::SecondOrderDerivable.

Definition at line 115 of file AbstractPhyloLikelihood.h.

◆ enableFirstOrderDerivatives() [2/2]

virtual void bpp::AbstractPhyloLikelihood::enableFirstOrderDerivatives ( bool  yn)
inlineoverridevirtualinherited

Tell if derivatives must be computed: for Function inheritance.

Implements bpp::SecondOrderDerivable.

Definition at line 113 of file AbstractPhyloLikelihood.h.

◆ enableSecondOrderDerivatives() [1/2]

bool bpp::AbstractPhyloLikelihood::enableSecondOrderDerivatives ( ) const
inlineoverridevirtualinherited

Implements bpp::SecondOrderDerivable.

Definition at line 116 of file AbstractPhyloLikelihood.h.

◆ enableSecondOrderDerivatives() [2/2]

virtual void bpp::AbstractPhyloLikelihood::enableSecondOrderDerivatives ( bool  yn)
inlineoverridevirtualinherited

Implements bpp::SecondOrderDerivable.

Definition at line 114 of file AbstractPhyloLikelihood.h.

◆ fireParameterChanged()

void AlignedPhyloLikelihoodHmm::fireParameterChanged ( const ParameterList parameters)
overridevirtual

◆ firstOrderDerivativeNode()

◆ getAlignedLikelihoodCalculation()

std::shared_ptr<AlignedLikelihoodCalculation> bpp::AlignedPhyloLikelihoodHmm::getAlignedLikelihoodCalculation ( ) const
inlineoverridevirtual
Returns
A shared pointer toward the LikelihoodCalculation.

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 114 of file AlignedPhyloLikelihoodHmm.h.

References hmm_.

◆ getAlignedPhyloLikelihood() [1/2]

std::shared_ptr<const AlignedPhyloLikelihoodInterface> bpp::AbstractAlignedPhyloLikelihoodSet::getAlignedPhyloLikelihood ( size_t  nPhyl) const
inlineoverridevirtualinherited

◆ getAlignedPhyloLikelihood() [2/2]

std::shared_ptr<AlignedPhyloLikelihoodInterface> bpp::AbstractAlignedPhyloLikelihoodSet::getAlignedPhyloLikelihood ( size_t  nPhyl)
inlineoverridevirtualinherited

◆ getBranchLengthParameters() [1/2]

virtual ParameterList bpp::PhyloLikelihoodInterface::getBranchLengthParameters ( ) const
pure virtualinherited

◆ getBranchLengthParameters() [2/2]

ParameterList AbstractPhyloLikelihoodSet::getBranchLengthParameters ( ) const
overridevirtualinherited

Get the branch lengths parameters.

Returns
A ParameterList with all branch lengths.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 107 of file PhyloLikelihoodSet.cpp.

References bpp::AbstractPhyloLikelihoodSet::getPhyloLikelihood(), bpp::ParameterList::includeParameters(), and bpp::AbstractPhyloLikelihoodSet::nPhylo_.

◆ getDerivableParameters() [1/2]

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

◆ getDerivableParameters() [2/2]

ParameterList AbstractPhyloLikelihoodSet::getDerivableParameters ( ) const
overridevirtualinherited

◆ getFirstOrderDerivative()

double bpp::AbstractPhyloLikelihood::getFirstOrderDerivative ( const std::string &  variable) const
inlineoverridevirtualinherited

◆ getHmmStateAlphabet()

std::shared_ptr<const HmmPhyloAlphabet> bpp::AlignedPhyloLikelihoodHmm::getHmmStateAlphabet ( ) const
inline

Definition at line 89 of file AlignedPhyloLikelihoodHmm.h.

References hma_.

◆ getHmmTransitionMatrix()

const Eigen::MatrixXd& bpp::AlignedPhyloLikelihoodHmm::getHmmTransitionMatrix ( ) const
inline

Definition at line 140 of file AlignedPhyloLikelihoodHmm.h.

References hmm_.

◆ getLikelihoodCalculation()

std::shared_ptr<LikelihoodCalculation> bpp::AlignedPhyloLikelihoodHmm::getLikelihoodCalculation ( ) const
inlineoverridevirtual
Returns
A shared pointer toward the LikelihoodCalculation.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 104 of file AlignedPhyloLikelihoodHmm.h.

References hmm_.

◆ getLikelihoodForASite() [1/2]

DataLik bpp::AbstractAlignedPhyloLikelihood::getLikelihoodForASite ( size_t  site) const
inlinevirtualinherited

Get the likelihood for a site (on uncompressed data)

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

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 143 of file AlignedPhyloLikelihood.h.

References bpp::AlignedPhyloLikelihoodInterface::alignedLikelihoodCalculation(), and bpp::AlignedLikelihoodCalculation::getLikelihoodForASite().

◆ getLikelihoodForASite() [2/2]

virtual DataLik bpp::AlignedPhyloLikelihoodInterface::getLikelihoodForASite ( size_t  site) const
pure virtualinherited

Get the likelihood for a site.

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

Implemented in bpp::AbstractAlignedPhyloLikelihood.

Referenced by bpp::AbstractAlignedPhyloLikelihoodSet::getLikelihoodForASiteForAPhyloLikelihood().

◆ getLikelihoodForASiteForAPhyloLikelihood()

DataLik bpp::AbstractAlignedPhyloLikelihoodSet::getLikelihoodForASiteForAPhyloLikelihood ( size_t  site,
size_t  nPhyl 
) const
inlineoverridevirtualinherited

Get the likelihood for a site for an aligned phyloLikelihood.

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

Implements bpp::AlignedPhyloLikelihoodSetInterface.

Definition at line 130 of file AlignedPhyloLikelihoodSet.h.

References bpp::AbstractAlignedPhyloLikelihoodSet::alignedPhyloLikelihood(), and bpp::AlignedPhyloLikelihoodInterface::getLikelihoodForASite().

◆ getLikelihoodNode() [1/2]

virtual ValueRef<DataLik> bpp::PhyloLikelihoodInterface::getLikelihoodNode ( ) const
pure virtualinherited
Returns
the LikDF node where the Likelihood is computed.

Implemented in bpp::AbstractPhyloLikelihood.

◆ getLikelihoodNode() [2/2]

ValueRef<DataLik> bpp::AbstractPhyloLikelihood::getLikelihoodNode ( ) const
inlineoverridevirtualinherited

◆ getLikelihoodPerSite() [1/2]

VDataLik bpp::AbstractAlignedPhyloLikelihood::getLikelihoodPerSite ( ) const
inlinevirtualinherited

◆ getLikelihoodPerSite() [2/2]

virtual VDataLik bpp::AlignedPhyloLikelihoodInterface::getLikelihoodPerSite ( ) const
pure virtualinherited

Get the likelihood for each site.

Returns
A vector with all site likelihoods.

Implemented in bpp::AbstractAlignedPhyloLikelihood.

◆ getLogLikelihood()

double bpp::PhyloLikelihoodInterface::getLogLikelihood ( ) const
inlineinherited

Get the logarithm of the likelihood for the whole dataset.

Returns
The logarithm of the likelihood of the dataset.

Definition at line 66 of file PhyloLikelihood.h.

References bpp::SecondOrderDerivable::getValue().

◆ getLogLikelihoodForASite() [1/2]

double bpp::AbstractAlignedPhyloLikelihood::getLogLikelihoodForASite ( size_t  site) const
inlinevirtualinherited

Get the log likelihood for a site, and its derivatives.

Parameters
siteThe site index to analyse.
Returns
The (D)log likelihood for site site.

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 154 of file AlignedPhyloLikelihood.h.

References bpp::convert(), and bpp::AlignedPhyloLikelihoodInterface::getAlignedLikelihoodCalculation().

◆ getLogLikelihoodForASite() [2/2]

virtual double bpp::AlignedPhyloLikelihoodInterface::getLogLikelihoodForASite ( size_t  site) const
pure virtualinherited

Get the log likelihood for a site, and its derivatives.

Parameters
siteThe site index to analyse.
Returns
The (D)log likelihood for site site.

Implemented in bpp::AbstractAlignedPhyloLikelihood.

Referenced by bpp::AbstractAlignedPhyloLikelihoodSet::getLogLikelihoodForASiteForAPhyloLikelihood(), and bpp::PhylogeneticsApplicationTools::printAnalysisInformation().

◆ getLogLikelihoodForASiteForAPhyloLikelihood()

double bpp::AbstractAlignedPhyloLikelihoodSet::getLogLikelihoodForASiteForAPhyloLikelihood ( size_t  site,
size_t  nPhyl 
) const
inlineoverridevirtualinherited

Get the log likelihood for a site for an aligned phyloLikelihood.

Parameters
siteThe site index to analyse.
nPhylthe phyloLikelihood index.
Returns
The log likelihood for site site.

Implements bpp::AlignedPhyloLikelihoodSetInterface.

Definition at line 135 of file AlignedPhyloLikelihoodSet.h.

References bpp::AbstractAlignedPhyloLikelihoodSet::alignedPhyloLikelihood(), and bpp::AlignedPhyloLikelihoodInterface::getLogLikelihoodForASite().

◆ getNonDerivableParameters() [1/2]

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

◆ getNonDerivableParameters() [2/2]

ParameterList AbstractPhyloLikelihoodSet::getNonDerivableParameters ( ) const
overridevirtualinherited

◆ getNumberOfSites() [1/2]

◆ getNumberOfSites() [2/2]

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

◆ getNumbersOfPhyloLikelihoods() [1/2]

virtual const std::vector<size_t>& bpp::PhyloLikelihoodSetInterface::getNumbersOfPhyloLikelihoods ( ) const
pure virtualinherited

◆ getNumbersOfPhyloLikelihoods() [2/2]

const std::vector<size_t>& bpp::AbstractPhyloLikelihoodSet::getNumbersOfPhyloLikelihoods ( ) const
inlineoverridevirtualinherited

◆ getPhyloContainer() [1/4]

virtual std::shared_ptr<const PhyloLikelihoodContainer> bpp::PhyloLikelihoodSetInterface::getPhyloContainer ( ) const
pure virtualinherited

◆ getPhyloContainer() [2/4]

std::shared_ptr<const PhyloLikelihoodContainer> bpp::AbstractPhyloLikelihoodSet::getPhyloContainer ( ) const
inlineoverridevirtualinherited

◆ getPhyloContainer() [3/4]

◆ getPhyloContainer() [4/4]

virtual std::shared_ptr<PhyloLikelihoodContainer> bpp::PhyloLikelihoodSetInterface::getPhyloContainer ( )
pure virtualinherited

◆ getPhyloLikelihood() [1/4]

virtual std::shared_ptr<const PhyloLikelihoodInterface> bpp::PhyloLikelihoodSetInterface::getPhyloLikelihood ( size_t  nPhyl) const
pure virtualinherited

◆ getPhyloLikelihood() [2/4]

◆ getPhyloLikelihood() [3/4]

std::shared_ptr<PhyloLikelihoodInterface> bpp::AbstractPhyloLikelihoodSet::getPhyloLikelihood ( size_t  nPhyl)
inlineoverridevirtualinherited

◆ getPhyloLikelihood() [4/4]

virtual std::shared_ptr<PhyloLikelihoodInterface> bpp::PhyloLikelihoodSetInterface::getPhyloLikelihood ( size_t  nPhyl)
pure virtualinherited

◆ getPosteriorProbabilitiesForASitePerAligned()

Vdouble bpp::AlignedPhyloLikelihoodHmm::getPosteriorProbabilitiesForASitePerAligned ( size_t  site) const
inline

◆ getPosteriorProbabilitiesPerSitePerAligned()

VVdouble bpp::AlignedPhyloLikelihoodHmm::getPosteriorProbabilitiesPerSitePerAligned ( ) const
inline

Definition at line 124 of file AlignedPhyloLikelihoodHmm.h.

References bpp::copyEigenToBpp(), and hmm_.

◆ getRateDistributionParameters() [1/2]

virtual ParameterList bpp::PhyloLikelihoodInterface::getRateDistributionParameters ( ) const
pure virtualinherited

Get the independent parameters associated to the rate distribution(s).

Returns
A ParameterList.

Implemented in bpp::SingleProcessPhyloLikelihood, bpp::AbstractParametrizableSequencePhyloLikelihood, bpp::AbstractPhyloLikelihoodSet, and bpp::OnABranchPhyloLikelihood.

◆ getRateDistributionParameters() [2/2]

ParameterList AbstractPhyloLikelihoodSet::getRateDistributionParameters ( ) const
overridevirtualinherited

Get the parameters associated to the rate distribution(s).

Returns
A ParameterList.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 129 of file PhyloLikelihoodSet.cpp.

References bpp::AbstractPhyloLikelihoodSet::getPhyloLikelihood(), bpp::ParameterList::includeParameters(), and bpp::AbstractPhyloLikelihoodSet::nPhylo_.

◆ getRootFrequenciesParameters() [1/2]

virtual ParameterList bpp::PhyloLikelihoodInterface::getRootFrequenciesParameters ( ) const
pure virtualinherited

Get the independent parameters associated to the root frequencies(s).

Returns
A ParameterList.

Implemented in bpp::SingleProcessPhyloLikelihood, bpp::AbstractParametrizableSequencePhyloLikelihood, bpp::AbstractPhyloLikelihoodSet, and bpp::OnABranchPhyloLikelihood.

◆ getRootFrequenciesParameters() [2/2]

ParameterList AbstractPhyloLikelihoodSet::getRootFrequenciesParameters ( ) const
overridevirtualinherited

Get the parameters associated to the root frequencies(s).

Returns
A ParameterList.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 140 of file PhyloLikelihoodSet.cpp.

References bpp::AbstractPhyloLikelihoodSet::getPhyloLikelihood(), bpp::ParameterList::includeParameters(), and bpp::AbstractPhyloLikelihoodSet::nPhylo_.

◆ getSecondOrderDerivative() [1/2]

double bpp::AbstractPhyloLikelihood::getSecondOrderDerivative ( const std::string &  variable) const
inlineoverridevirtualinherited

Implements bpp::SecondOrderDerivable.

Definition at line 155 of file AbstractPhyloLikelihood.h.

◆ getSecondOrderDerivative() [2/2]

double bpp::AbstractPhyloLikelihood::getSecondOrderDerivative ( const std::string &  variable1,
const std::string &  variable2 
) const
inlineoverridevirtualinherited

◆ getSubstitutionModelParameters() [1/2]

virtual ParameterList bpp::PhyloLikelihoodInterface::getSubstitutionModelParameters ( ) const
pure virtualinherited

Get the independent parameters associated to substitution model(s).

Returns
A ParameterList.

Implemented in bpp::SingleProcessPhyloLikelihood, bpp::AbstractParametrizableSequencePhyloLikelihood, bpp::AbstractPhyloLikelihoodSet, and bpp::OnABranchPhyloLikelihood.

◆ getSubstitutionModelParameters() [2/2]

ParameterList AbstractPhyloLikelihoodSet::getSubstitutionModelParameters ( ) const
overridevirtualinherited

◆ getValue()

double bpp::AbstractPhyloLikelihood::getValue ( ) const
inlineoverridevirtualinherited

◆ hasPhyloLikelihood() [1/2]

bool bpp::AbstractPhyloLikelihoodSet::hasPhyloLikelihood ( size_t  nPhyl)
inlineoverridevirtualinherited

◆ hasPhyloLikelihood() [2/2]

virtual bool bpp::PhyloLikelihoodSetInterface::hasPhyloLikelihood ( size_t  nPhyl)
pure virtualinherited

◆ hmmStateAlphabet()

const HmmPhyloAlphabet bpp::AlignedPhyloLikelihoodHmm::hmmStateAlphabet ( ) const
inline

Definition at line 84 of file AlignedPhyloLikelihoodHmm.h.

References hma_.

◆ isInitialized() [1/2]

virtual bool bpp::PhyloLikelihoodInterface::isInitialized ( ) const
pure virtualinherited

◆ isInitialized() [2/2]

bool bpp::AbstractPhyloLikelihoodSet::isInitialized ( ) const
inlineoverridevirtualinherited
Returns
'true' is the likelihood function has been initialized.

Reimplemented from bpp::AbstractPhyloLikelihood.

Definition at line 197 of file PhyloLikelihoodSet.h.

References bpp::AbstractPhyloLikelihoodSet::getPhyloLikelihood(), and bpp::AbstractPhyloLikelihoodSet::nPhylo_.

◆ likelihoodCalculation()

LikelihoodCalculation& bpp::AlignedPhyloLikelihoodHmm::likelihoodCalculation ( ) const
inlineoverridevirtual
Returns
The LikelihoodCalculation.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 99 of file AlignedPhyloLikelihoodHmm.h.

References hmm_.

◆ operator=()

AlignedPhyloLikelihoodHmm& bpp::AlignedPhyloLikelihoodHmm::operator= ( const AlignedPhyloLikelihoodHmm mlc)
inlineprotected

◆ secondOrderDerivativeNode()

ValueRef<DataLik> bpp::AbstractPhyloLikelihood::secondOrderDerivativeNode ( const std::string &  variable1,
const std::string &  variable2 
) const
inlineinherited

◆ setNamespace()

void AlignedPhyloLikelihoodHmm::setNamespace ( const std::string &  nameSpace)
overridevirtual

Reimplemented from bpp::AbstractParametrizable.

Definition at line 41 of file AlignedPhyloLikelihoodHmm.cpp.

References hmm_, and bpp::AbstractParametrizable::setNamespace().

◆ setNumberOfSites()

void bpp::AbstractAlignedPhyloLikelihood::setNumberOfSites ( size_t  nbSites)
inlineprotectedinherited

◆ setParameters()

void bpp::AbstractPhyloLikelihood::setParameters ( const ParameterList parameters)
inlineoverridevirtualinherited

◆ shareParameters()

void bpp::AbstractPhyloLikelihood::shareParameters ( const ParameterList variableNodes)
inlineinherited

Member Data Documentation

◆ context_

◆ firstOrderDerivativeNodes_

std::unordered_map<std::string, ValueRef<DataLik> > bpp::AbstractPhyloLikelihood::firstOrderDerivativeNodes_
mutableprotectedinherited

For Dataflow computing.

Definition at line 44 of file AbstractPhyloLikelihood.h.

Referenced by bpp::AbstractPhyloLikelihood::firstOrderDerivativeNode().

◆ hma_

std::shared_ptr<HmmPhyloAlphabet> bpp::AlignedPhyloLikelihoodHmm::hma_
private

Definition at line 34 of file AlignedPhyloLikelihoodHmm.h.

Referenced by getHmmStateAlphabet(), hmmStateAlphabet(), and operator=().

◆ hmm_

◆ hpep_

std::shared_ptr<HmmPhyloEmissionProbabilities> bpp::AlignedPhyloLikelihoodHmm::hpep_
private

Definition at line 38 of file AlignedPhyloLikelihoodHmm.h.

Referenced by operator=().

◆ htm_

std::shared_ptr<FullHmmTransitionMatrix> bpp::AlignedPhyloLikelihoodHmm::htm_
private

Definition at line 36 of file AlignedPhyloLikelihoodHmm.h.

Referenced by operator=().

◆ minusLogLik_

DataLik bpp::AbstractPhyloLikelihood::minusLogLik_
mutableprotectedinherited

◆ nbSites_

◆ nPhylo_

◆ pPhyloCont_

◆ secondOrderDerivativeNodes_

std::unordered_map<std::pair<std::string, std::string>, ValueRef<DataLik>, StringPairHash> bpp::AbstractPhyloLikelihood::secondOrderDerivativeNodes_
mutableprotectedinherited

◆ vLikCal_

std::vector<std::shared_ptr<LikelihoodCalculation> > bpp::AbstractPhyloLikelihoodSet::vLikCal_
mutableprotectedinherited

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