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
(float[] x)
| 170 | * but you have to divide by maxN instead of 2*maxN. |
| 171 | */ |
| 172 | public void transform1D(float[] x) { |
| 173 | int n = x.length; |
| 174 | if (S==null || n!=maxN) { |
| 175 | if (!isPowerOf2(n)) |
| 176 | throw new IllegalArgumentException("Not power of 2 length: "+n); |
| 177 | initializeTables(n); |
| 178 | } |
| 179 | dfht3(x, 0, false, n); |
| 180 | } |
| 181 | |
| 182 | /** Performs an inverse 1D Fast Hartley Transform (FHT) of an array */ |
| 183 | public void inverseTransform1D(float[] fht) { |
no test coverage detected