Changeset 3210
- Timestamp:
- 02/17/04 09:19:15 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/spline.C
r3022 r3210 23 23 24 24 /* User Change */ 25 Byte_t y[]={0x0F,0x10,0x2F,0x7F,0xAA,0x6C,0x14,0x13,0x15,0x18,0x21,0x12,0x11,0x14,0x13};25 const Byte_t y[]={0x0F,0x10,0x2F,0x7F,0xAA,0x6C,0x14,0x13,0x15,0x18,0x21,0x12,0x11,0x14,0x13}; 26 26 /* End user Change */ 27 Byte_t x[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E};27 const Byte_t x[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E}; 28 28 29 29 /*This cast is needed only to show graphically the output. Don' t needed if you -
trunk/MagicSoft/Mars/mtools/MCubicSpline.cc
r3148 r3210 46 46 // 47 47 // 48 MCubicSpline::MCubicSpline( Byte_t *y,Byte_t *x, Bool_t areAllEq,48 MCubicSpline::MCubicSpline(const Byte_t *y, const Byte_t *x, Bool_t areAllEq, 49 49 Int_t n, Double_t begSD, Double_t endSD) 50 50 { … … 57 57 // 58 58 // 59 MCubicSpline::MCubicSpline( Byte_t *y)60 { 61 Byte_t x[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E};59 MCubicSpline::MCubicSpline(const Byte_t *y) 60 { 61 const Byte_t x[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E}; 62 62 Init(y,x,kTRUE,15,0.0,0.0); 63 63 } … … 68 68 // 69 69 // 70 void MCubicSpline::Init( Byte_t *y,Byte_t *x, Bool_t areAllEq,70 void MCubicSpline::Init(const Byte_t *y, const Byte_t *x, Bool_t areAllEq, 71 71 Int_t n, Double_t begSD, Double_t endSD) 72 72 … … 137 137 Double_t MCubicSpline :: Eval(Double_t x) 138 138 { 139 const Int_t n = fCoeff->GetSize() -1;139 const Int_t n = fCoeff->GetSize(); 140 140 for (Int_t i = 0; i < n; i++) 141 141 { … … 177 177 MCubicCoeff *c; 178 178 while ((c=(MCubicCoeff*)Next())) 179 min = TMath::Min(min, c->GetM ax());179 min = TMath::Min(min, c->GetMin()); 180 180 181 181 return min; … … 223 223 while ((c=(MCubicCoeff*)Next())) 224 224 { 225 const Double_t temp = c->GetM ax();225 const Double_t temp = c->GetMin(); 226 226 if (temp >= min) 227 227 continue; … … 231 231 } 232 232 233 return cmin ? cmin->GetAbM ax() : FLT_MAX;233 return cmin ? cmin->GetAbMin() : FLT_MAX; 234 234 } 235 235 -
trunk/MagicSoft/Mars/mtools/MCubicSpline.h
r3148 r3210 17 17 TObjArray *fCoeff; //array of the coefficients 18 18 19 void Init( Byte_t *y,Byte_t *x, Bool_t areAllEq, Int_t n, Double_t begSD, Double_t endSD);19 void Init(const Byte_t *y, const Byte_t *x, Bool_t areAllEq, Int_t n, Double_t begSD, Double_t endSD); 20 20 21 21 public: 22 MCubicSpline( Byte_t *y,Byte_t *x, Bool_t areAllEq, Int_t n, Double_t begSD=0.0, Double_t endSD=0.0);23 MCubicSpline( Byte_t *y);22 MCubicSpline(const Byte_t *y, const Byte_t *x, Bool_t areAllEq, Int_t n, Double_t begSD=0.0, Double_t endSD=0.0); 23 MCubicSpline(const Byte_t *y); 24 24 ~MCubicSpline(); 25 25 Double_t Eval(Double_t x); //Eval the spline at a point x
Note:
See TracChangeset
for help on using the changeset viewer.