FFT Assignment (if you have not already finished it)
Design a class that has the following methods in it:
/**
* fft(input) performs an fft on input and returns the
ArrayList<Complex> which is the fft(input).
* input will first be lengthened with zeros to a power of 2
if it is not already a length which is a
* power of 2 so fft(input) will always return a power of 2
size ArrayList.
*/
public ArrayList<Complex> fft(ArrayList<Complex> input);
/**
* inversefft(input) performs the inverse fft on input and
returns that result. input will first be
* lengthened with zeros to a power of 2 if it is not
already a length which is a power of 2 so
* inversefft(input) will always return a power of 2 size
ArrayList.
*/
public ArrayList<Complex> fft(ArrayList<Complex> input);
/**
* multiplyPolys(poly1,poly2) will return an
ArrayList<Complex> containing the coefficients of the
* polynomial which is the product of poly1 and poly2 which
are polynomials stored as an
* ArrayList<Complex> of their coefficients.
*/
public ArrayList<Complex> multiplyPolys(ArrayList<Complex>
poly1,ArrayList<Complex> poly2);
If you have already turned it in without the last multiplyPolys but you
had a program that did
multiply two polynomials using the FFT's you do not have to write the
last method.
You also need a test program showing how they work.