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

src/distances.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 
00038 #ifndef DISTANCES_H
00039 #define DISTANCES_H
00040 
00041 #include "array.h"
00042 #include "linalg.h"
00043 #include "clustering.h"
00044 #include "definitions.h"
00045 #include "recurrence_plot.h"
00046 #include "nonlinear.h"
00047 #include "warping.h"
00048 #include "optarg.h"
00049 
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053   
00054   typedef double**(*PointwiseDistanceFunction)    (double*,int,double*,int,double**,OptArgList*);
00055   typedef double  (*VectorDistanceFunction)       (const double*,const double*,int,OptArgList*);
00056  
00057   Array* distmatrix_signaldist( VectorDistanceFunction f, const Array *s1,
00058                                           const Array *s2, Array *out, OptArgList *optargs );
00059   Array* matrix_distmatrix( VectorDistanceFunction f, 
00060                                      const Array *X, Array *D, 
00061                                      OptArgList *optargs );
00062 
00063   double** vectordist_distmatrix          ( VectorDistanceFunction f, const double **X, 
00064                                                           int n, int p, double **D, 
00065                                                           ProgressBarFunction progress, 
00066                                                           OptArgList* optargs );
00067 
00068   double   vectordist_euclidean           ( const double *x1, const double *x2, 
00069                                                           int p, OptArgList *optargs );
00070   double   vectordist_euclidean_normalized( const double *x1, const double *x2, 
00071                                                           int p, OptArgList *optargs );
00072   double   vectordist_dtw                 ( const double *x1, const double *x2, 
00073                                                           int p, OptArgList *optargs );
00074   double   vectordist_regularized_dtw     ( const double *x1, const double *x2, 
00075                                                           int p, OptArgList *optargs );
00076 
00077   double** eeg_distmatrix( EEG *eeg, VectorDistanceFunction f, 
00078                                     double **d, OptArgList *optargs );
00079  
00080   /*    These distances (functions starting with pathdist_*()) are between 
00081         two WarpPath structs.
00082   */  
00083   double   pathdist_euclidean_dt(WarpPath *p1, WarpPath *p2); 
00084 
00085   /* Other distance functions.
00086   */  
00087   double   dist_point_line(double *p, double *x, double *y); 
00088   
00089 
00090   /***********************************************************
00091     GOING TO BE OBSOLETE 
00092   ***********************************************************/
00093  
00094   double** signaldist_euclidean( double *s1, int n1, double *s2, int n2, 
00095                                             double **d, 
00096                                             OptArgList *optargs );
00097   double** signaldist_euclidean_derivative( double *s1, int n1, double *s2, int n2, 
00098                                                           double **d, 
00099                                                           OptArgList *optargs );
00100   double** signaldist_stft( double *s1, int n1, double *s2, int n2, 
00101                                      double **d, 
00102                                      OptArgList *optargs );
00103 
00104  
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 
00109 
00110 #endif

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