bpp-phyl3  3.0.0
bpp::HmmPhyloAlphabet Class Referenceabstract

Hidden states alphabet. More...

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

+ Inheritance diagram for bpp::HmmPhyloAlphabet:
+ Collaboration diagram for bpp::HmmPhyloAlphabet:

Public Member Functions

 HmmPhyloAlphabet (AlignedPhyloLikelihoodSetInterface &soap)
 
 HmmPhyloAlphabet (MultiProcessSequencePhyloLikelihood &mpsp)
 
 HmmPhyloAlphabet (const HmmPhyloAlphabet &hpa)
 
HmmPhyloAlphabetclone () const override
 
virtual ~HmmPhyloAlphabet ()
 
ContextgetContext ()
 
const ClonablegetState (size_t stateIndex) const override
 
const AlignedPhyloLikelihoodInterfacealignedPhyloLikelihood (size_t stateIndex) const
 
std::shared_ptr< const AlignedPhyloLikelihoodInterfacegetAlignedPhyloLikelihood (size_t stateIndex) const
 
size_t getNumberOfStates () const override
 
size_t getNumberOfSites () const
 
bool worksWith (const HmmStateAlphabet &stateAlphabet) const override
 Tell if this instance can work with the instance of alphabet given as input. More...
 
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
 
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)
 

Protected Member Functions

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

Private Attributes

Contextcontext_
 
std::vector< std::shared_ptr< AlignedPhyloLikelihoodInterface > > vAP_
 vector of aligned phylolikelihoods. These phylolikelihoods are not owned by the alphabet. More...
 
size_t nbSites_
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Hidden states alphabet.

Implementation of HmmStateAlphabet where Alphabet States are all the PhyloLikelihoods belonging to a AlignedPhyloLikelihoodSet.

Definition at line 24 of file HmmPhyloAlphabet.h.

Constructor & Destructor Documentation

◆ HmmPhyloAlphabet() [1/3]

◆ HmmPhyloAlphabet() [2/3]

◆ HmmPhyloAlphabet() [3/3]

bpp::HmmPhyloAlphabet::HmmPhyloAlphabet ( const HmmPhyloAlphabet hpa)
inline

Definition at line 83 of file HmmPhyloAlphabet.h.

◆ ~HmmPhyloAlphabet()

virtual bpp::HmmPhyloAlphabet::~HmmPhyloAlphabet ( )
inlinevirtual

Definition at line 92 of file HmmPhyloAlphabet.h.

Member Function Documentation

◆ alignedPhyloLikelihood()

const AlignedPhyloLikelihoodInterface& bpp::HmmPhyloAlphabet::alignedPhyloLikelihood ( size_t  stateIndex) const
inline

Definition at line 106 of file HmmPhyloAlphabet.h.

References vAP_.

◆ clone()

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

Implements bpp::AbstractParametrizable.

Definition at line 90 of file HmmPhyloAlphabet.h.

References HmmPhyloAlphabet().

◆ getAlignedPhyloLikelihood()

std::shared_ptr<const AlignedPhyloLikelihoodInterface> bpp::HmmPhyloAlphabet::getAlignedPhyloLikelihood ( size_t  stateIndex) const
inline

Definition at line 111 of file HmmPhyloAlphabet.h.

References vAP_.

◆ getContext()

Context& bpp::HmmPhyloAlphabet::getContext ( )
inline

Definition at line 94 of file HmmPhyloAlphabet.h.

References context_.

Referenced by HmmPhyloAlphabet().

◆ getNumberOfSites()

size_t bpp::HmmPhyloAlphabet::getNumberOfSites ( ) const
inline

Definition at line 121 of file HmmPhyloAlphabet.h.

References nbSites_.

◆ getNumberOfStates()

size_t bpp::HmmPhyloAlphabet::getNumberOfStates ( ) const
inlineoverridevirtual

Implements bpp::HmmStateAlphabet.

Definition at line 116 of file HmmPhyloAlphabet.h.

References vAP_.

◆ getState()

const Clonable& bpp::HmmPhyloAlphabet::getState ( size_t  stateIndex) const
inlineoverridevirtual
Parameters
stateIndexThe index of a hidden state.
Returns
The corresponding hidden state.
See also
getNumberOfStates

Implements bpp::HmmStateAlphabet.

Definition at line 101 of file HmmPhyloAlphabet.h.

References vAP_.

◆ worksWith()

bool bpp::HmmPhyloAlphabet::worksWith ( const HmmStateAlphabet stateAlphabet) const
inlineoverridevirtual

Tell if this instance can work with the instance of alphabet given as input.

In many case, this will return true if the pointer provided as argument refers to this object.

Parameters
stateAlphabetThe alphabet to check.
Returns
true if the matrix is compatible with the given alphabet.

Implements bpp::HmmStateAlphabet.

Definition at line 134 of file HmmPhyloAlphabet.h.

Member Data Documentation

◆ context_

Context& bpp::HmmPhyloAlphabet::context_
private

Definition at line 29 of file HmmPhyloAlphabet.h.

Referenced by getContext().

◆ nbSites_

size_t bpp::HmmPhyloAlphabet::nbSites_
private

Definition at line 37 of file HmmPhyloAlphabet.h.

Referenced by getNumberOfSites(), and HmmPhyloAlphabet().

◆ vAP_

std::vector<std::shared_ptr<AlignedPhyloLikelihoodInterface> > bpp::HmmPhyloAlphabet::vAP_
private

vector of aligned phylolikelihoods. These phylolikelihoods are not owned by the alphabet.

Definition at line 35 of file HmmPhyloAlphabet.h.

Referenced by alignedPhyloLikelihood(), getAlignedPhyloLikelihood(), getNumberOfStates(), getState(), and HmmPhyloAlphabet().


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