Back in 2003 we kicked FFT around in the Forum & ended up with
cube =: $~ 2: >. #:@-:@#
roots=: ^@(0j2p1&%)@* ^ i...@-:@]
floop=: 4 : 'for_r. i.#$x do. (y=.{."1 y) ] x=.(+/x) ,&,:"r (-/x)*y end.'
fft =: ] ,@floop&cube 1&ro...@#
ift =: # %~ ] ,@floop&cube _1&ro...@#
Not as fast as FFTW.
Henry Rich
John Randall wrote:
> Michel Dumontier wrote:
>> I have used Huffman compression in J using
>> http://www.jsoftware.com/jwiki/Essays/Huffman%20Coding
>> It works very well. But nothing to do with FHT that transforms time in
>> frequency. (in real numbers not like FFT that gives complex numbers).
>> There is nothing on JWiki Essays on FFT or FHT or other time<=> frequency
>> transforms. (FHT=Fast Hartley Transform which is faster than FFT).
>> Could somebody provide me such algorithms in APL or/and J ?
>> Is there a faster transform than the Hartley's one?
>>
>
> FFTW is provided as a J add-on (Windows only).
>
> It is common wisdom that writing your own FFT is difficult. You can
> do a slow (linear algebra) DFT along the lines suggested in
>
> http://www.jsoftware.com/jwiki/JohnRandall/FourierTransformAndPolynomialMultiplication
>
> Using a specialized form of the FFT may be better than using the
> Hartley transformation, simply because the FFT has received more
> attention. I doubt there is anything asymptotically faster.
>
> If you are interested in the DCT for image compression, I suggest you
> look at JPEG compression: DCT is the algorithm that is used.
>
> Best wishes,
>
> John
>
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm