⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hmm.h

📁 hmmc++程序
💻 H
字号:
/*
@abstract(code for the tutorial on hidden Markov models )
@author(Nikolai Shokhirev <nikolai@shokhirev.com> <nikolai@u.arizona.edu>
        http://www.shokhirev.com/nikolai.html
        http://www.u.arizona.edu/~nikolai/
        http://www.chem.arizona.edu/~shokhirn/nikolai.html )
@created(2006.02.02)
㎞ikolai V. Shokhirev, 2003-2006
 2006.02.24 - added PosteriorDecodingIdxs }
*/
//---------------------------------------------------------------------------

#ifndef HMMH
#define HMMH
#include "MatUtils.h"
#include "dynarrays.h"
//---------------------------------------------------------------------------
class HMM
{
private:
  int N;
  int M;
  int Tmax;
  FArr2D A;
  FArr2D B;
  FArr1D P0;
  FArr2D beta;
  FArr2D alpha;

  FArr2D* pA;
  FArr2D* pB;
  FArr1D* pP0;
  FArr2D* pbeta;
  FArr2D* palpha;

public:
  HMM();
  HMM(FArr2D& TransProb, FArr2D& ObsProb, FArr1D& InitProb);
  ~HMM();
  real GetProbabilityF(IArr1D& ObsIdxs);
  real GetProbabilityB(IArr1D& ObsIdxs);
  IArr1D ViterbiStateIdxs(IArr1D& ObsIdxs);
  IArr1D PosteriorDecodingIdxs(IArr1D& ObsIdxs);
};
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -