Module rand::distributions [] [src]

Sampling from random distributions.

A distribution may have internal state describing the distribution of generated values; for example Range needs to know its upper and lower bounds. Distributions use the Distribution trait to yield values: call distr.sample(&mut rng) to get a random variable.

Re-exports

pub use self::range::Range;
pub use self::gamma::Gamma;
pub use self::gamma::ChiSquared;
pub use self::gamma::FisherF;
pub use self::gamma::StudentT;
pub use self::normal::Normal;
pub use self::normal::LogNormal;
pub use self::normal::StandardNormal;
pub use self::exponential::Exp;
pub use self::exponential::Exp1;
pub use self::poisson::Poisson;
pub use self::binomial::Binomial;

Modules

binomial

The binomial distribution.

exponential

The exponential distribution.

gamma

The Gamma and derived distributions.

normal

The normal and derived distributions.

poisson

The Poisson distribution.

range

A distribution generating numbers within a given range.

Structs

Alphanumeric

Sample a char, uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9.

Uniform

A generic random value distribution. Generates values for various types with numerically uniform distribution.

Weighted

A value with a particular weight for use with WeightedChoice.

WeightedChoice

A distribution that selects from a finite collection of weighted items.

Traits

Distribution

Types (distributions) that can be used to create a random instance of T.

IndependentSample [
Deprecated
]

Samples that do not require keeping track of state.

Sample [
Deprecated
]

Types that can be used to create a random instance of Support.