/** Performs an inverse 1D Fast Hartley Transform (FHT) of an array */ public void inverseTransform1D(float[] fht) { int n = fht.length; if (S==null || n!=maxN) { if (!isPowerOf2(n)) throw new IllegalArgumentException("Not power of 2 length: "+n); initializeTables(n); } dfht3(fht, 0, true, n); }
/** Performs an inverse 1D Fast Hartley Transform (FHT) of an array */ public void inverseTransform1D(float[] fht) { int n = fht.length; if (S==null || n!=maxN) { if (!isPowerOf2(n)) throw new IllegalArgumentException("Not power of 2 length: "+n); initializeTables(n); } dfht3(fht, 0, true, n); }
/** Performs an optimized 1D Fast Hartley Transform (FHT) of an array. * Array size must be a power of 2. * Note that all amplitudes in the output 'x' are multiplied by the array length. * Therefore, to get the power spectrum, for 1 <=i < N/2, use * ps[i] = (x[i]*x[i]+x[maxN-i]*x[maxN-i])/(maxN*maxN), where maxN is the array length. * To get the real part of the complex FFT, for i=0 use x[0]/maxN, * and for i>0, use (x[i]+x[maxN-i])/(2*maxN). * The imaginary part of the complex FFT, with i>0, is given by (x[i]-x[maxN-i])/(2*maxN) * The coefficients of cosine and sine are like the real and imaginary values above, * but you have to divide by maxN instead of 2*maxN. */ public void transform1D(float[] x) { int n = x.length; if (S==null || n!=maxN) { if (!isPowerOf2(n)) throw new IllegalArgumentException("Not power of 2 length: "+n); initializeTables(n); } dfht3(x, 0, false, n); }
/** Performs an optimized 1D Fast Hartley Transform (FHT) of an array. * Array size must be a power of 2. * Note that all amplitudes in the output 'x' are multiplied by the array length. * Therefore, to get the power spectrum, for 1 <=i < N/2, use * ps[i] = (x[i]*x[i]+x[maxN-i]*x[maxN-i])/(maxN*maxN), where maxN is the array length. * To get the real part of the complex FFT, for i=0 use x[0]/maxN, * and for i>0, use (x[i]+x[maxN-i])/(2*maxN). * The imaginary part of the complex FFT, with i>0, is given by (x[i]-x[maxN-i])/(2*maxN) * The coefficients of cosine and sine are like the real and imaginary values above, * but you have to divide by maxN instead of 2*maxN. */ public void transform1D(float[] x) { int n = x.length; if (S==null || n!=maxN) { if (!isPowerOf2(n)) throw new IllegalArgumentException("Not power of 2 length: "+n); initializeTables(n); } dfht3(x, 0, false, n); }