JTransformsWrapper { public static ComplexNumber[] fullTransform1DReal(final double[] h) { ArgumentChecker.notEmpty(h, "array of doubles"); final int n = h.length; final double[] a = Arrays.copyOf(h, 2 * n); DoubleFFT_1D fft = CACHE_1D.get(n); if (fft == null) { fft = new DoubleFFT_1D(n); CACHE_1D.put(n, fft); } fft.realForwardFull(a); return unpackFull(a); }  static ComplexNumber[] transform1DComplex(final ComplexNumber[] z); static ComplexNumber[] inverseTransform1DComplex(final ComplexNumber[] z, final boolean scale); static ComplexNumber[] fullTransform1DReal(final double[] h); static ComplexNumber[] fullInverseTransform1DReal(final double[] x, final boolean scale); static ComplexNumber[] transform1DReal(final double[] h); static ComplexNumber[] inverseTransform1DReal(final double[] x, final boolean scale);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNull3() { JTransformsWrapper.fullTransform1DReal(null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testEmpty3() { JTransformsWrapper.fullTransform1DReal(new double[0]); }
@Test public void testGauss2() { final ComplexNumber[] transform = JTransformsWrapper.fullTransform1DReal(G); final int n = transform.length; assertEquals(n, N, 0); final double deltaF = 2 * Math.PI / N / DELTAX; double omega; for (int i = n / 2; i < n; i++) { omega = (i - n) * deltaF; final ComplexNumber scale = ComplexMathUtils.multiply(DELTAX, ComplexMathUtils.exp(new ComplexNumber(0.0, omega * X_MIN))); final ComplexNumber res = ComplexMathUtils.multiply(scale, transform[i]); assertComplexEquals(GAUSS_TRANSFORM.evaluate(new ComplexNumber(omega)), res); } for (int i = 0; i <= n / 2; i++) { omega = i * deltaF; final ComplexNumber scale = ComplexMathUtils.multiply(DELTAX, ComplexMathUtils.exp(new ComplexNumber(0.0, omega * X_MIN))); final ComplexNumber res = ComplexMathUtils.multiply(scale, transform[i]); assertComplexEquals(GAUSS_TRANSFORM.evaluate(new ComplexNumber(omega)), res); } }