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

src/nonlinear.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 
00068 #ifndef NONLINEAR_H
00069 # define NONLINEAR_H
00070 #include "mathadd.h"
00071 #include "distances.h"
00072 #include "definitions.h"
00073 
00074 #ifdef __cplusplus
00075 extern "C" {
00076 #endif
00077 
00078   /*-----------------------------------------------------------
00079      - Time-Delay Embedding
00080      ---------------------------------------------------------*/
00081 
00082   typedef struct {
00083      int m;     
00084      int tau;   
00085      double *x; 
00086      int xn;    
00087   } TimeDelayReconstruction;
00088 
00089   Array* tdelay_to_array( TimeDelayReconstruction *p );
00090 
00091   /* parameter estimation */
00092   int         tdelay_estimate_timelag_mutual( TimeDelayReconstruction *p, 
00093                                                              long partitions, long corrlength, double *mutual );
00094   int         tdelay_estimate_timelag_autocorr( TimeDelayReconstruction *p );
00095   int         tdelay_estimate_dimension( double Rtol, int m_start, int m_end );
00096   double      tdelay_fnn_ratio( TimeDelayReconstruction *p, double Rtol, double Atol );
00097   double      tdelay_attractor_size( TimeDelayReconstruction *p );
00098 
00099   /* struct handling */
00100   TimeDelayReconstruction* tdelay_init ( int m, int tau, double *x, int n );
00101   void        tdelay_free ( TimeDelayReconstruction *p );
00102   void        tdelay_print( FILE *out, TimeDelayReconstruction *p);
00103 
00104   /* indexing */
00105   double      tdelay_index_ij( TimeDelayReconstruction *p, int i, int j );
00106   void        tdelay_index_i ( TimeDelayReconstruction *p, int i, double *x);
00107   void        tdelay_index_j ( TimeDelayReconstruction *p, int j, double *x);
00108 
00109   /* nonlinear prediction */
00110   double tdelay_predict_simple( TimeDelayReconstruction *p, double *sample, int npredict, double epsilon );
00111   double tdelay_simple_nonlinear_prediction_error( TimeDelayReconstruction *reference, double *y, int yn, 
00112                                                                      int npredict, double epsilon );
00113 
00114   double** eeg_nonlinear_prediction_error( const EEG *eeg, int embedding_dim, int time_lag,
00115                                                          int npredict, double epsilon, 
00116                                                          double** output, OptArgList *optargs );
00117 #ifdef __cplusplus
00118 }
00119 #endif
00120 
00121 
00122 #endif

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