pub struct InvChiSquared { /* private fields */ }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 duplicate 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 = InvChiSquaredParameters
fn emit_params(&self) -> Self::Parameters
fn from_params(params: Self::Parameters) -> Self
fn map_params(&self, f: impl Fn(Self::Parameters) -> Self::Parameters) -> Self
Source§impl PartialEq for InvChiSquared
impl PartialEq for InvChiSquared
Source§impl Sampleable<f32> for InvChiSquared
impl Sampleable<f32> for InvChiSquared
Source§impl Sampleable<f64> for InvChiSquared
impl Sampleable<f64> for InvChiSquared
Source§impl Scalable for InvChiSquared
impl Scalable for InvChiSquared
Source§impl Serialize for InvChiSquared
impl Serialize for InvChiSquared
Source§impl Shiftable for InvChiSquared
impl Shiftable 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§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.