64 fSecondDerivative(new
G4double[number]),
69 const G4double maxDerivative = 0.99e30 ;
77 if(pFirstDerStart > maxDerivative)
93 for(i=1;i<fNumber-1;i++)
102 if(pFirstDerFinish > maxDerivative)
151 G4double mult=0.0, difi=0.0, deltaLow=0.0, deltaUp=0.0,
cd=0.0,
y=0.0 ;
169 for(i=0;i<fNumber-j;i++)
174 mult = deltaLow - deltaUp ;
177 G4Exception(
"G4DataInterpolation::PolynomInterpolation()",
181 d[i] = deltaUp*mult ;
182 c[i] = deltaLow*mult ;
184 y += (deltaY = (2*
k < (fNumber - j -1) ? c[
k+1] : d[
k--] )) ;
210 tempArgument[i] = cof[i] = 0.0 ;
212 tempArgument[fNumber-1] = -
fArgument[0] ;
216 for(j=fNumber-1-i;j<fNumber-1;j++)
218 tempArgument[j] -=
fArgument[i]*tempArgument[j+1] ;
220 tempArgument[fNumber-1] -=
fArgument[i] ;
225 for(j=fNumber-1;j>=1;j--)
227 factor = j*tempArgument[j] + factor*
fArgument[i] ;
231 for(j=fNumber-1;j>=0;j--)
233 cof[j] += mult*reducedY ;
234 mult = tempArgument[j] + mult*
fArgument[i] ;
237 delete[] tempArgument ;
252 const G4double tolerance = 1.6e-24 ;
253 G4double mult=0.0, difi=0.0,
cd=0.0,
y=0.0, cof=0.0 ;
279 for(i=0;i<fNumber-j;i++)
284 mult = cof - c[i+1] ;
287 G4Exception(
"G4DataInterpolation::RationalPolInterpolation()",
294 y += (deltaY = (2*
k < (fNumber - j - 1) ? c[
k+1] : d[
k--] )) ;
317 while((kHigh - kLow) > 1)
319 k = (kHigh + kLow) >> 1 ;
330 if (!(deltaHL != 0.0))
332 G4Exception(
"G4DataInterpolation::CubicSplineInterpolation()",
335 G4double a = (fArgument[kHigh] - pX)/deltaHL ;
336 G4double b = (pX - fArgument[kLow])/deltaHL ;
358 G4Exception(
"G4DataInterpolation::FastCubicSpline()",
361 G4double a = (fArgument[index+1] - pX)/delta ;
362 G4double b = (pX - fArgument[index])/delta ;
381 while((kHigh - kLow) > 1)
383 k = (kHigh + kLow) >> 1 ;
416 G4int kHigh=0,
k=0, Increment=0 ;
419 if(index < 0 || index >
fNumber-1)
435 while((pX >=
fArgument[kHigh]) == ascend)
438 Increment += Increment ;
439 kHigh = index + Increment ;
459 if(Increment >= kHigh)
466 index = kHigh - Increment ;
473 while((kHigh - index) != 1)
475 k = (kHigh + index) >> 1 ;