Member Functions | |||
cols() fourier() |
ifourier() operator=() |
rows() setCols() |
setRows() |
#include <rw/cfft2d.h> DComplexFFT2DServer dcfft2s;
Class DComplexFFT2DServer performs two-dimensional (2-D) double precision complex fast Fourier transforms (FFTs) of an RWGenMat<DComplex> matrix. The transform of a complex matrix is a complex matrix; therefore, the server returns a complex matrix for either a forward or backward transform.
At any given moment, the server is configured to transform a matrix with specified dimensions. These dimensions can be set one of three ways:
At construction time
With the functions setRows() or setCols()
By the server from a supplied matrix.
The last method means that if the matrix size changes, the server automatically reconfigures to the new size. Since this is an expensive calculation, it is most efficient to call the server repeatedly for matrices of the same size. Different FFT servers may be constructed to handle different sizes.
The forward transform calculated is:
The inverse Fourier transform (IDFT) calculated is:
As with the 1-D FFT, a call to fourier() followed by a call to ifourier() results in the original matrix multiplied by the total number of elements, that is, the number of rows times the number of columns.
DComplexFFT2DServer();
Constructs a double precision FFT server for a matrix of unspecified dimensions. The dimensions are initialized when the server is used.
DComplexFFT2DServer(unsigned nrows, unsigned ncols);
Constructs a complex FFT server designed to transform a matrix with nrows rows and ncols columns.
DComplexFFT2DServer(unsigned n);
Constructs a complex FFT server designed to transform a square matrix with n rows and columns.
DComplexFFT2DServer(const DComplexFFT2DServer&);
Copy constructor. The new server references the old server's data.
unsigned cols() const;
Returns the number of columns that the 2-D FFT server is currently configured to transform.
RWGenMat<DComplex> fourier(const RWGenMat<DComplex>&);
Returns the 2-D FFT of a complex matrix.
RWGenMat<DComplex> ifourier(const RWGenMat<DComplex>&);
Returns the inverse 2-D FFT of a complex matrix.
unsigned rows() const;
Returns the number of rows the 2-D FFT server is currently configured to transform.
void setCols(unsigned N);
Resets the number of columns of a 2-D FFT server to N.
void setRows(unsigned N);
Resets the number of rows of a 2-D FFT server to N.
void operator=(const DComplexFFT2DServer& v);
Sets self to the same order as v.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.