bpp-phyl3  3.0.0
bpp::SingleDataPhyloLikelihoodInterface Class Referenceabstract

The SingleDataPhyloLikelihood interface, for phylogenetic likelihood. More...

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

+ Inheritance diagram for bpp::SingleDataPhyloLikelihoodInterface:
+ Collaboration diagram for bpp::SingleDataPhyloLikelihoodInterface:

Public Member Functions

 SingleDataPhyloLikelihoodInterface ()
 
virtual ~SingleDataPhyloLikelihoodInterface ()
 
virtual SingleDataPhyloLikelihoodInterfaceclone () const =0
 
virtual LikelihoodCalculationlikelihoodCalculation () const =0
 
virtual std::shared_ptr< LikelihoodCalculationgetLikelihoodCalculation () const =0
 
virtual void enableSecondOrderDerivatives (bool yn)=0
 
virtual bool enableSecondOrderDerivatives () const=0
 
virtual double getSecondOrderDerivative (const std::string &variable) const=0
 
virtual double getSecondOrderDerivative (const std::string &variable1, const std::string &variable2) const=0
 
virtual double d2f (const std::string &variable, const ParameterList &parameters)
 
virtual double d2f (const std::string &variable1, const std::string &variable2, const ParameterList &parameters)
 
virtual void enableFirstOrderDerivatives (bool yn)=0
 
virtual bool enableFirstOrderDerivatives () const=0
 
virtual double getFirstOrderDerivative (const std::string &variable) const=0
 
virtual double df (const std::string &variable, const ParameterList &parameters)
 
virtual void setParameters (const ParameterList &parameters)=0
 
virtual double getValue () const=0
 
virtual double f (const ParameterList &parameters)
 
virtual bool hasParameter (const std::string &name) const=0
 
virtual const ParameterListgetParameters () const=0
 
virtual const Parameterparameter (const std::string &name) const=0
 
virtual double getParameterValue (const std::string &name) const=0
 
virtual void setAllParametersValues (const ParameterList &parameters)=0
 
virtual void setParameterValue (const std::string &name, double value)=0
 
virtual void setParametersValues (const ParameterList &parameters)=0
 
virtual bool matchParametersValues (const ParameterList &parameters)=0
 
virtual void removeConstraint (const std::string &name)=0
 
virtual void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0
 
virtual size_t getNumberOfParameters () const=0
 
virtual void setNamespace (const std::string &prefix)=0
 
virtual std::string getNamespace () const=0
 
virtual std::string getParameterNameWithoutNamespace (const std::string &name) const=0
 
The data functions
virtual void setData (std::shared_ptr< const AlignmentDataInterface > sites, size_t nData=0)=0
 Set the dataset for which the likelihood must be evaluated. More...
 
virtual std::shared_ptr< const AlignmentDataInterfacegetData () const =0
 Get the dataset for which the likelihood must be evaluated. More...
 
virtual size_t getNData () const =0
 Get the number of dataset concerned. More...
 
virtual size_t getNumberOfStates () const =0
 Get the number the states. More...
 
virtual std::shared_ptr< const AlphabetgetAlphabet () const =0
 Get the alphabet associated to the dataset. More...
 
The data functions
virtual size_t getNumberOfSites () const =0
 Get the number of sites in the dataset. More...
 
The likelihood functions.
virtual AlignedLikelihoodCalculationalignedLikelihoodCalculation () const =0
 
virtual std::shared_ptr< AlignedLikelihoodCalculationgetAlignedLikelihoodCalculation () const =0
 
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...
 
The data functions
virtual bool isInitialized () const =0
 
virtual const Contextcontext () const =0
 
virtual Contextcontext ()=0
 
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...
 

Protected Member Functions

virtual ParameterListgetParameters_ ()=0
 

Detailed Description

The SingleDataPhyloLikelihood interface, for phylogenetic likelihood.

This interface defines the common methods needed to compute a likelihood from aligned sequences.

Definition at line 28 of file SingleDataPhyloLikelihood.h.

Constructor & Destructor Documentation

◆ SingleDataPhyloLikelihoodInterface()

bpp::SingleDataPhyloLikelihoodInterface::SingleDataPhyloLikelihoodInterface ( )
inline

Definition at line 32 of file SingleDataPhyloLikelihood.h.

◆ ~SingleDataPhyloLikelihoodInterface()

virtual bpp::SingleDataPhyloLikelihoodInterface::~SingleDataPhyloLikelihoodInterface ( )
inlinevirtual

Definition at line 33 of file SingleDataPhyloLikelihood.h.

Member Function Documentation

◆ alignedLikelihoodCalculation()

◆ clone()

◆ context() [1/2]

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

◆ context() [2/2]

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

◆ getAlignedLikelihoodCalculation()

◆ getAlphabet()

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

Get the alphabet associated to the dataset.

Returns
the alphabet associated to the dataset.

Implemented in bpp::SingleProcessPhyloLikelihood, bpp::AbstractSequencePhyloLikelihood, bpp::OneProcessSequencePhyloLikelihood, and bpp::MultiProcessSequencePhyloLikelihood.

◆ getBranchLengthParameters()

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

◆ getData()

virtual std::shared_ptr<const AlignmentDataInterface> bpp::SingleDataPhyloLikelihoodInterface::getData ( ) const
pure virtual

Get the dataset for which the likelihood must be evaluated.

Returns
A pointer toward the site container where the sequences are stored.

Implemented in bpp::SingleProcessPhyloLikelihood, bpp::PartitionProcessPhyloLikelihood, bpp::OneProcessSequencePhyloLikelihood, and bpp::MultiProcessSequencePhyloLikelihood.

Referenced by bpp::PhylogeneticsApplicationTools::printAnalysisInformation().

◆ getDerivableParameters()

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

◆ getLikelihoodCalculation()

◆ getLikelihoodForASite()

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().

◆ getLikelihoodNode()

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

Implemented in bpp::AbstractPhyloLikelihood.

◆ getLikelihoodPerSite()

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()

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().

◆ getNData()

virtual size_t bpp::SingleDataPhyloLikelihoodInterface::getNData ( ) const
pure virtual

Get the number of dataset concerned.

Implemented in bpp::AbstractSingleDataPhyloLikelihood.

Referenced by bpp::PhylogeneticsApplicationTools::printParameters().

◆ getNonDerivableParameters()

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

◆ getNumberOfSites()

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

◆ getNumberOfStates()

virtual size_t bpp::SingleDataPhyloLikelihoodInterface::getNumberOfStates ( ) const
pure virtual

Get the number the states.

Implemented in bpp::AbstractSingleDataPhyloLikelihood.

◆ getRateDistributionParameters()

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.

◆ getRootFrequenciesParameters()

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.

◆ getSubstitutionModelParameters()

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.

◆ isInitialized()

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

◆ likelihoodCalculation()

◆ setData()

virtual void bpp::SingleDataPhyloLikelihoodInterface::setData ( std::shared_ptr< const AlignmentDataInterface sites,
size_t  nData = 0 
)
pure virtual

Set the dataset for which the likelihood must be evaluated.

Parameters
sitesThe data set to use.
nDatathe number of the data

Implemented in bpp::SingleProcessPhyloLikelihood, bpp::AbstractParametrizableSequencePhyloLikelihood, bpp::OneProcessSequencePhyloLikelihood, bpp::MultiProcessSequencePhyloLikelihood, bpp::AbstractSingleDataPhyloLikelihood, and bpp::PartitionProcessPhyloLikelihood.


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