ProductPolynomialExtrapolator1D extends Interpolator1D { @Override public Double interpolate(final Interpolator1DDataBundle data, final Double value) { Validate.notNull(data, "data"); Validate.notNull(value, "value"); ArgumentChecker.isTrue(value < data.firstKey() || value > data.lastKey(), "value was within data range"); Validate.isTrue(data instanceof Interpolator1DPiecewisePoynomialWithExtraKnotsDataBundle); Interpolator1DPiecewisePoynomialWithExtraKnotsDataBundle polyData = (Interpolator1DPiecewisePoynomialWithExtraKnotsDataBundle) data; return _interpolator.interpolate(polyData, value, _func, SMALL); } ProductPolynomialExtrapolator1D(Interpolator1D interpolator);  ProductPolynomialExtrapolator1D(Interpolator1D interpolator, PiecewisePolynomialFunction1D func); @Override Interpolator1DDataBundle getDataBundle(final double[] x, final double[] y); @Override Interpolator1DDataBundle getDataBundleFromSortedArrays(final double[] x, final double[] y); @Override Double interpolate(final Interpolator1DDataBundle data, final Double value); @Override double firstDerivative(final Interpolator1DDataBundle data, final Double value); @Override double[] getNodeSensitivitiesForValue(final Interpolator1DDataBundle data, final Double value);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void nullDataInterpTest() { S_EXTRAP.interpolate(null, 5.0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void nullValueInterpTest() { S_EXTRAP.interpolate(S_DATA, null); }