next up previous
Next: Storage: What Goes Where Up: Using FFTEASY Previous: Overview of the Functions

Using FFTEASY in Your Program

The simplest way to incorporate FFTEASY into your program is to compile and link the file ffteasy.c containing all of the FFTEASY functions into your program. Then all you will need to do is include declarations of the FFTEASY functions you wish to call. The declarations are collected for convenience at the top of the file ffteasy.c, from which you can paste them directly into your program.

If you want you can instead copy the FFTEASY functions out of the file ffteasy.c and include them directly in your code. If you do so please remember to include the credits/legal paragraph along with the code. Also, you will need to take account of the following dependencies:

  1. All of the functions use the struct complex, which simply consists of two floats called $real$ and $imag$ respectively. The declaration of this struct is at the top of the ffteasy.c file.
  2. The function fftc1 works by itself.
  3. The functions fftcn and fftr1 both call fftc1, so if either of them are included in your code fftc1 must be included as well.
  4. The function fftrn calls the function fftcn.

When calling the FFTEASY functions bear in mind that they all take an array of numbers and replace it with its Fourier transform. In other words the transform is done ``in place,'' overwriting the original data. If you want to keep your original data you can: a) make a copy of it before doing the transform, or b) use FFTEASY to do the inverse transform when you're done, thus restoring your original data up to small numerical errors.


next up previous
Next: Storage: What Goes Where Up: Using FFTEASY Previous: Overview of the Functions

Go to The FFTEASY Home Page
Go to Gary Felder's Home Page
Send email to Gary at gfelder@email.smith.edu

This documentation was generated on 2003-09-30