-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparameters.h
73 lines (54 loc) · 1.74 KB
/
parameters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef PARAMETERS_H
#define PARAMETERS_H
#include <vector>
#include <Eigen/Dense>
#include <memory>
#include <iostream>
#include "upperTriangle.hpp"
#include "nprodHHMM.hpp"
#include "prodHHMM.hpp"
using namespace std;
using namespace Eigen;
template<typename T>
using up = unique_ptr<T>;
template<typename T>
using diVector = vector<vector<T>>;
using MatrixXld = Matrix<long double,Dynamic,Dynamic>;
using VectorXld = Matrix<long double,Dynamic,1>;
namespace hhmm{
class TestHHMM;
class baseHHMM;
class parameters{
friend TestHHMM;
private:
MatrixXld xiContent;
MatrixXld tmpTransContent;//auxiliary variables for parameter's alteration
public:
upperTriangle<long double> alpha;
upperTriangle<long double> beta;
vector<long double> etaIn;
vector<long double> etaOut;
vector<long double> chi;
vector<long double> gammaIn;
vector<long double> gammaOut;
parameters* parent;
vector<up<parameters>> children;
long double tmpPi;//auxiliary variables for parameter's alteration
long double tmpEmitParent;//auxiliary variables for parameter's alteration
VectorXld tmpMean;//auxiliary variables for parameter's alteration
DM tmpVariance;
//vector<long double> tmpEmit;
upperTriangle<long double> delta;
upperTriangle<uint32_t> phi;
upperTriangle<uint32_t> tau;
long double& xi(uint32_t x,baseHHMM* y,nprodHHMM* z);
long double& tmpTrans(baseHHMM* x,baseHHMM* y,nprodHHMM* z);
MatrixXld& tmpTrans();
parameters(vector<uint32_t> const&,uint32_t,uint32_t,uint32_t,parameters*);
parameters(uint32_t,uint32_t,uint32_t,parameters*);
parameters(vector<uint32_t> const&,uint32_t,uint32_t);
void transform();
~parameters() = default;
};
}
#endif