Generalized prime factor complex fast Fourier transform and backtransform in one, two, and three dimensions (d = 1,2,3). Each dimension must be of the form n = (2**p) * (3**q) * (5**r). The complex d-dimensional data can be either given in a vector of double precision complex numbers or in two seperate vectors of doubles for the real and imaginary parts respectively, or in single precision, either in a vector of complex or in two seperate vectors of float. A leading dimension different from the first data dimension can be specified - this can prevent memory-bank conflicts and therefore dramatically improves performance on vector machines with interleaved memory. The Fourier transform is always perfored inplace. The data array can be stored either in column (Fortran convention) or row (C convention) order. This makes about 40 different combinations (float - double, dimension, order, complex - real) which can be easily accessed by a simple class definition:
Constructor | Description |
Full Usage:
Pfa235FFT()
|
uninitialized setup Setup fast Fourier transform / back-transform for one, two or three dimensions. The dimensions n1,n2,and n3 must be of the form n = (2**p) * (3**q) * (5**r) otherwise an error will be generated and the error handler function Matpack.Error() is called. On instantiation some trigonometric tables will be allocated and calculated. This approach avoids multiple twiddle factor recalculations if several FFTs are calculated for data with the same dimensions. Sometimes it is convenient to define an "empty" setup (first constructor) and assign a setup later (see copying and assignment). As default the multi-dimensional data are expected in row order (C convention). If you want to transform data stored in column order (Fortran convention) use the member function SetOrder() to change the order - see below. For optimizations on vector machines with separate memory banks an extra leading dimension can be defined to avoid bank conflicts - also see SetOrder(). |
Full Usage:
Pfa235FFT(n1)
Parameters:
int
|
1-dimensional setup Setup fast Fourier transform / back-transform for one, two or three dimensions. The dimensions n1,n2,and n3 must be of the form n = (2**p) * (3**q) * (5**r) otherwise an error will be generated and the error handler function Matpack.Error() is called. On instantiation some trigonometric tables will be allocated and calculated. This approach avoids multiple twiddle factor recalculations if several FFTs are calculated for data with the same dimensions. Sometimes it is convenient to define an "empty" setup (first constructor) and assign a setup later (see copying and assignment). As default the multi-dimensional data are expected in row order (C convention). If you want to transform data stored in column order (Fortran convention) use the member function SetOrder() to change the order - see below. For optimizations on vector machines with separate memory banks an extra leading dimension can be defined to avoid bank conflicts - also see SetOrder().
|
Full Usage:
Pfa235FFT(n1, n2)
Parameters:
int
n2 : int
|
2-dimensional setup Setup fast Fourier transform / back-transform for one, two or three dimensions. The dimensions n1,n2,and n3 must be of the form n = (2**p) * (3**q) * (5**r) otherwise an error will be generated and the error handler function Matpack.Error() is called. On instantiation some trigonometric tables will be allocated and calculated. This approach avoids multiple twiddle factor recalculations if several FFTs are calculated for data with the same dimensions. Sometimes it is convenient to define an "empty" setup (first constructor) and assign a setup later (see copying and assignment). As default the multi-dimensional data are expected in row order (C convention). If you want to transform data stored in column order (Fortran convention) use the member function SetOrder() to change the order - see below. For optimizations on vector machines with separate memory banks an extra leading dimension can be defined to avoid bank conflicts - also see SetOrder().
|
Full Usage:
Pfa235FFT(n1, n2, n3)
Parameters:
int
n2 : int
n3 : int
|
3-dimensional setup Setup fast Fourier transform / back-transform for one, two or three dimensions. The dimensions n1,n2,and n3 must be of the form n = (2**p) * (3**q) * (5**r) otherwise an error will be generated and the error handler function Matpack.Error() is called. On instantiation some trigonometric tables will be allocated and calculated. This approach avoids multiple twiddle factor recalculations if several FFTs are calculated for data with the same dimensions. Sometimes it is convenient to define an "empty" setup (first constructor) and assign a setup later (see copying and assignment). As default the multi-dimensional data are expected in row order (C convention). If you want to transform data stored in column order (Fortran convention) use the member function SetOrder() to change the order - see below. For optimizations on vector machines with separate memory banks an extra leading dimension can be defined to avoid bank conflicts - also see SetOrder().
|
|
Copy-Constructor Setup fast Fourier transform / back-transform for one, two or three dimensions. The dimensions n1,n2,and n3 must be of the form n = (2**p) * (3**q) * (5**r) otherwise an error will be generated and the error handler function Matpack.Error() is called. On instantiation some trigonometric tables will be allocated and calculated. This approach avoids multiple twiddle factor recalculations if several FFTs are calculated for data with the same dimensions. Sometimes it is convenient to define an "empty" setup (first constructor) and assign a setup later (see copying and assignment). As default the multi-dimensional data are expected in row order (C convention). If you want to transform data stored in column order (Fortran convention) use the member function SetOrder() to change the order - see below. For optimizations on vector machines with separate memory banks an extra leading dimension can be defined to avoid bank conflicts - also see SetOrder().
|
Instance member | Description |
Full Usage:
this.FFT
Parameters:
float[]
-
Input/Output vector of real part.
im : float[]
-
Input/Output vector of imaginary part.
isign : FourierDirection
-
Forward (-1) or reverse (1) transform.
Returns: int
Currently undefined, not used.
|
Complex forward/backward FFT for 1/2/3 dimensions Interface with separate FLOAT vectors for real and imaginary part
|
Full Usage:
this.RealFFT
Parameters:
float[]
-
Input/Output vector of first real array.
real2 : float[]
-
Input/Output vector of second real array.
isign : FourierDirection
-
Forward (-1) or reverse (1) transform.
Returns: int
Currently undefined, not used.
|
Performs two FFTs of the two real values arrays and store the result in the arrays.
|
Static member | Description |
Full Usage:
Pfa235FFT.CanFactorized(n)
Parameters:
int
-
The number to test.
Returns: bool
True if n can be factorized into powers of 2, 3 and 5, or false if not.
|
Test if the number n can be factorized into powers of 2, 3 and 5.
|
Full Usage:
Pfa235FFT.Factorize(n, pqr)
Parameters:
int
-
The dimension n to be factorized into the valid factors n = (2**p) * (3**q) * (5**r)
pqr : int[]
-
Return the powers of the basic prime factors 2, 3 and 5 for the given argument n. Must be at least int[3].
Returns: bool
True if factorization is successful, False if n can not be factorized into powers of 2, 3, and 5.
|
Factorize the number into powers of 2, 3, and 5
|