bpp-phyl3  3.0.0
bpp::AlignedLikelihoodCalculation Class Reference

#include <Bpp/Phyl/Likelihood/DataFlow/LikelihoodCalculation.h>

+ Inheritance diagram for bpp::AlignedLikelihoodCalculation:
+ Collaboration diagram for bpp::AlignedLikelihoodCalculation:

Public Member Functions

 AlignedLikelihoodCalculation (Context &context)
 
 AlignedLikelihoodCalculation (const AlignedLikelihoodCalculation &lik)
 
AlignedLikelihoodCalculationclone () const
 
SiteLikelihoodsRef getSiteLikelihoods (bool shrunk=false)
 
void setSiteLikelihoods (SiteLikelihoodsRef ll, bool shrunk=false)
 
DataLik getLikelihoodForASite (size_t pos, bool shrunk=false)
 
DataLik getLogLikelihoodForASite (size_t pos, bool shrunk=false)
 
VDataLik getLikelihoodPerSite ()
 Get the likelihood for each site. More...
 
void cleanAllLikelihoods ()
 
ValueRef< DataLikgetLikelihoodNode ()
 
virtual bool isInitialized () const
 
const ContextgetContext () const
 
void setLikelihoodNode (ValueRef< DataLik > ll)
 
void setNamespace (const std::string &prefix)
 
bool hasIndependentParameter (const std::string &name) const
 
const ParameterListgetIndependentParameters () const
 
size_t getNumberOfIndependentParameters () const
 
void aliasParameters (const std::string &p1, const std::string &p2)
 
void aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)
 
void unaliasParameters (const std::string &p1, const std::string &p2)
 
ParameterList getAliasedParameters (const ParameterList &pl) const
 
ParameterList getFromParameters (const ParameterList &pl) const
 
virtual std::vector< std::string > getAlias (const std::string &name) const
 
virtual std::map< std::string, std::string > getAliases () const
 
std::string getFrom (const std::string &name) 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
 
std::string getNamespace () const override
 
std::string getParameterNameWithoutNamespace (const std::string &name) const override
 
virtual void fireParameterChanged (const ParameterList &parameters)
 

Protected Member Functions

virtual void makeLikelihoods ()
 
ContextgetContext_ ()
 
ValueRef< DataLikgetLikelihoodNode_ ()
 
const std::shared_ptr< Parameter > & getParameter (size_t i) const
 
std::shared_ptr< Parameter > & getParameter (size_t i)
 
void addParameter_ (Parameter *parameter)
 
void addParameters_ (const ParameterList &parameters)
 
void shareParameter_ (const std::shared_ptr< Parameter > &parameter)
 
void shareParameters_ (const ParameterList &parameters)
 
void includeParameters_ (const ParameterList &parameters)
 
void deleteParameter_ (size_t index)
 
void deleteParameter_ (std::string &name)
 
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
 

Protected Attributes

SiteLikelihoodsRef siteLikelihoods_
 
SiteLikelihoodsRef patternedSiteLikelihoods_
 
ValueRef< DataLiklikelihood_
 

Private Attributes

Contextcontext_
 
ParameterList independentParameters_
 
std::map< std::string, std::shared_ptr< AliasParameterListener > > aliasListenersRegister_
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Definition at line 124 of file LikelihoodCalculation.h.

Constructor & Destructor Documentation

◆ AlignedLikelihoodCalculation() [1/2]

bpp::AlignedLikelihoodCalculation::AlignedLikelihoodCalculation ( Context context)
inline

Definition at line 128 of file LikelihoodCalculation.h.

◆ AlignedLikelihoodCalculation() [2/2]

bpp::AlignedLikelihoodCalculation::AlignedLikelihoodCalculation ( const AlignedLikelihoodCalculation lik)
inline

Definition at line 131 of file LikelihoodCalculation.h.

Member Function Documentation

◆ cleanAllLikelihoods()

◆ clone()

AlignedLikelihoodCalculation* bpp::AlignedLikelihoodCalculation::clone ( ) const
inlinevirtual

◆ getContext()

const Context& bpp::LikelihoodCalculation::getContext ( ) const
inlineinherited

Definition at line 76 of file LikelihoodCalculation.h.

References bpp::LikelihoodCalculation::context_.

◆ getContext_()

◆ getLikelihoodForASite()

DataLik bpp::AlignedLikelihoodCalculation::getLikelihoodForASite ( size_t  pos,
bool  shrunk = false 
)
inline

◆ getLikelihoodNode()

ValueRef<DataLik> bpp::LikelihoodCalculation::getLikelihoodNode ( )
inlineinherited

◆ getLikelihoodNode_()

◆ getLikelihoodPerSite()

VDataLik bpp::AlignedLikelihoodCalculation::getLikelihoodPerSite ( )
inline

Get the likelihood for each site.

Returns
A vector with all site likelihoods.

Definition at line 221 of file LikelihoodCalculation.h.

References bpp::copyEigenToBpp(), and getSiteLikelihoods().

◆ getLogLikelihoodForASite()

DataLik bpp::AlignedLikelihoodCalculation::getLogLikelihoodForASite ( size_t  pos,
bool  shrunk = false 
)
inline

Definition at line 209 of file LikelihoodCalculation.h.

References getLikelihoodForASite(), and bpp::log().

◆ getSiteLikelihoods()

SiteLikelihoodsRef bpp::AlignedLikelihoodCalculation::getSiteLikelihoods ( bool  shrunk = false)
inline

◆ isInitialized()

◆ makeLikelihoods()

virtual void bpp::AlignedLikelihoodCalculation::makeLikelihoods ( )
inlineprotectedvirtual

◆ setLikelihoodNode()

◆ setSiteLikelihoods()

void bpp::AlignedLikelihoodCalculation::setSiteLikelihoods ( SiteLikelihoodsRef  ll,
bool  shrunk = false 
)
inline

Member Data Documentation

◆ context_

Context& bpp::LikelihoodCalculation::context_
privateinherited

◆ likelihood_

◆ patternedSiteLikelihoods_

◆ siteLikelihoods_

SiteLikelihoodsRef bpp::AlignedLikelihoodCalculation::siteLikelihoods_
mutableprotected

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