2020-10-31 23:08:30 +00:00
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace FastRng.Float.Distributions
|
|
|
|
{
|
|
|
|
public sealed class ExponentialLa10 : Distribution
|
|
|
|
{
|
|
|
|
private const float LAMBDA = 10.0f;
|
|
|
|
private const float CONSTANT = 0.1106f;
|
|
|
|
|
2020-11-07 14:12:56 +00:00
|
|
|
public ExponentialLa10(IRandom rng) : base(rng)
|
|
|
|
{
|
|
|
|
}
|
2020-11-08 15:23:05 +00:00
|
|
|
|
|
|
|
private protected override float ShapeFunction(float x) => CONSTANT * LAMBDA * MathF.Exp(-LAMBDA * x);
|
2020-10-31 23:08:30 +00:00
|
|
|
}
|
|
|
|
}
|