Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TFFTRealComplex.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_TFFTRealComplex
13#define ROOT_TFFTRealComplex
14
15#include "TVirtualFFT.h"
16#include "TString.h"
17
18class TComplex;
19
21 protected:
22 void *fIn; //input array
23 void *fOut; //output array
24 void *fPlan; //fftw plan (the plan how to compute the transform)
25 Int_t fNdim; //number of dimensions
26 Int_t fTotalSize; //total size of the transform
27 Int_t *fN; //transform sizes in each dimension
28 TString fFlags; //transform flags
29
30 UInt_t MapFlag(Option_t *flag);
31
32 public:
34 TFFTRealComplex(Int_t n, Bool_t inPlace);
35 TFFTRealComplex(Int_t ndim, Int_t *n, Bool_t inPlace);
36 ~TFFTRealComplex() override;
37
38 void Init( Option_t *flags, Int_t /*sign*/,const Int_t* /*kind*/) override;
39
40 virtual Int_t GetSize() const {return fTotalSize;}
41 Int_t *GetN() const override {return fN;}
42 Int_t GetNdim() const override {return fNdim;}
43 Option_t *GetType() const override {return "R2C";}
44 Int_t GetSign() const override {return 1;}
45 Option_t *GetTransformFlag() const override {return fFlags;}
46 Bool_t IsInplace() const override {if (fOut) return kTRUE; else return kFALSE;};
47
48 void GetPoints(Double_t *data, Bool_t fromInput = kFALSE) const override;
49 Double_t GetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const override;
50 Double_t GetPointReal(const Int_t *ipoint, Bool_t fromInput = kFALSE) const override;
51 void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override;
52 void GetPointComplex(const Int_t *ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override;
53 Double_t *GetPointsReal(Bool_t fromInput=kFALSE) const override;
54 void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput = kFALSE) const override ;
55 void GetPointsComplex(Double_t *data, Bool_t fromInput = kFALSE) const override ;
56
57 void SetPoint(Int_t ipoint, Double_t re, Double_t im = 0) override;
58 void SetPoint(const Int_t *ipoint, Double_t re, Double_t im = 0) override;
59 void SetPoints(const Double_t *data) override;
60 void SetPointComplex(Int_t ipoint, TComplex &c) override;
61 void SetPointsComplex(const Double_t *re, const Double_t *im) override;
62 void Transform() override;
63
65};
66
67#endif
#define c(i)
Definition RSha256.hxx:101
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char).
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
UInt_t MapFlag(Option_t *flag)
allowed options: "ES" "M" "P" "EX"
void Init(Option_t *flags, Int_t, const Int_t *) override
Creates the fftw-plan.
virtual Int_t GetSize() const
Option_t * GetType() const override
void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override
Returns the point #ipoint.
Int_t GetNdim() const override
void SetPoints(const Double_t *data) override
Set all input points.
Int_t GetSign() const override
Double_t * GetPointsReal(Bool_t fromInput=kFALSE) const override
Returns the input array// One of the interface classes to the FFTW package, can be used directly or v...
Double_t GetPointReal(Int_t ipoint, Bool_t fromInput=kFALSE) const override
Returns the real part of the point #ipoint from the output or the point #ipoint from the input.
Bool_t IsInplace() const override
void SetPointComplex(Int_t ipoint, TComplex &c) override
Sets the point #ipoint (only the real part of the argument is taken).
Int_t * GetN() const override
Option_t * GetTransformFlag() const override
void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput=kFALSE) const override
Fills the argument arrays with the real and imaginary parts of the computed transform.
void SetPointsComplex(const Double_t *re, const Double_t *im) override
Set all points. Only the real array is used.
void SetPoint(Int_t ipoint, Double_t re, Double_t im=0) override
Set the point #ipoint.
void GetPoints(Double_t *data, Bool_t fromInput=kFALSE) const override
Fills the array data with the computed transform.
void Transform() override
Computes the transform, specified in Init() function.
~TFFTRealComplex() override
Destroys the data arrays and the plan.
Basic string class.
Definition TString.h:138
const Int_t n
Definition legend1.C:16