spline: actually return something in evalDerivative() in the extrapolate case

once more, thanks to @bska to catching this!
This commit is contained in:
Andreas Lauser
2013-09-26 13:32:20 +02:00
parent fc6503d2e7
commit bbf5a9767a
+3 -4
View File
@@ -829,9 +829,9 @@ public:
assert(extrapolate || applies(x));
if (extrapolate) {
if (x < xMin())
evalDerivative_(xMin(), /*segmentIdx=*/0);
return evalDerivative_(xMin(), /*segmentIdx=*/0);
else if (x > xMax())
evalDerivative_(xMax(), /*segmentIdx=*/numSamples() - 2);
return evalDerivative_(xMax(), /*segmentIdx=*/numSamples() - 2);
}
return evalDerivative_(x, segmentIdx_(x));
@@ -1703,8 +1703,7 @@ protected:
// returns the coefficient in front of the x^1 term. In Stoer this
// is beta.
Scalar c_(int i) const
{ return evalDerivative_(/*x=*/0, i); }
Scalar c_(int i) const { return evalDerivative_(/*x=*/0, i); }
// returns the coefficient in front of the x^0 term. In Stoer this
// is alpha.