FastRng/FastRng/Double/Distributions/BetaA2B2.cs

19 lines
496 B
C#
Raw Normal View History

2020-09-26 10:44:18 +00:00
using System;
using System.Threading;
using System.Threading.Tasks;
namespace FastRng.Double.Distributions
{
public sealed class BetaA2B2 : Distribution
2020-09-26 10:44:18 +00:00
{
2020-09-30 18:21:46 +00:00
private const double ALPHA = 2;
private const double BETA = 2;
2020-10-19 17:48:16 +00:00
private const double CONSTANT = 4;
2020-09-26 10:44:18 +00:00
public BetaA2B2(IRandom rng) : base(rng)
{
}
protected override double ShapeFunction(double x) => CONSTANT * Math.Pow(x, ALPHA - 1) * Math.Pow(1 - x, BETA - 1);
2020-09-26 10:44:18 +00:00
}
}