2020-11-01 00:08:30 +01:00
|
|
|
using System;
|
|
|
|
|
|
2023-07-06 10:08:46 +02:00
|
|
|
namespace FastRng.Distributions
|
2020-11-01 00:08:30 +01:00
|
|
|
{
|
|
|
|
|
public sealed class InverseExponentialLa10 : Distribution
|
|
|
|
|
{
|
|
|
|
|
private const float LAMBDA = 10.0f;
|
|
|
|
|
private const float CONSTANT = 4.539992976248453e-06f;
|
|
|
|
|
|
2020-11-07 15:12:56 +01:00
|
|
|
public InverseExponentialLa10(IRandom rng) : base(rng)
|
|
|
|
|
{
|
|
|
|
|
}
|
2020-11-08 16:23:05 +01:00
|
|
|
|
|
|
|
|
private protected override float ShapeFunction(float x) => CONSTANT * LAMBDA * MathF.Exp(LAMBDA * x);
|
2020-11-01 00:08:30 +01:00
|
|
|
}
|
|
|
|
|
}
|