MFFM FFTw Wrapper
Main Page
Classes
Files
Examples
File List
realFFT.H
1
/* Copyright 2001,2002 Matt Flax <flatmax@ieee.org>
2
This file is part of the MFFM FFTw Wrapper library.
3
4
MFFM MFFM FFTw Wrapper library is free software; you can
5
redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
MFFM FFTw Wrapper library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You have received a copy of the GNU General Public License
16
along with the MFFM FFTw Wrapper library
17
*/
18
#ifndef REALFFT_H_
19
#define REALFFT_H_
20
21
#include "realFFTData.H"
22
#include <fftw3.h>
23
24
#include <iostream>
25
using namespace
std;
26
27
class
realFFTData
;
28
29
#define PLANTYPE FFTW_ESTIMATE
30
31
///class realFFT controls fftw plans and executes fwd/inv transforms
32
class
realFFT
{
33
/// The fwd/inv plans
34
fftw_plan fwdPlan, invPlan;
35
36
/// Method to create the plans
37
void
createPlan(
void
);
38
/// Method to destroy the plans
39
void
destroyPlan(
void
);
40
protected
:
41
/// The pointer to the relevant data
42
realFFTData
*
data
;
43
public
:
44
/// fft init ... don't forget to associate data using switchData
45
realFFT
(
void
);
46
/// fft init ... data pointed to by 'd'
47
realFFT
(
realFFTData
*d);
48
/// fft deconstructor
49
~
realFFT
(
void
);
50
51
/// Use this to change associated fft data (for fft'ing)
52
void
switchData(
realFFTData
*d);
53
54
/// Forward transform the data (in to out)
55
void
fwdTransform();
// Forward fft
56
/// Inverse transform the data (out to in)
57
void
invTransform();
// Inverse fft
58
};
59
/** \example realFFTExample.cc
60
* This is an example of how to use the class.
61
* It transforms a sine tone stored in the .dat file and saves the
62
* in, out, and power_spectrum results of using the class
63
*/
64
#endif // REALFFT_H_
Generated on Sat Mar 15 2014 14:19:51 for MFFM FFTw Wrapper by
1.8.1.2