diff --git a/src/Numerics/IntegralTransforms/Fourier.cs b/src/Numerics/IntegralTransforms/Fourier.cs index cbe09965..e3fa9ed7 100644 --- a/src/Numerics/IntegralTransforms/Fourier.cs +++ b/src/Numerics/IntegralTransforms/Fourier.cs @@ -52,40 +52,6 @@ namespace MathNet.Numerics.IntegralTransforms Control.FourierTransformProvider.ForwardInplace(samples, FourierTransformScaling.SymmetricScaling); } - /// - /// Applies the forward Fast Fourier Transform (FFT) to multiple dimensional sample data. - /// - /// Sample data, where the FFT is evaluated in place. - /// - /// The data size per dimension. The first dimension is the major one. - /// For example, with two dimensions "rows" and "columns" the samples are assumed to be organized row by row. - /// - public static void ForwardMultiDim(Complex[] samples, int[] dimensions) - { - Control.FourierTransformProvider.ForwardInplaceMultidim(samples, dimensions, FourierTransformScaling.SymmetricScaling); - } - - /// - /// Applies the forward Fast Fourier Transform (FFT) to two dimensional sample data. - /// - /// Sample data, organized row by row, where the FFT is evaluated in place - /// The number of rows. - /// The number of columns. - /// Data available organized column by column instead of row by row can be processed directly by swapping the rows and columns arguments. - public static void Forward2D(Complex[] samplesRowWise, int rows, int columns) - { - ForwardMultiDim(samplesRowWise, new[] {rows, columns}); - } - - /// - /// Applies the forward Fast Fourier Transform (FFT) to a two dimensional data in form of a matrix. - /// - /// Sample matrix, where the FFT is evaluated in place - public static void Forward2D(Matrix samples) - { - Forward2D(samples, FourierOptions.Default); - } - /// /// Applies the forward Fast Fourier Transform (FFT) to arbitrary-length sample vectors. /// @@ -121,7 +87,7 @@ namespace MathNet.Numerics.IntegralTransforms /// For example, with two dimensions "rows" and "columns" the samples are assumed to be organized row by row. /// /// Fourier Transform Convention Options. - public static void ForwardMultiDim(Complex[] samples, int[] dimensions, FourierOptions options) + public static void ForwardMultiDim(Complex[] samples, int[] dimensions, FourierOptions options = FourierOptions.Default) { switch (options) { @@ -150,7 +116,7 @@ namespace MathNet.Numerics.IntegralTransforms /// The number of columns. /// Data available organized column by column instead of row by row can be processed directly by swapping the rows and columns arguments. /// Fourier Transform Convention Options. - public static void Forward2D(Complex[] samplesRowWise, int rows, int columns, FourierOptions options) + public static void Forward2D(Complex[] samplesRowWise, int rows, int columns, FourierOptions options = FourierOptions.Default) { ForwardMultiDim(samplesRowWise, new[] { rows, columns }, options); } @@ -160,7 +126,7 @@ namespace MathNet.Numerics.IntegralTransforms /// /// Sample matrix, where the FFT is evaluated in place /// Fourier Transform Convention Options. - public static void Forward2D(Matrix samples, FourierOptions options) + public static void Forward2D(Matrix samples, FourierOptions options = FourierOptions.Default) { // since dense matrix data is column major, we switch rows and columns @@ -186,40 +152,6 @@ namespace MathNet.Numerics.IntegralTransforms Control.FourierTransformProvider.BackwardInplace(spectrum, FourierTransformScaling.SymmetricScaling); } - /// - /// Applies the inverse Fast Fourier Transform (iFFT) to multiple dimensional sample data. - /// - /// Spectrum data, where the iFFT is evaluated in place. - /// - /// The data size per dimension. The first dimension is the major one. - /// For example, with two dimensions "rows" and "columns" the samples are assumed to be organized row by row. - /// - public static void InverseMultiDim(Complex[] spectrum, int[] dimensions) - { - Control.FourierTransformProvider.BackwardInplaceMultidim(spectrum, dimensions, FourierTransformScaling.SymmetricScaling); - } - - /// - /// Applies the inverse Fast Fourier Transform (iFFT) to two dimensional sample data. - /// - /// Sample data, organized row by row, where the iFFT is evaluated in place - /// The number of rows. - /// The number of columns. - /// Data available organized column by column instead of row by row can be processed directly by swapping the rows and columns arguments. - public static void Inverse2D(Complex[] spectrumRowWise, int rows, int columns) - { - InverseMultiDim(spectrumRowWise, new[] { rows, columns }); - } - - /// - /// Applies the inverse Fast Fourier Transform (iFFT) to a two dimensional data in form of a matrix. - /// - /// Sample matrix, where the iFFT is evaluated in place - public static void Inverse2D(Matrix spectrum) - { - Inverse2D(spectrum, FourierOptions.Default); - } - /// /// Applies the inverse Fast Fourier Transform (iFFT) to arbitrary-length sample vectors. /// @@ -259,7 +191,7 @@ namespace MathNet.Numerics.IntegralTransforms /// For example, with two dimensions "rows" and "columns" the samples are assumed to be organized row by row. /// /// Fourier Transform Convention Options. - public static void InverseMultiDim(Complex[] spectrum, int[] dimensions, FourierOptions options) + public static void InverseMultiDim(Complex[] spectrum, int[] dimensions, FourierOptions options = FourierOptions.Default) { switch (options) { @@ -292,7 +224,7 @@ namespace MathNet.Numerics.IntegralTransforms /// The number of columns. /// Data available organized column by column instead of row by row can be processed directly by swapping the rows and columns arguments. /// Fourier Transform Convention Options. - public static void Inverse2D(Complex[] spectrumRowWise, int rows, int columns, FourierOptions options) + public static void Inverse2D(Complex[] spectrumRowWise, int rows, int columns, FourierOptions options = FourierOptions.Default) { InverseMultiDim(spectrumRowWise, new[] { rows, columns }, options); } @@ -302,7 +234,7 @@ namespace MathNet.Numerics.IntegralTransforms /// /// Sample matrix, where the iFFT is evaluated in place /// Fourier Transform Convention Options. - public static void Inverse2D(Matrix spectrum, FourierOptions options) + public static void Inverse2D(Matrix spectrum, FourierOptions options = FourierOptions.Default) { // since dense matrix data is column major, we switch rows and columns @@ -325,7 +257,7 @@ namespace MathNet.Numerics.IntegralTransforms /// Time-space sample vector. /// Fourier Transform Convention Options. /// Corresponding frequency-space vector. - public static Complex[] NaiveForward(Complex[] samples, FourierOptions options) + public static Complex[] NaiveForward(Complex[] samples, FourierOptions options = FourierOptions.Default) { var frequencySpace = Naive(samples, SignByOptions(options)); ForwardScaleByOptions(options, frequencySpace); @@ -338,7 +270,7 @@ namespace MathNet.Numerics.IntegralTransforms /// Frequency-space sample vector. /// Fourier Transform Convention Options. /// Corresponding time-space vector. - public static Complex[] NaiveInverse(Complex[] spectrum, FourierOptions options) + public static Complex[] NaiveInverse(Complex[] spectrum, FourierOptions options = FourierOptions.Default) { var timeSpace = Naive(spectrum, -SignByOptions(options)); InverseScaleByOptions(options, timeSpace); @@ -351,7 +283,7 @@ namespace MathNet.Numerics.IntegralTransforms /// Sample vector, where the FFT is evaluated in place. /// Fourier Transform Convention Options. /// - public static void Radix2Forward(Complex[] samples, FourierOptions options) + public static void Radix2Forward(Complex[] samples, FourierOptions options = FourierOptions.Default) { Radix2Parallel(samples, SignByOptions(options)); ForwardScaleByOptions(options, samples); @@ -363,7 +295,7 @@ namespace MathNet.Numerics.IntegralTransforms /// Sample vector, where the FFT is evaluated in place. /// Fourier Transform Convention Options. /// - public static void Radix2Inverse(Complex[] spectrum, FourierOptions options) + public static void Radix2Inverse(Complex[] spectrum, FourierOptions options = FourierOptions.Default) { Radix2Parallel(spectrum, -SignByOptions(options)); InverseScaleByOptions(options, spectrum); @@ -374,7 +306,7 @@ namespace MathNet.Numerics.IntegralTransforms /// /// Sample vector, where the FFT is evaluated in place. /// Fourier Transform Convention Options. - public static void BluesteinForward(Complex[] samples, FourierOptions options) + public static void BluesteinForward(Complex[] samples, FourierOptions options = FourierOptions.Default) { Bluestein(samples, SignByOptions(options)); ForwardScaleByOptions(options, samples); @@ -385,7 +317,7 @@ namespace MathNet.Numerics.IntegralTransforms /// /// Sample vector, where the FFT is evaluated in place. /// Fourier Transform Convention Options. - public static void BluesteinInverse(Complex[] spectrum, FourierOptions options) + public static void BluesteinInverse(Complex[] spectrum, FourierOptions options = FourierOptions.Default) { Bluestein(spectrum, -SignByOptions(options)); InverseScaleByOptions(options, spectrum);