(int n)
| 221 | |
| 222 | /* Find the log2(n) */ |
| 223 | public static int findLog2(int n) { |
| 224 | int log2n = 0; |
| 225 | while ((1 << log2n) < n) { |
| 226 | log2n++; |
| 227 | } |
| 228 | return log2n; |
| 229 | } |
| 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) { |