Method
inverseFFT
(int n, boolean inverse, ArrayList<Complex> x)
Source from the content-addressed store, hash-verified
| 242 | |
| 243 | /* Divide by n if we want the inverse FFT */ |
| 244 | public static ArrayList<Complex> inverseFFT(int n, boolean inverse, ArrayList<Complex> x) { |
| 245 | if (inverse) { |
| 246 | for (int i = 0; i < x.size(); i++) { |
| 247 | Complex z = x.get(i); |
| 248 | x.set(i, z.divide(n)); |
| 249 | } |
| 250 | } |
| 251 | return x; |
| 252 | } |
| 253 | |
| 254 | /** |
| 255 | * This function reverses the bits of a number. It is used in Cooley-Tukey |
Tested by
no test coverage detected