bpp-phyl3  3.0.0
bpp::AutoCorrelationProcessPhyloLikelihood Class Referenceabstract

Likelihood framework based on an auto-correlation of simple likelihoods. More...

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

+ Inheritance diagram for bpp::AutoCorrelationProcessPhyloLikelihood:
+ Collaboration diagram for bpp::AutoCorrelationProcessPhyloLikelihood:

Public Member Functions

 AutoCorrelationProcessPhyloLikelihood (std::shared_ptr< const AlignmentDataInterface > data, std::shared_ptr< AutoCorrelationSequenceEvolution > processSeqEvol, std::shared_ptr< CollectionNodes > collNodes, size_t nSeqEvol=0, size_t nData=0)
 
virtual ~AutoCorrelationProcessPhyloLikelihood ()
 
AutoCorrelationProcessPhyloLikelihoodclone () const override
 
void setNamespace (const std::string &nameSpace) override
 
void fireParameterChanged (const ParameterList &parameters) override
 
 AutoCorrelationProcessPhyloLikelihood (std::shared_ptr< const AlignmentDataInterface > data, std::shared_ptr< AutoCorrelationSequenceEvolution > processSeqEvol, std::shared_ptr< CollectionNodes > collNodes, size_t nSeqEvol=0, size_t nData=0)
 
virtual ~AutoCorrelationProcessPhyloLikelihood ()
 
AutoCorrelationProcessPhyloLikelihoodclone () const override
 
void setNamespace (const std::string &nameSpace) override
 
void fireParameterChanged (const ParameterList &parameters) override
 
std::shared_ptr< LikelihoodCalculationSingleProcessgetLikelihoodCalculationForAProcess (size_t p)
 
DataLik getLikelihoodForASiteForAProcess (size_t site, size_t p) const
 Get the likelihood for a site for a process. More...
 
VVdouble getLikelihoodPerSitePerProcess () const
 
bool isInitialized () const override
 Sets the computeLikelihoods_ to true. More...
 
void setData (std::shared_ptr< const AlignmentDataInterface > sites, size_t nData=0) override
 Set the dataset for which the likelihood must be evaluated. More...
 
size_t getNumberOfSubstitutionProcess () const
 Return the number of process used for computation. More...
 
ParameterList getNonDerivableParameters () const override
 
ParameterList getDerivableParameters () const override
 
ParameterList getBranchLengthParameters () const override
 Get the independent branch lengths parameters. More...
 
ParameterList getRootFrequenciesParameters () const override
 Get the independent parameters associated to the root frequencies(s). More...
 
ParameterList getRateDistributionParameters () const override
 Get the independent parameters associated to the rate distribution(s). More...
 
ParameterList getSubstitutionModelParameters () const override
 Get the independent parameters associated to substitution model(s). More...
 
virtual ParameterList getSubstitutionProcessParameters () const
 
const SequenceEvolutionsequenceEvolution () const override
 The Sequence Evolution. More...
 
std::shared_ptr< const SequenceEvolutiongetSequenceEvolution () const override
 
const size_t getSequenceEvolutionNumber () const override
 
size_t getNData () const
 Get the number of dataset concerned. More...
 
size_t getNumberOfStates () const
 Get the number the states. More...
 
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...
 
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
 
void setNData (size_t nData)
 
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 getPosteriorProbabilitiesPerSitePerProcess () const override
 return the posterior probabilities of subprocess on each site. More...
 
const Eigen::MatrixXd & getHmmTransitionMatrix () const
 
LikelihoodCalculationlikelihoodCalculation () const override
 
std::shared_ptr< LikelihoodCalculationgetLikelihoodCalculation () const override
 
AlignedLikelihoodCalculationalignedLikelihoodCalculation () const override
 
std::shared_ptr< AlignedLikelihoodCalculationgetAlignedLikelihoodCalculation () const override
 
VVdouble getPosteriorProbabilitiesPerSitePerProcess () const override
 return the posterior probabilities of subprocess on each site. More...
 
const Eigen::MatrixXd & getHmmTransitionMatrix () const
 
The Likelihood interface.
std::shared_ptr< const AlignmentDataInterfacegetData () const override
 Get the dataset for which the likelihood must be evaluated. More...
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 Get the alphabet associated to the dataset. More...
 
The data functions
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...
 
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...
 
The data functions
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...
 

Protected Member Functions

 AutoCorrelationProcessPhyloLikelihood (const AutoCorrelationProcessPhyloLikelihood &mlc)
 
AutoCorrelationProcessPhyloLikelihoodoperator= (const AutoCorrelationProcessPhyloLikelihood &mlc)
 
 AutoCorrelationProcessPhyloLikelihood (const AutoCorrelationProcessPhyloLikelihood &mlc)
 
AutoCorrelationProcessPhyloLikelihoodoperator= (const AutoCorrelationProcessPhyloLikelihood &mlc)
 
virtual ParameterListgetParameters_ ()=0
 
ParameterListgetParameters_ () override
 
void setNumberOfSites (size_t nbSites)
 
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
 

Static Protected Member Functions

static Node_DFaccessVariableNode (const Parameter &param)
 

Protected Attributes

std::vector< std::shared_ptr< LikelihoodCalculationSingleProcess > > vLikCal_
 
std::shared_ptr< SequenceEvolutionseqEvol_
 the Sequence Evolution More...
 
size_t nSeqEvol_
 the Sequence Evolution number More...
 
size_t nbStates_
 
size_t nData_
 Number of the concerned data. More...
 
size_t nbSites_
 
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_
 

Private Attributes

std::shared_ptr< HmmPhyloEmissionProbabilitiesHpep_
 
std::shared_ptr< HmmLikelihood_DFhmm_
 
std::shared_ptr< MultiProcessSequenceEvolutionmSeqEvol_
 to avoid the dynamic casts More...
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Likelihood framework based on an auto-correlation of simple likelihoods.

Likelihood framework based on an auto-correlation of simple likelihoods, with weighted probabilities to get into states.

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

Definition at line 29 of file AutoCorrelationProcessPhyloLikelihood.h.

Constructor & Destructor Documentation

◆ AutoCorrelationProcessPhyloLikelihood() [1/4]

AutoCorrelationProcessPhyloLikelihood::AutoCorrelationProcessPhyloLikelihood ( std::shared_ptr< const AlignmentDataInterface data,
std::shared_ptr< AutoCorrelationSequenceEvolution processSeqEvol,
std::shared_ptr< CollectionNodes collNodes,
size_t  nSeqEvol = 0,
size_t  nData = 0 
)

◆ AutoCorrelationProcessPhyloLikelihood() [2/4]

bpp::AutoCorrelationProcessPhyloLikelihood::AutoCorrelationProcessPhyloLikelihood ( const AutoCorrelationProcessPhyloLikelihood mlc)
inlineprotected

Definition at line 46 of file AutoCorrelationProcessPhyloLikelihood.h.

◆ ~AutoCorrelationProcessPhyloLikelihood() [1/2]

virtual bpp::AutoCorrelationProcessPhyloLikelihood::~AutoCorrelationProcessPhyloLikelihood ( )
inlinevirtual

Definition at line 66 of file AutoCorrelationProcessPhyloLikelihood.h.

◆ AutoCorrelationProcessPhyloLikelihood() [3/4]

bpp::AutoCorrelationProcessPhyloLikelihood::AutoCorrelationProcessPhyloLikelihood ( std::shared_ptr< const AlignmentDataInterface data,
std::shared_ptr< AutoCorrelationSequenceEvolution processSeqEvol,
std::shared_ptr< CollectionNodes collNodes,
size_t  nSeqEvol = 0,
size_t  nData = 0 
)

◆ AutoCorrelationProcessPhyloLikelihood() [4/4]

bpp::AutoCorrelationProcessPhyloLikelihood::AutoCorrelationProcessPhyloLikelihood ( const AutoCorrelationProcessPhyloLikelihood mlc)
inlineprotected

◆ ~AutoCorrelationProcessPhyloLikelihood() [2/2]

virtual bpp::AutoCorrelationProcessPhyloLikelihood::~AutoCorrelationProcessPhyloLikelihood ( )
inlinevirtual

Member Function Documentation

◆ accessVariableNode() [1/2]

◆ accessVariableNode() [2/2]

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

◆ alignedLikelihoodCalculation() [1/2]

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

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 93 of file AutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ alignedLikelihoodCalculation() [2/2]

AlignedLikelihoodCalculation& bpp::AutoCorrelationProcessPhyloLikelihood::alignedLikelihoodCalculation ( ) const
inlineoverridevirtual

◆ clone() [1/2]

AutoCorrelationProcessPhyloLikelihood* bpp::AutoCorrelationProcessPhyloLikelihood::clone ( ) const
inlineoverridevirtual

◆ clone() [2/2]

AutoCorrelationProcessPhyloLikelihood* bpp::AutoCorrelationProcessPhyloLikelihood::clone ( ) const
inlineoverridevirtual

◆ 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() [1/2]

void AutoCorrelationProcessPhyloLikelihood::fireParameterChanged ( const ParameterList parameters)
overridevirtual

◆ fireParameterChanged() [2/2]

void bpp::AutoCorrelationProcessPhyloLikelihood::fireParameterChanged ( const ParameterList parameters)
overridevirtual

◆ firstOrderDerivativeNode()

◆ getAlignedLikelihoodCalculation() [1/2]

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

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 98 of file AutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ getAlignedLikelihoodCalculation() [2/2]

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

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 100 of file WeightedAutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ getAlphabet()

std::shared_ptr<const Alphabet> bpp::MultiProcessSequencePhyloLikelihood::getAlphabet ( ) const
inlineoverridevirtualinherited

Get the alphabet associated to the dataset.

Returns
the alphabet associated to the dataset.

Implements bpp::SingleDataPhyloLikelihoodInterface.

Definition at line 85 of file MultiProcessSequencePhyloLikelihood.h.

◆ getBranchLengthParameters()

ParameterList bpp::AbstractParametrizableSequencePhyloLikelihood::getBranchLengthParameters ( ) const
inlineoverridevirtualinherited

Get the independent branch lengths parameters.

Returns
A ParameterList with all branch lengths.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 184 of file SequencePhyloLikelihood.h.

References bpp::AbstractSequencePhyloLikelihood::seqEvol_.

◆ getData()

std::shared_ptr<const AlignmentDataInterface> bpp::MultiProcessSequencePhyloLikelihood::getData ( ) const
inlineoverridevirtualinherited

Get the dataset for which the likelihood must be evaluated.

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

Implements bpp::SingleDataPhyloLikelihoodInterface.

Definition at line 80 of file MultiProcessSequencePhyloLikelihood.h.

◆ getDerivableParameters()

ParameterList bpp::AbstractParametrizableSequencePhyloLikelihood::getDerivableParameters ( ) const
inlineoverridevirtualinherited

◆ getFirstOrderDerivative()

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

◆ getHmmTransitionMatrix() [1/2]

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

Definition at line 116 of file AutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ getHmmTransitionMatrix() [2/2]

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

Definition at line 118 of file WeightedAutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ getLikelihoodCalculation() [1/2]

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

Implements bpp::PhyloLikelihoodInterface.

Definition at line 88 of file AutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ getLikelihoodCalculation() [2/2]

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

Implements bpp::PhyloLikelihoodInterface.

Definition at line 90 of file WeightedAutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ getLikelihoodCalculationForAProcess()

std::shared_ptr<LikelihoodCalculationSingleProcess> bpp::MultiProcessSequencePhyloLikelihood::getLikelihoodCalculationForAProcess ( size_t  p)
inlineinherited

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

◆ getLikelihoodForASiteForAProcess()

DataLik bpp::MultiProcessSequencePhyloLikelihood::getLikelihoodForASiteForAProcess ( size_t  site,
size_t  p 
) const
inlineinherited

Get the likelihood for a site for a process.

Parameters
siteThe site index to analyse.
pthe process index in the given order.
Returns
The likelihood for site site.

Definition at line 107 of file MultiProcessSequencePhyloLikelihood.h.

Referenced by bpp::MultiProcessSequencePhyloLikelihood::getLikelihoodPerSitePerProcess().

◆ 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.

◆ getLikelihoodPerSitePerProcess()

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

◆ getNData() [1/2]

size_t bpp::AbstractSingleDataPhyloLikelihood::getNData ( ) const
inlinevirtualinherited

Get the number of dataset concerned.

Implements bpp::SingleDataPhyloLikelihoodInterface.

Definition at line 126 of file SingleDataPhyloLikelihood.h.

References bpp::AbstractSingleDataPhyloLikelihood::nData_.

◆ getNData() [2/2]

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

Get the number of dataset concerned.

Implemented in bpp::AbstractSingleDataPhyloLikelihood.

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

◆ getNonDerivableParameters()

ParameterList bpp::AbstractParametrizableSequencePhyloLikelihood::getNonDerivableParameters ( ) const
inlineoverridevirtualinherited

◆ getNumberOfSites() [1/2]

◆ getNumberOfSites() [2/2]

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

◆ getNumberOfStates() [1/2]

size_t bpp::AbstractSingleDataPhyloLikelihood::getNumberOfStates ( ) const
inlinevirtualinherited

Get the number the states.

Implements bpp::SingleDataPhyloLikelihoodInterface.

Definition at line 136 of file SingleDataPhyloLikelihood.h.

References bpp::AbstractSingleDataPhyloLikelihood::nbStates_.

◆ getNumberOfStates() [2/2]

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

Get the number the states.

Implemented in bpp::AbstractSingleDataPhyloLikelihood.

◆ getNumberOfSubstitutionProcess()

size_t bpp::MultiProcessSequencePhyloLikelihood::getNumberOfSubstitutionProcess ( ) const
inlineinherited

◆ getPosteriorProbabilitiesPerSitePerProcess() [1/2]

VVdouble bpp::AutoCorrelationProcessPhyloLikelihood::getPosteriorProbabilitiesPerSitePerProcess ( ) const
inlineoverridevirtual

return the posterior probabilities of subprocess on each site.

Returns
MatrixXd sites x states

Implements bpp::MultiProcessSequencePhyloLikelihood.

Definition at line 108 of file AutoCorrelationProcessPhyloLikelihood.h.

References bpp::copyEigenToBpp(), and hmm_.

◆ getPosteriorProbabilitiesPerSitePerProcess() [2/2]

VVdouble bpp::AutoCorrelationProcessPhyloLikelihood::getPosteriorProbabilitiesPerSitePerProcess ( ) const
inlineoverridevirtual

return the posterior probabilities of subprocess on each site.

Returns
MatrixXd sites x states

Implements bpp::MultiProcessSequencePhyloLikelihood.

Definition at line 110 of file WeightedAutoCorrelationProcessPhyloLikelihood.h.

References bpp::copyEigenToBpp(), and hmm_.

◆ getRateDistributionParameters()

ParameterList bpp::AbstractParametrizableSequencePhyloLikelihood::getRateDistributionParameters ( ) const
inlineoverridevirtualinherited

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

Returns
A ParameterList.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 194 of file SequencePhyloLikelihood.h.

References bpp::AbstractSequencePhyloLikelihood::seqEvol_.

◆ getRootFrequenciesParameters()

ParameterList bpp::AbstractParametrizableSequencePhyloLikelihood::getRootFrequenciesParameters ( ) const
inlineoverridevirtualinherited

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

Returns
A ParameterList.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 189 of file SequencePhyloLikelihood.h.

References bpp::AbstractSequencePhyloLikelihood::seqEvol_.

◆ 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

◆ getSequenceEvolution()

std::shared_ptr<const SequenceEvolution> bpp::AbstractSequencePhyloLikelihood::getSequenceEvolution ( ) const
inlineoverridevirtualinherited

◆ getSequenceEvolutionNumber()

const size_t bpp::AbstractSequencePhyloLikelihood::getSequenceEvolutionNumber ( ) const
inlineoverridevirtualinherited

◆ getSubstitutionModelParameters()

ParameterList bpp::AbstractParametrizableSequencePhyloLikelihood::getSubstitutionModelParameters ( ) const
inlineoverridevirtualinherited

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

Returns
A ParameterList.

Implements bpp::PhyloLikelihoodInterface.

Definition at line 199 of file SequencePhyloLikelihood.h.

References bpp::AbstractSequencePhyloLikelihood::seqEvol_.

◆ getSubstitutionProcessParameters()

virtual ParameterList bpp::AbstractParametrizableSequencePhyloLikelihood::getSubstitutionProcessParameters ( ) const
inlinevirtualinherited

◆ getValue()

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

◆ isInitialized()

bool bpp::MultiProcessSequencePhyloLikelihood::isInitialized ( ) const
inlineoverridevirtualinherited

Sets the computeLikelihoods_ to true.

Reimplemented from bpp::AbstractPhyloLikelihood.

Definition at line 122 of file MultiProcessSequencePhyloLikelihood.h.

◆ likelihoodCalculation() [1/2]

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

Implements bpp::PhyloLikelihoodInterface.

Definition at line 83 of file AutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ likelihoodCalculation() [2/2]

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

Implements bpp::PhyloLikelihoodInterface.

Definition at line 85 of file WeightedAutoCorrelationProcessPhyloLikelihood.h.

References hmm_.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ secondOrderDerivativeNode()

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

◆ sequenceEvolution()

const SequenceEvolution& bpp::AbstractSequencePhyloLikelihood::sequenceEvolution ( ) const
inlineoverridevirtualinherited

◆ setData()

void MultiProcessSequencePhyloLikelihood::setData ( std::shared_ptr< const AlignmentDataInterface sites,
size_t  nData = 0 
)
overridevirtualinherited

Set the dataset for which the likelihood must be evaluated.

Parameters
sitesThe data set to use.
nDatathe number of the data (optional, default 0).

Reimplemented from bpp::AbstractSingleDataPhyloLikelihood.

Definition at line 44 of file MultiProcessSequencePhyloLikelihood.cpp.

References bpp::AbstractSingleDataPhyloLikelihood::setData(), and bpp::MultiProcessSequencePhyloLikelihood::vLikCal_.

◆ setNamespace() [1/2]

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

◆ setNamespace() [2/2]

void bpp::AutoCorrelationProcessPhyloLikelihood::setNamespace ( const std::string &  nameSpace)
overridevirtual

◆ setNData()

void bpp::AbstractSingleDataPhyloLikelihood::setNData ( size_t  nData)
inlineinherited

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

◆ hmm_

◆ Hpep_

std::shared_ptr< HmmPhyloEmissionProbabilities > bpp::AutoCorrelationProcessPhyloLikelihood::Hpep_
private

◆ minusLogLik_

DataLik bpp::AbstractPhyloLikelihood::minusLogLik_
mutableprotectedinherited

◆ mSeqEvol_

std::shared_ptr<MultiProcessSequenceEvolution> bpp::MultiProcessSequencePhyloLikelihood::mSeqEvol_
privateinherited

to avoid the dynamic casts

Definition at line 39 of file MultiProcessSequencePhyloLikelihood.h.

Referenced by bpp::MultiProcessSequencePhyloLikelihood::operator=().

◆ nbSites_

◆ nbStates_

◆ nData_

◆ nSeqEvol_

size_t bpp::AbstractSequencePhyloLikelihood::nSeqEvol_
protectedinherited

◆ secondOrderDerivativeNodes_

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

◆ seqEvol_

◆ vLikCal_


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