3 #ifndef AliL3FitUtilities
4 #define AliL3FitUtilities
6 /*This we do because this file is read both with c and c++ compiler,
7 and extern "C" is needed only in case of c++. */
11 void f2gauss5( double, double *, double *,double *,int );
16 int lev_marq_fit( double x[], double y[], double sig[], int NPT, double a[], int ia[], double dev[], int MA,
17 double *chisq_p, void (*funcs)(double, double [], double *, double [], int) );
19 #define max(x, y) (((x) > (y)) ? (x) : (y))
20 #define min(x, y) (((x) < (y)) ? (x) : (y))
21 #define mabs(x) (((x) > 0) ? (x) : (-(x)))
22 #define nint(x) ((int)((x) < 0 ? (x)-0.5 : (x)+0.5))
23 #define DBL(x) ((double)(x))
24 #define veclen2(x,y) (DBL(x)*DBL(x) + DBL(y)*DBL(y))
25 #define samesign(x,y) ((((x)>=0 && (y)>=0) || ((x)<0&&(y)<0)) ? TRUE : FALSE )
27 #define SWAP(a,b) {swap=(a);(a)=(b);(b)=swap;}
28 #define SQR(x) ((x)*(x))
31 #define FREE_ARG char*
32 #define EPSILON 1.0E-12
37 /*--- fitting 2-dimensional cluster --------------------------*/
42 typedef struct DPOINT DPOINT;
53 typedef float FLOAT_SIZE;