Browse Source

Cleanup: whitespace

ridge-regression
Christoph Ruegg 8 years ago
parent
commit
995b49593a
  1. 6
      src/Numerics.Tests/DistanceTests.cs
  2. 2
      src/Numerics.Tests/LinearAlgebraTests/Complex/Factorization/CholeskyTests.cs
  3. 2
      src/Numerics.Tests/LinearAlgebraTests/Complex32/UserDefinedMatrix.cs
  4. 2
      src/Numerics.Tests/LinearAlgebraTests/Double/UserDefinedMatrix.cs
  5. 2
      src/Numerics.Tests/LinearAlgebraTests/Single/UserDefinedMatrix.cs
  6. 2
      src/Numerics.Tests/OptimizationTests/BfgsBMinimizerTests.cs
  7. 2
      src/Numerics.Tests/OptimizationTests/TestFunctions/BealeFunction.cs
  8. 6
      src/Numerics.Tests/OptimizationTests/TestFunctions/BrownAndDennisFunction.cs
  9. 2
      src/Numerics.Tests/OptimizationTests/TestFunctions/BrownBadlyScaledFunction.cs
  10. 2
      src/Numerics.Tests/OptimizationTests/TestFunctions/FreudensteinAndRothFunction.cs
  11. 2
      src/Numerics.Tests/OptimizationTests/TestFunctions/HelicalValleyFunction.cs
  12. 2
      src/Numerics/Compatibility.cs
  13. 2
      src/Numerics/Distributions/Weibull.cs
  14. 12
      src/Numerics/Optimization/ObjectiveFunctions/ForwardDifferenceGradientObjectiveFunction.cs
  15. 24
      src/Numerics/Precision.Comparison.cs
  16. 2
      src/Numerics/Providers/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex.cs
  17. 2
      src/Numerics/Providers/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex32.cs
  18. 2
      src/Numerics/Providers/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Double.cs
  19. 2
      src/Numerics/Providers/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Single.cs
  20. 6
      src/Numerics/Random/Xoshiro256StarStar.cs
  21. 20
      src/Numerics/SpecialFunctions/ModifiedBessel.cs
  22. 18
      src/Numerics/SpecialFunctions/ModifiedStruve.cs
  23. 2
      src/Numerics/Statistics/RunningStatistics.cs

6
src/Numerics.Tests/DistanceTests.cs

@ -97,7 +97,7 @@ namespace MathNet.Numerics.UnitTests
Assert.That(Distance.Jaccard(_dp3, _dq3), Is.EqualTo(0));
Assert.That(Distance.Jaccard(_dp4, _dq4), Is.EqualTo(0.66666).Within(0.00001));
Assert.That(Distance.Jaccard(_dp5, _dq5), Is.EqualTo(0.9).Within(0.1));
Assert.That(() => Distance.Jaccard(_fp0, _fq4), Throws.ArgumentException);
Assert.That(() => Distance.Jaccard(null, _fq4), Throws.ArgumentNullException);
Assert.That(() => Distance.Jaccard(_fp0, null), Throws.ArgumentNullException);
@ -143,7 +143,7 @@ namespace MathNet.Numerics.UnitTests
Assert.That(Distance.Manhattan(_dp3, _dq3), Is.EqualTo(0));
Assert.That(Distance.Manhattan(_dp4, _dq4), Is.EqualTo(4.5));
Assert.That(Distance.Manhattan(_dp5, _dq5), Is.EqualTo(12));
Assert.That(() => Distance.Manhattan(_fp0, _fq4), Throws.ArgumentException);
Assert.That(Distance.Manhattan(_fp0, _fq0), Is.EqualTo(1));
@ -165,7 +165,7 @@ namespace MathNet.Numerics.UnitTests
Assert.That(Distance.Cosine(_dp3, _dq3), Is.EqualTo(0).Within(0.00001));
Assert.That(Distance.Cosine(_dp4, _dq4), Is.EqualTo(0.039354).Within(0.00001));
Assert.That(Distance.Cosine(_dp5, _dq5), Is.EqualTo(0.031026).Within(0.00001));
Assert.That(() => Distance.Cosine(_fp0, _fq4), Throws.ArgumentException);
Assert.That(Distance.Cosine(_fp0, _fq0), Is.EqualTo(0.2).Within(0.00001));

2
src/Numerics.Tests/LinearAlgebraTests/Complex/Factorization/CholeskyTests.cs

@ -34,7 +34,7 @@ using NUnit.Framework;
namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex.Factorization
{
using Complex = System.Numerics.Complex;
/// <summary>
/// Cholesky factorization tests for a dense matrix.
/// </summary>

2
src/Numerics.Tests/LinearAlgebraTests/Complex32/UserDefinedMatrix.cs

@ -102,7 +102,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex32
}
/// <summary>
/// Initializes a new instance of the <see cref="UserDefinedMatrix"/> class from a 2D array.
/// Initializes a new instance of the <see cref="UserDefinedMatrix"/> class from a 2D array.
/// </summary>
/// <param name="data">The 2D array to create this matrix from.</param>
public UserDefinedMatrix(Complex32[,] data)

2
src/Numerics.Tests/LinearAlgebraTests/Double/UserDefinedMatrix.cs

@ -100,7 +100,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Double
}
/// <summary>
/// Initializes a new instance of the <see cref="UserDefinedMatrix"/> class from a 2D array.
/// Initializes a new instance of the <see cref="UserDefinedMatrix"/> class from a 2D array.
/// </summary>
/// <param name="data">The 2D array to create this matrix from.</param>
public UserDefinedMatrix(double[,] data)

2
src/Numerics.Tests/LinearAlgebraTests/Single/UserDefinedMatrix.cs

@ -100,7 +100,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single
}
/// <summary>
/// Initializes a new instance of the <see cref="UserDefinedMatrix"/> class from a 2D array.
/// Initializes a new instance of the <see cref="UserDefinedMatrix"/> class from a 2D array.
/// </summary>
/// <param name="data">The 2D array to create this matrix from.</param>
public UserDefinedMatrix(float[,] data)

2
src/Numerics.Tests/OptimizationTests/BfgsBMinimizerTests.cs

@ -216,7 +216,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests
}
public IEnumerator<ITestCaseData> GetEnumerator()
{
return
return
RosenbrockFunction2.TestCases
.Concat(BealeFunction.TestCases)
.Concat(HelicalValleyFunction.TestCases)

2
src/Numerics.Tests/OptimizationTests/TestFunctions/BealeFunction.cs

@ -44,7 +44,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions
Function = new BealeFunction(),
InitialGuess = new double[] { 1, 1 },
MinimalValue = 0,
MinimizingPoint = new double[] { 3, 0.5 },
MinimizingPoint = new double[] { 3, 0.5 },
CaseName = "unbounded"
};
yield return new TestCase()

6
src/Numerics.Tests/OptimizationTests/TestFunctions/BrownAndDennisFunction.cs

@ -44,7 +44,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions
Function = new BrownAndDennisFunction(20),
InitialGuess = new double[] { 25, 5, -5, -1 },
MinimalValue = 85822.2,
MinimizingPoint = null,
MinimizingPoint = null,
CaseName = "unbounded"
};
yield return new TestCase()
@ -55,7 +55,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions
MinimizingPoint = null,
LowerBound = new double[] { -1000, -1000, -1000, -1000 },
UpperBound = new double[] {1000, 1000, 1000, 1000 },
CaseName = "loose bounds"
CaseName = "loose bounds"
};
yield return new TestCase()
{
@ -69,7 +69,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions
};
}
}
private readonly int _items;
public BrownAndDennisFunction(int items)

2
src/Numerics.Tests/OptimizationTests/TestFunctions/BrownBadlyScaledFunction.cs

@ -65,7 +65,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions
MinimizingPoint = new double[] { 1e6, 2e-6 },
LowerBound = new double[] { 0, 3e-5 },
UpperBound = new double[] { 1e6, 100 },
CaseName = "tight bounds"
CaseName = "tight bounds"
};
}
}

2
src/Numerics.Tests/OptimizationTests/TestFunctions/FreudensteinAndRothFunction.cs

@ -82,7 +82,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions
{
if (itemIndex == 0)
return -13 + x[0] + ((5 - x[1]) * x[1] - 2) * x[1];
else
else
return -29 + x[0] + ((x[1] + 1) * x[1] - 14) * x[1];
}

2
src/Numerics.Tests/OptimizationTests/TestFunctions/HelicalValleyFunction.cs

@ -185,7 +185,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions
{
return -((x1 * x2) / (Math.PI * Math.Pow(x1*x1 + x2*x2, 2)));
}
public override double ItemValue(Vector<double> x, int itemIndex)
{
switch (itemIndex)

2
src/Numerics/Compatibility.cs

@ -102,7 +102,7 @@ namespace MathNet.Numerics
var action = actions[i];
if (action == null)
{
throw new ArgumentException(String.Format(Properties.Resources.ArgumentItemNull, nameof(actions)), "actions");
throw new ArgumentException(String.Format(Properties.Resources.ArgumentItemNull, nameof(actions)), nameof(actions));
}
tasks[i] = Task.Factory.StartNew(action, parallelOptions.CancellationToken, TaskCreationOptions.None, parallelOptions.TaskScheduler);

2
src/Numerics/Distributions/Weibull.cs

@ -420,7 +420,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Implemented according to: Parameter estimation of the Weibull probability distribution, 1994, Hongzhu Qiao, Chris P. Tsokos
/// Implemented according to: Parameter estimation of the Weibull probability distribution, 1994, Hongzhu Qiao, Chris P. Tsokos
/// </summary>
/// <param name="samples"></param>
/// <param name="randomSource"></param>

12
src/Numerics/Optimization/ObjectiveFunctions/ForwardDifferenceGradientObjectiveFunction.cs

@ -33,13 +33,13 @@ using MathNet.Numerics.LinearAlgebra;
namespace MathNet.Numerics.Optimization.ObjectiveFunctions
{
/// <summary>
/// Adapts an objective function with only value implemented
/// to provide a gradient as well. Gradient calculation is
/// done using the finite difference method, specifically
/// Adapts an objective function with only value implemented
/// to provide a gradient as well. Gradient calculation is
/// done using the finite difference method, specifically
/// forward differences.
///
/// For each gradient computed, the algorithm requires an
/// additional number of function evaluations equal to the
///
/// For each gradient computed, the algorithm requires an
/// additional number of function evaluations equal to the
/// functions's number of input parameters.
/// </summary>
public class ForwardDifferenceGradientObjectiveFunction : IObjectiveFunction

24
src/Numerics/Precision.Comparison.cs

@ -219,8 +219,8 @@ namespace MathNet.Numerics
/// </summary>
/// <remarks>
/// <para>
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of the numbers, e.g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of the numbers, e.g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// 0.005 and 0.015, but not 0.02 and not 0.00
/// </para>
/// </remarks>
@ -247,8 +247,8 @@ namespace MathNet.Numerics
/// </summary>
/// <remarks>
/// <para>
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of the numbers, e.g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of the numbers, e.g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// 0.005 and 0.015, but not 0.02 and not 0.00
/// </para>
/// </remarks>
@ -317,8 +317,8 @@ namespace MathNet.Numerics
/// </summary>
/// <remarks>
/// <para>
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of the numbers, e.g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of the numbers, e.g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// 0.005 and 0.015, but not 0.02 and not 0.00
/// </para>
/// </remarks>
@ -345,8 +345,8 @@ namespace MathNet.Numerics
/// </summary>
/// <remarks>
/// <para>
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of the numbers, e.g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of the numbers, e.g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// 0.005 and 0.015, but not 0.02 and not 0.00
/// </para>
/// </remarks>
@ -457,8 +457,8 @@ namespace MathNet.Numerics
/// </summary>
/// <remarks>
/// <para>
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of th<paramref name="decimalPlaces"/>g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of th<paramref name="decimalPlaces"/>g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// 0.005 and 0.015, but not 0.02 and not 0.00
/// </para>
/// </remarks>
@ -485,8 +485,8 @@ namespace MathNet.Numerics
/// </summary>
/// <remarks>
/// <para>
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of th<paramref name="decimalPlaces"/>g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by
/// two so that we have half the range on each side of th<paramref name="decimalPlaces"/>g. if <paramref name="decimalPlaces"/> == 2, then 0.01 will equal between
/// 0.005 and 0.015, but not 0.02 and not 0.00
/// </para>
/// </remarks>

2
src/Numerics/Providers/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex.cs

@ -605,7 +605,7 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Acml
/// it is overwritten with the R matrix of the QR factorization. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// QR factorization.</param>
/// <param name="tau">A min(m,n) vector. On exit, contains additional information
/// to be used by the QR solve routine.</param>

2
src/Numerics/Providers/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex32.cs

@ -608,7 +608,7 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Acml
/// it is overwritten with the R matrix of the QR factorization. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// QR factorization.</param>
/// <param name="tau">A min(m,n) vector. On exit, contains additional information
/// to be used by the QR solve routine.</param>

2
src/Numerics/Providers/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Double.cs

@ -608,7 +608,7 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Acml
/// it is overwritten with the R matrix of the QR factorization. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// QR factorization.</param>
/// <param name="tau">A min(m,n) vector. On exit, contains additional information
/// to be used by the QR solve routine.</param>

2
src/Numerics/Providers/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Single.cs

@ -608,7 +608,7 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Acml
/// it is overwritten with the R matrix of the QR factorization. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// QR factorization.</param>
/// <param name="tau">A min(m,n) vector. On exit, contains additional information
/// to be used by the QR solve routine.</param>

6
src/Numerics/Random/Xoshiro256StarStar.cs

@ -135,8 +135,8 @@ namespace MathNet.Numerics.Random
protected override int DoSampleInteger()
{
retry:
// Handle the special case where the value int.MaxValue is generated; this is outside
// the range of permitted return values for this method.
// Handle the special case where the value int.MaxValue is generated; this is outside
// the range of permitted return values for this method.
ulong rtn = NextInnerULong() & 0x7fff_ffffUL;
if (rtn == 0x7fff_ffffUL)
{
@ -250,7 +250,7 @@ namespace MathNet.Numerics.Random
_s2 = Splitmix64(ref longSeed);
_s3 = Splitmix64(ref longSeed);
}
private ulong NextInnerULong()
{
ulong s0 = _s0;

20
src/Numerics/SpecialFunctions/ModifiedBessel.cs

@ -31,10 +31,10 @@
// CERN - European Laboratory for Particle Physics
// http://www.docjar.com/html/api/cern/jet/math/Bessel.java.html
// Copyright 1999 CERN - European Laboratory for Particle Physics.
// Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose
// is hereby granted without fee, provided that the above copyright notice appear in all copies and
// that both that copyright notice and this permission notice appear in supporting documentation.
// CERN makes no representations about the suitability of this software for any purpose.
// Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose
// is hereby granted without fee, provided that the above copyright notice appear in all copies and
// that both that copyright notice and this permission notice appear in supporting documentation.
// CERN makes no representations about the suitability of this software for any purpose.
// It is provided "as is" without expressed or implied warranty.
// TOMS757 - Uncommon Special Functions (Fortran77) by Allan McLeod
// http://people.sc.fsu.edu/~jburkardt/f77_src/toms757/toms757.html
@ -61,14 +61,14 @@ namespace MathNet.Numerics
/// </summary>
/// <summary> Chebyshev coefficients for exp(-x) I0(x)
/// in the interval [0, 8].
///
///
/// lim(x->0){ exp(-x) I0(x) } = 1.
/// </summary>
private static readonly double[] BesselI0A = { -4.41534164647933937950e-18, 3.33079451882223809783e-17, -2.43127984654795469359e-16, 1.71539128555513303061e-15, -1.16853328779934516808e-14, 7.67618549860493561688e-14, -4.85644678311192946090e-13, 2.95505266312963983461e-12, -1.72682629144155570723e-11, 9.67580903537323691224e-11, -5.18979560163526290666e-10, 2.65982372468238665035e-9, -1.30002500998624804212e-8, 6.04699502254191894932e-8, -2.67079385394061173391e-7, 1.11738753912010371815e-6, -4.41673835845875056359e-6, 1.64484480707288970893e-5, -5.75419501008210370398e-5, 1.88502885095841655729e-4, -5.76375574538582365885e-4, 1.63947561694133579842e-3, -4.32430999505057594430e-3, 1.05464603945949983183e-2, -2.37374148058994688156e-2, 4.93052842396707084878e-2, -9.49010970480476444210e-2, 1.71620901522208775349e-1, -3.04682672343198398683e-1, 6.76795274409476084995e-1 };
/// <summary> Chebyshev coefficients for exp(-x) sqrt(x) I0(x)
/// in the inverted interval [8, infinity].
///
///
/// lim(x->inf){ exp(-x) sqrt(x) I0(x) } = 1/sqrt(2pi).
/// </summary>
private static readonly double[] BesselI0B = { -7.23318048787475395456e-18, -4.83050448594418207126e-18, 4.46562142029675999901e-17, 3.46122286769746109310e-17, -2.82762398051658348494e-16, -3.42548561967721913462e-16, 1.77256013305652638360e-15, 3.81168066935262242075e-15, -9.55484669882830764870e-15, -4.15056934728722208663e-14, 1.54008621752140982691e-14, 3.85277838274214270114e-13, 7.18012445138366623367e-13, -1.79417853150680611778e-12, -1.32158118404477131188e-11, -3.14991652796324136454e-11, 1.18891471078464383424e-11, 4.94060238822496958910e-10, 3.39623202570838634515e-9, 2.26666899049817806459e-8, 2.04891858946906374183e-7, 2.89137052083475648297e-6, 6.88975834691682398426e-5, 3.36911647825569408990e-3, 8.04490411014108831608e-1 };
@ -80,7 +80,7 @@ namespace MathNet.Numerics
/// </summary>
/// <summary> Chebyshev coefficients for exp(-x) I1(x) / x
/// in the interval [0, 8].
///
///
/// lim(x->0){ exp(-x) I1(x) / x } = 1/2.
/// </summary>
private static readonly double[] BesselI1A = { 2.77791411276104639959e-18, -2.11142121435816608115e-17, 1.55363195773620046921e-16, -1.10559694773538630805e-15, 7.60068429473540693410e-15, -5.04218550472791168711e-14, 3.22379336594557470981e-13, -1.98397439776494371520e-12, 1.17361862988909016308e-11, -6.66348972350202774223e-11, 3.62559028155211703701e-10, -1.88724975172282928790e-9, 9.38153738649577178388e-9, -4.44505912879632808065e-8, 2.00329475355213526229e-7, -8.56872026469545474066e-7, 3.47025130813767847674e-6, -1.32731636560394358279e-5, 4.78156510755005422638e-5, -1.61760815825896745588e-4, 5.12285956168575772895e-4, -1.51357245063125314899e-3, 4.15642294431288815669e-3, -1.05640848946261981558e-2, 2.47264490306265168283e-2, -5.29459812080949914269e-2, 1.02643658689847095384e-1, -1.76416518357834055153e-1, 2.52587186443633654823e-1 };
@ -100,14 +100,14 @@ namespace MathNet.Numerics
/// <summary> Chebyshev coefficients for K0(x) + log(x/2) I0(x)
/// in the interval [0, 2]. The odd order coefficients are all
/// zero; only the even order coefficients are listed.
///
///
/// lim(x->0){ K0(x) + log(x/2) I0(x) } = -EUL.
/// </summary>
private static readonly double[] BesselK0A = { 1.37446543561352307156e-16, 4.25981614279661018399e-14, 1.03496952576338420167e-11, 1.90451637722020886025e-9, 2.53479107902614945675e-7, 2.28621210311945178607e-5, 1.26461541144692592338e-3, 3.59799365153615016266e-2, 3.44289899924628486886e-1, -5.35327393233902768720e-1 };
/// <summary> Chebyshev coefficients for exp(x) sqrt(x) K0(x)
/// in the inverted interval [2, infinity].
///
///
/// lim(x->inf){ exp(x) sqrt(x) K0(x) } = sqrt(pi/2).
/// </summary>
private static readonly double[] BesselK0B = { 5.30043377268626276149e-18, -1.64758043015242134646e-17, 5.21039150503902756861e-17, -1.67823109680541210385e-16, 5.51205597852431940784e-16, -1.84859337734377901440e-15, 6.34007647740507060557e-15, -2.22751332699166985548e-14, 8.03289077536357521100e-14, -2.98009692317273043925e-13, 1.14034058820847496303e-12, -4.51459788337394416547e-12, 1.85594911495471785253e-11, -7.95748924447710747776e-11, 3.57739728140030116597e-10, -1.69753450938905987466e-9, 8.57403401741422608519e-9, -4.66048989768794782956e-8, 2.76681363944501510342e-7, -1.83175552271911948767e-6, 1.39498137188764993662e-5, -1.28495495816278026384e-4, 1.56988388573005337491e-3, -3.14481013119645005427e-2, 2.44030308206595545468e0 };
@ -119,7 +119,7 @@ namespace MathNet.Numerics
/// </summary>
/// <summary> Chebyshev coefficients for x(K1(x) - log(x/2) I1(x))
/// in the interval [0, 2].
///
///
/// lim(x->0){ x(K1(x) - log(x/2) I1(x)) } = 1.
/// </summary>
private static readonly double[] BesselK1A = { -7.02386347938628759343e-18, -2.42744985051936593393e-15, -6.66690169419932900609e-13, -1.41148839263352776110e-10, -2.21338763073472585583e-8, -2.43340614156596823496e-6, -1.73028895751305206302e-4, -6.97572385963986435018e-3, -1.22611180822657148235e-1, -3.53155960776544875667e-1, 1.52530022733894777053e0 };

18
src/Numerics/SpecialFunctions/ModifiedStruve.cs

@ -31,10 +31,10 @@
// CERN - European Laboratory for Particle Physics
// http://www.docjar.com/html/api/cern/jet/math/Bessel.java.html
// Copyright 1999 CERN - European Laboratory for Particle Physics.
// Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose
// is hereby granted without fee, provided that the above copyright notice appear in all copies and
// that both that copyright notice and this permission notice appear in supporting documentation.
// CERN makes no representations about the suitability of this software for any purpose.
// Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose
// is hereby granted without fee, provided that the above copyright notice appear in all copies and
// that both that copyright notice and this permission notice appear in supporting documentation.
// CERN makes no representations about the suitability of this software for any purpose.
// It is provided "as is" without expressed or implied warranty.
// TOMS757 - Uncommon Special Functions (Fortran77) by Allan McLeod
// http://people.sc.fsu.edu/~jburkardt/f77_src/toms757/toms757.html
@ -324,15 +324,15 @@ namespace MathNet.Numerics
//
// NTERM2 - INTEGER - The no. of terms for the array ARL1AS.
// The recommended value is such that
// ABS(ARL1AS(NTERM2)) < EPS/100
// ABS(ARL1AS(NTERM2)) < EPS/100
//
// NTERM3 - INTEGER - The no. of terms for the array AI1ML1.
// The recommended value is such that
// ABS(AI1ML1(NTERM3)) < EPS/100
//
// XLOW1 - DOUBLE PRECISION - The value of x below which
// XLOW1 - DOUBLE PRECISION - The value of x below which
// L1(x) = 2*x*x/(3*pi)
// to machine precision. The recommended
// to machine precision. The recommended
// value is SQRT(15*EPS)
//
// XLOW2 - DOUBLE PRECISION - The value of x below which L1(x) set to 0.0.
@ -349,12 +349,12 @@ namespace MathNet.Numerics
// series in the asymptotic expansion of I1 - L1
// equals 1.0 to machine precision. The recommended
// value is 30 / EPSNEG.
//
//
// XMAX - DOUBLE PRECISION - The value of XMAX, where XMAX is the
// largest possible floating-pt argument.
// This is used to prevent overflow.
//
// For values of EPS, EPSNEG, XMIN, and XMAX the user should refer
// For values of EPS, EPSNEG, XMIN, and XMAX the user should refer
// to the file MACHCON.TXT
//
// The machine-arithmetic constants are given in DATA

2
src/Numerics/Statistics/RunningStatistics.cs

@ -245,7 +245,7 @@ namespace MathNet.Numerics.Statistics
{
return a;
}
long n = a._n + b._n;
double d = b._m1 - a._m1;
double d2 = d*d;

Loading…
Cancel
Save