44 for (i = 0; i < data[0].GetVectorLength(); i++) {
45 aBuffer->SetInterpolationManager(data[0].GetInterpolationManager());
46 aBuffer->SetData(i, data[0].
GetX(i), data[0].
GetY(i));
50 for (i = 0; i < nData; i++) {
59 for (
G4int ii = 0; ii < data[i].GetVectorLength(); ii++) {
60 x1 = data[i - 1].GetX(std::min(i1, data[i - 1].GetVectorLength() - 1));
61 x2 = data[i].GetX(ii);
62 if (x1 < x2 && i1 < data[i - 1].GetVectorLength()) {
63 y1 = data[i - 1].GetY(i1);
64 y2 = data[i].GetY(x1);
66 y = theInt.Interpolate(theManager.GetScheme(i), e1, E1, E2, y1, y2);
71 aBuffer->SetData(ib, x1, y);
72 aBuffer->SetScheme(ib++, data[i - 1].GetScheme(i1));
74 if (x2 - x1 > 0.001 * x1) {
79 y1 = data[i - 1].GetY(x2);
80 y2 = data[i].GetY(ii);
82 y = theInt.Interpolate(theManager.GetScheme(i), e1, E1, E2, y1, y2);
87 aBuffer->SetData(ib, x2, y);
88 aBuffer->SetScheme(ib++, data[i].GetScheme(ii));
89 if (x1 - x2 < 0.001 * x2) i1++;
98 for (i = 0; i < nData; i++) {
110 else if (i == nData) {
112 theBuff.
SetX(i,
GetX(nData - 1, i));
113 theBuff.
SetY(i,
GetY(nData - 1, i));
119 G4int high = low + 1;
121 G4int i1 = 0, i2 = 0, ii = 0;
130 theBuff.
SetY(ii, theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, y1,
132 theBuff.
SetScheme(ii, data[low].GetScheme(i1));
133 if (std::abs(
GetX(low, i1) -
GetX(high, i2)) < 0.001) i2++;
146 theBuff.
SetY(ii, theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, y1,
148 theBuff.
SetScheme(ii, data[high].GetScheme(i2));
149 if (std::abs(
GetX(low, i1) -
GetX(high, i2)) < 0.001) i1++;
G4int GetNEntries(G4int i)
G4double Sample(G4double x)
G4double GetY(G4int i, G4int j)
void SetY(G4int i, G4double x)
void SetX(G4int i, G4double e)
void SetScheme(G4int aPoint, const G4InterpolationScheme &aScheme)
void SetInterpolationManager(const G4InterpolationManager &aManager)