• API Main Page
  • Documentation
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

src/hmm.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2008/2009 by Matthias Ihrke                                  *
00003  *   mihrke@uni-goettingen.de                                              *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
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

Generated on Fri Jun 25 2010 14:10:18 for libeegtools by  doxygen 1.7.0