bpp-phyl3  3.0.0
HmmSequenceEvolution.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_PHYL_LIKELIHOOD_HMMSEQUENCEEVOLUTION_H
6 #define BPP_PHYL_LIKELIHOOD_HMMSEQUENCEEVOLUTION_H
7 
8 
9 #include "HmmProcessAlphabet.h"
11 
12 // From Numeric
14 
15 #include <memory>
16 
17 namespace bpp
18 {
24 {
25 private:
26  std::shared_ptr<HmmProcessAlphabet> hmmAlph_;
27  std::shared_ptr<FullHmmTransitionMatrix> hmmTransMat_;
28 
29 public:
31  std::shared_ptr<SubstitutionProcessCollection> processColl,
32  std::vector<size_t>& nProc);
33 
36  hmmAlph_(mlc.hmmAlph_->clone()),
38 
40  {
42  hmmAlph_ = std::make_shared<HmmProcessAlphabet>(*mlc.hmmAlph_);
43  hmmTransMat_ = std::make_shared<FullHmmTransitionMatrix>(*mlc.hmmTransMat_);
44 
45  return *this;
46  }
47 
48  virtual ~HmmSequenceEvolution() {}
49 
50  HmmSequenceEvolution* clone() const { return new HmmSequenceEvolution(*this); }
51 
52 public:
53  void setNamespace(const std::string& nameSpace);
54 
55  void fireParameterChanged(const ParameterList& parameters);
56 
58  {
59  return *hmmTransMat_;
60  }
61 
63  {
64  return *hmmTransMat_;
65  }
66 
67  std::shared_ptr<FullHmmTransitionMatrix> getHmmTransitionMatrix()
68  {
69  return hmmTransMat_;
70  }
71 
73  {
74  return *hmmAlph_;
75  }
76 
78  {
79  return *hmmAlph_;
80  }
81 
82  std::shared_ptr<HmmProcessAlphabet> getHmmProcessAlphabet()
83  {
84  return hmmAlph_;
85  }
86 };
87 } // end of namespace bpp.
88 #endif // BPP_PHYL_LIKELIHOOD_HMMSEQUENCEEVOLUTION_H
Hidden states alphabet.
Sequence evolution framework based on a hmm.
HmmSequenceEvolution * clone() const
std::shared_ptr< HmmProcessAlphabet > getHmmProcessAlphabet()
FullHmmTransitionMatrix & hmmTransitionMatrix()
std::shared_ptr< FullHmmTransitionMatrix > hmmTransMat_
HmmSequenceEvolution(const HmmSequenceEvolution &mlc)
void setNamespace(const std::string &nameSpace)
HmmSequenceEvolution & operator=(const HmmSequenceEvolution &mlc)
std::shared_ptr< FullHmmTransitionMatrix > getHmmTransitionMatrix()
std::shared_ptr< HmmProcessAlphabet > hmmAlph_
HmmProcessAlphabet & hmmProcessAlphabet()
const HmmProcessAlphabet & hmmProcessAlphabet() const
HmmSequenceEvolution(std::shared_ptr< SubstitutionProcessCollection > processColl, std::vector< size_t > &nProc)
const FullHmmTransitionMatrix & hmmTransitionMatrix() const
void fireParameterChanged(const ParameterList &parameters)
Partial implementation of multiple processes of sequences.
MultiProcessSequenceEvolution & operator=(const MultiProcessSequenceEvolution &lik)
Defines the basic types of data flow nodes.