Question

I need to compute something of the sort:

Aj,j' = 1/N*sum(k=1,...,N; ei*2*pi/N*j*k * sum(k'=1,...,N; A'k,k' e-i*2*pi/N*j'*k')) (i = imaginary unit)

The most efficient way to do this is by use of FFT along the columns and IFFT along the rows. I am working in C and I use the FFTW package. I'm wondering whether it is possible to create a plan to do both in once, as for 2-D FFTs. The alternative is to do FFT column by column, store the results, and then perform IFFT row by row. I would like to avoid this if there is a possibility.

Greetings

Giorgos

Was it helpful?

Solution 2

I saw the answer quite late, but thanks anyway. I found a way in the meanwhile, but I should check whether it is more efficient than just doing FFT and IFFT in two different dimensions. For the interested, it is the following:

The IFFT is the same as FFT of the inverse of the array, apart from a factor. So:

http://latex.codecogs.com/gif.latex?X_j=\sum_{k=1}^Ne^{i2\pi/Njk}

Is also equal to:

http://latex.codecogs.com/gif.latex?X_j=\frac{e^{i2\pi/Nj}}{N}\sum_{k'=1}^Ne^{-i2\pi/Njk'}x_{N-k'+1}

This can be shown by a change of index k=N-k'+1 (just follow the links for the equation). If it is possible to store the rows in reverse order, then one plan for a 2-D FFT is sufficient for the original question, but then all rows should still be multiplied by a constant.

OTHER TIPS

Not that I know of. You can only do one direction at a time. At best you'll need to allocate three fftw_complex objects and create two plans.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top