Removed float namespace

This commit is contained in:
Thorsten Sommer 2023-07-06 10:08:46 +02:00
parent 7bc829482e
commit 38764d5d97
No known key found for this signature in database
GPG Key ID: B0B7E2FC074BF1F5
56 changed files with 182 additions and 184 deletions

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class BetaA2B2 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class BetaA2B5 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class BetaA5B2 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class CauchyLorentzX0 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class CauchyLorentzX1 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class ChiSquareK1 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class ChiSquareK10 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class ChiSquareK4 : Distribution
{

View File

@ -2,7 +2,7 @@ using System;
using System.Threading;
using System.Threading.Tasks;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public abstract class Distribution : IDistribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class ExponentialLa10 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class ExponentialLa5 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class GammaA5B15 : Distribution
{

View File

@ -1,7 +1,7 @@
using System.Threading;
using System.Threading.Tasks;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public interface IDistribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class InverseExponentialLa10 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class InverseExponentialLa5 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class InverseGammaA3B05 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class LaplaceB01M0 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class LaplaceB01M05 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class LogNormalS1M0 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class NormalS02M05 : Distribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class StudentTNu1 : Distribution
{

View File

@ -2,7 +2,7 @@ using System;
using System.Threading;
using System.Threading.Tasks;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class Uniform : IDistribution
{

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float.Distributions
namespace FastRng.Distributions
{
public sealed class WeibullK05La1 : Distribution
{

View File

@ -21,4 +21,5 @@
<DocumentationFile>bin\Release\ExaArray.xml</DocumentationFile>
</PropertyGroup>
</Project>

View File

@ -1,9 +1,8 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using FastRng.Float.Distributions;
namespace FastRng.Float
namespace FastRng
{
/// <summary>
/// Interface for random number generators.

View File

@ -1,6 +1,6 @@
using System;
namespace FastRng.Float
namespace FastRng
{
/// <summary>
/// Provides some mathematical function, which are not available within in the .NET framework.

View File

@ -3,9 +3,8 @@ using System.Collections.Concurrent;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using FastRng.Float.Distributions;
namespace FastRng.Float
namespace FastRng
{
/// <summary>
/// A fast multi-threaded pseudo random number generator.

View File

@ -1,9 +1,9 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using FastRng.Float.Distributions;
using FastRng.Distributions;
namespace FastRng.Float
namespace FastRng
{
/// <summary>
/// ShapeFitter is a rejection sampler, cf. https://en.wikipedia.org/wiki/Rejection_sampling

View File

@ -1,14 +1,12 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng.Float.Distributions;
using FastRngTests.Float.Distributions;
using FastRng;
using NUnit.Framework;
using Uniform = FastRng.Float.Distributions.Uniform;
using Uniform = FastRng.Distributions.Uniform;
using WeibullK05La1 = FastRng.Distributions.WeibullK05La1;
namespace FastRngTests.Float
namespace FastRngTests
{
[ExcludeFromCodeCoverage]
public class DecisionTester
@ -43,7 +41,7 @@ namespace FastRngTests.Float
public async Task DecisionWeibull01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.WeibullK05La1(rng);
var dist = new WeibullK05La1(rng);
var neededCoinTossesA = 0;
var neededCoinTossesB = 0;

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class BetaA2B2
@ -16,8 +16,8 @@ namespace FastRngTests.Float.Distributions
public async Task TestBetaDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.BetaA2B2(rng);
var fqa = new Float.FrequencyAnalysis();
var dist = new FastRng.Distributions.BetaA2B2(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
fqa.CountThis(await dist.NextNumber());
@ -50,7 +50,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.BetaA2B2(rng);
var dist = new FastRng.Distributions.BetaA2B2(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -65,7 +65,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.BetaA2B2(rng);
var dist = new FastRng.Distributions.BetaA2B2(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.BetaA2B2(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.BetaA2B2(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class BetaA2B5
@ -16,8 +16,8 @@ namespace FastRngTests.Float.Distributions
public async Task TestBetaDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.BetaA2B5(rng);
var fqa = new Float.FrequencyAnalysis();
var dist = new FastRng.Distributions.BetaA2B5(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
fqa.CountThis(await dist.NextNumber());
@ -50,7 +50,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.BetaA2B5(rng);
var dist = new FastRng.Distributions.BetaA2B5(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -65,7 +65,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.BetaA2B5(rng);
var dist = new FastRng.Distributions.BetaA2B5(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.BetaA2B5(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.BetaA2B5(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class BetaA5B2
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestBetaDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.BetaA5B2(rng);
var dist = new FastRng.Distributions.BetaA5B2(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -50,7 +50,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.BetaA5B2(rng);
var dist = new FastRng.Distributions.BetaA5B2(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -65,7 +65,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.BetaA5B2(rng);
var dist = new FastRng.Distributions.BetaA5B2(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.BetaA5B2(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.BetaA5B2(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class CauchyLorentzX0
@ -19,7 +19,7 @@ namespace FastRngTests.Float.Distributions
// cf. https://en.wikipedia.org/wiki/Cauchy_distribution#Explanation_of_undefined_moments
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.CauchyLorentzX0(rng);
var dist = new FastRng.Distributions.CauchyLorentzX0(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -52,7 +52,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestCauchyGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.CauchyLorentzX0(rng);
var dist = new FastRng.Distributions.CauchyLorentzX0(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -67,7 +67,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestCauchyGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.CauchyLorentzX0(rng);
var dist = new FastRng.Distributions.CauchyLorentzX0(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -81,7 +81,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.CauchyLorentzX0(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.CauchyLorentzX0(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class CauchyLorentzX1
@ -19,7 +19,7 @@ namespace FastRngTests.Float.Distributions
// cf. https://en.wikipedia.org/wiki/Cauchy_distribution#Explanation_of_undefined_moments
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.CauchyLorentzX1(rng);
var dist = new FastRng.Distributions.CauchyLorentzX1(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -52,7 +52,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestCauchyGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.CauchyLorentzX0(rng);
var dist = new FastRng.Distributions.CauchyLorentzX0(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -67,7 +67,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestCauchyGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.CauchyLorentzX0(rng);
var dist = new FastRng.Distributions.CauchyLorentzX0(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -81,7 +81,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.CauchyLorentzX1(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.CauchyLorentzX1(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class ChiSquareK1
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK1(rng);
var dist = new FastRng.Distributions.ChiSquareK1(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -52,7 +52,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK1(rng);
var dist = new FastRng.Distributions.ChiSquareK1(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -67,7 +67,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK1(rng);
var dist = new FastRng.Distributions.ChiSquareK1(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -81,7 +81,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.ChiSquareK1(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.ChiSquareK1(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class ChiSquareK10
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK10(rng);
var dist = new FastRng.Distributions.ChiSquareK10(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -52,7 +52,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK10(rng);
var dist = new FastRng.Distributions.ChiSquareK10(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -67,7 +67,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK10(rng);
var dist = new FastRng.Distributions.ChiSquareK10(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -81,7 +81,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.ChiSquareK10(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.ChiSquareK10(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class ChiSquareK4
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK4(rng);
var dist = new FastRng.Distributions.ChiSquareK4(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK4(rng);
var dist = new FastRng.Distributions.ChiSquareK4(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestChiSquareGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ChiSquareK4(rng);
var dist = new FastRng.Distributions.ChiSquareK4(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.ChiSquareK4(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.ChiSquareK4(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class ExponentialLa10
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ExponentialLa10(rng);
var dist = new FastRng.Distributions.ExponentialLa10(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ExponentialLa10(rng);
var dist = new FastRng.Distributions.ExponentialLa10(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ExponentialLa10(rng);
var dist = new FastRng.Distributions.ExponentialLa10(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.ExponentialLa10(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.ExponentialLa10(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class ExponentialLa5
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ExponentialLa5(rng);
var dist = new FastRng.Distributions.ExponentialLa5(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ExponentialLa5(rng);
var dist = new FastRng.Distributions.ExponentialLa5(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.ExponentialLa5(rng);
var dist = new FastRng.Distributions.ExponentialLa5(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.ExponentialLa5(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.ExponentialLa5(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class GammaA5B15
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestGammaDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.GammaA5B15(rng);
var dist = new FastRng.Distributions.GammaA5B15(rng);
var fra = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestGammaGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.GammaA5B15(rng);
var dist = new FastRng.Distributions.GammaA5B15(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestGammaGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.GammaA5B15(rng);
var dist = new FastRng.Distributions.GammaA5B15(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.GammaA5B15(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.GammaA5B15(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class InverseExponentialLa10
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseExponentialLa10(rng);
var dist = new FastRng.Distributions.InverseExponentialLa10(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseExponentialLa10(rng);
var dist = new FastRng.Distributions.InverseExponentialLa10(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseExponentialLa10(rng);
var dist = new FastRng.Distributions.InverseExponentialLa10(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.InverseExponentialLa10(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.InverseExponentialLa10(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class InverseExponentialLa5
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseExponentialLa5(rng);
var dist = new FastRng.Distributions.InverseExponentialLa5(rng);
var fqa = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseExponentialLa5(rng);
var dist = new FastRng.Distributions.InverseExponentialLa5(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestExponentialGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseExponentialLa5(rng);
var dist = new FastRng.Distributions.InverseExponentialLa5(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.InverseExponentialLa5(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.InverseExponentialLa5(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class InverseGammaA3B05
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestInverseGammaDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseGammaA3B05(rng);
var dist = new FastRng.Distributions.InverseGammaA3B05(rng);
var fra = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestInverseGammaGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseGammaA3B05(rng);
var dist = new FastRng.Distributions.InverseGammaA3B05(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestInverseGammaGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.InverseGammaA3B05(rng);
var dist = new FastRng.Distributions.InverseGammaA3B05(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.InverseGammaA3B05(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.InverseGammaA3B05(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class LaplaceB01M0
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLaplaceDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LaplaceB01M0(rng);
var dist = new FastRng.Distributions.LaplaceB01M0(rng);
var fra = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLaplaceGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LaplaceB01M0(rng);
var dist = new FastRng.Distributions.LaplaceB01M0(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLaplaceGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LaplaceB01M0(rng);
var dist = new FastRng.Distributions.LaplaceB01M0(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.LaplaceB01M0(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.LaplaceB01M0(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class LaplaceB01M05
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLaplaceDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LaplaceB01M05(rng);
var dist = new FastRng.Distributions.LaplaceB01M05(rng);
var fra = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLaplaceGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LaplaceB01M05(rng);
var dist = new FastRng.Distributions.LaplaceB01M05(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLaplaceGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LaplaceB01M05(rng);
var dist = new FastRng.Distributions.LaplaceB01M05(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.LaplaceB01M05(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.LaplaceB01M05(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class LogNormalS1M0
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLogNormalDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LogNormalS1M0(rng);
var dist = new FastRng.Distributions.LogNormalS1M0(rng);
var fra = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLogNormalGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LogNormalS1M0(rng);
var dist = new FastRng.Distributions.LogNormalS1M0(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestLogNormalGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.LogNormalS1M0(rng);
var dist = new FastRng.Distributions.LogNormalS1M0(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.LogNormalS1M0(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.LogNormalS1M0(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class NormalS02M05
@ -19,7 +19,7 @@ namespace FastRngTests.Float.Distributions
const float STANDARD_DEVIATION = 0.2f;
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.NormalS02M05(rng);
var dist = new FastRng.Distributions.NormalS02M05(rng);
var stats = new RunningStatistics();
var fra = new FrequencyAnalysis();
@ -46,7 +46,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.NormalS02M05(rng);
var dist = new FastRng.Distributions.NormalS02M05(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -61,7 +61,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.NormalS02M05(rng);
var dist = new FastRng.Distributions.NormalS02M05(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -74,7 +74,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.NormalS02M05(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.NormalS02M05(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class StudentTNu1
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestStudentTDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.StudentTNu1(rng);
var dist = new FastRng.Distributions.StudentTNu1(rng);
var fra = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestStudentTGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.StudentTNu1(rng);
var dist = new FastRng.Distributions.StudentTNu1(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestStudentTGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.StudentTNu1(rng);
var dist = new FastRng.Distributions.StudentTNu1(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.StudentTNu1(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.StudentTNu1(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class Uniform
@ -117,7 +117,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -132,7 +132,7 @@ namespace FastRngTests.Float.Distributions
{
using var rng = new MultiThreadedRng();
var samples = new float[1_000];
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -160,7 +160,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestRange05Uint()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 1_000_000;
for (var n = 0; n < runs; n++)
@ -176,7 +176,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestRange05Ulong()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 1_000_000;
for (var n = 0; n < runs; n++)
@ -192,7 +192,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestRange05Float()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 1_000_000;
for (var n = 0; n < runs; n++)
@ -207,7 +207,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestDistribution001Uint()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 1_000_000;
for (var n = 0; n < runs; n++)
@ -221,7 +221,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestDistribution001Ulong()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 1_000_000;
for (var n = 0; n < runs; n++)
@ -235,7 +235,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestDistribution001Float()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 1_000_000;
for (var n = 0; n < runs; n++)
@ -249,7 +249,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestDistribution002Uint()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 100_000_000;
for (var n = 0; n < runs; n++)
@ -263,7 +263,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestDistribution002Ulong()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 100_000_000;
for (var n = 0; n < runs; n++)
@ -277,7 +277,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestDistribution002Float()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.Uniform(rng);
var dist = new FastRng.Distributions.Uniform(rng);
var distribution = new uint[101];
var runs = 100_000_000;
for (var n = 0; n < runs; n++)
@ -291,7 +291,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.Uniform(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.Uniform(null));
}
}
}

View File

@ -2,10 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float.Distributions
namespace FastRngTests.Distributions
{
[ExcludeFromCodeCoverage]
public class WeibullK05La1
@ -16,7 +16,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestWeibullDistribution01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.WeibullK05La1(rng);
var dist = new FastRng.Distributions.WeibullK05La1(rng);
var fra = new FrequencyAnalysis();
for (var n = 0; n < 100_000; n++)
@ -49,7 +49,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestWeibullGeneratorWithRange01()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.WeibullK05La1(rng);
var dist = new FastRng.Distributions.WeibullK05La1(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(-1.0f, 1.0f);
@ -64,7 +64,7 @@ namespace FastRngTests.Float.Distributions
public async Task TestWeibullGeneratorWithRange02()
{
using var rng = new MultiThreadedRng();
var dist = new FastRng.Float.Distributions.WeibullK05La1(rng);
var dist = new FastRng.Distributions.WeibullK05La1(rng);
var samples = new float[1_000];
for (var n = 0; n < samples.Length; n++)
samples[n] = await dist.NextNumber(0.0f, 1.0f);
@ -78,7 +78,7 @@ namespace FastRngTests.Float.Distributions
[Category(TestCategories.NORMAL)]
public void NoRandomNumberGenerator01()
{
Assert.Throws<ArgumentNullException>(() => new FastRng.Float.Distributions.WeibullK05La1(null));
Assert.Throws<ArgumentNullException>(() => new FastRng.Distributions.WeibullK05La1(null));
}
}
}

View File

@ -19,4 +19,5 @@
<ProjectReference Include="..\FastRng\FastRng.csproj" />
</ItemGroup>
</Project>

View File

@ -3,7 +3,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
namespace FastRngTests.Float
namespace FastRngTests
{
[ExcludeFromCodeCoverage]
public sealed class FrequencyAnalysis

View File

@ -1,9 +1,9 @@
using System;
using System.Diagnostics.CodeAnalysis;
using FastRng.Float;
using FastRng;
using NUnit.Framework;
namespace FastRngTests.Float
namespace FastRngTests
{
[ExcludeFromCodeCoverage]
public class MathToolsTests

View File

@ -2,11 +2,11 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng.Float.Distributions;
using FastRng;
using FastRng.Distributions;
using NUnit.Framework;
namespace FastRngTests.Float
namespace FastRngTests
{
[ExcludeFromCodeCoverage]
public class MultiThreadedRngTests
@ -172,7 +172,7 @@ namespace FastRngTests.Float
for (int i = 0; i < 100_000_000; i++)
{
var rngValue = await rng.GetUniform();
var rngValue = await this.rng.GetUniform();
var uniform = await distUniform.NextNumber();
var lorentz = await distLorentz.NextNumber();

View File

@ -3,13 +3,13 @@ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using FastRng.Float;
using FastRng.Float.Distributions;
using FastRng;
using FastRng.Distributions;
using MathNet.Numerics.Distributions;
using MathNet.Numerics.Random;
using NUnit.Framework;
namespace FastRngTests.Float
namespace FastRngTests
{
[ExcludeFromCodeCoverage]
public class PerformanceTests

View File

@ -1,7 +1,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
namespace FastRngTests.Float
namespace FastRngTests
{
[ExcludeFromCodeCoverage]
internal sealed class RunningStatistics