Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TFFTComplexReal.h
Go to the documentation of this file.
1// @(#)root/fft:$Id$
2// Author: Anna Kreshuk 07/4/2006
3
4/*************************************************************************
5 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TFFTComplexReal
13#define ROOT_TFFTComplexReal
14
15
16#include "TVirtualFFT.h"
17#include "TString.h"
18
19class TComplex;
20
22
23 protected:
24 void *fIn; //input array
25 void *fOut; //output array
26 void *fPlan; //fftw plan (the plan how to compute the transform)
27 Int_t fNdim; //number of dimensions
28 Int_t fTotalSize; //total size of the transform
29 Int_t *fN; //transform sizes in each dimension
30 TString fFlags; //transform flags
31
32 UInt_t MapFlag(Option_t *flag);
33
34 public:
36 TFFTComplexReal(Int_t n, Bool_t inPlace);
37 TFFTComplexReal(Int_t ndim, Int_t *n, Bool_t inPlace);
38 ~TFFTComplexReal() override;
39
40 void Init( Option_t *flags, Int_t /*sign*/,const Int_t* /*kind*/) override;
41
42 virtual Int_t GetSize() const {return fTotalSize;}
43 Int_t *GetN() const override {return fN;}
44 Int_t GetNdim() const override {return fNdim;}
45 Option_t *GetType() const override {return "C2R";}
46 Int_t GetSign() const override {return -1;}
47 Option_t *GetTransformFlag() const override {return fFlags;}
48 Bool_t IsInplace() const override {if (fOut) return kTRUE; else return kFALSE;};
49
50 void GetPoints(Double_t *data, Bool_t fromInput = kFALSE) const override;
51 Double_t GetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const override;
52 Double_t GetPointReal(const Int_t *ipoint, Bool_t fromInput = kFALSE) const override;
53 void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override;
54 void GetPointComplex(const Int_t *ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override;
55 Double_t* GetPointsReal(Bool_t fromInput=kFALSE) const override;
56 void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput = kFALSE) const override ;
57 void GetPointsComplex(Double_t *data, Bool_t fromInput = kFALSE) const override ;
58
59 void SetPoint(Int_t ipoint, Double_t re, Double_t im = 0) override;
60 void SetPoint(const Int_t *ipoint, Double_t re, Double_t im = 0) override;
61 void SetPoints(const Double_t *data) override;
62 void SetPointComplex(Int_t ipoint, TComplex &c) override;
63 void SetPointsComplex(const Double_t *re, const Double_t *im) override;
64 void Transform() override;
65
67};
68
69#endif
#define c(i)
Definition RSha256.hxx:101
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
One of the interface classes to the FFTW package, can be used directly or via the TVirtualFFT class.
void GetPoints(Double_t *data, Bool_t fromInput=kFALSE) const override
Fills the argument array with the computed transform Works only for output (input array is destroyed ...
Int_t GetSign() const override
Int_t * GetN() const override
void SetPointComplex(Int_t ipoint, TComplex &c) override
since the input must be complex-Hermitian, if the ipoint > n/2, the according point before n/2 is set...
void SetPointsComplex(const Double_t *re, const Double_t *im) override
Set all points. The values are copied.
UInt_t MapFlag(Option_t *flag)
allowed options: "ES" - FFTW_ESTIMATE "M" - FFTW_MEASURE "P" - FFTW_PATIENT "EX" - FFTW_EXHAUSTIVE
void Transform() override
Computes the transform, specified in Init() function.
void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput=kFALSE) const override
Fills the argument array with the computed transform Works only for output (input array is destroyed ...
~TFFTComplexReal() override
Destroys the data arrays and the plan.
virtual Int_t GetSize() const
Double_t * GetPointsReal(Bool_t fromInput=kFALSE) const override
Returns the array of computed transform Works only for output (input array is destroyed in a C2R tran...
Option_t * GetType() const override
Bool_t IsInplace() const override
void SetPoints(const Double_t *data) override
set all points.
void SetPoint(Int_t ipoint, Double_t re, Double_t im=0) override
since the input must be complex-Hermitian, if the ipoint > n/2, the according point before n/2 is set...
void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override
Works only for output (input array is destroyed in a C2R transform)
Option_t * GetTransformFlag() const override
Double_t GetPointReal(Int_t ipoint, Bool_t fromInput=kFALSE) const override
Returns the point #ipoint Works only for output (input array is destroyed in a C2R transform)
void Init(Option_t *flags, Int_t, const Int_t *) override
Creates the fftw-plan.
Int_t GetNdim() const override
Basic string class.
Definition TString.h:139
TVirtualFFT is an interface class for Fast Fourier Transforms.
Definition TVirtualFFT.h:88
const Int_t n
Definition legend1.C:16