Struct rv::dist::InvChiSquared
source · pub struct InvChiSquared { /* private fields */ }
Expand description
Implementations§
source§impl InvChiSquared
impl InvChiSquared
sourcepub fn new(v: f64) -> Result<Self, InvChiSquaredError>
pub fn new(v: f64) -> Result<Self, InvChiSquaredError>
sourcepub fn new_unchecked(v: f64) -> Self
pub fn new_unchecked(v: f64) -> Self
Create a new InvChiSquared without checking whether the parameters are valid.
sourcepub fn v(&self) -> f64
pub fn v(&self) -> f64
Get the degrees of freedom, v
.
§Example
let ix2 = InvChiSquared::new(1.2).unwrap();
assert_eq!(ix2.v(), 1.2);
sourcepub fn set_v(&mut self, v: f64) -> Result<(), InvChiSquaredError>
pub fn set_v(&mut self, v: f64) -> Result<(), InvChiSquaredError>
Set the degrees of freedom, k
.
§Example
let mut ix2 = InvChiSquared::new(1.2).unwrap();
ix2.set_v(2.2).unwrap();
assert_eq!(ix2.v(), 2.2);
Will error given invalid values.
assert!(ix2.set_v(2.2).is_ok());
assert!(ix2.set_v(0.0).is_err());
assert!(ix2.set_v(-1.0).is_err());
assert!(ix2.set_v(f64::NAN).is_err());
assert!(ix2.set_v(f64::INFINITY).is_err());
pub fn set_v_unchecked(&mut self, v: f64)
Trait Implementations§
source§impl Cdf<f32> for InvChiSquared
impl Cdf<f32> for InvChiSquared
source§impl Cdf<f64> for InvChiSquared
impl Cdf<f64> for InvChiSquared
source§impl Clone for InvChiSquared
impl Clone for InvChiSquared
source§fn clone(&self) -> InvChiSquared
fn clone(&self) -> InvChiSquared
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 ContinuousDistr<f32> for InvChiSquared
impl ContinuousDistr<f32> for InvChiSquared
source§impl ContinuousDistr<f64> for InvChiSquared
impl ContinuousDistr<f64> for InvChiSquared
source§impl Debug for InvChiSquared
impl Debug for InvChiSquared
source§impl<'de> Deserialize<'de> for InvChiSquared
impl<'de> Deserialize<'de> for InvChiSquared
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for InvChiSquared
impl Display for InvChiSquared
source§impl From<&InvChiSquared> for String
impl From<&InvChiSquared> for String
source§fn from(ix2: &InvChiSquared) -> String
fn from(ix2: &InvChiSquared) -> String
Converts to this type from the input type.
source§impl HasDensity<f32> for InvChiSquared
impl HasDensity<f32> for InvChiSquared
source§impl HasDensity<f64> for InvChiSquared
impl HasDensity<f64> for InvChiSquared
source§impl Mean<f32> for InvChiSquared
impl Mean<f32> for InvChiSquared
source§impl Mean<f64> for InvChiSquared
impl Mean<f64> for InvChiSquared
source§impl Mode<f32> for InvChiSquared
impl Mode<f32> for InvChiSquared
source§impl Mode<f64> for InvChiSquared
impl Mode<f64> for InvChiSquared
source§impl Parameterized for InvChiSquared
impl Parameterized for InvChiSquared
type Parameters = f64
fn emit_params(&self) -> Self::Parameters
fn from_params(v: Self::Parameters) -> Self
source§impl PartialEq for InvChiSquared
impl PartialEq for InvChiSquared
source§fn eq(&self, other: &InvChiSquared) -> bool
fn eq(&self, other: &InvChiSquared) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Sampleable<f32> for InvChiSquared
impl Sampleable<f32> for InvChiSquared
source§impl Sampleable<f64> for InvChiSquared
impl Sampleable<f64> for InvChiSquared
source§impl Serialize for InvChiSquared
impl Serialize for InvChiSquared
source§impl Support<f32> for InvChiSquared
impl Support<f32> for InvChiSquared
source§impl Support<f64> for InvChiSquared
impl Support<f64> for InvChiSquared
source§impl Variance<f32> for InvChiSquared
impl Variance<f32> for InvChiSquared
Auto Trait Implementations§
impl !Freeze for InvChiSquared
impl RefUnwindSafe for InvChiSquared
impl Send for InvChiSquared
impl Sync for InvChiSquared
impl Unpin for InvChiSquared
impl UnwindSafe for InvChiSquared
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.