c06fp computes the discrete Fourier transforms of sequences, each containing real data values. This method is designed to be particularly efficient on vector processors.
Syntax
C# |
---|
public static void c06fp( int m, int n, double[] x, string init, double[] trig, out int ifail ) |
Visual Basic |
---|
Public Shared Sub c06fp ( _ m As Integer, _ n As Integer, _ x As Double(), _ init As String, _ trig As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void c06fp( int m, int n, array<double>^ x, String^ init, array<double>^ trig, [OutAttribute] int% ifail ) |
F# |
---|
static member c06fp : m : int * n : int * x : float[] * init : string * trig : float[] * ifail : int byref -> unit |
Parameters
- m
- Type: System..::..Int32On entry: , the number of sequences to be transformed.Constraint: .
- n
- Type: System..::..Int32On entry: , the number of real values in each sequence.Constraint: .
- x
- Type: array<System..::..Double>[]()[][]An array of size []On entry: the data must be stored in x as if in a two-dimensional array of dimension ; each of the sequences is stored in a row of the array. In other words, if the data values of the th sequence to be transformed are denoted by , for , then the elements of the array x must contain the valuesOn exit: the discrete Fourier transforms stored as if in a two-dimensional array of dimension . Each of the transforms is stored in a row of the array in Hermitian form, overwriting the corresponding original sequence. If the components of the discrete Fourier transform are written as , then for , is contained in , and for , is contained in . (See also [] in the C06 class Chapter Introduction.)
- init
- Type: System..::..StringOn entry: indicates whether trigonometric coefficients are to be calculated.
- Calculate the required trigonometric coefficients for the given value of , and store in the array trig.
- or
- The required trigonometric coefficients are assumed to have been calculated and stored in the array trig in a prior call to one of c06fp, c06fq or c06fr. The method performs a simple check that the current value of is consistent with the values stored in trig.
Constraint: , or .
- trig
- Type: array<System..::..Double>[]()[][]An array of size []On entry: if or , trig must contain the required trigonometric coefficients that have been previously calculated. Otherwise trig need not be set.On exit: contains the required coefficients (computed by the method if ).
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
Given sequences of real data values , for and , c06fp simultaneously calculates the Fourier transforms of all the sequences defined by
(Note the scale factor in this definition.)
The transformed values are complex, but for each value of the form a Hermitian sequence (i.e., is the complex conjugate of ), so they are completely determined by real numbers (see also the C06 class).
The discrete Fourier transform is sometimes defined using a positive sign in the exponential term:
To compute this form, this method should be followed by forming the complex conjugates of the ; that is , for .
The method uses a variant of the fast Fourier transform (FFT) algorithm (see Brigham (1974)) known as the Stockham self-sorting algorithm, which is described in Temperton (1983). Special coding is provided for the factors , , , and . This method is designed to be particularly efficient on vector processors, and it becomes especially fast as , the number of transforms to be computed in parallel, increases.
References
Brigham E O (1974) The Fast Fourier Transform Prentice–Hall
Temperton C (1983) Fast mixed-radix real Fourier transforms J. Comput. Phys. 52 340–350
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, .
On entry, .
On entry, , or .
- Not used at this Mark.
- An unexpected error has occurred in an internal call. Check all method calls and array dimensions. Seek expert help.
Accuracy
Some indication of accuracy can be obtained by performing a subsequent inverse transform and comparing the results with the original sequence (in exact arithmetic they would be identical).
Parallelism and Performance
None.