sample method

  1. @override
double sample({
  1. Random? random,
})
override

Returns a single sample of a random value within the distribution.

Implementation

@override
double sample({Random? random}) {
  final gamma = GammaDistribution.shape(shape);
  return scale / gamma.sample(random: random);
}