There are several variants of the discrete Fourier transform, with various
normalization conventions, which are specified by the parameter
DftNormalization.
The current implementation of the discrete Fourier transform as a fast Fourier transform requires the length of the data set to be a power of 2. This greatly simplifies and speeds up the code. Users can pad the data with zeros to meet this requirement. There are other flavors of FFT, for reference, see S. Winograd, On computing the discrete Fourier transform, Mathematics of Computation, 32 (1978), 175 - 199.
DftNormalization
| Modifier and Type | Class and Description |
|---|---|
| private static class | FastFourierTransformer.
Deprecated
see MATH-736
Complex matrix implementation.
|
| Modifier and Type | Field and Description |
|---|---|
| private final DftNormalization | normalization
The type of DFT to be performed. |
| pack-priv static final long | serialVersionUID
Serializable version identifier. |
| private static final double[] | W_SUB_N_I
|
| private static final double[] | W_SUB_N_R
|
| Access | Constructor and Description |
|---|---|
| public | FastFourierTransformer(final DftNormalization
the type of normalization to be applied to the
transformed data normalization)Creates a new instance of this class, with various normalization conventions. |
| Modifier and Type | Method and Description |
|---|---|
| private static void | bitReversalShuffle2(double[]
the first array to be shuffled a, double[] the second array to be shuffled b)Performs identical index bit reversal shuffles on two arrays of identical size. |
| public Object | Returns: transform ofmdca as a Multi-Dimensional Complex Array, i.e. Complex[][][][]Multi-Dimensional Complex Array, i.e. mdca, TransformType Complex[][][][]the type of transform (forward, inverse) to be performed type)
Deprecated
see MATH-736
Performs a multi-dimensional Fourier transform on a given array. |
| private void | mdfft(FastFourierTransformer.
input matrix mdcm,the type of transform (forward, inverse) to be performed type, int index of the dimension to process d, int[] recursion subvector subVector)
Deprecated
see MATH-736
Performs one dimension of a multi-dimensional Fourier transform. |
| private static void | normalizeTransformedData(final double[][]
the unscaled transformed data dataRI, final DftNormalization the normalization to be applied normalization, final TransformType the type of transform (forward, inverse) which resulted in the specified data type)Applies the proper normalization to the specified transformed data. |
| public Complex[] | Returns: the complex transformed arraythe real data array to be transformed f, final TransformType the type of transform (forward, inverse) to be performed type)Returns the (forward, inverse) transform of the specified real data set. |
| public Complex[] | Returns: the complex transformed arraythe function to be sampled and transformed f, final double the (inclusive) lower bound for the interval min, final double the (exclusive) upper bound for the interval max, final int the number of sample points n, final TransformType the type of transform (forward, inverse) to be performed type)Returns the (forward, inverse) transform of the specified real function, sampled on the specified interval. |
| public Complex[] | Returns: the complex transformed arraythe complex data array to be transformed f, final TransformType the type of transform (forward, inverse) to be performed type)Returns the (forward, inverse) transform of the specified complex data set. |
| public static void | transformInPlace(final double[][]
the two dimensional array of real and imaginary parts of the data dataRI, final DftNormalization the normalization to be applied to the transformed data normalization, final TransformType the type of transform (forward, inverse) to be performed type)Computes the standard transform of the specified complex data. |
| normalization | back to summary |
|---|---|
| private final DftNormalization normalization The type of DFT to be performed. | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID Serializable version identifier. | |
| W_SUB_N_I | back to summary |
|---|---|
| private static final double[] W_SUB_N_I
| |
| W_SUB_N_R | back to summary |
|---|---|
| private static final double[] W_SUB_N_R
| |
| FastFourierTransformer | back to summary |
|---|---|
| public FastFourierTransformer(final DftNormalization normalization) Creates a new instance of this class, with various normalization conventions.
| |
| bitReversalShuffle2 | back to summary |
|---|---|
| private static void bitReversalShuffle2(double[] a, double[] b) Performs identical index bit reversal shuffles on two arrays of identical size. Each element in the array is swapped with another element based on the bit-reversal of the index. For example, in an array with length 16, item at binary index 0011 (decimal 3) would be swapped with the item at binary index 1100 (decimal 12).
| |
| mdfft | back to summary |
|---|---|
| public Object mdfft(Object mdca, TransformType type)
Deprecated see MATH-736 Performs a multi-dimensional Fourier transform on a given array. Use
| |
| mdfft | back to summary |
|---|---|
| private void mdfft(FastFourierTransformer. Deprecated see MATH-736 Performs one dimension of a multi-dimensional Fourier transform.
| |
| normalizeTransformedData | back to summary |
|---|---|
| private static void normalizeTransformedData(final double[][] dataRI, final DftNormalization normalization, final TransformType type) Applies the proper normalization to the specified transformed data.
| |
| transform | back to summary |
|---|---|
| public Complex[] transform(final double[] f, final TransformType type) Returns the (forward, inverse) transform of the specified real data set.
| |
| transform | back to summary |
|---|---|
| public Complex[] transform(final UnivariateFunction f, final double min, final double max, final int n, final TransformType type) Returns the (forward, inverse) transform of the specified real function, sampled on the specified interval.
| |
| transform | back to summary |
|---|---|
| public Complex[] transform(final Complex[] f, final TransformType type) Returns the (forward, inverse) transform of the specified complex data set.
| |
| transformInPlace | back to summary |
|---|---|
| public static void transformInPlace(final double[][] dataRI, final DftNormalization normalization, final TransformType type) Computes the standard transform of the specified complex data. The computation is done in place. The input data is laid out as follows
| |
Deprecated
see MATH-736
| Modifier and Type | Field and Description |
|---|---|
| protected int[] | dimensionSize
Size in all dimensions. |
| protected Object | multiDimensionalComplexArray
Storage array. |
| Access | Constructor and Description |
|---|---|
| pack-priv | MultiDimensionalComplexMatrix(Object
array containing the matrix
elements multiDimensionalComplexArray)Simple constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| private void | clone(FastFourierTransformer.
array where to copy data mdcm
Deprecated
as a consequence of
FastFourierTransformer.MultiDimensionalComplexMatrix being deprecated.
Copy contents of current array into mdcm. |
| public Complex | |
| public Object | |
| public int[] | |
| public Complex |
| dimensionSize | back to summary |
|---|---|
| protected int[] dimensionSize Size in all dimensions. | |
| multiDimensionalComplexArray | back to summary |
|---|---|
| protected Object multiDimensionalComplexArray Storage array. | |
| MultiDimensionalComplexMatrix | back to summary |
|---|---|
| pack-priv MultiDimensionalComplexMatrix(Object multiDimensionalComplexArray) Simple constructor.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| clone | back to summary |
|---|---|
| private void clone(FastFourierTransformer. Deprecated as a consequence of Copy contents of current array into mdcm.
| |
| get | back to summary |
|---|---|
| public Complex get(int... vector) throws DimensionMismatchException Get a matrix element.
| |
| getArray | back to summary |
|---|---|
| public Object getArray() Get the underlying storage array.
| |
| getDimensionSizes | back to summary |
|---|---|
| public int[] getDimensionSizes() Get the size in all dimensions.
| |
| set | back to summary |
|---|---|
| public Complex set(Complex magnitude, int... vector) throws DimensionMismatchException Set a matrix element.
| |