Closed simonster closed 10 years ago
That's not quite right: you have to apply the column-wise FFT n
times, and the row-wise one m
times, so the total complexity ends up being
O(n*m*log(m) + m*n*log(n)) = O(m*n*(log(m) + log(n)))
which is exactly the same as the 2D form. As I understand it, the 2D FFT is actually obtained by just applying the 1D FFTs each way.
I think that any improved performance possible here is likely to be from using in-place FFTs.
Yes, you are correct; I'm not sure what I was thinking.
There may still be some performance to be gained by computing the characteristic functions once for the rows and once for the columns, instead of for each data point.
That's true. I was more focusing on functionality rather than optimising performance at the moment (especially since the FFT interface is still under debate), but if you want to look at it I'm more than happy to incorporate any improvements.
Since we are convolving with a product distribution, the 2D convolution is separable. This approach has complexity
O(m*log(m)+n*log(n))
whereas the 2D FFT has complexityO(m*n*(log(m)+log(n)))
.