static { int n = Y_DATA.length; YSTAR_DATA = new double[n]; for (int i = 0; i < n; i++) { YSTAR_DATA[i] = TRANSFORM.transform(Y_DATA[i]); } DATA_BUNDLE = INTERPOLATOR_BASE.getDataBundleFromSortedArrays(X_DATA, Y_DATA); TRANS_DATA_BUNDLE = INTERPOLATOR.getDataBundleFromSortedArrays(X_DATA, YSTAR_DATA); }
@Test public void testDataBundleType2() { assertEquals( INTERPOLATOR .getDataBundleFromSortedArrays(new double[] {1, 2, 3}, new double[] {1, 2, 3}) .getClass(), ArrayInterpolator1DDataBundle.class); }
/** * The node values must be in the transformed space * * @param x The positions of the nodes. <b>These must be in ascending order</b> * @param y The values of the nodes - these must be in the transformed space * @return a data bundle */ @Override public Interpolator1DDataBundle getDataBundleFromSortedArrays( final double[] x, final double[] y) { return _base.getDataBundleFromSortedArrays(x, y); }
@Test public void testDataBundleType2() { assertEquals( INTERPOLATOR.getDataBundleFromSortedArrays(X_DATA, Y_DATA).getClass(), Interpolator1DPiecewisePoynomialDataBundle.class); }