67 std::complex<double>&
operator()(
const int& ix);
68 std::complex<double>&
operator()(
const int& ix,
const int& iy);
69 const std::complex<double>&
operator()(
const int& ix)
const;
70 const std::complex<double>&
operator()(
const int& ix,
const int& iy)
const;
86 const std::vector<int>&
shape(
void)
const;
87 const std::vector<int>&
strides(
void)
const;
102 void transform(std::complex<double>* data,
106 const bool& forward =
true);
107 void factor2(
const std::complex<double>* in,
109 std::complex<double>* out,
116 void factor3(
const std::complex<double>* in,
118 std::complex<double>* out,
125 void factor4(
const std::complex<double>* in,
127 std::complex<double>* out,
134 void factor5(
const std::complex<double>* in,
136 std::complex<double>* out,
143 void factor6(
const std::complex<double>* in,
145 std::complex<double>* out,
152 void factor7(
const std::complex<double>* in,
154 std::complex<double>* out,
161 void factorn(std::complex<double>* in,
163 std::complex<double>* out,
176 const int& sign)
const;
177 std::complex<double>
timesi(
const std::complex<double>& value)
const;
397 std::complex<double>
GFft::timesi(
const std::complex<double>& value)
const
399 std::complex<double> result(-value.imag(), value.real());
std::vector< int > m_shape
Array dimensions.
void factor3(const std::complex< double > *in, const int &istride, std::complex< double > *out, const int &ostride, const GFftWavetable &wavetable, const int &sign, const int &product, const int &n, const int &index)
Compute FFT for factor 3.
void factorn(std::complex< double > *in, const int &istride, std::complex< double > *out, const int &ostride, const GFftWavetable &wavetable, const int &sign, const int &factor, const int &product, const int &n, const int &index)
Compute FFT for arbitrary factor.
void set_data(const GNdarray &array)
Set data from n-dimensional array.
GArf operator/(const GArf &arf, const double &scale)
Auxiliary Response File vision operator friend.
std::complex< double > & operator()(const int &ix)
1-dimensional FFT element access operator
void forward(const GNdarray &array)
Forward Fast Fourier Transform.
GFft * clone(void) const
Clone Fast Fourier Transform.
std::string print(const GChatter &chatter=NORMAL) const
Print Fast Fourier Transform information.
std::complex< double > timesi(const std::complex< double > &value) const
Return complex value times i.
std::vector< std::complex< double > > get_w(const GFftWavetable &wavetable, const int &index, const int &k, const int &q, const int &n, const int &sign) const
Extract coefficients from wavetable.
void clear(void)
Clear Fast Fourier Transform.
std::complex< double > * m_data
Pointer on array data.
void factor5(const std::complex< double > *in, const int &istride, std::complex< double > *out, const int &ostride, const GFftWavetable &wavetable, const int &sign, const int &product, const int &n, const int &index)
Compute FFT for factor 5.
Definition of interface for all GammaLib classes.
void init_members(void)
Initialise class members.
GFft & operator/=(const GFft &fft)
Unary division operator.
virtual ~GFft(void)
Destructor.
Lookup table class for Fast Fourier Transformation.
void transform(std::complex< double > *data, const int &stride, const int &n, const GFftWavetable &wavetable, const bool &forward=true)
Perform Fast Fourier Transform.
int size(void) const
Return number of elements in array.
GNdarray backward(void) const
Backward Fast Fourier Transform.
int m_size
Size of data array.
GFft & operator-=(const GFft &fft)
Unary subtraction operator.
GArf operator+(const GArf &a, const GArf &b)
Auxiliary Response File addition operator friend.
bool has_same_shape(const GFft &fft) const
Check if FFT has the same shape.
void free_members(void)
Delete class members.
GFft & operator=(const GFft &fft)
Assignment operator.
GFft & operator+=(const GFft &fft)
Unary addition operator.
void copy_members(const GFft &fft)
Copy class members.
GFft(void)
Void constructor.
std::vector< GFftWavetable > m_wavetable
Trigonometric coefficients.
Lookup table class interface definition for Fast Fourier transformation.
GFft & operator*=(const GFft &fft)
Unary multiplication operator.
Interface class for all GammaLib classes.
Fast Fourier Transformation class.
void factor7(const std::complex< double > *in, const int &istride, std::complex< double > *out, const int &ostride, const GFftWavetable &wavetable, const int &sign, const int &product, const int &n, const int &index)
Compute FFT for factor 7.
std::vector< int > m_strides
Steps in each dimension.
GNdarray sign(const GNdarray &array)
Computes sign of array elements.
void require_same_shape(const std::string &method, const GFft &fft) const
Throw exception if FFT shapes differ.
GArf operator*(const GArf &arf, const double &scale)
Auxiliary Response File scaling operator friend.
N-dimensional array class.
GFft operator-(void) const
Unary minus operator.
const std::vector< int > & shape(void) const
Return shape of array.
void factor2(const std::complex< double > *in, const int &istride, std::complex< double > *out, const int &ostride, const GFftWavetable &wavetable, const int &sign, const int &product, const int &n, const int &index)
Compute FFT for factor 2.
int dim(void) const
Return dimension of Fast Fourier Transformation.
void factor6(const std::complex< double > *in, const int &istride, std::complex< double > *out, const int &ostride, const GFftWavetable &wavetable, const int &sign, const int &product, const int &n, const int &index)
Compute FFT for factor 6.
GArf operator-(const GArf &a, const GArf &b)
Auxiliary Response File subtraction operator friend.
std::string classname(void) const
Return class name.
const std::vector< int > & strides(void) const
Return strides of array.
void factor4(const std::complex< double > *in, const int &istride, std::complex< double > *out, const int &ostride, const GFftWavetable &wavetable, const int &sign, const int &product, const int &n, const int &index)
Compute FFT for factor 4.