bpp-core3  3.0.0
FullHmmTransitionMatrix.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_FULLHMMTRANSITIONMATRIX_H
6 #define BPP_NUMERIC_HMM_FULLHMMTRANSITIONMATRIX_H
7 
8 
9 #include "../AbstractParameterAliasable.h"
10 #include "../Prob/Simplex.h"
12 
13 namespace bpp
14 {
30  public virtual AbstractHmmTransitionMatrix,
32 {
33 private:
34  std::vector<Simplex> vSimplex_;
35 
36 public:
37  FullHmmTransitionMatrix(std::shared_ptr<const HmmStateAlphabet> alph, const std::string& prefix = "");
38 
40 
42 
43  FullHmmTransitionMatrix* clone() const { return new FullHmmTransitionMatrix(*this);}
44 
49 
57  double Pij(size_t i, size_t j) const
58  {
59  return vSimplex_[i].prob(j);
60  }
61 
68  const Matrix<double>& getPij() const;
69 
73  const std::vector<double>& getEquilibriumFrequencies() const;
74 
75 
79  void fireParameterChanged(const ParameterList& parameters);
80 };
81 } // end of namespace bpp
82 #endif // BPP_NUMERIC_HMM_FULLHMMTRANSITIONMATRIX_H
The matrix template interface.
Definition: Matrix.h:22
FullHmmTransitionMatrix & operator=(const FullHmmTransitionMatrix &hptm)
void fireParameterChanged(const ParameterList &parameters)
From AbstractParametrizable interface.
FullHmmTransitionMatrix * clone() const
Create a copy of this object and send a pointer to it.
A partial implementation of the Parametrizable interface.
const Matrix< double > & getPij() const
Get all transition probabilities as a matrix.
FullHmmTransitionMatrix(std::shared_ptr< const HmmStateAlphabet > alph, const std::string &prefix="")
Describe the transition probabilities between hidden states of a Hidden Markov Model.
The parameter list object.
Definition: ParameterList.h:27
Partial implementation of HmmTransitionMatrix.
double Pij(size_t i, size_t j) const
Get the transition probability between two states.
void setTransitionProbabilities(const Matrix< double > &mat)
Set the matrix of the transition probabilities.
const std::vector< double > & getEquilibriumFrequencies() const