bpp-phyl3  3.0.0
bpp::HmmProcessAlphabet Class Referenceabstract

Hidden states alphabet. More...

#include <Bpp/Phyl/Likelihood/HmmProcessAlphabet.h>

+ Inheritance diagram for bpp::HmmProcessAlphabet:
+ Collaboration diagram for bpp::HmmProcessAlphabet:

Public Member Functions

 HmmProcessAlphabet (std::shared_ptr< const SubstitutionProcessCollection > pSub, std::vector< size_t > nProc)
 
 HmmProcessAlphabet (const HmmProcessAlphabet &hpa)
 
HmmProcessAlphabetoperator= (const HmmProcessAlphabet &hpa)
 
HmmProcessAlphabetclone () const override
 
virtual ~HmmProcessAlphabet ()
 
const ClonablegetState (size_t stateIndex) const override
 
size_t getNumberOfStates () const override
 
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

std::shared_ptr< const SubstitutionProcessCollectionprocessColl_
 
std::vector< size_t > nProc_
 the vector of the substitution process numbers. More...
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Hidden states alphabet.

Implementation of HmmStateAlphabet where Alphabet States are Substitution Process belonging to a collection.

Definition at line 23 of file HmmProcessAlphabet.h.

Constructor & Destructor Documentation

◆ HmmProcessAlphabet() [1/2]

bpp::HmmProcessAlphabet::HmmProcessAlphabet ( std::shared_ptr< const SubstitutionProcessCollection pSub,
std::vector< size_t >  nProc 
)
inline

Definition at line 36 of file HmmProcessAlphabet.h.

Referenced by clone().

◆ HmmProcessAlphabet() [2/2]

bpp::HmmProcessAlphabet::HmmProcessAlphabet ( const HmmProcessAlphabet hpa)
inline

Definition at line 44 of file HmmProcessAlphabet.h.

◆ ~HmmProcessAlphabet()

virtual bpp::HmmProcessAlphabet::~HmmProcessAlphabet ( )
inlinevirtual

Definition at line 61 of file HmmProcessAlphabet.h.

Member Function Documentation

◆ clone()

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

Implements bpp::AbstractParametrizable.

Definition at line 59 of file HmmProcessAlphabet.h.

References HmmProcessAlphabet().

◆ getNumberOfStates()

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

Implements bpp::HmmStateAlphabet.

Definition at line 73 of file HmmProcessAlphabet.h.

References nProc_.

◆ getState()

const Clonable& bpp::HmmProcessAlphabet::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 68 of file HmmProcessAlphabet.h.

References nProc_, and processColl_.

◆ operator=()

HmmProcessAlphabet& bpp::HmmProcessAlphabet::operator= ( const HmmProcessAlphabet hpa)
inline

Definition at line 50 of file HmmProcessAlphabet.h.

References nProc_, and processColl_.

◆ worksWith()

bool bpp::HmmProcessAlphabet::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 86 of file HmmProcessAlphabet.h.

Member Data Documentation

◆ nProc_

std::vector<size_t> bpp::HmmProcessAlphabet::nProc_
private

the vector of the substitution process numbers.

Definition at line 33 of file HmmProcessAlphabet.h.

Referenced by getNumberOfStates(), getState(), and operator=().

◆ processColl_

std::shared_ptr<const SubstitutionProcessCollection> bpp::HmmProcessAlphabet::processColl_
private

Definition at line 28 of file HmmProcessAlphabet.h.

Referenced by getState(), and operator=().


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