Browse Source

Drop obsolete functions

dependabot/nuget/NUnit3TestAdapter-4.2.0
Christoph Ruegg 5 years ago
parent
commit
809da21b5e
  1. 1
      src/FSharp/BigRational.fs
  2. 154
      src/Numerics/IntegralTransforms/Fourier.cs
  3. 39
      src/Numerics/SpecialFunctions/Evaluate.cs

1
src/FSharp/BigRational.fs

@ -441,7 +441,6 @@ type BigRational =
| Q q ->
Q (BigRationalLarge.Pow (q, i))
[<Obsolete("Use Pow instead, which is compatible with the ** operator. Will be removed in a future release.")>]
static member PowN (n, i : int) = BigRational.Pow(n, i)

154
src/Numerics/IntegralTransforms/Fourier.cs

@ -38,7 +38,7 @@ namespace MathNet.Numerics.IntegralTransforms
/// <summary>
/// Complex Fast (FFT) Implementation of the Discrete Fourier Transform (DFT).
/// </summary>
public static partial class Fourier
public static class Fourier
{
/// <summary>
/// Applies the forward Fast Fourier Transform (FFT) to arbitrary-length sample vectors.
@ -744,158 +744,6 @@ namespace MathNet.Numerics.IntegralTransforms
denseStorage.CopyToUnchecked(spectrum.Storage, ExistingData.Clear);
}
/// <summary>
/// Naive forward DFT, useful e.g. to verify faster algorithms.
/// </summary>
/// <param name="samples">Time-space sample vector.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
/// <returns>Corresponding frequency-space vector.</returns>
[Obsolete("Use Forward instead. Will be dropped in version 5.0 and behave like Forward until then.")]
public static Complex32[] NaiveForward(Complex32[] samples, FourierOptions options = FourierOptions.Default)
{
var result = new Complex32[samples.Length];
samples.Copy(result);
Forward(result, options);
return result;
}
/// <summary>
/// Naive forward DFT, useful e.g. to verify faster algorithms.
/// </summary>
/// <param name="samples">Time-space sample vector.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
/// <returns>Corresponding frequency-space vector.</returns>
[Obsolete("Use Forward instead. Will be dropped in version 5.0 and behave like Forward until then.")]
public static Complex[] NaiveForward(Complex[] samples, FourierOptions options = FourierOptions.Default)
{
var result = new Complex[samples.Length];
samples.Copy(result);
Forward(result, options);
return result;
}
/// <summary>
/// Naive inverse DFT, useful e.g. to verify faster algorithms.
/// </summary>
/// <param name="spectrum">Frequency-space sample vector.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
/// <returns>Corresponding time-space vector.</returns>
[Obsolete("Use Inverse instead. Will be dropped in version 5.0 and behave like Inverse until then.")]
public static Complex32[] NaiveInverse(Complex32[] spectrum, FourierOptions options = FourierOptions.Default)
{
var result = new Complex32[spectrum.Length];
spectrum.Copy(result);
Inverse(result, options);
return result;
}
/// <summary>
/// Naive inverse DFT, useful e.g. to verify faster algorithms.
/// </summary>
/// <param name="spectrum">Frequency-space sample vector.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
/// <returns>Corresponding time-space vector.</returns>
[Obsolete("Use Inverse instead. Will be dropped in version 5.0 and behave like Inverse until then.")]
public static Complex[] NaiveInverse(Complex[] spectrum, FourierOptions options = FourierOptions.Default)
{
var result = new Complex[spectrum.Length];
spectrum.Copy(result);
Inverse(result, options);
return result;
}
/// <summary>
/// Radix-2 forward FFT for power-of-two sized sample vectors.
/// </summary>
/// <param name="samples">Sample vector, where the FFT is evaluated in place.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
/// <exception cref="ArgumentException"/>
[Obsolete("Use Forward instead. Will be dropped in version 5.0 and behave like Forward until then.")]
public static void Radix2Forward(Complex32[] samples, FourierOptions options = FourierOptions.Default)
{
Forward(samples, options);
}
/// <summary>
/// Radix-2 forward FFT for power-of-two sized sample vectors.
/// </summary>
/// <param name="samples">Sample vector, where the FFT is evaluated in place.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
/// <exception cref="ArgumentException"/>
[Obsolete("Use Forward instead. Will be dropped in version 5.0 and behave like Forward until then.")]
public static void Radix2Forward(Complex[] samples, FourierOptions options = FourierOptions.Default)
{
Forward(samples, options);
}
/// <summary>
/// Radix-2 inverse FFT for power-of-two sized sample vectors.
/// </summary>
/// <param name="spectrum">Sample vector, where the FFT is evaluated in place.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
/// <exception cref="ArgumentException"/>
[Obsolete("Use Inverse instead. Will be dropped in version 5.0 and behave like Inverse until then.")]
public static void Radix2Inverse(Complex32[] spectrum, FourierOptions options = FourierOptions.Default)
{
Inverse(spectrum, options);
}
/// <summary>
/// Radix-2 inverse FFT for power-of-two sized sample vectors.
/// </summary>
/// <param name="spectrum">Sample vector, where the FFT is evaluated in place.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
/// <exception cref="ArgumentException"/>
[Obsolete("Use Inverse instead. Will be dropped in version 5.0 and behave like Inverse until then.")]
public static void Radix2Inverse(Complex[] spectrum, FourierOptions options = FourierOptions.Default)
{
Inverse(spectrum, options);
}
/// <summary>
/// Bluestein forward FFT for arbitrary sized sample vectors.
/// </summary>
/// <param name="samples">Sample vector, where the FFT is evaluated in place.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
[Obsolete("Use Forward instead. Will be dropped in version 5.0 and behave like Forward until then.")]
public static void BluesteinForward(Complex32[] samples, FourierOptions options = FourierOptions.Default)
{
Forward(samples, options);
}
/// <summary>
/// Bluestein forward FFT for arbitrary sized sample vectors.
/// </summary>
/// <param name="samples">Sample vector, where the FFT is evaluated in place.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
[Obsolete("Use Forward instead. Will be dropped in version 5.0 and behave like Forward until then.")]
public static void BluesteinForward(Complex[] samples, FourierOptions options = FourierOptions.Default)
{
Forward(samples, options);
}
/// <summary>
/// Bluestein inverse FFT for arbitrary sized sample vectors.
/// </summary>
/// <param name="spectrum">Sample vector, where the FFT is evaluated in place.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
[Obsolete("Use Inverse instead. Will be dropped in version 5.0 and behave like Inverse until then.")]
public static void BluesteinInverse(Complex32[] spectrum, FourierOptions options = FourierOptions.Default)
{
Inverse(spectrum, options);
}
/// <summary>
/// Bluestein inverse FFT for arbitrary sized sample vectors.
/// </summary>
/// <param name="spectrum">Sample vector, where the FFT is evaluated in place.</param>
/// <param name="options">Fourier Transform Convention Options.</param>
[Obsolete("Use Inverse instead. Will be dropped in version 5.0 and behave like Inverse until then.")]
public static void BluesteinInverse(Complex[] spectrum, FourierOptions options = FourierOptions.Default)
{
Inverse(spectrum, options);
}
/// <summary>
/// Generate the frequencies corresponding to each index in frequency space.
/// The frequency space has a resolution of sampleRate/N.

39
src/Numerics/SpecialFunctions/Evaluate.cs

@ -55,45 +55,6 @@ namespace MathNet.Numerics
/// </summary>
public static class Evaluate
{
/// <summary>
/// Evaluate a polynomial at point x.
/// Coefficients are ordered by power with power k at index k.
/// Example: coefficients [3,-1,2] represent y=2x^2-x+3.
/// </summary>
/// <param name="z">The location where to evaluate the polynomial at.</param>
/// <param name="coefficients">The coefficients of the polynomial, coefficient for power k at index k.</param>
[Obsolete("Use Polynomial.Evaluate instead. Will be removed in the next major version.")]
public static double Polynomial(double z, params double[] coefficients)
{
return Numerics.Polynomial.Evaluate(z, coefficients);
}
/// <summary>
/// Evaluate a polynomial at point x.
/// Coefficients are ordered by power with power k at index k.
/// Example: coefficients [3,-1,2] represent y=2x^2-x+3.
/// </summary>
/// <param name="z">The location where to evaluate the polynomial at.</param>
/// <param name="coefficients">The coefficients of the polynomial, coefficient for power k at index k.</param>
[Obsolete("Use Polynomial.Evaluate instead. Will be removed in the next major version.")]
public static Complex Polynomial(Complex z, params double[] coefficients)
{
return Numerics.Polynomial.Evaluate(z, coefficients);
}
/// <summary>
/// Evaluate a polynomial at point x.
/// Coefficients are ordered by power with power k at index k.
/// Example: coefficients [3,-1,2] represent y=2x^2-x+3.
/// </summary>
/// <param name="z">The location where to evaluate the polynomial at.</param>
/// <param name="coefficients">The coefficients of the polynomial, coefficient for power k at index k.</param>
[Obsolete("Use Polynomial.Evaluate instead. Will be removed in the next major version.")]
public static Complex Polynomial(Complex z, params Complex[] coefficients)
{
return Numerics.Polynomial.Evaluate(z, coefficients);
}
/// <summary>
/// Numerically stable series summation
/// </summary>

Loading…
Cancel
Save