72 fIn = fftw_malloc(
sizeof(fftw_complex)*(n/2+1));
76 fIn = fftw_malloc(
sizeof(fftw_complex)*(n/2+1));
102 fIn = fftw_malloc(
sizeof(fftw_complex)*sizein);
105 fIn = fftw_malloc(
sizeof(fftw_complex)*sizein);
120 fftw_destroy_plan((fftw_plan)
fPlan);
122 fftw_free((fftw_complex*)
fIn);
154 fftw_destroy_plan((fftw_plan)
fPlan);
169 fftw_execute((fftw_plan)
fPlan);
171 Error(
"Transform",
"transform was not initialized");
183 Error(
"GetPoints",
"Input array has been destroyed");
197 Error(
"GetPointReal",
"Input array has been destroyed");
201 return array[ipoint];
211 Error(
"GetPointReal",
"Input array has been destroyed");
214 Int_t ireal = ipoint[0];
216 ireal=
fN[i+1]*ireal + ipoint[i+1];
229 Error(
"GetPointComplex",
"Input array has been destroyed");
244 Error(
"GetPointComplex",
"Input array has been destroyed");
249 Int_t ireal = ipoint[0];
251 ireal=
fN[i+1]*ireal + ipoint[i+1];
267 Error(
"GetPointsReal",
"Input array was destroyed");
280 Error(
"GetPointsComplex",
"Input array has been destroyed");
297 Error(
"GetPointsComplex",
"Input array has been destroyed");
302 data[i] = array[i/2];
313 if (ipoint <=
fN[0]/2){
314 ((fftw_complex*)
fIn)[ipoint][0] = re;
315 ((fftw_complex*)
fIn)[ipoint][1] = im;
317 ((fftw_complex*)
fOut)[2*(
fN[0]/2)-ipoint][0] = re;
318 ((fftw_complex*)
fOut)[2*(
fN[0]/2)-ipoint][1] = -im;
328 Int_t ireal = ipoint[0];
330 ireal=
fN[i+1]*ireal + ipoint[i+1];
332 ireal = (
fN[fNdim-1]/2+1)*ireal+ipoint[fNdim-1];
336 Error(
"SetPoint",
"Illegal index value");
339 ((fftw_complex*)
fIn)[ireal][0] = re;
340 ((fftw_complex*)
fIn)[ireal][1] = im;
349 if (ipoint <=
fN[0]/2){
350 ((fftw_complex*)
fIn)[ipoint][0] = c.
Re();
351 ((fftw_complex*)
fIn)[ipoint][1] = c.
Im();
353 ((fftw_complex*)
fIn)[2*(
fN[0]/2)-ipoint][0] = c.
Re();
354 ((fftw_complex*)
fIn)[2*(
fN[0]/2)-ipoint][1] = -c.
Im();
366 for (
Int_t i=0; i<2*(sizein); i+=2){
367 ((fftw_complex*)
fIn)[i/2][0]=data[i];
368 ((fftw_complex*)
fIn)[i/2][1]=data[i+1];
378 for (
Int_t i=0; i<sizein; i++){
379 ((fftw_complex*)
fIn)[i][0]=re[i];
380 ((fftw_complex*)
fIn)[i][1]=im[i];
396 return FFTW_ESTIMATE;
402 return FFTW_EXHAUSTIVE;
403 return FFTW_ESTIMATE;
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 ...
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 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) ...
void ToUpper()
Change string to upper case.
virtual void Init(Option_t *flags, Int_t, const Int_t *)
Creates the fftw-plan.
virtual ~TFFTComplexReal()
Destroys the data arrays and the plan.
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 SetPoints(const Double_t *data)
set all points.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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 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 SetPointsComplex(const Double_t *re, const Double_t *im)
Set all points. The values are copied.
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...
ClassImp(TFFTComplexReal) TFFTComplexReal
default
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
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 ...