46 SetNameTitle( title, title );
69 if (ibin < 0 ) ibin = 0;
70 if (ibin >= fGraph->GetN()) ibin = fGraph->GetN() - 1;
77 fGraph->GetX()[ibin] + dx,
78 fGraph->GetX()[ibin+1] + dx,
79 fGraph->GetX()[ibin+2] + dx,
81 fGraph->GetY()[ibin+1],
82 fGraph->GetY()[ibin+2]);
85 else if (ibin >= (fGraph->GetN()-2)) {
86 ibin = fGraph->GetN() - 1;
89 fGraph->GetX()[ibin-2] + dx,
90 fGraph->GetX()[ibin-1] + dx,
91 fGraph->GetX()[ibin] + dx,
92 fGraph->GetY()[ibin-2],
93 fGraph->GetY()[ibin-1],
94 fGraph->GetY()[ibin]);
98 retval = ( Quadrax( x,
99 fGraph->GetX()[ibin-1] + dx,
100 fGraph->GetX()[ibin] + dx,
101 fGraph->GetX()[ibin+1] + dx,
102 fGraph->GetY()[ibin-1],
103 fGraph->GetY()[ibin],
104 fGraph->GetY()[ibin+1])
106 Quadrax( x, fGraph->GetX()[ibin] + dx,
107 fGraph->GetX()[ibin+1] + dx,
108 fGraph->GetX()[ibin+2] + dx,
109 fGraph->GetY()[ibin],
110 fGraph->GetY()[ibin+1],
111 fGraph->GetY()[ibin+2]) )*0.5;
141 Float_t a = cos1*(dm2-dm3) + cos2*(dm3-dm1) + cos3*(dm1-dm2);
142 Float_t b = cos1*(dm2*dm2-dm3*dm3) + cos2*(dm3*dm3-dm1*dm1) + cos3*(dm1*dm1-dm2*dm2);
143 Float_t c = cos1*(dm2-dm3)*dm2*dm3 + cos2*(dm3-dm1)*dm3*dm1 + cos3*(dm1-dm2)*dm1*dm2;
145 Float_t denom = (dm2-dm3)*(dm3-dm1)*(dm1-dm2);
147 return (denom != 0.0) ? (-a*dm*dm+b*dm-
c)/denom : 0.0;
virtual void BuildCoeff(void)
no coefficients to precompute
virtual void GetKnot(Int_t i, Double_t &x, Double_t &y) const
no knots
virtual Double_t Eval(Double_t x) const
returns quadratically interpolated TGraph entry around x
virtual ~TSpline2(void)
destructor
Double_t Quadrax(Float_t dm, Float_t dm1, Float_t dm2, Float_t dm3, Float_t cos1, Float_t cos2, Float_t cos3) const
quadratic interpolation Revised and checked by Francois Nov, 16th, 2000 Note the beautiful non-sponta...
Abstract ClassifierFactory template that handles arbitrary types.
ClassImp(TMVA::TSpline2) TMVA
constructor from TGraph TSpline is a TNamed object
A Graph is a graphics object made of two arrays X and Y with npoints each.
Long64_t BinarySearch(Long64_t n, const T *array, T value)