FDS_binary/clusters.h

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 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 /* C++ protection. */
00024 #ifdef  __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 #include <lal/LALDatatypes.h>
00029 #include <lal/SkyCoordinates.h>
00030 #include <lal/PtoleMetric.h>
00031 #include <lal/StackMetric.h>
00032 #include <lal/LALBarycenter.h>
00033 
00034 #include <unistd.h>
00035 #include <stdio.h>
00036 #include <string.h>
00037 #include <stdlib.h>
00038 #include <math.h>
00039 #include <lal/LALDatatypes.h>
00040 
00041 
00042 /* #define BUFFERSIZE 1024 */
00043 
00044 
00045 typedef struct Clusterstag {
00046   INT2  Nclusters;     /* how many clusters */
00047   UINT4  *NclustPoints; /* for each cluster: how many points it has */
00048   UINT4  *Iclust;       /* index of the first datum of each cluster */
00049   REAL8 *clusters;     /* value of ratio for each cluster point, for all clusters */
00050 } Clusters;
00051 
00052 typedef struct ClustersParamstag {
00053   INT4  wings;
00054   INT2  smallBlock;
00055 } ClustersParams;
00056 
00057 typedef struct Outlierstag {
00058   UINT4  Noutliers;
00059   INT4  rightwing;
00060   INT4  leftwing;
00061   UINT4  *outlierIndexes; /*  indexes in OutliersInput->data vector */
00062   REAL8 *ratio;
00063 } Outliers;
00064 
00065 typedef struct OutliersInputtag {
00066   REAL8Vector *data;
00067   INT4        ifmin;
00068 } OutliersInput;
00069 
00070 typedef struct OutliersParamstag {
00071   REAL8Vector *Floor;
00072   REAL4       Thr; 
00073   INT4        wings;
00074   INT4        ifmin;
00075 } OutliersParams;
00076 
00077 typedef struct ClustersInputtag {
00078   OutliersInput  *outliersInput;
00079   OutliersParams *outliersParams;
00080   Outliers       *outliers;
00081 } ClustersInput;
00082 
00083 
00084 
00085 /* Function Prototypes */
00086 
00087 int DetectClusters(ClustersInput *input, ClustersParams *params, Clusters *output);
00088 int ComputeOutliers(OutliersInput *outliersInput, OutliersParams *outlierParams, Outliers *outliers);
00089 int EstimateFloor(REAL8Vector *input, INT2 windowSize, REAL8Vector *output);
00090 
00091 #ifdef  __cplusplus
00092 }
00093 #endif  
00094 /* C++ protection. */
00095 
00096 #endif  /* Double-include protection. */

Generated on Thu Aug 21 03:12:14 2008 for LAL by  doxygen 1.5.2