00001 /* 00002 * Copyright (C) 2007 Bernd Machenschalk, Maria Alessandra Papa, Reinhard Prix 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with with program; see the file COPYING. If not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00017 * MA 02111-1307 USA 00018 */ 00019 00020 #ifndef _CLUSTERS_H /* Double-include protection. */ 00021 #define _CLUSTERS_H 00022 00023 #include <lal/LALDatatypes.h> 00024 00025 /* C++ protection. */ 00026 #ifdef __cplusplus 00027 extern "C" { 00028 #endif 00029 00030 typedef struct Clusterstag { 00031 INT2 Nclusters; /* how many clusters */ 00032 UINT4 *NclustPoints; /* for each cluster: how many points it has */ 00033 UINT4 *Iclust; /* index of the first datum of each cluster */ 00034 REAL8 *clusters; /* value of ratio for each cluster point, for all clusters */ 00035 } Clusters; 00036 00037 typedef struct ClustersParamstag { 00038 INT4 wings; 00039 INT2 smallBlock; 00040 } ClustersParams; 00041 00042 typedef struct Outlierstag { 00043 UINT4 Noutliers; 00044 INT4 rightwing; 00045 INT4 leftwing; 00046 UINT4 *outlierIndexes; /* indexes in OutliersInput->data vector */ 00047 REAL8 *ratio; 00048 } Outliers; 00049 00050 typedef struct OutliersInputtag { 00051 REAL8Vector *data; 00052 INT4 ifmin; 00053 } OutliersInput; 00054 00055 typedef struct OutliersParamstag { 00056 REAL8Vector *Floor; 00057 REAL8 Thr; 00058 INT4 wings; 00059 INT4 ifmin; 00060 } OutliersParams; 00061 00062 typedef struct ClustersInputtag { 00063 OutliersInput *outliersInput; 00064 OutliersParams *outliersParams; 00065 Outliers *outliers; 00066 } ClustersInput; 00067 00068 00069 00070 /* Function Prototypes */ 00071 00072 void DetectClusters(LALStatus *, ClustersInput *input, ClustersParams *clParams, Clusters *output); 00073 int ComputeOutliers(OutliersInput *outliersInput, OutliersParams *outlierParams, Outliers *outliers); 00074 void EstimateFloor(LALStatus *, REAL8Vector *input, INT2 windowSize, REAL8Vector *output); 00075 00076 #ifdef __cplusplus 00077 } 00078 #endif 00079 /* C++ protection. */ 00080 00081 #endif /* Double-include protection. */
1.5.2