Struct std::rand::distributions::StudentTUnstable [-] [+] [src]

pub struct StudentT {
    // some fields omitted
}

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

Example

fn main() { use std::rand; use std::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) }
use std::rand;
use std::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>(&mut self, rng: &mut R) -> f64 where R: Rng

impl IndependentSample<f64> for StudentT

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