# rand::distributions::gamma::StudentT - Rust
API documentation for the Rust `StudentT` struct in crate `rand`.
Keywords: rust, rustlang, rust-lang, StudentT

# Struct rand::distributions::gamma::StudentT [−] [src]

    pub struct StudentT {
        // some fields omitted
    }

The Student t distribution, `t(nu)`, where `nu` is the degrees of freedom.

# Example

    use rand::distributions::{StudentT, IndependentSample};

    let t = StudentT::new(11.0);
    let v = t.ind_sample(&mut rand::thread_rng());
    println!("{} is from a t(11) distribution", v)

## Methods

### `impl StudentT`

#### `fn new(n: f64) -> StudentT`

Create a new Student t distribution with `n` degrees of freedom. Panics if `n <= 0`.

## Trait Implementations

### `impl Sample<f64> for StudentT`

#### `fn sample<R: Rng>(&mut self, rng: &mut R) -> f64`

### `impl IndependentSample<f64> for StudentT`

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

### Derived Implementations

### `impl Copy for StudentT`

### `impl Clone for StudentT`

#### `fn clone(&self) -> StudentT`

#### `fn clone_from(&mut self, source: &Self)`1.0.0

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