ROOT logo

class TFFTReal: public TVirtualFFT

 One of the interface classes to the FFTW package, can be used directly
 or via the TVirtualFFT class. Only the basic interface of FFTW is implemented.

 Computes transforms called r2r in FFTW manual:
 - transforms of real input and output in "halfcomplex" format i.e.
   real and imaginary parts for a transform of size n stored as
   (r0, r1, r2, ..., rn/2, i(n+1)/2-1, ..., i2, i1)
 - discrete Hartley transform
 - sine and cosine transforms (DCT-I,II,III,IV and DST-I,II,III,IV)
 For the detailed information on the computed
 transforms please refer to the FFTW manual, chapter "What FFTW really computes".

 How to use it:
 1) Create an instance of TFFTReal - this will allocate input and output
    arrays (unless an in-place transform is specified)
 2) Run the Init() function with the desired flags and settings (see function
    comments for possible kind parameters)
 3) Set the data (via SetPoints()or SetPoint() functions)
 4) Run the Transform() function
 5) Get the output (via GetPoints() or GetPoint() functions)
 6) Repeat steps 3)-5) as needed
 For a transform of the same size, but of different kind (or with different flags),
 rerun the Init() function and continue with steps 3)-5)

 NOTE: 1) running Init() function will overwrite the input array! Don't set any data
          before running the Init() function!
       2) FFTW computes unnormalized transform, so doing a transform followed by
          its inverse will lead to the original array scaled BY:
          - transform size (N) for R2HC, HC2R, DHT transforms
          - 2*(N-1) for DCT-I (REDFT00)
          - 2*(N+1) for DST-I (RODFT00)
          - 2*N for the remaining transforms
 Transform inverses:

Function Members (Methods)

TFFTReal(const TFFTReal&)
TFFTReal(Int_t n, Bool_t inPlace = kFALSE)
TFFTReal(Int_t ndim, Int_t* n, Bool_t inPlace = kFALSE)
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
static TVirtualFFT*TVirtualFFT::FFT(Int_t ndim, Int_t* n, Option_t* option)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
static TVirtualFFT*TVirtualFFT::GetCurrentTransform()
static const char*TVirtualFFT::GetDefaultFFT()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual Int_t*GetN() const
virtual const char*TObject::GetName() const
virtual Int_tGetNdim() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual voidGetPointComplex(const Int_t* ipoint, Double_t& re, Double_t& im, Bool_t fromInput = kFALSE) const
virtual voidGetPointComplex(Int_t ipoint, Double_t& re, Double_t& im, Bool_t fromInput = kFALSE) const
virtual Double_tGetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const
virtual Double_tGetPointReal(const Int_t* ipoint, Bool_t fromInput = kFALSE) const
virtual voidGetPoints(Double_t* data, Bool_t fromInput = kFALSE) const
virtual voidGetPointsComplex(Double_t*, Bool_t) const
virtual voidGetPointsComplex(Double_t*, Double_t*, Bool_t) const
virtual Double_t*GetPointsReal(Bool_t fromInput = kFALSE) const
virtual Int_tGetSign() const
virtual Int_tGetSize() const
virtual const char*TObject::GetTitle() const
virtual Option_t*GetTransformFlag() const
virtual Option_t*GetType() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidInit(Option_t* flags, Int_t sign, const Int_t* kind)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tIsInplace() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TFFTReal&operator=(const TFFTReal&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
static voidTVirtualFFT::SetDefaultFFT(const char* name = "")
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetPoint(Int_t ipoint, Double_t re, Double_t im = 0)
virtual voidSetPoint(const Int_t* ipoint, Double_t re, Double_t)
virtual voidSetPointComplex(Int_t, TComplex&)
virtual voidSetPoints(const Double_t* data)
virtual voidSetPointsComplex(const Double_t*, const Double_t*)
static voidTVirtualFFT::SetTransform(TVirtualFFT* fft)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp)
static TVirtualFFT*TVirtualFFT::SineCosine(Int_t ndim, Int_t* n, Int_t* r2rkind, Option_t* option)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTransform()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
UInt_tMapFlag(Option_t* flag)
Int_tMapOptions(const Int_t* kind)

Data Members

Option_t*fFlagstransform flags
void*fIninput array
void*fKindtransform kinds in each dimension
Int_t*fNtransform sizes in each dimension
Int_tfNdimnumber of dimensions
void*fOutoutput array
void*fPlanfftw plan (the plan how to compute the transform)
Int_tfTotalSizetotal size of the transform
static TStringTVirtualFFT::fgDefaultdefault transformer
static TVirtualFFT*TVirtualFFT::fgFFTcurrent transformer

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TFFTReal(Int_t n, Bool_t inPlace = kFALSE)
For 1d transforms
n here is the physical size of the transform (see FFTW manual for more details)
TFFTReal(Int_t ndim, Int_t* n, Bool_t inPlace = kFALSE)
For multidimensional transforms
1st parameter is the # of dimensions,
2nd is the sizes (physical) of the transform in each dimension
void Init(Option_t* flags, Int_t sign, const Int_t* kind)
Creates the fftw-plan

NOTE:  input and output arrays are overwritten during initialisation,
       so don't set any points, before running this function!!!!!

1st parameter:
  Possible flag_options:
  "ES" (from "estimate") - no time in preparing the transform, but probably sub-optimal
  "M" (from "measure") - some time spend in finding the optimal way to do the transform
  "P" (from "patient") - more time spend in finding the optimal way to do the transform
  "EX" (from "exhaustive") - the most optimal way is found
  This option should be chosen depending on how many transforms of the same size and
  type are going to be done. Planning is only done once, for the first transform of this
  size and type.
2nd parameter is dummy and doesn't need to be specified
3rd parameter- transform kind for each dimension
     4 different kinds of sine and cosine transforms are available
     DCT-I   - kind=0
     DCT-II  - kind=1
     DCT-III - kind=2
     DCT-IV  - kind=3
     DST-I   - kind=4
     DST-II  - kind=5
     DSTIII  - kind=6
     DSTIV   - kind=7
void Transform()
Computes the transform, specified in Init() function
Option_t * GetType() const
Returns the type of the transform
void GetPoints(Double_t* data, Bool_t fromInput = kFALSE) const
Copies the output (or input) points into the provided array, that should
be big enough
Double_t GetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const
For 1d tranforms. Returns point #ipoint
Double_t GetPointReal(const Int_t* ipoint, Bool_t fromInput = kFALSE) const
For multidim.transforms. Returns point #ipoint
void GetPointComplex(Int_t ipoint, Double_t& re, Double_t& im, Bool_t fromInput = kFALSE) const
Only for input of HC2R and output of R2HC
void GetPointComplex(const Int_t* ipoint, Double_t& re, Double_t& im, Bool_t fromInput = kFALSE) const
Only for input of HC2R and output of R2HC and for 1d
Double_t* GetPointsReal(Bool_t fromInput = kFALSE) const
Returns the output (or input) array
void SetPoint(Int_t ipoint, Double_t re, Double_t im = 0)
void SetPoint(const Int_t* ipoint, Double_t re, Double_t )
Since multidimensional R2HC and HC2R transforms are not supported,
third parameter is dummy
void SetPoints(const Double_t* data)
Sets all points
Int_t MapOptions(const Int_t* kind)
transfers the r2r_kind parameters to fftw type
UInt_t MapFlag(Option_t* flag)
allowed options:
Int_t GetSize() const
{return fTotalSize;}
Int_t * GetN() const
{return fN;}
Int_t GetNdim() const
{return fNdim;}
Int_t GetSign() const
{return 0;}
Option_t * GetTransformFlag() const
{return fFlags;}
Bool_t IsInplace() const
{if (fOut) return kTRUE; else return kFALSE;}
void GetPointsComplex(Double_t* , Double_t* , Bool_t ) const
void GetPointsComplex(Double_t* , Bool_t ) const
void SetPointComplex(Int_t , TComplex& )
void SetPointsComplex(const Double_t* , const Double_t* )