SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions
DComplexFFT2DServer Class Reference

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

#include <rw/cfft2d.h>

Public Member Functions

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

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>

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.

DComplexFFT2DServer& 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.

Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.