annotate src/fftw-3.3.3/doc/html/More-DFTs-of-Real-Data.html @ 95:89f5e221ed7b

Add FFTW3
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
rev   line source
cannam@95 1 <html lang="en">
cannam@95 2 <head>
cannam@95 3 <title>More DFTs of Real Data - FFTW 3.3.3</title>
cannam@95 4 <meta http-equiv="Content-Type" content="text/html">
cannam@95 5 <meta name="description" content="FFTW 3.3.3">
cannam@95 6 <meta name="generator" content="makeinfo 4.13">
cannam@95 7 <link title="Top" rel="start" href="index.html#Top">
cannam@95 8 <link rel="up" href="Tutorial.html#Tutorial" title="Tutorial">
cannam@95 9 <link rel="prev" href="Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data" title="Multi-Dimensional DFTs of Real Data">
cannam@95 10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
cannam@95 11 <!--
cannam@95 12 This manual is for FFTW
cannam@95 13 (version 3.3.3, 25 November 2012).
cannam@95 14
cannam@95 15 Copyright (C) 2003 Matteo Frigo.
cannam@95 16
cannam@95 17 Copyright (C) 2003 Massachusetts Institute of Technology.
cannam@95 18
cannam@95 19 Permission is granted to make and distribute verbatim copies of
cannam@95 20 this manual provided the copyright notice and this permission
cannam@95 21 notice are preserved on all copies.
cannam@95 22
cannam@95 23 Permission is granted to copy and distribute modified versions of
cannam@95 24 this manual under the conditions for verbatim copying, provided
cannam@95 25 that the entire resulting derived work is distributed under the
cannam@95 26 terms of a permission notice identical to this one.
cannam@95 27
cannam@95 28 Permission is granted to copy and distribute translations of this
cannam@95 29 manual into another language, under the above conditions for
cannam@95 30 modified versions, except that this permission notice may be
cannam@95 31 stated in a translation approved by the Free Software Foundation.
cannam@95 32 -->
cannam@95 33 <meta http-equiv="Content-Style-Type" content="text/css">
cannam@95 34 <style type="text/css"><!--
cannam@95 35 pre.display { font-family:inherit }
cannam@95 36 pre.format { font-family:inherit }
cannam@95 37 pre.smalldisplay { font-family:inherit; font-size:smaller }
cannam@95 38 pre.smallformat { font-family:inherit; font-size:smaller }
cannam@95 39 pre.smallexample { font-size:smaller }
cannam@95 40 pre.smalllisp { font-size:smaller }
cannam@95 41 span.sc { font-variant:small-caps }
cannam@95 42 span.roman { font-family:serif; font-weight:normal; }
cannam@95 43 span.sansserif { font-family:sans-serif; font-weight:normal; }
cannam@95 44 --></style>
cannam@95 45 </head>
cannam@95 46 <body>
cannam@95 47 <div class="node">
cannam@95 48 <a name="More-DFTs-of-Real-Data"></a>
cannam@95 49 <p>
cannam@95 50 Previous:&nbsp;<a rel="previous" accesskey="p" href="Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data">Multi-Dimensional DFTs of Real Data</a>,
cannam@95 51 Up:&nbsp;<a rel="up" accesskey="u" href="Tutorial.html#Tutorial">Tutorial</a>
cannam@95 52 <hr>
cannam@95 53 </div>
cannam@95 54
cannam@95 55 <h3 class="section">2.5 More DFTs of Real Data</h3>
cannam@95 56
cannam@95 57 <ul class="menu">
cannam@95 58 <li><a accesskey="1" href="The-Halfcomplex_002dformat-DFT.html#The-Halfcomplex_002dformat-DFT">The Halfcomplex-format DFT</a>
cannam@95 59 <li><a accesskey="2" href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029">Real even/odd DFTs (cosine/sine transforms)</a>
cannam@95 60 <li><a accesskey="3" href="The-Discrete-Hartley-Transform.html#The-Discrete-Hartley-Transform">The Discrete Hartley Transform</a>
cannam@95 61 </ul>
cannam@95 62
cannam@95 63 <p>FFTW supports several other transform types via a unified <dfn>r2r</dfn>
cannam@95 64 (real-to-real) interface,
cannam@95 65 <a name="index-r2r-65"></a>so called because it takes a real (<code>double</code>) array and outputs a
cannam@95 66 real array of the same size. These r2r transforms currently fall into
cannam@95 67 three categories: DFTs of real input and complex-Hermitian output in
cannam@95 68 halfcomplex format, DFTs of real input with even/odd symmetry
cannam@95 69 (a.k.a. discrete cosine/sine transforms, DCTs/DSTs), and discrete
cannam@95 70 Hartley transforms (DHTs), all described in more detail by the
cannam@95 71 following sections.
cannam@95 72
cannam@95 73 <p>The r2r transforms follow the by now familiar interface of creating an
cannam@95 74 <code>fftw_plan</code>, executing it with <code>fftw_execute(plan)</code>, and
cannam@95 75 destroying it with <code>fftw_destroy_plan(plan)</code>. Furthermore, all
cannam@95 76 r2r transforms share the same planner interface:
cannam@95 77
cannam@95 78 <pre class="example"> fftw_plan fftw_plan_r2r_1d(int n, double *in, double *out,
cannam@95 79 fftw_r2r_kind kind, unsigned flags);
cannam@95 80 fftw_plan fftw_plan_r2r_2d(int n0, int n1, double *in, double *out,
cannam@95 81 fftw_r2r_kind kind0, fftw_r2r_kind kind1,
cannam@95 82 unsigned flags);
cannam@95 83 fftw_plan fftw_plan_r2r_3d(int n0, int n1, int n2,
cannam@95 84 double *in, double *out,
cannam@95 85 fftw_r2r_kind kind0,
cannam@95 86 fftw_r2r_kind kind1,
cannam@95 87 fftw_r2r_kind kind2,
cannam@95 88 unsigned flags);
cannam@95 89 fftw_plan fftw_plan_r2r(int rank, const int *n, double *in, double *out,
cannam@95 90 const fftw_r2r_kind *kind, unsigned flags);
cannam@95 91 </pre>
cannam@95 92 <p><a name="index-fftw_005fplan_005fr2r_005f1d-66"></a><a name="index-fftw_005fplan_005fr2r_005f2d-67"></a><a name="index-fftw_005fplan_005fr2r_005f3d-68"></a><a name="index-fftw_005fplan_005fr2r-69"></a>
cannam@95 93 Just as for the complex DFT, these plan 1d/2d/3d/multi-dimensional
cannam@95 94 transforms for contiguous arrays in row-major order, transforming (real)
cannam@95 95 input to output of the same size, where <code>n</code> specifies the
cannam@95 96 <em>physical</em> dimensions of the arrays. All positive <code>n</code> are
cannam@95 97 supported (with the exception of <code>n=1</code> for the <code>FFTW_REDFT00</code>
cannam@95 98 kind, noted in the real-even subsection below); products of small
cannam@95 99 factors are most efficient (factorizing <code>n-1</code> and <code>n+1</code> for
cannam@95 100 <code>FFTW_REDFT00</code> and <code>FFTW_RODFT00</code> kinds, described below), but
cannam@95 101 an <i>O</i>(<i>n</i>&nbsp;log&nbsp;<i>n</i>) algorithm is used even for prime sizes.
cannam@95 102
cannam@95 103 <p>Each dimension has a <dfn>kind</dfn> parameter, of type
cannam@95 104 <code>fftw_r2r_kind</code>, specifying the kind of r2r transform to be used
cannam@95 105 for that dimension.
cannam@95 106 <a name="index-kind-_0028r2r_0029-70"></a><a name="index-fftw_005fr2r_005fkind-71"></a>(In the case of <code>fftw_plan_r2r</code>, this is an array <code>kind[rank]</code>
cannam@95 107 where <code>kind[i]</code> is the transform kind for the dimension
cannam@95 108 <code>n[i]</code>.) The kind can be one of a set of predefined constants,
cannam@95 109 defined in the following subsections.
cannam@95 110
cannam@95 111 <p>In other words, FFTW computes the separable product of the specified
cannam@95 112 r2r transforms over each dimension, which can be used e.g. for partial
cannam@95 113 differential equations with mixed boundary conditions. (For some r2r
cannam@95 114 kinds, notably the halfcomplex DFT and the DHT, such a separable
cannam@95 115 product is somewhat problematic in more than one dimension, however,
cannam@95 116 as is described below.)
cannam@95 117
cannam@95 118 <p>In the current version of FFTW, all r2r transforms except for the
cannam@95 119 halfcomplex type are computed via pre- or post-processing of
cannam@95 120 halfcomplex transforms, and they are therefore not as fast as they
cannam@95 121 could be. Since most other general DCT/DST codes employ a similar
cannam@95 122 algorithm, however, FFTW's implementation should provide at least
cannam@95 123 competitive performance.
cannam@95 124
cannam@95 125 <!-- =========> -->
cannam@95 126 </body></html>
cannam@95 127