Struct rand::distributions::StudentT [−][src]
pub struct StudentT { /* fields omitted */ }
The Student t distribution, t(nu)
, where nu
is the degrees of
freedom.
Example
use rand::distributions::{StudentT, Distribution}; let t = StudentT::new(11.0); let v = t.sample(&mut rand::thread_rng()); println!("{} is from a t(11) distribution", v)
Methods
impl StudentT
[src]
impl StudentT
pub fn new(n: f64) -> StudentT
[src]
pub fn new(n: f64) -> StudentT
Create a new Student t distribution with n
degrees of
freedom. Panics if n <= 0
.
Trait Implementations
impl Clone for StudentT
[src]
impl Clone for StudentT
fn clone(&self) -> StudentT
[src]
fn clone(&self) -> StudentT
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for StudentT
[src]
impl Copy for StudentT
impl Debug for StudentT
[src]
impl Debug for StudentT
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Distribution<f64> for StudentT
[src]
impl Distribution<f64> for StudentT
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f64
[src]
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f64
Generate a random value of T
, using rng
as the source of randomness.
ⓘImportant traits for DistIter<'a, D, R, T>fn sample_iter<'a, R>(&'a self, rng: &'a mut R) -> DistIter<'a, Self, R, T> where
Self: Sized,
R: Rng,
[src]
ⓘImportant traits for DistIter<'a, D, R, T>
fn sample_iter<'a, R>(&'a self, rng: &'a mut R) -> DistIter<'a, Self, R, T> where
Self: Sized,
R: Rng,
Create an iterator that generates random values of T
, using rng
as the source of randomness. Read more
impl Sample<f64> for StudentT
[src]
impl Sample<f64> for StudentT
fn sample<R: Rng>(&mut self, rng: &mut R) -> f64
[src]
fn sample<R: Rng>(&mut self, rng: &mut R) -> f64
Deprecated since 0.5.0
: use Distribution instead
Generate a random value of Support
, using rng
as the source of randomness. Read more
impl IndependentSample<f64> for StudentT
[src]
impl IndependentSample<f64> for StudentT
fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64
[src]
fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64
Deprecated since 0.5.0
: use Distribution instead
Generate a random value.