bpp-core3  3.0.0
HmmTransitionMatrix.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_NUMERIC_HMM_HMMTRANSITIONMATRIX_H
6 #define BPP_NUMERIC_HMM_HMMTRANSITIONMATRIX_H
7 
8 
9 #include "../Matrix/Matrix.h"
10 #include "../Parametrizable.h"
11 #include "HmmExceptions.h"
12 #include "HmmStateAlphabet.h"
13 
14 // Fron the STL:
15 #include <vector>
16 
17 namespace bpp
18 {
25  public virtual Parametrizable
26 {
27 public:
28  virtual HmmTransitionMatrix* clone() const override = 0;
29 
33  virtual const HmmStateAlphabet& hmmStateAlphabet() const = 0;
34 
38  virtual std::shared_ptr<const HmmStateAlphabet> getHmmStateAlphabet() const = 0;
39 
45  virtual void setHmmStateAlphabet(std::shared_ptr<const HmmStateAlphabet> stateAlphabet) = 0;
46 
50  virtual size_t getNumberOfStates() const = 0;
51 
59  virtual double Pij(size_t i, size_t j) const = 0;
60 
66  virtual const Matrix<double>& getPij() const = 0;
67 
71  virtual const std::vector<double>& getEquilibriumFrequencies() const = 0;
72 };
73 } // end of namespace bpp
74 #endif // BPP_NUMERIC_HMM_HMMTRANSITIONMATRIX_H
Hidden states alphabet.
The matrix template interface.
Definition: Matrix.h:22
virtual void setHmmStateAlphabet(std::shared_ptr< const HmmStateAlphabet > stateAlphabet)=0
Set the new hidden state alphabet.
virtual const Matrix< double > & getPij() const =0
Get all transition probabilities as a matrix.
virtual const HmmStateAlphabet & hmmStateAlphabet() const =0
virtual HmmTransitionMatrix * clone() const override=0
Create a copy of this object and send a pointer to it.
This is the interface for all objects that imply parameters.
virtual size_t getNumberOfStates() const =0
virtual const std::vector< double > & getEquilibriumFrequencies() const =0
virtual std::shared_ptr< const HmmStateAlphabet > getHmmStateAlphabet() const =0
virtual double Pij(size_t i, size_t j) const =0
Get the transition probability between two states.
Describe the transition probabilities between hidden states of a Hidden Markov Model.