Browse Source
Merge pull request #711 from Evangelink/tests-invariant-culture
Fix thread culture for some tests
pull/729/head
Christoph Ruegg
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with
41 additions and
0 deletions
-
src/Numerics.Tests/DistributionTests/Continuous/BetaTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/BurrTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/CauchyTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/ChiSquareTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/ChiTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/ContinuousUniformTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/ErlangTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/ExponentialTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/FisherSnedecorTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/GammaTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/InverseGammaTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/InverseGaussianTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/LaplaceTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/LogNormalTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/NormalTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/ParetoTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/RayleighTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/StableTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/StudentTTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/TriangularTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/TruncatedParetoTests.cs
-
src/Numerics.Tests/DistributionTests/Continuous/WeibullTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/BernoulliTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/BinomialTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/CategoricalTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/ConwayMaxwellPoissonTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/DiscreteUniformTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/GeometricTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/HypergeometricTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/NegativeBinomialTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/PoissonTests.cs
-
src/Numerics.Tests/DistributionTests/Discrete/ZipfTests.cs
-
src/Numerics.Tests/DistributionTests/Multivariate/InverseWishartTests.cs
-
src/Numerics.Tests/DistributionTests/Multivariate/MatrixNormalTests.cs
-
src/Numerics.Tests/DistributionTests/Multivariate/MultinomialTests.cs
-
src/Numerics.Tests/DistributionTests/Multivariate/WishartTests.cs
-
src/Numerics.Tests/LinearAlgebraTests/VectorToStringTests.cs
|
|
|
@ -84,6 +84,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Beta(1d, 2d); |
|
|
|
Assert.AreEqual("Beta(α = 1, β = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -113,6 +113,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Burr(1d, 2d, 3d); |
|
|
|
Assert.AreEqual("Burr(a = 1, c = 2, k = 3)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -89,6 +89,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Cauchy(1d, 2d); |
|
|
|
Assert.AreEqual("Cauchy(x0 = 1, γ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -75,6 +75,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new ChiSquared(1.0); |
|
|
|
Assert.AreEqual("ChiSquared(k = 1)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -73,6 +73,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Chi(1.0); |
|
|
|
Assert.AreEqual("Chi(k = 1)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -92,6 +92,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new ContinuousUniform(1.0, 2.0); |
|
|
|
Assert.AreEqual("ContinuousUniform(Lower = 1, Upper = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -115,6 +115,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Erlang(1, 2d); |
|
|
|
Assert.AreEqual("Erlang(k = 1, λ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -73,6 +73,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Exponential(2d); |
|
|
|
Assert.AreEqual("Exponential(λ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -96,6 +96,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new FisherSnedecor(2d, 1d); |
|
|
|
Assert.AreEqual("FisherSnedecor(d1 = 2, d2 = 1)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -117,6 +117,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Gamma(1d, 2d); |
|
|
|
Assert.AreEqual("Gamma(α = 1, β = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -28,6 +28,7 @@ |
|
|
|
// </copyright>
|
|
|
|
|
|
|
|
using System; |
|
|
|
using System.Globalization; |
|
|
|
using System.Linq; |
|
|
|
using MathNet.Numerics.Distributions; |
|
|
|
using NUnit.Framework; |
|
|
|
@ -81,6 +82,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; |
|
|
|
var n = new InverseGamma(1.1d, 2.1d); |
|
|
|
Assert.AreEqual("InverseGamma(α = 1.1, β = 2.1)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -102,6 +102,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new InverseGaussian(1d, 2d); |
|
|
|
Assert.AreEqual("InverseGaussian(μ = 1, λ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -75,6 +75,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Laplace(-1d, 2d); |
|
|
|
Assert.AreEqual("Laplace(μ = -1, b = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -80,6 +80,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new LogNormal(1d, 2d); |
|
|
|
Assert.AreEqual("LogNormal(μ = 1, σ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -145,6 +145,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Normal(1d, 2d); |
|
|
|
Assert.AreEqual("Normal(μ = 1, σ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -81,6 +81,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Pareto(1d, 2d); |
|
|
|
Assert.AreEqual("Pareto(xm = 1, α = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -73,6 +73,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Rayleigh(2d); |
|
|
|
Assert.AreEqual("Rayleigh(σ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -97,6 +97,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Stable(1.2d, 0.3d, 1d, 2d); |
|
|
|
Assert.AreEqual("Stable(α = 1.2, β = 0.3, c = 1, μ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -93,6 +93,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new StudentT(1.0, 2.0, 1.0); |
|
|
|
Assert.AreEqual("StudentT(μ = 1, σ = 2, ν = 1)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -88,6 +88,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Triangular(0d, 2d, 1d); |
|
|
|
Assert.AreEqual("Triangular(Lower = 0, Upper = 2, Mode = 1)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -111,6 +111,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new TruncatedPareto(1d, 2d, 100d); |
|
|
|
Assert.AreEqual("Truncated Pareto(Scale = 1, Shape = 2, Truncation = 100)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -83,6 +83,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Continuous |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var n = new Weibull(1d, 2d); |
|
|
|
Assert.AreEqual("Weibull(k = 1, λ = 2)", n.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -71,6 +71,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var b = new Bernoulli(0.3); |
|
|
|
Assert.AreEqual("Bernoulli(p = 0.3)", b.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -75,6 +75,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var b = new Binomial(0.3, 2); |
|
|
|
Assert.AreEqual("Binomial(p = 0.3, n = 2)", b.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -134,6 +134,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var b = new Categorical(_smallP); |
|
|
|
Assert.AreEqual("Categorical(Dimension = 3)", b.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -72,6 +72,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var d = new ConwayMaxwellPoisson(1d, 2d); |
|
|
|
Assert.AreEqual("ConwayMaxwellPoisson(λ = 1, ν = 2)", d.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -75,6 +75,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var b = new DiscreteUniform(0, 10); |
|
|
|
Assert.AreEqual("DiscreteUniform(Lower = 0, Upper = 10)", b.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -72,6 +72,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var d = new Geometric(0.3); |
|
|
|
Assert.AreEqual("Geometric(p = 0.3)", d.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -82,6 +82,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var d = new Hypergeometric(10, 1, 1); |
|
|
|
Assert.AreEqual("Hypergeometric(N = 10, M = 1, n = 1)", d.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -79,6 +79,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var d = new NegativeBinomial(1.0, 0.3); |
|
|
|
Assert.AreEqual(String.Format("NegativeBinomial(R = {0}, P = {1})", d.R, d.P), d.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -71,6 +71,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var d = new Poisson(0.3); |
|
|
|
Assert.AreEqual(String.Format("Poisson(λ = {0})", 0.3), d.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -73,6 +73,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Discrete |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var d = new Zipf(1.0, 5); |
|
|
|
Assert.AreEqual("Zipf(S = 1, N = 5)", d.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -137,6 +137,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Multivariate |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var d = new InverseWishart(1d, Matrix<double>.Build.RandomPositiveDefinite(2, 1)); |
|
|
|
Assert.AreEqual("InverseWishart(ν = 1, Rows = 2, Columns = 2)", d.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -148,6 +148,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Multivariate |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
const int N = 2; |
|
|
|
const int P = 5; |
|
|
|
var d = new MatrixNormal(Matrix<double>.Build.Random(N, P, 1), Matrix<double>.Build.RandomPositiveDefinite(N, 1), Matrix<double>.Build.RandomPositiveDefinite(P, 1)); |
|
|
|
|
|
|
|
@ -136,6 +136,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Multivariate |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var b = new Multinomial(_smallP, 4); |
|
|
|
Assert.AreEqual("Multinomial(Dimension = 3, Number of Trails = 4)", b.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -131,6 +131,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests.Multivariate |
|
|
|
[Test] |
|
|
|
public void ValidateToString() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
var d = new Wishart(1.0, Matrix<double>.Build.RandomPositiveDefinite(2, 1)); |
|
|
|
Assert.AreEqual("Wishart(DegreesOfFreedom = 1, Rows = 2, Columns = 2)", d.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -15,6 +15,8 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests |
|
|
|
[Test] |
|
|
|
public void MinimumLimits() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
|
|
|
|
Assert.That(v1.ToVectorString(3, 16, "G6"), Is.EqualTo("3.14159" + NL)); |
|
|
|
Assert.That(v2.ToVectorString(3, 16, "G6"), Is.EqualTo("3.14159" + NL + "6.28319" + NL)); |
|
|
|
Assert.That(v100.ToVectorString(3, 16, "G6"), Is.EqualTo("3.14159" + NL + " .." + NL + "314.159" + NL)); |
|
|
|
@ -23,6 +25,8 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests |
|
|
|
[Test] |
|
|
|
public void GitHubIssue387() |
|
|
|
{ |
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; |
|
|
|
|
|
|
|
Vector<double> v = Vector<double>.Build.DenseOfArray(new[] |
|
|
|
{ |
|
|
|
0.607142857142857, |
|
|
|
|