MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / inverseFFT

Method inverseFFT

src/main/java/com/thealgorithms/maths/FFT.java:244–252  ·  view source on GitHub ↗
(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

Callers 1

fftMethod · 0.95

Calls 4

divideMethod · 0.95
setMethod · 0.80
sizeMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected