RandomEffectController.exponential constructor
RandomEffectController.exponential(
- DurationEffectController child, {
- required double beta,
- Random? random,
Factory constructor that employs a random variable distributed
exponentially with rate parameter beta
. The produced random values will
have the average duration of beta
.
Implementation
factory RandomEffectController.exponential(
DurationEffectController child, {
required double beta,
Random? random,
}) {
assert(beta > 0, 'Beta must be positive: $beta');
return RandomEffectController(
child,
_ExponentialRandomVariable(beta, random),
);
}