Mercurial > hg > pyin
annotate SparseHMM.h @ 0:99bac62ee2da
added PYIN sources, should be compileable
author | matthiasm |
---|---|
date | Wed, 27 Nov 2013 11:59:49 +0000 |
parents | |
children | 5945b8905d1f |
rev | line source |
---|---|
matthiasm@0 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
matthiasm@0 | 2 /* |
matthiasm@0 | 3 This file is Copyright (c) 2012 Matthias Mauch |
matthiasm@0 | 4 |
matthiasm@0 | 5 */ |
matthiasm@0 | 6 |
matthiasm@0 | 7 #ifndef _SPARSEHMM_H_ |
matthiasm@0 | 8 #define _SPARSEHMM_H_ |
matthiasm@0 | 9 |
matthiasm@0 | 10 #include <vector> |
matthiasm@0 | 11 #include <cstdio> |
matthiasm@0 | 12 |
matthiasm@0 | 13 using std::vector; |
matthiasm@0 | 14 using std::pair; |
matthiasm@0 | 15 |
matthiasm@0 | 16 class SparseHMM |
matthiasm@0 | 17 { |
matthiasm@0 | 18 public: |
matthiasm@0 | 19 virtual const std::vector<double> calculateObsProb(const vector<pair<double, double> >); |
matthiasm@0 | 20 const std::vector<int> decodeViterbi(std::vector<vector<double> > obs, |
matthiasm@0 | 21 vector<double> *scale); |
matthiasm@0 | 22 vector<double> init; |
matthiasm@0 | 23 vector<size_t> from; |
matthiasm@0 | 24 vector<size_t> to; |
matthiasm@0 | 25 vector<double> transProb; |
matthiasm@0 | 26 }; |
matthiasm@0 | 27 |
matthiasm@0 | 28 #endif |