Mercurial > hg > pyin
diff SparseHMM.h @ 146:8404827a4b02 memory
Avoid calculating a temporary obsprob matrix for note tracking; + some tidying
author | Chris Cannam |
---|---|
date | Wed, 17 May 2017 14:50:10 +0100 |
parents | 0432723faf03 |
children | 3faac48d491d |
line wrap: on
line diff
--- a/SparseHMM.h Fri Mar 24 15:35:32 2017 +0000 +++ b/SparseHMM.h Wed May 17 14:50:10 2017 +0100 @@ -25,15 +25,18 @@ class SparseHMM { public: - SparseHMM(int fixedLag); - virtual std::vector<double> - calculateObsProb(const vector<pair<double, double> >); + SparseHMM(int fixedLag); // set fixedLag == 0 when doing full Viterbi + + virtual std::vector<double> calculateObsProb + (const vector<pair<double, double> >) = 0; + virtual void build(); std::vector<int> decodeViterbi(std::vector<vector<double> > obs); void reset(); void initialise(vector<double> firstObs); int process(vector<double> newObs); vector<int> track(); + // "sparse" HMM definition int m_fixedLag; int m_nState;