Skip to content

Commit

Permalink
- DiscreteDistribution: Added TODO.
Browse files Browse the repository at this point in the history
- Added v11 package release notes.
  • Loading branch information
colgreen committed Aug 2, 2020
1 parent c45057c commit ec76a3f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace Redzen.Numerics.Distributions.Double
/// </summary>
public sealed class DiscreteDistribution
{
// TODO: Review use of this constant.
const double __MaxFloatError = 0.000_001;
readonly double[] _probArr;
readonly int[] _labelArr;
Expand Down
3 changes: 1 addition & 2 deletions Redzen/Numerics/Distributions/Float/DiscreteDistribution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@

namespace Redzen.Numerics.Distributions.Float
{
// TODO: Unit tests.

/// <summary>
/// Represents a distribution over a discrete set of possible states.
/// </summary>
public sealed class DiscreteDistribution
{
// TODO: Review use of this constant.
const float __MaxFloatError = 0.000_001f;
readonly float[] _probArr;
readonly int[] _labelArr;
Expand Down
19 changes: 14 additions & 5 deletions Redzen/Redzen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@
<Description>General purpose C# code library.</Description>
<PackageProjectUrl>https://github.com/colgreen/Redzen</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>C# .NET rng prng ziggurat gaussian io sorting timsort xoshiro</PackageTags>
<PackageReleaseNotes>Bug fixes.
Added IRandomSource.NextFloatNonZero()
Added Float.BoxMullerGaussian, ZigguratGaussian, DiscreteDistribution and related classes.
</PackageReleaseNotes>
<PackageTags>C# .NET rng prng ziggurat gaussian io sorting timsort xoshiro random math numerics</PackageTags>
<PackageReleaseNotes>- Enabled nullable reference types (introduced as part of C#8).
- Added Float.BoxMullerGaussian, ZigguratGaussian, DiscreteDistribution and related classes.
- Rename MathArrayUtils to MathSpanUtils.
- Added MathFSpanUtils; a single-precision floating-point equivalent of MathSpanUtils.
- Deleted ArrayUtils; this is superseded by SpanUtils.
- Fix: Base64EncodingOutputStream.Write() - incorrect offset bound check.
- Eliminate a single branch from the ZigguratGuassian class; in synthetic benchmarks this improves performance by approx. 36%.
- Fix: NextDoubleNonZero() could return zero (very infrequently)
- RandomSourceBase.Next(): Use high bits as the source of entropy, as these generally exhibit high quality randomness in LCG PRNGs.
- Removed a number of AggressiveInlining attributes where, on balance, they are not useful.
- XorShiftRandom: Removed redundant test of maxValue.
- Doubled sampling resolution of NextDoubleNonZero().
- Added IRandomSource.NextFloatNonZero().</PackageReleaseNotes>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>colindgreen.pfx</AssemblyOriginatorKeyFile>
<Authors>Colin D. Green</Authors>
Expand Down

0 comments on commit ec76a3f

Please sign in to comment.