69 fIn = fftw_malloc(
sizeof(fftw_complex) *
n);
71 fOut = fftw_malloc(
sizeof(fftw_complex) *
n);
111 fftw_destroy_plan((fftw_plan)
fPlan);
113 fftw_free((fftw_complex*)
fIn);
115 fftw_free((fftw_complex*)
fOut);
146 fftw_destroy_plan((fftw_plan)
fPlan);
161 fftw_execute((fftw_plan)
fPlan);
163 Error(
"Transform",
"transform not initialised");
175 data[i] = ((fftw_complex*)
fOut)[i/2][0];
176 data[i+1] = ((fftw_complex*)
fOut)[i/2][1];
180 data[i] = ((fftw_complex*)
fIn)[i/2][0];
181 data[i+1] = ((fftw_complex*)
fIn)[i/2][1];
191 if (
fOut && !fromInput){
192 re = ((fftw_complex*)
fOut)[ipoint][0];
193 im = ((fftw_complex*)
fOut)[ipoint][1];
195 re = ((fftw_complex*)
fIn)[ipoint][0];
196 im = ((fftw_complex*)
fIn)[ipoint][1];
205 Int_t ireal = ipoint[0];
207 ireal=
fN[i+1]*ireal + ipoint[i+1];
209 if (
fOut && !fromInput){
210 re = ((fftw_complex*)
fOut)[ireal][0];
211 im = ((fftw_complex*)
fOut)[ireal][1];
213 re = ((fftw_complex*)
fIn)[ireal][0];
214 im = ((fftw_complex*)
fIn)[ireal][1];
223 if (
fOut && !fromInput){
225 re[i] = ((fftw_complex*)
fOut)[i][0];
226 im[i] = ((fftw_complex*)
fOut)[i][1];
230 re[i] = ((fftw_complex*)
fIn)[i][0];
231 im[i] = ((fftw_complex*)
fIn)[i][1];
241 if (
fOut && !fromInput){
243 data[i] = ((fftw_complex*)
fOut)[i/2][0];
244 data[i+1] = ((fftw_complex*)
fOut)[i/2][1];
248 data[i] = ((fftw_complex*)
fIn)[i/2][0];
249 data[i+1] = ((fftw_complex*)
fIn)[i/2][1];
259 ((fftw_complex*)
fIn)[ipoint][0]=re;
260 ((fftw_complex*)
fIn)[ipoint][1]=im;
268 Int_t ireal = ipoint[0];
270 ireal=
fN[i+1]*ireal + ipoint[i+1];
272 ((fftw_complex*)
fIn)[ireal][0]=re;
273 ((fftw_complex*)
fIn)[ireal][1]=im;
280 ((fftw_complex*)
fIn)[ipoint][0] =
c.Re();
281 ((fftw_complex*)
fIn)[ipoint][1] =
c.Im();
291 ((fftw_complex*)
fIn)[i/2][0]=data[i];
292 ((fftw_complex*)
fIn)[i/2][1]=data[i+1];
302 Error(
"SetPointsComplex",
"Size is not set yet");
306 ((fftw_complex*)
fIn)[i][0]=re_data[i];
307 ((fftw_complex*)
fIn)[i][1]=im_data[i];
323 return FFTW_ESTIMATE;
329 return FFTW_EXHAUSTIVE;
330 return FFTW_ESTIMATE;
One of the interface classes to the FFTW package, can be used directly or via the TVirtualFFT class.
virtual void SetPointsComplex(const Double_t *re, const Double_t *im)
set all points. the values are copied
UInt_t MapFlag(Option_t *flag)
allowed options:
virtual void SetPoint(Int_t ipoint, Double_t re, Double_t im=0)
sets real and imaginary parts of point # ipoint
virtual void Init(Option_t *flags, Int_t sign, const Int_t *)
Creates the fftw-plan.
virtual void SetPoints(const Double_t *data)
set all points.
virtual void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const
returns real and imaginary parts of the point #ipoint
virtual void SetPointComplex(Int_t ipoint, TComplex &c)
virtual ~TFFTComplex()
Destroys the data arrays and the plan.
virtual void Transform()
Computes the transform, specified in Init() function.
virtual void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput=kFALSE) const
Copies real and imaginary parts of the output (input) into the argument arrays.
virtual void GetPoints(Double_t *data, Bool_t fromInput=kFALSE) const
Copies the output(or input) into the argument array.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void ToUpper()
Change string to upper case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const