(int n, int log2n, ArrayList<Complex> x)
| 230 | |
| 231 | /* Swap the values of the signal with bit-reversal method */ |
| 232 | public static ArrayList<Complex> fftBitReversal(int n, int log2n, ArrayList<Complex> x) { |
| 233 | int reverse; |
| 234 | for (int i = 0; i < n; i++) { |
| 235 | reverse = reverseBits(i, log2n); |
| 236 | if (i < reverse) { |
| 237 | Collections.swap(x, i, reverse); |
| 238 | } |
| 239 | } |
| 240 | return x; |
| 241 | } |
| 242 | |
| 243 | /* Divide by n if we want the inverse FFT */ |
| 244 | public static ArrayList<Complex> inverseFFT(int n, boolean inverse, ArrayList<Complex> x) { |
no test coverage detected