Line | |
---|
1 | // polfitclip.h
|
---|
2 | // Eric Aubourg CEA/DAPNIA/SPP novembre 1999
|
---|
3 |
|
---|
4 | #ifndef POLFITCLIP_H
|
---|
5 | #define POLFITCLIP_H
|
---|
6 |
|
---|
7 | #include <stdlib.h>
|
---|
8 |
|
---|
9 | class PolFitClip {
|
---|
10 | public:
|
---|
11 | PolFitClip(long ndatamax, long degpol);
|
---|
12 | ~PolFitClip();
|
---|
13 |
|
---|
14 | void setData(double const* x, double const* y, long n);
|
---|
15 | void addData(double xx, double yy);
|
---|
16 | void clear();
|
---|
17 | void setClip(double frc, double nsig, int npass);
|
---|
18 |
|
---|
19 | int doFit(double* coef=NULL);
|
---|
20 | int doFit1();
|
---|
21 |
|
---|
22 | double value(double x);
|
---|
23 |
|
---|
24 | long getNData();
|
---|
25 | double getXMin();
|
---|
26 | double getXMax();
|
---|
27 |
|
---|
28 | double getChi2();
|
---|
29 | double getCov(int i, int j);
|
---|
30 | double getSigma();
|
---|
31 |
|
---|
32 | protected:
|
---|
33 | double* x;
|
---|
34 | double* ySort;
|
---|
35 | double* y;
|
---|
36 | double* sig;
|
---|
37 | double* a;
|
---|
38 | int* ia;
|
---|
39 | double** cov;
|
---|
40 | long ndata;
|
---|
41 | long ndatamax;
|
---|
42 | double chi2;
|
---|
43 |
|
---|
44 | long nparm;
|
---|
45 |
|
---|
46 | double frc;
|
---|
47 | double nsig;
|
---|
48 | int npass;
|
---|
49 |
|
---|
50 | double sigma;
|
---|
51 | };
|
---|
52 |
|
---|
53 | class PolFitClip2 {
|
---|
54 | public:
|
---|
55 | PolFitClip2(long ndatamax, long degpol);
|
---|
56 | ~PolFitClip2();
|
---|
57 |
|
---|
58 | void setData(double const* x, double const* y, double const* z, long n);
|
---|
59 | void addData(double xx, double yy, double zz);
|
---|
60 | void clear();
|
---|
61 | void setClip(double frcY, double frcZ, double nsig, int npass);
|
---|
62 |
|
---|
63 | int doFit(double* coefY=NULL, double* coefZ=NULL);
|
---|
64 | int doFit1();
|
---|
65 |
|
---|
66 | double valueY(double x);
|
---|
67 | double valueZ(double x);
|
---|
68 |
|
---|
69 | long getNData();
|
---|
70 | long getNDataUsed();
|
---|
71 | double getXMin();
|
---|
72 | double getXMax();
|
---|
73 |
|
---|
74 | double getChi2Y();
|
---|
75 | double getChi2Z();
|
---|
76 | double getCovY(int i, int j);
|
---|
77 | double getCovZ(int i, int j);
|
---|
78 | double getSigmaY();
|
---|
79 | double getSigmaZ();
|
---|
80 |
|
---|
81 | protected:
|
---|
82 | double* x;
|
---|
83 | double* ySort;
|
---|
84 | double* y;
|
---|
85 | double* zSort;
|
---|
86 | double* z;
|
---|
87 | double* sig;
|
---|
88 | double* aY;
|
---|
89 | double* aZ;
|
---|
90 | int* ia;
|
---|
91 | double** covY;
|
---|
92 | double** covZ;
|
---|
93 | long ndata;
|
---|
94 | long ndataused;
|
---|
95 | long ndatamax;
|
---|
96 | double chi2Y;
|
---|
97 | double chi2Z;
|
---|
98 |
|
---|
99 | long nparm;
|
---|
100 |
|
---|
101 | double frcY;
|
---|
102 | double frcZ;
|
---|
103 | double nsig;
|
---|
104 | int npass;
|
---|
105 |
|
---|
106 | double sigmaY;
|
---|
107 | double sigmaZ;
|
---|
108 | };
|
---|
109 |
|
---|
110 |
|
---|
111 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.