statistics-0.10.2.0: A library of statistical types, data, and functions

Portability | portable
Stability | experimental
Maintainer | bos@serpentine.com
Safe Haskell | None

Statistics.Transform

Contents

- Type synonyms
- Discrete cosine transform
- Fast Fourier transform

Description

Fourier-related transformations of mathematical functions.

These functions are written for simplicity and correctness, not speed. If you need a fast FFT implementation for your application, you should strongly consider using a library of FFTW bindings instead.

Synopsis

- type CD = Complex Double
- dct :: Vector Double -> Vector Double
- dct_ :: Vector CD -> Vector Double
- idct :: Vector Double -> Vector Double
- idct_ :: Vector CD -> Vector Double
- fft :: Vector CD -> Vector CD
- ifft :: Vector CD -> Vector CD

# Type synonyms

type CD = Complex Double Source

# Discrete cosine transform

dct :: Vector Double -> Vector Double Source

Discrete cosine transform (DCT-II).

dct_ :: Vector CD -> Vector Double Source

Discrete cosine transform (DCT-II). Only real part of vector is transformed, imaginary part is ignored.

idct :: Vector Double -> Vector Double Source

Inverse discrete cosine transform (DCT-III). It's inverse of `dct` only up to scale parameter:

     (idct . dct) x = (* lenngth x)

idct_ :: Vector CD -> Vector Double Source

Inverse discrete cosine transform (DCT-III). Only real part of vector is transformed, imaginary part is ignored.

# Fast Fourier transform

fft :: Vector CD -> Vector CD Source

Radix-2 decimation-in-time fast Fourier transform.

ifft :: Vector CD -> Vector CD Source

Inverse fast Fourier transform.