XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ cfft2b()

void cfft2b ( int  l,
int  m,
int  ldc,
doublecomplex  c[],
double  wsave[],
int  lwsave,
double  work[],
int  lwork,
int *  info 
)

Two-dimensional complex Fourier backward transform

Purpose
cfft2b computes the two-dimensional Fourier transform of a periodic sequence within a real array. This is referred to as the backward transform or Fourier synthesis, transforming the sequence from spectral to physical space.
c[k][j] = sum(sum(c[m1][l1]exp(2pi*i*(j*l1/l+k*m1/m)))) (i is imaginary unit)
(1st Σ for l1=0 to l-1, 2nd Σ for m1=0 to m-1)
(j=0 to l-1, k=0 to m-1)
This transform is normalized since a call to cfft2b followed by a call to cfft2f (or vice-versa) reproduces the original array subject to algorithmic constraints, roundoff error, etc.
Parameters
[in]lThe number of elements to be transformed in the first dimension of the two-dimensional data array. (l >= 1)
The transform is most efficient when l is a product of small primes.
[in]mThe number of elements to be transformed in the second dimension of the two-dimensional data array. (m >= 1)
The transform is most efficient when m is a product of small primes.
[in]ldcLeading dimension of two dimensional array c[][]. (ldc >= l)
[in,out]c[][]Array c[lc][ldc] (lc >= m)
[in] The two dimensional sequence dat to be transformed.
[out] Fourier backward transformed two dimensional sequence data.
[in]wsave[]Array wsave[lwsave]
Work data. Its contents must be initialized with a call to cfft2i before the first call to cfft2f or cfft2b for a given transform length l and m.
[in]lwsaveThe length of the array wsave[]. (lwsave >= 2*(l + m) + ln(l)/ln(2) + ln(m)/ln(2) + 8)
[out]work[]Array work[lwork]
Work array.
[in]lworkThe length of the array work[]. (lwork >= 2*l*m)
[out]info= 0: Successful exit
= -1: The argument l had an illegal value (l < 1)
= -2: The argument m had an illegal value (m < 1)
= -3: The argument ldc had an illegal value (ldc < l)
= -6: The argument lwsave had an illegal value (lwsave not big enough)
= -8: The argument lwork had an illegal value (lwork not big enough)
Reference
FFTPACK 5.1