Changeset 8522 for trunk/MagicSoft/Mars/mextralgo
- Timestamp:
- 05/16/07 16:30:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h
r8354 r8522 59 59 } 60 60 61 /*62 inline Float_t EvalAt(const Float_t x) const63 {64 Int_t i = TMath::FloorNint(x);65 66 // handle under- and overflow of the array-range by extrapolation67 if (i<0)68 i=0;69 if (i>fNum-2)70 i = fNum-2;71 72 return Eval(i, x-i);73 }74 */75 76 61 // Evaluate first derivative of spline in the interval i with x=[0;1[ 77 62 inline Double_t EvalDeriv1(const Float_t x, const Int_t i) const … … 184 169 inline Double_t EvalInteg(Int_t i, Float_t a=0, Float_t b=1) const 185 170 { 186 // This is to make sure that we never access invalid187 // memory, even if this should never happen.188 // If it happens anyhow we extraolate the spline189 Align(i, a);190 Align(i, b);191 192 171 return EvalPrimitive(i, b)-EvalPrimitive(i, a); 193 172 } … … 471 450 Float_t ExtractNoise(/*Int_t iter*/); 472 451 void Extract(Byte_t sat, Int_t maxpos, Bool_t width=kFALSE); 452 453 Float_t EvalAt(const Float_t x) const; 473 454 }; 474 455 456 inline Float_t MExtralgoSpline::EvalAt(const Float_t x) const 457 { 458 Int_t i = TMath::FloorNint(x); 459 Float_t f = x-i; 460 461 Align(i, f); 462 463 return Eval(i, f); 464 } 465 475 466 #endif
Note:
See TracChangeset
for help on using the changeset viewer.