Skip to content
/ dft Public

A quick and dirty implementation of Discrete Fourier transform (DFT) in Haskell. Tested on Polynomial Multiplication.

License

Notifications You must be signed in to change notification settings

gboduljak/dft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📉 Discrete Fourier Transform (DFT)

Implementation

A quick and dirty implementation of Discrete Fourier transform (DFT) in Haskell. The algorithm is implemented using the simplified version of Cooley–Tukey FFT algorithm. The implementation is here.

Testing

DFT, Inverse DFT and underlying FFT algorithm are tested by simply checking whether the composition of inverse dft and dft produces the same result as the provided input. The test implementation is here. Polynomial Multiplication Algorithm was also used to test underlying DFT algorithm here.

Application to O(n log n) Polynomial Multiplication

DFT algorithm can be conveniently applied to polynomial multiplication. The result is O(n log n) polynomial multiplication algorithm. The implementation is here. This application was also used to test the FFT implementation, and test cases are here.

Build & Dependencies

In order to build dft from the source, you will need a Haskell stack.

Build:

  1. Clone the project
  2. Run stack build in the root of the repository
    • This should automatically pull dependencies, compile and build

Run in interactive mode: Run stack ghci in the app folder of the repository

Test: Run stack test in the root of the repository

About

A quick and dirty implementation of Discrete Fourier transform (DFT) in Haskell. Tested on Polynomial Multiplication.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published