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++) {
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);
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);
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;
132 theBuff.
SetScheme(ii, data[low].GetScheme(i1));
133 if (std::abs(
GetX(low, i1) -
GetX(high, i2)) < 0.001) i2++;
148 theBuff.
SetScheme(ii, data[high].GetScheme(i2));
149 if (std::abs(
GetX(low, i1) -
GetX(high, i2)) < 0.001) i1++;
G4double Interpolate(G4InterpolationScheme aScheme, G4double x, G4double x1, G4double x2, G4double y1, G4double y2) const
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)
G4double GetY(G4double x)
G4double GetX(G4int i) const
G4int GetVectorLength() const