# Module rand::distributions [−] [src]

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.

## Reexports

`pub use self::range::Range;`
`pub use self::gamma::{Gamma, ChiSquared, FisherF, StudentT};`
`pub use self::normal::{Normal, LogNormal};`
`pub use self::exponential::Exp;`

## Modules

exponential | The exponential distribution.
gamma | The Gamma and derived distributions.
normal | The normal and derived distributions.
range | Generating numbers between two others.

## Structs

RandSample | A wrapper for generating types that implement `Rand` via the `Sample` & `IndependentSample` traits.
Weighted | A value with a particular weight for use with `WeightedChoice`.
WeightedChoice | A distribution that selects from a finite collection of weighted items.

## Traits

IndependentSample | `Sample`s that do not require keeping track of state.
Sample | Types that can be used to create a random instance of `Support`.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)