module Numeric.FFT
( fft, ifft, fftWith, ifftWith
, plan, planFromFactors, execute
, Plan (..), Direction (..), BaseTransform (..)
) where
import Prelude hiding (length, map, sum, zipWith)
import Data.Vector
import Data.Complex
import Numeric.FFT.Types
import Numeric.FFT.Plan
import Numeric.FFT.Execute
fft :: Vector (Complex Double) -> IO (Vector (Complex Double))
fft xs = do
p <- plan $ length xs
return $ fftWith p xs
ifft :: Vector (Complex Double) -> IO (Vector (Complex Double))
ifft xs = do
p <- plan $ length xs
return $ ifftWith p xs
fftWith :: Plan -> Vector (Complex Double) -> Vector (Complex Double)
fftWith p = convert . execute p Forward . convert
ifftWith :: Plan -> Vector (Complex Double) -> Vector (Complex Double)
ifftWith p = convert . execute p Inverse . convert