Struct rand::distributions::ChiSquared
source · pub struct ChiSquared { /* private fields */ }
👎Deprecated since 0.7.0: moved to rand_distr crate
Expand description
The chi-squared distribution χ²(k)
, where k
is the degrees of
freedom.
For k > 0
integral, this distribution is the sum of the squares
of k
independent standard normal random variables. For other
k
, this uses the equivalent characterisation
χ²(k) = Gamma(k/2, 2)
.
Implementations§
source§impl ChiSquared
impl ChiSquared
sourcepub fn new(k: f64) -> ChiSquared
pub fn new(k: f64) -> ChiSquared
Create a new chi-squared distribution with degrees-of-freedom
k
. Panics if k < 0
.
Trait Implementations§
source§impl Clone for ChiSquared
impl Clone for ChiSquared
source§fn clone(&self) -> ChiSquared
fn clone(&self) -> ChiSquared
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ChiSquared
impl Debug for ChiSquared
source§impl Distribution<f64> for ChiSquared
impl Distribution<f64> for ChiSquared
impl Copy for ChiSquared
Auto Trait Implementations§
impl RefUnwindSafe for ChiSquared
impl Send for ChiSquared
impl Sync for ChiSquared
impl Unpin for ChiSquared
impl UnwindSafe for ChiSquared
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more