bpp-phyl3  3.0.0
bpp::SingleProcessPhyloLikelihood Class Referenceabstract

Wraps a dataflow graph as a function: resultNode = f(variableNodes). More...

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

+ Inheritance diagram for bpp::SingleProcessPhyloLikelihood:
+ Collaboration diagram for bpp::SingleProcessPhyloLikelihood:

Public Member Functions

 SingleProcessPhyloLikelihood (Context &context, std::shared_ptr< LikelihoodCalculationSingleProcess > likCal, const ParameterList &variableNodes, size_t nProc=0, size_t nData=0)
 
 SingleProcessPhyloLikelihood (Context &context, std::shared_ptr< LikelihoodCalculationSingleProcess > likCal, size_t nProc=0, size_t nData=0)
 : the parameters the independent parameters of the LikelihoodCalculation More...
 
SingleProcessPhyloLikelihoodclone () const override
 
void setData (std::shared_ptr< const AlignmentDataInterface > sites, size_t nData=0) override
 Set the dataset for which the likelihood must be evaluated. More...
 
std::shared_ptr< const AlignmentDataInterfacegetShrunkData () const
 return a pointer to the compressed data. More...
 
std::shared_ptr< const AlignmentDataInterfacegetData () const override
 return a pointer to the original data. More...
 
size_t getNumberOfSites () const override
 Get the number of sites in the dataset. More...
 
size_t getNumberOfDistinctSites () const
 
size_t getNumberOfClasses () const
 Get the number of model classes. More...
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 Get the alphabet associated to the dataset. More...
 
std::shared_ptr< const ParametrizablePhyloTreetree () const
 
const SubstitutionProcessInterfacesubstitutionProcess () const
 Return the ref to the SubstitutionProcess used to build the phylolikelihood. More...
 
std::shared_ptr< const SubstitutionProcessInterfacegetSubstitutionProcess () const
 Return a smarter pointer to the SubstitutionProcess used to build the phylolikelihood. More...
 
size_t getSubstitutionProcessNumber () const
 
bool isInitialized () const override
 
LikelihoodCalculationlikelihoodCalculation () const override
 
std::shared_ptr< LikelihoodCalculationgetLikelihoodCalculation () const override
 
AlignedLikelihoodCalculationalignedLikelihoodCalculation () const override
 
std::shared_ptr< AlignedLikelihoodCalculationgetAlignedLikelihoodCalculation () const override
 
LikelihoodCalculationSingleProcesslikelihoodCalculationSingleProcess () const
 
std::shared_ptr< LikelihoodCalculationSingleProcessgetLikelihoodCalculationSingleProcess () const
 
ValueRef< RowLikgetFirstOrderDerivativeVector (const std::string &variable) const
 
ValueRef< RowLikfirstOrderDerivativeVector (const std::string &variable) const
 
ValueRef< RowLikgetSecondOrderDerivativeVector (const std::string &variable) const
 
ValueRef< RowLikgetSecondOrderDerivativeVector (const std::string &variable1, const std::string &variable2) const
 
ValueRef< RowLiksecondOrderDerivativeVector (const std::string &variable1, const std::string &variable2) const
 
VVdouble getPosteriorProbabilitiesPerSitePerClass () const
 Get the posterior probabilities of each class, for each site. More...
 
Vdouble getPosteriorProbabilitiesForSitePerClass (size_t pos) const
 
VVDataLik getLikelihoodPerSitePerClass () const
 
std::vector< size_t > getClassWithMaxPostProbPerSite () const
 
Vdouble getPosteriorRatePerSite () const
 
Vdouble getPosteriorStateFrequencies (uint nodeId)
 
size_t getNData () const
 Get the number of dataset concerned. More...
 
void setNData (size_t nData)
 
size_t getNumberOfStates () const
 Get the number the states. 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
 
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
 
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
 
bool hasParameter (const std::string &name) const override
 
const ParameterListgetParameters () const override
 
const Parameterparameter (const std::string &name) const override
 
const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 
double getParameterValue (const std::string &name) const override
 
void setAllParametersValues (const ParameterList &parameters) override
 
void setParameterValue (const std::string &name, double value) override
 
void setParametersValues (const ParameterList &parameters) override
 
bool matchParametersValues (const ParameterList &parameters) override
 
void removeConstraint (const std::string &name) override
 
void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
 
size_t getNumberOfParameters () const override
 
void setNamespace (const std::string &prefix) override
 
std::string getNamespace () const override
 
std::string getParameterNameWithoutNamespace (const std::string &name) const override
 
virtual void fireParameterChanged (const ParameterList &parameters)
 
Retrieve some particular independent parameters subsets.
ParameterList getNonDerivableParameters () const override
 
ParameterList getDerivableParameters () const override
 
ParameterList getBranchLengthParameters () const override
 Get the independent branch lengths parameters. More...
 
ParameterList getSubstitutionModelParameters () const override
 Get the independent parameters associated to substitution model(s). More...
 
ParameterList getRateDistributionParameters () const override
 Get the independent parameters associated to the rate distribution(s). More...
 
ParameterList getRootFrequenciesParameters () const override
 Get the independent parameters associated to the root frequencies(s). 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

virtual ParameterListgetParameters_ ()=0
 
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
 
ParameterListgetParameters_ () override
 

Static Protected Member Functions

static Node_DFaccessVariableNode (const Parameter &param)
 

Protected Attributes

std::shared_ptr< LikelihoodCalculationSingleProcesslikCal_
 
size_t nProc_
 the Substitution Process number More...
 
std::unordered_map< std::string, ValueRef< RowLik > > firstOrderDerivativeVectors_
 For Dataflow computing. More...
 
std::unordered_map< std::pair< std::string, std::string >, ValueRef< RowLik >, StringPairHashsecondOrderDerivativeVectors_
 
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

ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Wraps a dataflow graph as a function: resultNode = f(variableNodes).

Definition at line 29 of file SingleProcessPhyloLikelihood.h.

Constructor & Destructor Documentation

◆ SingleProcessPhyloLikelihood() [1/2]

bpp::SingleProcessPhyloLikelihood::SingleProcessPhyloLikelihood ( Context context,
std::shared_ptr< LikelihoodCalculationSingleProcess likCal,
const ParameterList variableNodes,
size_t  nProc = 0,
size_t  nData = 0 
)
inline

Definition at line 52 of file SingleProcessPhyloLikelihood.h.

References bpp::AbstractParametrizable::shareParameters_().

Referenced by clone().

◆ SingleProcessPhyloLikelihood() [2/2]

bpp::SingleProcessPhyloLikelihood::SingleProcessPhyloLikelihood ( Context context,
std::shared_ptr< LikelihoodCalculationSingleProcess likCal,
size_t  nProc = 0,
size_t  nData = 0 
)
inline

: the parameters the independent parameters of the LikelihoodCalculation

Definition at line 68 of file SingleProcessPhyloLikelihood.h.

References likCal_, and bpp::AbstractParametrizable::shareParameters_().

Member Function Documentation

◆ accessVariableNode() [1/2]

◆ accessVariableNode() [2/2]

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

◆ alignedLikelihoodCalculation()

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

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 255 of file SingleProcessPhyloLikelihood.h.

References likCal_.

◆ clone()

SingleProcessPhyloLikelihood* bpp::SingleProcessPhyloLikelihood::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.

◆ firstOrderDerivativeNode()

◆ firstOrderDerivativeVector()

ValueRef<RowLik> bpp::SingleProcessPhyloLikelihood::firstOrderDerivativeVector ( const std::string &  variable) const
inline

◆ getAlignedLikelihoodCalculation()

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

Implements bpp::AlignedPhyloLikelihoodInterface.

Definition at line 260 of file SingleProcessPhyloLikelihood.h.

References likCal_.

◆ getAlphabet()

std::shared_ptr<const Alphabet> bpp::SingleProcessPhyloLikelihood::getAlphabet ( ) const
inlineoverridevirtual

Get the alphabet associated to the dataset.

Returns
the alphabet associated to the dataset.

Implements bpp::SingleDataPhyloLikelihoodInterface.

Definition at line 134 of file SingleProcessPhyloLikelihood.h.

References bpp::StateMapInterface::getAlphabet(), likelihoodCalculationSingleProcess(), and bpp::LikelihoodCalculationSingleProcess::stateMap().

◆ getBranchLengthParameters()

ParameterList bpp::SingleProcessPhyloLikelihood::getBranchLengthParameters ( ) const
inlineoverridevirtual

◆ getClassWithMaxPostProbPerSite()

vector< size_t > SingleProcessPhyloLikelihood::getClassWithMaxPostProbPerSite ( ) const

Definition at line 82 of file SingleProcessPhyloLikelihood.cpp.

◆ getData()

std::shared_ptr<const AlignmentDataInterface> bpp::SingleProcessPhyloLikelihood::getData ( ) const
inlineoverridevirtual

◆ getDerivableParameters()

◆ getFirstOrderDerivative()

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

◆ getFirstOrderDerivativeVector()

ValueRef<RowLik> bpp::SingleProcessPhyloLikelihood::getFirstOrderDerivativeVector ( const std::string &  variable) const
inline

Definition at line 277 of file SingleProcessPhyloLikelihood.h.

References firstOrderDerivativeVector().

◆ getLikelihoodCalculation()

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

Implements bpp::PhyloLikelihoodInterface.

Definition at line 250 of file SingleProcessPhyloLikelihood.h.

References likCal_.

◆ getLikelihoodCalculationSingleProcess()

std::shared_ptr<LikelihoodCalculationSingleProcess> bpp::SingleProcessPhyloLikelihood::getLikelihoodCalculationSingleProcess ( ) const
inline

Definition at line 270 of file SingleProcessPhyloLikelihood.h.

References likCal_.

Referenced by firstOrderDerivativeVector().

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

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

◆ getLikelihoodPerSitePerClass()

VVDataLik SingleProcessPhyloLikelihood::getLikelihoodPerSitePerClass ( ) const

Definition at line 72 of file SingleProcessPhyloLikelihood.cpp.

References bpp::copyEigenToBpp().

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

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

◆ getNonDerivableParameters()

ParameterList bpp::SingleProcessPhyloLikelihood::getNonDerivableParameters ( ) const
inlineoverridevirtual

◆ getNumberOfClasses()

size_t bpp::SingleProcessPhyloLikelihood::getNumberOfClasses ( ) const
inline

Get the number of model classes.

Definition at line 131 of file SingleProcessPhyloLikelihood.h.

References bpp::SubstitutionProcessInterface::getNumberOfClasses(), and substitutionProcess().

◆ getNumberOfDistinctSites()

size_t bpp::SingleProcessPhyloLikelihood::getNumberOfDistinctSites ( ) const
inline

◆ getNumberOfSites()

size_t bpp::SingleProcessPhyloLikelihood::getNumberOfSites ( ) const
inlineoverridevirtual

Get the number of sites in the dataset.

Returns
the number of sites in the dataset.

Reimplemented from bpp::AbstractAlignedPhyloLikelihood.

Definition at line 117 of file SingleProcessPhyloLikelihood.h.

References bpp::LikelihoodCalculationSingleProcess::getNumberOfSites(), and likelihoodCalculationSingleProcess().

◆ getNumberOfStates()

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

◆ getPosteriorProbabilitiesForSitePerClass()

Vdouble SingleProcessPhyloLikelihood::getPosteriorProbabilitiesForSitePerClass ( size_t  pos) const

Definition at line 12 of file SingleProcessPhyloLikelihood.cpp.

References bpp::convert(), and bpp::VectorTools::sum().

◆ getPosteriorProbabilitiesPerSitePerClass()

VVdouble SingleProcessPhyloLikelihood::getPosteriorProbabilitiesPerSitePerClass ( ) const

Get the posterior probabilities of each class, for each site.

Returns
A 2D-vector (Sites X Class) of all posterior probabilities.

Definition at line 38 of file SingleProcessPhyloLikelihood.cpp.

References bpp::copyBppToEigen(), bpp::copyEigenToBpp(), bpp::numeric::cwise(), and bpp::ExtendedFloatEigen< R, C, EigenType >::sum().

◆ getPosteriorRatePerSite()

Vdouble SingleProcessPhyloLikelihood::getPosteriorRatePerSite ( ) const

Definition at line 96 of file SingleProcessPhyloLikelihood.cpp.

References bpp::convert().

◆ getPosteriorStateFrequencies()

Vdouble SingleProcessPhyloLikelihood::getPosteriorStateFrequencies ( uint  nodeId)

Definition at line 119 of file SingleProcessPhyloLikelihood.cpp.

References bpp::copyEigenToBpp().

◆ getRateDistributionParameters()

ParameterList bpp::SingleProcessPhyloLikelihood::getRateDistributionParameters ( ) const
inlineoverridevirtual

◆ getRootFrequenciesParameters()

ParameterList bpp::SingleProcessPhyloLikelihood::getRootFrequenciesParameters ( ) const
inlineoverridevirtual

◆ 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

◆ getSecondOrderDerivativeVector() [1/2]

ValueRef<RowLik> bpp::SingleProcessPhyloLikelihood::getSecondOrderDerivativeVector ( const std::string &  variable) const
inline

Definition at line 297 of file SingleProcessPhyloLikelihood.h.

◆ getSecondOrderDerivativeVector() [2/2]

ValueRef<RowLik> bpp::SingleProcessPhyloLikelihood::getSecondOrderDerivativeVector ( const std::string &  variable1,
const std::string &  variable2 
) const
inline

Definition at line 302 of file SingleProcessPhyloLikelihood.h.

References secondOrderDerivativeVector().

◆ getShrunkData()

std::shared_ptr<const AlignmentDataInterface> bpp::SingleProcessPhyloLikelihood::getShrunkData ( ) const
inline

return a pointer to the compressed data.

Definition at line 103 of file SingleProcessPhyloLikelihood.h.

References bpp::LikelihoodCalculationSingleProcess::getShrunkData(), and likelihoodCalculationSingleProcess().

◆ getSubstitutionModelParameters()

ParameterList bpp::SingleProcessPhyloLikelihood::getSubstitutionModelParameters ( ) const
inlineoverridevirtual

◆ getSubstitutionProcess()

std::shared_ptr<const SubstitutionProcessInterface> bpp::SingleProcessPhyloLikelihood::getSubstitutionProcess ( ) const
inline

Return a smarter pointer to the SubstitutionProcess used to build the phylolikelihood.

Warning; the process parameter values may not be up to date with some of the LikelihoodCalculationSingleProcess

Definition at line 170 of file SingleProcessPhyloLikelihood.h.

References bpp::LikelihoodCalculationSingleProcess::getSubstitutionProcess(), and likelihoodCalculationSingleProcess().

◆ getSubstitutionProcessNumber()

size_t bpp::SingleProcessPhyloLikelihood::getSubstitutionProcessNumber ( ) const
inline

Definition at line 175 of file SingleProcessPhyloLikelihood.h.

References nProc_.

◆ getValue()

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

◆ isInitialized()

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

Reimplemented from bpp::AbstractPhyloLikelihood.

Definition at line 180 of file SingleProcessPhyloLikelihood.h.

References bpp::LikelihoodCalculation::isInitialized(), and likelihoodCalculationSingleProcess().

◆ likelihoodCalculation()

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

Implements bpp::PhyloLikelihoodInterface.

Definition at line 245 of file SingleProcessPhyloLikelihood.h.

References likCal_.

◆ likelihoodCalculationSingleProcess()

◆ secondOrderDerivativeNode()

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

◆ secondOrderDerivativeVector()

ValueRef<RowLik> bpp::SingleProcessPhyloLikelihood::secondOrderDerivativeVector ( const std::string &  variable1,
const std::string &  variable2 
) const
inline

◆ setData()

void bpp::SingleProcessPhyloLikelihood::setData ( std::shared_ptr< const AlignmentDataInterface sites,
size_t  nData = 0 
)
inlineoverridevirtual

Set the dataset for which the likelihood must be evaluated.

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

Reimplemented from bpp::AbstractSingleDataPhyloLikelihood.

Definition at line 93 of file SingleProcessPhyloLikelihood.h.

References likelihoodCalculationSingleProcess(), bpp::LikelihoodCalculationSingleProcess::setData(), and bpp::AbstractSingleDataPhyloLikelihood::setData().

◆ 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

◆ substitutionProcess()

const SubstitutionProcessInterface& bpp::SingleProcessPhyloLikelihood::substitutionProcess ( ) const
inline

Return the ref to the SubstitutionProcess used to build the phylolikelihood.

Warning; the process parameter values may not be up to date with some of the LikelihoodCalculationSingleProcess

Definition at line 158 of file SingleProcessPhyloLikelihood.h.

References likelihoodCalculationSingleProcess(), and bpp::LikelihoodCalculationSingleProcess::substitutionProcess().

Referenced by getNumberOfClasses().

◆ tree()

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

◆ firstOrderDerivativeVectors_

std::unordered_map<std::string, ValueRef<RowLik> > bpp::SingleProcessPhyloLikelihood::firstOrderDerivativeVectors_
mutableprotected

For Dataflow computing.

Definition at line 45 of file SingleProcessPhyloLikelihood.h.

Referenced by firstOrderDerivativeVector().

◆ likCal_

◆ minusLogLik_

DataLik bpp::AbstractPhyloLikelihood::minusLogLik_
mutableprotectedinherited

◆ nbSites_

◆ nbStates_

◆ nData_

◆ nProc_

size_t bpp::SingleProcessPhyloLikelihood::nProc_
protected

the Substitution Process number

Definition at line 40 of file SingleProcessPhyloLikelihood.h.

Referenced by getSubstitutionProcessNumber().

◆ secondOrderDerivativeNodes_

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

◆ secondOrderDerivativeVectors_

std::unordered_map<std::pair<std::string, std::string>, ValueRef<RowLik>, StringPairHash> bpp::SingleProcessPhyloLikelihood::secondOrderDerivativeVectors_
mutableprotected

Definition at line 49 of file SingleProcessPhyloLikelihood.h.

Referenced by secondOrderDerivativeVector().


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