1 #ifndef AliL3FitUtilities
2 #define AliL3FitUtilities
4 void f2gauss5( double, double *, double *,double *,int );
5 int lev_marq_fit( double x[], double y[], double sig[], int NPT, double a[], int ia[], double dev[], int MA,
6 double *chisq_p, void (*funcs)(double, double [], double *, double [], int) );
8 #define max(x, y) (((x) > (y)) ? (x) : (y))
9 #define min(x, y) (((x) < (y)) ? (x) : (y))
10 #define mabs(x) (((x) > 0) ? (x) : (-(x)))
11 #define nint(x) ((int)((x) < 0 ? (x)-0.5 : (x)+0.5))
12 #define DBL(x) ((double)(x))
13 #define veclen2(x,y) (DBL(x)*DBL(x) + DBL(y)*DBL(y))
14 #define samesign(x,y) ((((x)>=0 && (y)>=0) || ((x)<0&&(y)<0)) ? TRUE : FALSE )
16 #define SWAP(a,b) {swap=(a);(a)=(b);(b)=swap;}
17 #define SQR(x) ((x)*(x))
20 #define FREE_ARG char*
21 #define EPSILON 1.0E-12
28 /*--- fitting 2-dimensional cluster --------------------------*/
33 typedef struct DPOINT DPOINT;
35 extern DPOINT *plane; //!
44 typedef float FLOAT_SIZE;