71 fIn = fftw_malloc(
sizeof(fftw_complex)*(
n/2+1));
75 fIn = fftw_malloc(
sizeof(fftw_complex)*(
n/2+1));
100 fIn = fftw_malloc(
sizeof(fftw_complex)*sizein);
103 fIn = fftw_malloc(
sizeof(fftw_complex)*sizein);
117 fftw_destroy_plan((fftw_plan)
fPlan);
119 fftw_free((fftw_complex*)
fIn);
153 fftw_destroy_plan((fftw_plan)
fPlan);
168 fftw_execute((fftw_plan)
fPlan);
170 Error(
"Transform",
"transform was not initialized");
182 Error(
"GetPoints",
"Input array has been destroyed");
196 Error(
"GetPointReal",
"Input array has been destroyed");
200 return array[ipoint];
210 Error(
"GetPointReal",
"Input array has been destroyed");
213 Int_t ireal = ipoint[0];
215 ireal=
fN[i+1]*ireal + ipoint[i+1];
228 Error(
"GetPointComplex",
"Input array has been destroyed");
243 Error(
"GetPointComplex",
"Input array has been destroyed");
248 Int_t ireal = ipoint[0];
250 ireal=
fN[i+1]*ireal + ipoint[i+1];
266 Error(
"GetPointsReal",
"Input array was destroyed");
279 Error(
"GetPointsComplex",
"Input array has been destroyed");
296 Error(
"GetPointsComplex",
"Input array has been destroyed");
301 data[i] = array[i/2];
312 if (ipoint <=
fN[0]/2){
313 ((fftw_complex*)
fIn)[ipoint][0] = re;
314 ((fftw_complex*)
fIn)[ipoint][1] = im;
316 ((fftw_complex*)
fOut)[2*(
fN[0]/2)-ipoint][0] = re;
317 ((fftw_complex*)
fOut)[2*(
fN[0]/2)-ipoint][1] = -im;
327 Int_t ireal = ipoint[0];
329 ireal=
fN[i+1]*ireal + ipoint[i+1];
335 Error(
"SetPoint",
"Illegal index value");
338 ((fftw_complex*)
fIn)[ireal][0] = re;
339 ((fftw_complex*)
fIn)[ireal][1] = im;
348 if (ipoint <=
fN[0]/2){
349 ((fftw_complex*)
fIn)[ipoint][0] =
c.Re();
350 ((fftw_complex*)
fIn)[ipoint][1] =
c.Im();
352 ((fftw_complex*)
fIn)[2*(
fN[0]/2)-ipoint][0] =
c.Re();
353 ((fftw_complex*)
fIn)[2*(
fN[0]/2)-ipoint][1] = -
c.Im();
365 for (
Int_t i=0; i<2*(sizein); i+=2){
366 ((fftw_complex*)
fIn)[i/2][0]=data[i];
367 ((fftw_complex*)
fIn)[i/2][1]=data[i+1];
377 for (
Int_t i=0; i<sizein; i++){
378 ((fftw_complex*)
fIn)[i][0]=re[i];
379 ((fftw_complex*)
fIn)[i][1]=im[i];
395 return FFTW_ESTIMATE;
401 return FFTW_EXHAUSTIVE;
402 return FFTW_ESTIMATE;
One of the interface classes to the FFTW package, can be used directly or via the TVirtualFFT class.
virtual Double_t * GetPointsReal(Bool_t fromInput=kFALSE) const
Returns the array of computed transform Works only for output (input array is destroyed in a C2R tran...
virtual void SetPointComplex(Int_t ipoint, TComplex &c)
since the input must be complex-Hermitian, if the ipoint > n/2, the according point before n/2 is set...
virtual void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput=kFALSE) const
Fills the argument array with the computed transform Works only for output (input array is destroyed ...
UInt_t MapFlag(Option_t *flag)
allowed options: "ES" - FFTW_ESTIMATE "M" - FFTW_MEASURE "P" - FFTW_PATIENT "EX" - FFTW_EXHAUSTIVE
virtual Double_t GetPointReal(Int_t ipoint, Bool_t fromInput=kFALSE) const
Returns the point #ipoint Works only for output (input array is destroyed in a C2R transform)
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
Works only for output (input array is destroyed in a C2R transform)
virtual void Transform()
Computes the transform, specified in Init() function.
virtual void Init(Option_t *flags, Int_t, const Int_t *)
Creates the fftw-plan.
virtual void SetPointsComplex(const Double_t *re, const Double_t *im)
Set all points. The values are copied.
virtual void SetPoint(Int_t ipoint, Double_t re, Double_t im=0)
since the input must be complex-Hermitian, if the ipoint > n/2, the according point before n/2 is set...
virtual ~TFFTComplexReal()
Destroys the data arrays and the plan.
virtual void GetPoints(Double_t *data, Bool_t fromInput=kFALSE) const
Fills the argument array with the computed transform Works only for output (input array is destroyed ...
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