rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

DComplexFFT2DServer Class Reference
[FFT Server]

Performs two-dimensional (2-D) double precision complex fast Fourier transforms (FFTs) of an RWGenMat<DComplex> matrix. More...

#include <rw/cfft2d.h>

List of all members.

Public Member Functions

 DComplexFFT2DServer ()
 DComplexFFT2DServer (size_t nrows, size_t ncols)
 DComplexFFT2DServer (size_t n)
 DComplexFFT2DServer (const DComplexFFT2DServer &)
void operator= (const DComplexFFT2DServer &v)
size_t rows () const
size_t cols () const
void setRows (size_t N)
void setCols (size_t N)
RWGenMat< DComplexfourier (const RWGenMat< DComplex > &)
RWGenMat< DComplexifourier (const RWGenMat< DComplex > &)

Detailed Description

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:

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:

$ A(m, n) = \displaystyle\sum_{j=0}^{M-1} \displaystyle\sum_{k=0}^{N-1} X(j, k) exp\left(-2\pi i\left[\frac{jm}{M}+\frac{kn}{n}\right]\right); $

$ m=0, \quad .., \quad M-1; \quad k=0, \quad .., \quad N-1 $

The inverse Fourier transform (IDFT) calculated is:

$ X(j, k) = \displaystyle\sum_{m=0}^{M-1} \displaystyle\sum_{n=0}^{N-1} A(m, n) exp\left(2\pi i\left[\frac{jm}{M}+\frac{kn}{n}\right]\right); $

$ j=0, \quad .., \quad M-1; \quad k=0, \quad .., \quad N-1 $

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.

Synopsis

 #include <rw/cfft2d.h>
 DComplexFFT2DServer dcfft2s;

Constructor & Destructor Documentation

DComplexFFT2DServer::DComplexFFT2DServer (  ) 

Constructs a double precision FFT server for a matrix of unspecified dimensions. The dimensions are initialized when the server is used.

DComplexFFT2DServer::DComplexFFT2DServer ( size_t  nrows,
size_t  ncols 
)

Constructs a complex FFT server designed to transform a matrix with nrows rows and ncols columns.

DComplexFFT2DServer::DComplexFFT2DServer ( size_t  n  ) 

Constructs a complex FFT server designed to transform a square matrix with n rows and columns.

DComplexFFT2DServer::DComplexFFT2DServer ( const DComplexFFT2DServer  ) 

Copy constructor. The new server references the old server's data.


Member Function Documentation

size_t DComplexFFT2DServer::cols (  )  const [inline]

Returns the number of columns that the 2-D FFT server is currently configured to transform.

RWGenMat<DComplex> DComplexFFT2DServer::fourier ( const RWGenMat< DComplex > &   ) 

Returns the 2-D FFT of a complex matrix.

RWGenMat<DComplex> DComplexFFT2DServer::ifourier ( const RWGenMat< DComplex > &   ) 

Returns the inverse 2-D FFT of a complex matrix.

void DComplexFFT2DServer::operator= ( const DComplexFFT2DServer v  ) 

Sets self to the same order as v.

size_t DComplexFFT2DServer::rows (  )  const [inline]

Returns the number of rows the 2-D FFT server is currently configured to transform.

void DComplexFFT2DServer::setCols ( size_t  N  ) 

Resets the number of columns of a 2-D FFT server to N.

void DComplexFFT2DServer::setRows ( size_t  N  ) 

Resets the number of rows of a 2-D FFT server to N.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.