# rand::distributions::IndependentSample - Rust
API documentation for the Rust `IndependentSample` trait in crate `rand`.
Keywords: rust, rustlang, rust-lang, IndependentSample

# Trait rand::distributions::IndependentSample [−] [src]

    pub trait IndependentSample<Support>: Sample<Support> {
        fn ind_sample<R: Rng>(&self, &mut R) -> Support;
    }

`Sample`s that do not require keeping track of state.

Since no state is recorded, each sample is (statistically) independent of all others, assuming the `Rng` used has this property.

## Required Methods

### `fn ind_sample<R: Rng>(&self, &mut R) -> Support`

Generate a random value.

## Implementors

- `impl<Sup: SampleRange> IndependentSample for Range<Sup>`
- `impl IndependentSample for Gamma`
- `impl IndependentSample for ChiSquared`
- `impl IndependentSample for FisherF`
- `impl IndependentSample for StudentT`
- `impl IndependentSample for Normal`
- `impl IndependentSample for LogNormal`
- `impl IndependentSample for Exp`
- `impl<Sup: Rand> IndependentSample for RandSample<Sup>`
- `impl<'a, T: Clone> IndependentSample for WeightedChoice<'a, T>`

# 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`)