]>
Commit | Line | Data |
---|---|---|
3e87ef69 | 1 | // @(#) $Id$ |
2 | ||
6b8f6f6e | 3 | #ifndef AliL3FitUtilities |
4 | #define AliL3FitUtilities | |
5 | ||
3e87ef69 | 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++. | |
8 | #ifdef __cplusplus | |
9 | extern "C" | |
10 | #endif | |
11 | void f2gauss5( double, double *, double *,double *,int ); | |
12 | ||
13 | #ifdef __cplusplus | |
14 | extern "C" | |
15 | #endif | |
6b8f6f6e | 16 | int lev_marq_fit( double x[], double y[], double sig[], int NPT, double a[], int ia[], double dev[], int MA, |
3e87ef69 | 17 | double *chisq_p, void (*funcs)(double, double [], double *, double [], int) ); |
6b8f6f6e | 18 | |
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 ) | |
26 | ||
27 | #define SWAP(a,b) {swap=(a);(a)=(b);(b)=swap;} | |
28 | #define SQR(x) ((x)*(x)) | |
29 | ||
30 | #define NR_END 1 | |
31 | #define FREE_ARG char* | |
32 | #define EPSILON 1.0E-12 | |
1f1942b8 | 33 | //#define TRUE 1 |
34 | //#define FALSE 1 | |
6b8f6f6e | 35 | #define FIT_PTS 2000 |
36 | #define FIT_MAXPAR 41 | |
37 | #define NUM_PARS 5 | |
38 | ||
39 | /*--- fitting 2-dimensional cluster --------------------------*/ | |
40 | struct DPOINT { | |
41 | double u; | |
42 | double v; | |
43 | }; | |
44 | typedef struct DPOINT DPOINT; | |
45 | ||
46 | extern DPOINT *plane; //! | |
47 | ||
48 | typedef struct { | |
49 | long float_size; | |
50 | long steps; | |
51 | double dmin; | |
52 | double dmax; | |
53 | double step_size; | |
54 | } exp_header_t; | |
55 | typedef float FLOAT_SIZE; | |
56 | ||
57 | #endif |