throw new MathException("Could not get upper bound: index " + upperBound + " must be less than or equal to " + (n + 1));
}
final double[] x = Arrays.copyOfRange(keys, lowerBound, upperBound);
final double[] y = Arrays.copyOfRange(values, lowerBound, upperBound);
try {
final PolynomialFunctionLagrangeForm lagrange = _interpolator.interpolate(x, y);
return CommonsMathWrapper.unwrap(lagrange).evaluate(value);
} catch (final org.apache.commons.math.MathException e) {
throw new MathException(e);
}
}