ROOT logo
ROOT » MATH » FFTW » TFFTComplexReal

class TFFTComplexReal: public TVirtualFFT


 TFFTComplexReal

 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 the inverse of the real-to-complex transforms (class TFFTRealComplex)
 taking complex input (storing the non-redundant half of a logically Hermitian array)
 to real output (see FFTW manual for more details)

 How to use it:
 1) Create an instance of TFFTComplexReal - 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
 3) Set the data (via SetPoints(), SetPoint() or SetPointComplex() functions)
 4) Run the Transform() function
 5) Get the output (via GetPoints(), GetPoint() or GetPointReal() functions)
 6) Repeat steps 3)-5) as needed

 For a transform of the same size, but 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 the transform size


Function Members (Methods)

public:
TFFTComplexReal()
TFFTComplexReal(const TFFTComplexReal&)
TFFTComplexReal(Int_t n, Bool_t inPlace)
TFFTComplexReal(Int_t ndim, Int_t* n, Bool_t inPlace)
virtual~TFFTComplexReal()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
static TClass*TVirtualFFT::Class()
static TClass*TObject::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 Int_t*TVirtualFFT::GetN() const
virtual const char*TObject::GetName() const
virtual Int_tGetNdim() const
virtual Int_tTVirtualFFT::GetNdim() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual voidGetPointComplex(Int_t ipoint, Double_t& re, Double_t& im, Bool_t fromInput = kFALSE) const
virtual voidGetPointComplex(const Int_t* ipoint, Double_t& re, Double_t& im, Bool_t fromInput = kFALSE) const
virtual voidTVirtualFFT::GetPointComplex(Int_t ipoint, Double_t& re, Double_t& im, Bool_t fromInput = kFALSE) const
virtual voidTVirtualFFT::GetPointComplex(const 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 Double_tTVirtualFFT::GetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const
virtual Double_tTVirtualFFT::GetPointReal(const Int_t* ipoint, Bool_t fromInput = kFALSE) const
virtual voidGetPoints(Double_t* data, Bool_t fromInput = kFALSE) const
virtual voidTVirtualFFT::GetPoints(Double_t* data, Bool_t fromInput = kFALSE) const
virtual voidGetPointsComplex(Double_t* data, Bool_t fromInput = kFALSE) const
virtual voidTVirtualFFT::GetPointsComplex(Double_t* data, Bool_t fromInput = kFALSE) const
virtual voidGetPointsComplex(Double_t* re, Double_t* im, Bool_t fromInput = kFALSE) const
virtual voidTVirtualFFT::GetPointsComplex(Double_t* re, Double_t* im, Bool_t fromInput = kFALSE) const
virtual Double_t*GetPointsReal(Bool_t fromInput = kFALSE) const
virtual Double_t*TVirtualFFT::GetPointsReal(Bool_t fromInput = kFALSE) const
virtual Int_tGetSign() const
virtual Int_tTVirtualFFT::GetSign() const
virtual Int_tGetSize() const
virtual const char*TObject::GetTitle() const
virtual Option_t*GetTransformFlag() const
virtual Option_t*TVirtualFFT::GetTransformFlag() const
virtual Option_t*GetType() const
virtual Option_t*TVirtualFFT::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, const Int_t*)
virtual voidTVirtualFFT::Init(Option_t* flag, Int_t sign, const Int_t* kind)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual TClass*TVirtualFFT::IsA() const
virtual TClass*TObject::IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tIsInplace() const
virtual Bool_tTVirtualFFT::IsInplace() 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()
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)
TFFTComplexReal&operator=(const TFFTComplexReal&)
TVirtualFFT&TVirtualFFT::operator=(const TVirtualFFT&)
TObject&TObject::operator=(const TObject& rhs)
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(basic_ostream<char,char_traits<char> >& 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 im = 0)
virtual voidTVirtualFFT::SetPoint(Int_t ipoint, Double_t re, Double_t im = 0)
virtual voidTVirtualFFT::SetPoint(const Int_t* ipoint, Double_t re, Double_t im = 0)
virtual voidSetPointComplex(Int_t ipoint, TComplex& c)
virtual voidTVirtualFFT::SetPointComplex(Int_t ipoint, TComplex& c)
virtual voidSetPoints(const Double_t* data)
virtual voidTVirtualFFT::SetPoints(const Double_t* data)
virtual voidSetPointsComplex(const Double_t* re, const Double_t* im)
virtual voidTVirtualFFT::SetPointsComplex(const Double_t* re, const Double_t* im)
static voidTVirtualFFT::SetTransform(TVirtualFFT* fft)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTVirtualFFT::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTObject::ShowMembers(TMemberInspector& insp, char* parent)
static TVirtualFFT*TVirtualFFT::SineCosine(Int_t ndim, Int_t* n, Int_t* r2rkind, Option_t* option)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTVirtualFFT::StreamerNVirtual(TBuffer& b)
voidTObject::StreamerNVirtual(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 voidTVirtualFFT::Transform()
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
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
UInt_tMapFlag(Option_t* flag)

Data Members

protected:
Option_t*fFlagstransform flags
void*fIninput array
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

TFFTComplexReal()
default
TFFTComplexReal(Int_t n, Bool_t inPlace)
For 1d transforms
Allocates memory for the input array, and, if inPlace = kFALSE, for the output array
TFFTComplexReal(Int_t ndim, Int_t* n, Bool_t inPlace)
For ndim-dimensional transforms
Second argurment contains sizes of the transform in each dimension
~TFFTComplexReal()
Destroys the data arrays and the plan. However, some plan information stays around
until the root session is over, and is reused if other plans of the same size are
created
void Init(Option_t* flags, Int_t , const Int_t* )
Creates the fftw-plan

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

Arguments sign and kind are dummy and not need to be specified
Possible flag_options:
"ES" (from "estimate") - no time in preparing the transform, but probably sub-optimal
   performanc
"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.
void Transform()
Computes the transform, specified in Init() function
void GetPoints(Double_t* data, Bool_t fromInput = kFALSE) const
Fills the argument array with the computed transform
Double_t GetPointReal(Int_t ipoint, Bool_t fromInput)
Returns the point #ipoint
Double_t GetPointReal(const Int_t *ipoint, Bool_t fromInput)
For multidimensional transforms. Returns the point #ipoint
void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput)
void GetPointComplex(const Int_t *ipoint, Double_t &re, Double_t &im, Bool_t fromInput)
For multidimensional transforms. Returns the point #ipoint
Double_t* GetPointsReal(Bool_t fromInput = kFALSE) const
Returns the array of computed transform
void GetPointsComplex(Double_t* re, Double_t* im, Bool_t fromInput = kFALSE) const
Fills the argument array with the computed transform
void GetPointsComplex(Double_t* data, Bool_t fromInput = kFALSE) const
void SetPoint(Int_t ipoint, Double_t re, Double_t im)
since the input must be complex-Hermitian, if the ipoint > n/2, the according
point before n/2 is set to (re, -im)
void SetPoint(const Int_t *ipoint, Double_t re, Double_t im)
Set the point #ipoint. Since the input is Hermitian, only the first (roughly)half of
the points have to be set.
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 to (re, -im)
void SetPoints(const Double_t* data)
set all points. the values are copied. points should be ordered as follows:
[re_0, im_0, re_1, im_1, ..., re_n, im_n)
void SetPointsComplex(const Double_t* re, const Double_t* im)
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
TFFTComplexReal()
Int_t GetSize() const
{return fTotalSize;}
Int_t * GetN() const
{return fN;}
Int_t GetNdim() const
{return fNdim;}
Option_t * GetType() const
{return "C2R";}
Int_t GetSign() const
{return -1;}
Option_t * GetTransformFlag() const
{return fFlags;}
Bool_t IsInplace() const
{if (fOut) return kTRUE; else return kFALSE;}