67 fIn = fftw_malloc(
sizeof(fftw_complex) *n);
69 fOut = fftw_malloc(
sizeof(fftw_complex) * n);
96 fOut = fftw_malloc(
sizeof(fftw_complex) * fTotalSize);
111 fftw_destroy_plan((fftw_plan)
fPlan);
113 fftw_free((fftw_complex*)
fIn);
115 fftw_free((fftw_complex*)
fOut);
144 fftw_destroy_plan((fftw_plan)
fPlan);
148 fPlan = (
void*)fftw_plan_dft(
fNdim,
fN, (fftw_complex*)
fIn, (fftw_complex*)
fOut, sign,
MapFlag(flags));
150 fPlan = (
void*)fftw_plan_dft(
fNdim,
fN, (fftw_complex*)
fIn, (fftw_complex*)
fIn, sign,
MapFlag(flags));
159 fftw_execute((fftw_plan)
fPlan);
161 Error(
"Transform",
"transform not initialised");
173 data[i] = ((fftw_complex*)
fOut)[i/2][0];
174 data[i+1] = ((fftw_complex*)
fOut)[i/2][1];
178 data[i] = ((fftw_complex*)
fIn)[i/2][0];
179 data[i+1] = ((fftw_complex*)
fIn)[i/2][1];
189 if (
fOut && !fromInput){
190 re = ((fftw_complex*)
fOut)[ipoint][0];
191 im = ((fftw_complex*)
fOut)[ipoint][1];
193 re = ((fftw_complex*)
fIn)[ipoint][0];
194 im = ((fftw_complex*)
fIn)[ipoint][1];
203 Int_t ireal = ipoint[0];
205 ireal=
fN[i+1]*ireal + ipoint[i+1];
207 if (
fOut && !fromInput){
208 re = ((fftw_complex*)
fOut)[ireal][0];
209 im = ((fftw_complex*)
fOut)[ireal][1];
211 re = ((fftw_complex*)
fIn)[ireal][0];
212 im = ((fftw_complex*)
fIn)[ireal][1];
221 if (
fOut && !fromInput){
223 re[i] = ((fftw_complex*)
fOut)[i][0];
224 im[i] = ((fftw_complex*)
fOut)[i][1];
228 re[i] = ((fftw_complex*)
fIn)[i][0];
229 im[i] = ((fftw_complex*)
fIn)[i][1];
239 if (
fOut && !fromInput){
241 data[i] = ((fftw_complex*)
fOut)[i/2][0];
242 data[i+1] = ((fftw_complex*)
fOut)[i/2][1];
246 data[i] = ((fftw_complex*)
fIn)[i/2][0];
247 data[i+1] = ((fftw_complex*)
fIn)[i/2][1];
257 ((fftw_complex*)
fIn)[ipoint][0]=re;
258 ((fftw_complex*)
fIn)[ipoint][1]=im;
266 Int_t ireal = ipoint[0];
268 ireal=
fN[i+1]*ireal + ipoint[i+1];
270 ((fftw_complex*)
fIn)[ireal][0]=re;
271 ((fftw_complex*)
fIn)[ireal][1]=im;
278 ((fftw_complex*)
fIn)[ipoint][0] = c.
Re();
279 ((fftw_complex*)
fIn)[ipoint][1] = c.
Im();
289 ((fftw_complex*)
fIn)[i/2][0]=data[i];
290 ((fftw_complex*)
fIn)[i/2][1]=data[i+1];
300 Error(
"SetPointsComplex",
"Size is not set yet");
304 ((fftw_complex*)
fIn)[i][0]=re_data[i];
305 ((fftw_complex*)
fIn)[i][1]=im_data[i];
321 return FFTW_ESTIMATE;
327 return FFTW_EXHAUSTIVE;
328 return FFTW_ESTIMATE;
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 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 GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const
returns real and imaginary parts of the point #ipoint
void ToUpper()
Change string to upper case.
virtual void SetPointComplex(Int_t ipoint, TComplex &c)
virtual void Transform()
Computes the transform, specified in Init() function.
UInt_t MapFlag(Option_t *flag)
allowed options: "ES" - FFTW_ESTIMATE "M" - FFTW_MEASURE "P" - FFTW_PATIENT "EX" - FFTW_EXHAUSTIVE ...
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void GetPoints(Double_t *data, Bool_t fromInput=kFALSE) const
Copies the output(or input) into the argument array.
virtual ~TFFTComplex()
Destroys the data arrays and the plan.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetPoints(const Double_t *data)
set all points.
virtual void SetPointsComplex(const Double_t *re, const Double_t *im)
set all points. the values are copied