NotAKnotCubicSplineInterpolator1D extends PiecewisePolynomialInterpolator1D { @Override public Interpolator1DDataBundle getDataBundle(final double[] x, final double[] y, final double leftCond, final double rightCond) { throw new IllegalArgumentException("No degrees of freedom at endpoints for this interpolation method"); } NotAKnotCubicSplineInterpolator1D(); @Override Interpolator1DDataBundle getDataBundle(final double[] x, final double[] y, final double leftCond, final double rightCond); @Override Interpolator1DDataBundle getDataBundleFromSortedArrays(final double[] x, final double[] y, final double leftCond, final double rightCond);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void boundaryConditionTest() { final double[] xValues = new double[] {0., 1., 2., 3., }; final double[] yValues = new double[] {0., 1., 2., 3., }; INTERP1D.getDataBundle(xValues, yValues, 0., 0.); }