RandomEffectController.exponential constructor

RandomEffectController.exponential(
  1. DurationEffectController child, {
  2. required double beta,
  3. 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),
  );
}