Struct rv::dist::StudentsT [−][src]
pub struct StudentsT { /* fields omitted */ }
Student’s T distribution over x in (-∞, ∞).
Implementations
impl StudentsT
[src]
impl StudentsT
[src]pub fn new(v: f64) -> Result<Self, StudentsTError>
[src]
Create a new Student’s T distribtuion with degrees of freedom, v.
pub fn new_unchecked(v: f64) -> Self
[src]
Creates a new StudentsT without checking whether the parameter is valid.
pub fn v(&self) -> f64
[src]
Get the degrees of freedom, v
pub fn set_v(&mut self, v: f64) -> Result<(), StudentsTError>
[src]
Set the value of v
Example
use rv::dist::StudentsT; let mut t = StudentsT::new(1.2).unwrap(); assert_eq!(t.v(), 1.2); t.set_v(4.3).unwrap(); assert_eq!(t.v(), 4.3);
Will error for invalid values
assert!(t.set_v(2.1).is_ok()); // must be greater than zero assert!(t.set_v(0.0).is_err()); assert!(t.set_v(-1.0).is_err()); assert!(t.set_v(std::f64::INFINITY).is_err()); assert!(t.set_v(std::f64::NEG_INFINITY).is_err()); assert!(t.set_v(std::f64::NAN).is_err());
pub fn set_v_unchecked(&mut self, v: f64)
[src]
Set the value of v without input validation
Trait Implementations
impl ContinuousDistr<f32> for StudentsT
[src]
impl ContinuousDistr<f32> for StudentsT
[src]impl ContinuousDistr<f64> for StudentsT
[src]
impl ContinuousDistr<f64> for StudentsT
[src]impl StructuralPartialEq for StudentsT
[src]
impl StructuralPartialEq for StudentsT
[src]Auto Trait Implementations
impl RefUnwindSafe for StudentsT
impl RefUnwindSafe for StudentsT
impl UnwindSafe for StudentsT
impl UnwindSafe for StudentsT
Blanket Implementations
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,