Contents Up << >>

FFTPACK++

VERSION: 1.0

FFT_Pack is a C++ wrapper for FFTPACK complex routines using LAPACK++ Matrix and Vector classes. FFTPACK routines were converted to C using f2c and also modified to use double precision complex using -r8 to f2c.

Most of this code was lifted directly from GNU OCTAVE v1.1.0, hence the copyright notice at the top.

the forward FFT takes you to freq domain (ala direction == -1), and backward the other way.

Passing LaVectorComplex/Double or LaGenMatComplex/Double with one dimension set to 1 will implicitly perform 1D FFT on the data.

The members of the FFT_Pack class are declared static, since they really need no private member storage. There are two types of transform routines: ones that return a new complex matrix and the ones that change the matrix in place. For example:

    LaGenMatComplex cmat;
    // ...
    // initialize cmat.
    // ...

    // the following computes the forward FFT of Matrix cmat and returns
    // a new matrix which then initializes a new matrix cmat2. 
    LaGenMatComplex cmat2 = FFT_Pack::forward(cmat);

    // The following simply overwrites itself by reinitializing with the
    // anonymous matrix returned by FFT_Pack::forward.
    cmat = FFT_Pack::forward(cmat);

    // in-place example. In case of large matrices, it is best to try to
    // optimize memory usage using IP (in-place) routines. Note that you
    // can only use Complex matrices in this case.
    FFT_Pack::forward_IP(cmat);
Prerequites/Installation:

compiler: you'd need a C++ compiler (I've used both cfront 3.0.1 and gcc-2.6.3) on a variety of platforms.

LaMatrix++: You'd need LaMatrix++ class library from LAPACK++. Check out ftp://netlib.att.com/netlib/c++ if you don't have it.

FFTPACK: you can use the f2c'd fftpack routines I've provided with the package, or you can use the original FORTRAN version from netlib.

F2C: If your system does not have F77 compiler environment installed, then you would need libf2c.a (ie., libF77.a + libI77.a), also available from netlib.

LICENSE AND COPYRIGHT:

FFTPACK++ is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

FFTPACK++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file COPYING for more details.

SITE: http://www.xraylith.wisc.edu/ khan/software/fftpack/ AUTHOR: Mumit Khan <khan@xraylith.wisc.edu> Center for X-ray Lithography University of Wisconsin - Madison Voice: 608 265 6075 FAX: 608 265 3811