2020-10-31 22:49:37 +00:00
|
|
|
using System;
|
|
|
|
|
2023-07-06 08:08:46 +00:00
|
|
|
namespace FastRng.Distributions
|
2020-10-31 22:49:37 +00:00
|
|
|
{
|
|
|
|
public sealed class BetaA2B2 : Distribution
|
|
|
|
{
|
|
|
|
private const float ALPHA = 2f;
|
|
|
|
private const float BETA = 2f;
|
|
|
|
private const float CONSTANT = 4f;
|
|
|
|
|
2020-11-07 14:12:56 +00:00
|
|
|
public BetaA2B2(IRandom rng) : base(rng)
|
|
|
|
{
|
|
|
|
}
|
2020-11-08 15:23:05 +00:00
|
|
|
|
|
|
|
private protected override float ShapeFunction(float x) => CONSTANT * MathF.Pow(x, ALPHA - 1f) * MathF.Pow(1f - x, BETA - 1f);
|
2020-10-31 22:49:37 +00:00
|
|
|
}
|
|
|
|
}
|