| ||||||||

| ||||||||

| ||||||||

Description | ||||||||

This module exposes an interface to FFTW, the Fastest Fourier Transform in the West. These bindings present several levels of interface. All the higher level
functions ( The simplest interface is the one-dimensional transforms. If you supply a multi-dimensional array, these will only transform the first dimension. These functions only take one argument, the array to be transformed. At the next level, we have multi-dimensional transforms where you specify which dimensions to transform in and the array to transform. For instance b = dftRCN [0,2] a is the real to complex transform in dimensions 0 and 2 of the array a is real valued).
The real to real transforms allow different transform kinds in each transformed dimension. For example, b = dftRRN [(0,DHT), (1,REDFT10), (2,RODFT11)] a is a Discrete Hartley Transform in dimension 0, a discrete cosine transform
(DCT-2) in dimension 1, and distrete sine transform (DST-4) in dimension 2
where the array The general interface is similar to the multi-dimensional interface, takes as
its first argument, a bitwise .|. of planning b = dftG DFTBackward (patient .|. destroy_input) [1,2] a is an inverse DFT in dimensions 1 and 2 of the complex array Inverse transforms are typically normalized. The un-normalized inverse
transforms are b = dftCROGU measure [0,1] a is an un-normalized inverse DFT in dimensions 0 and 1 of the complex array
The FFTW library separates transforms into two steps. First you compute a
plan for a given transform, then you execute it. Often the planning stage is
quite time-consuming, but subsequent transforms of the same size and type
will be extremely fast. The planning phase actually computes transforms, so
it overwrites its input array. For many C codes, it is reasonable to re-use
the same arrays to compute a given transform on different data. This is not
a very useful paradigm from Haskell. Fortunately, FFTW caches its plans so
if try to generate a new plan for a transform size which has already been
planned, the planner will return immediately. Unfortunately, it is not
possible to consult the cache, so if a plan is cached, we may use more memory
than is strictly necessary since we must allocate a work array which we
expect to be overwritten during planning. FFTW can export its cached plans
to a string. This is known as wisdom. For high performance work, it is a
good idea to compute plans of the sizes you are interested in, using
aggressive options (i.e. | ||||||||

Synopsis | ||||||||

Data types | ||||||||

| ||||||||

| ||||||||

| ||||||||

| ||||||||

Planner flags | ||||||||

Algorithm restriction flags | ||||||||

| ||||||||

Allows FFTW to overwrite the input array with arbitrary data; this can sometimes allow more efficient algorithms to be employed. Setting this flag implies that two memory allocations will be done, one for
work space, and one for the result. When | ||||||||

| ||||||||

preserveInput specifies that an out-of-place transform must not change
its input array. This is ordinarily the default, except for complex to real
transforms for which destroyInput is the default. In the latter cases,
passing preserveInput will attempt to use algorithms that do not destroy
the input, at the expense of worse performance; for multi-dimensional complex
to real transforms, however, no input-preserving algorithms are implemented
so the Haskell bindings will set destroyInput and do a transform with two
memory allocations.
| ||||||||

Planning rigor flags | ||||||||

| ||||||||

This is the only planner flag for which a single memory allocation is possible. | ||||||||

| ||||||||

measure tells FFTW to find an optimized plan by actually computing
several FFTs and measuring their execution time. Depending on your machine,
this can take some time (often a few seconds). measure is the default
planning option.
| ||||||||

| ||||||||

patient is like measure, but considers a wider range of algorithms and
often produces a more optimal plan (especially for large transforms), but
at the expense of several times longer planning time (especially for large
transforms).
| ||||||||

| ||||||||

exhaustive is like patient but considers an even wider range of
algorithms, including many that we think are unlikely to be fast, to
produce the most optimal plan but with a substantially increased planning
time.
| ||||||||

DFT of complex data | ||||||||

DFT in first dimension only | ||||||||

| ||||||||

1-dimensional complex DFT. | ||||||||

| ||||||||

1-dimensional complex inverse DFT. Inverse of dft.
| ||||||||

Multi-dimensional transforms | ||||||||

| ||||||||

Multi-dimensional forward DFT. | ||||||||

| ||||||||

Multi-dimensional inverse DFT. | ||||||||

General transform | ||||||||

| ||||||||

Normalized general complex DFT | ||||||||

Un-normalized general transform | ||||||||

| ||||||||

Complex to Complex DFT, un-normalized. | ||||||||

DFT of real data | ||||||||

DFT in first dimension only | ||||||||

| ||||||||

1-dimensional real to complex DFT. | ||||||||

| ||||||||

1-dimensional complex to real DFT with logically even dimension. Inverse of dftRC.
| ||||||||

| ||||||||

1-dimensional complex to real DFT with logically odd dimension. Inverse of dftRC.
| ||||||||

Multi-dimensional transforms | ||||||||

| ||||||||

Multi-dimensional forward DFT of real data. | ||||||||

| ||||||||

Multi-dimensional inverse DFT of Hermitian-symmetric data (where only the non-negative frequencies are given). | ||||||||

| ||||||||

Multi-dimensional inverse DFT of Hermitian-symmetric data (where only the non-negative frequencies are given) and the last transformed dimension is logically odd. | ||||||||

General transform | ||||||||

| ||||||||

Real to Complex DFT. | ||||||||

| ||||||||

Normalized general complex to real DFT where the last transformed dimension is logically even. | ||||||||

| ||||||||

Normalized general complex to real DFT where the last transformed dimension is logicall odd. | ||||||||

Un-normalized general transform | ||||||||

| ||||||||

Complex to Real DFT where last transformed dimension is logically even. | ||||||||

| ||||||||

Complex to Real DFT where last transformed dimension is logically odd. | ||||||||

Real to real transforms (all un-normalized) | ||||||||

Transforms in first dimension only | ||||||||

| ||||||||

1-dimensional real to half-complex DFT. | ||||||||

| ||||||||

1-dimensional half-complex to real DFT. Inverse of dftRH after normalization.
| ||||||||

| ||||||||

1-dimensional Discrete Hartley Transform. Self-inverse after normalization. | ||||||||

| ||||||||

1-dimensional Type 1 discrete cosine transform. | ||||||||

| ||||||||

1-dimensional Type 2 discrete cosine transform. This is commonly known as the DCT.
| ||||||||

| ||||||||

1-dimensional Type 3 discrete cosine transform. This is commonly known as the inverse DCT.
| ||||||||

| ||||||||

1-dimensional Type 4 discrete cosine transform. | ||||||||

| ||||||||

1-dimensional Type 1 discrete sine transform. | ||||||||

| ||||||||

1-dimensional Type 2 discrete sine transform. | ||||||||

| ||||||||

1-dimensional Type 3 discrete sine transform. | ||||||||

| ||||||||

1-dimensional Type 4 discrete sine transform. | ||||||||

Multi-dimensional transforms with the same transform type in each dimension | ||||||||

| ||||||||

Multi-dimensional real to half-complex transform. The result is not normalized. | ||||||||

| ||||||||

Multi-dimensional half-complex to real transform. The result is not normalized. | ||||||||

| ||||||||

Multi-dimensional Discrete Hartley Transform. The result is not normalized. | ||||||||

| ||||||||

Multi-dimensional Type 1 discrete cosine transform. | ||||||||

| ||||||||

Multi-dimensional Type 2 discrete cosine transform. This is commonly known
as the DCT.
| ||||||||

| ||||||||

Multi-dimensional Type 3 discrete cosine transform. This is commonly known
as the inverse DCT. The result is not normalized.
| ||||||||

| ||||||||

Multi-dimensional Type 4 discrete cosine transform. | ||||||||

| ||||||||

Multi-dimensional Type 1 discrete sine transform. | ||||||||

| ||||||||

Multi-dimensional Type 2 discrete sine transform. | ||||||||

| ||||||||

Multi-dimensional Type 3 discrete sine transform. | ||||||||

| ||||||||

Multi-dimensional Type 4 discrete sine transform. | ||||||||

Multi-dimensional transforms with possibly different transforms in each dimension | ||||||||

| ||||||||

Multi-dimensional real to real transform. The result is not normalized. | ||||||||

General transforms | ||||||||

| ||||||||

Real to Real transforms. | ||||||||

Wisdom | ||||||||

| ||||||||

Add wisdom to the FFTW cache. Returns True if it is successful.
| ||||||||

| ||||||||

Tries to import wisdom from a global source, typically .
Returns etcfftw/wisdomTrue if it was successful.
| ||||||||

| ||||||||

Queries the FFTW cache. The String can be written to a file so the
wisdom can be reused on a subsequent run.
| ||||||||

Produced by Haddock version 2.4.2 |