Module rand04::distributions
source · Expand description
Sampling from random distributions.
This is a generalization of Rand
to allow parameters to control the
exact properties of the generated values, e.g. the mean and standard
deviation of a normal distribution. The Sample
trait is the most
general, and allows for generating values that change some state
internally. The IndependentSample
trait is for generating values
that do not need to record state.
Modules
The exponential distribution.
The Gamma and derived distributions.
The normal and derived distributions.
Generating numbers between two others.
Structs
The chi-squared distribution
χ²(k)
, where k
is the degrees of
freedom.The exponential distribution
Exp(lambda)
.The Fisher F distribution
F(m, n)
.The Gamma distribution
Gamma(shape, scale)
distribution.The log-normal distribution
ln N(mean, std_dev**2)
.The normal distribution
N(mean, std_dev**2)
.A wrapper for generating types that implement
Rand
via the
Sample
& IndependentSample
traits.Sample values uniformly between two bounds.
The Student t distribution,
t(nu)
, where nu
is the degrees of
freedom.A value with a particular weight for use with
WeightedChoice
.A distribution that selects from a finite collection of weighted items.
Traits
Sample
s that do not require keeping track of state.Types that can be used to create a random instance of
Support
.