Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00033 #ifndef HMM_H
00034 # define HMM_H
00035
00036 #include "mathadd.h"
00037 #include "definitions.h"
00038 #include "eeg.h"
00039 #include <gsl/gsl_rng.h>
00040 #include <gsl/gsl_randist.h>
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00046
00049 typedef struct{
00050 int K;
00051 int n;
00052 int M;
00054 int Q;
00055 double *q;
00057 double *u;
00059 int J;
00060 double *d;
00061 double s[2];
00063 double **tau;
00064 int **phi;
00066 double *z;
00067 double sigma;
00069 gsl_rng_type *random_number_type;
00070 gsl_rng *rng;
00071 long seed;
00072 } CPHiddenMarkovModel;
00073
00074 double cphmm_get_transition_prob( CPHiddenMarkovModel *m, int k, int i, int j );
00075
00076
00077 CPHiddenMarkovModel* cphmm_alloc( int K, int n, int M, int Q, int J );
00078 CPHiddenMarkovModel* eeg_cphmm_init( EEG *eeg, int channel, double **X );
00079 void cphmm_init( CPHiddenMarkovModel *m, double **X );
00080 void cphmm_free( CPHiddenMarkovModel *m );
00081
00082 #ifdef __cplusplus
00083 }
00084 #endif
00085
00086
00087 #endif