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

Copyright | (c) 2011 Bryan O'Sullivan
License | BSD3
Maintainer | bos@serpentine.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

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 v CD, Vector v Double, Vector v Int) => v Double -> v Double
- dct_ :: (Vector v CD, Vector v Double, Vector v Int) => v CD -> v Double
- idct :: (Vector v CD, Vector v Double) => v Double -> v Double
- idct_ :: (Vector v CD, Vector v Double) => v CD -> v Double
- fft :: Vector v CD => v CD -> v CD
- ifft :: Vector v CD => v CD -> v CD

# Type synonyms

type CD = Complex Double #

# Discrete cosine transform

dct :: (Vector v CD, Vector v Double, Vector v Int) => v Double -> v Double #

Discrete cosine transform (DCT-II).

dct_ :: (Vector v CD, Vector v Double, Vector v Int) => v CD -> v Double #

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

idct :: (Vector v CD, Vector v Double) => v Double -> v Double #

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

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

idct_ :: (Vector v CD, Vector v Double) => v CD -> v Double #

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

# Fast Fourier transform

fft :: Vector v CD => v CD -> v CD #

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

ifft :: Vector v CD => v CD -> v CD #

Inverse fast Fourier transform.