pub struct ConfidenceLevel<T>(/* private fields */);Expand description
The degree of confidence associated with a value to be computed.
Implementations§
Source§impl<T: Float + FromPrimitive + ToPrimitive> ConfidenceLevel<T>
impl<T: Float + FromPrimitive + ToPrimitive> ConfidenceLevel<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the wrapped value as a fraction
Sourcepub fn fractional(level: T) -> Result<Self, ConfidenceError>
pub fn fractional(level: T) -> Result<Self, ConfidenceError>
Create a new confidence value from a fractional level
§Errors
- If the provided value is outside [0, 1], or is NaN
Sourcepub fn percentage(level: T) -> Result<Self, ConfidenceError>
pub fn percentage(level: T) -> Result<Self, ConfidenceError>
Create a new confidence value from a percentage level
§Errors
- If the provided value is outside [0, 100], or is NaN
Sourcepub fn ninety_nine_point_nine_percent() -> Self
pub fn ninety_nine_point_nine_percent() -> Self
Create a new confidence value representing a confidence level of 99.9%
Sourcepub fn ninety_nine_point_five_percent() -> Self
pub fn ninety_nine_point_five_percent() -> Self
Create a new confidence value representing a confidence level of 99.5%
Sourcepub fn ninety_nine_percent() -> Self
pub fn ninety_nine_percent() -> Self
Create a new confidence value representing a confidence level of 99.0%
Sourcepub fn ninety_seven_point_five_percent() -> Self
pub fn ninety_seven_point_five_percent() -> Self
Create a new confidence value representing a confidence level of 97.5%
Sourcepub fn ninety_five_percent() -> Self
pub fn ninety_five_percent() -> Self
Create a new confidence value representing a confidence level of 95.0%
Sourcepub fn ninety_percent() -> Self
pub fn ninety_percent() -> Self
Create a new confidence value representing a confidence level of 90.0%
Sourcepub fn probability(&self) -> T
pub fn probability(&self) -> T
Return the numerical value associated with the confidence level
Source§impl<T: ToPrimitive> ConfidenceLevel<T>
impl<T: ToPrimitive> ConfidenceLevel<T>
pub fn to_f64(self) -> Option<ConfidenceLevel<f64>>
Trait Implementations§
Source§impl<T: Clone> Clone for ConfidenceLevel<T>
impl<T: Clone> Clone for ConfidenceLevel<T>
Source§fn clone(&self) -> ConfidenceLevel<T>
fn clone(&self) -> ConfidenceLevel<T>
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<T: Debug> Debug for ConfidenceLevel<T>
impl<T: Debug> Debug for ConfidenceLevel<T>
Source§impl<T: ToPrimitive> Display for ConfidenceLevel<T>
impl<T: ToPrimitive> Display for ConfidenceLevel<T>
Source§impl<T: Float> From<ConfidenceLevel<T>> for SignificanceLevel<T>
impl<T: Float> From<ConfidenceLevel<T>> for SignificanceLevel<T>
Source§fn from(confidence_level: ConfidenceLevel<T>) -> Self
fn from(confidence_level: ConfidenceLevel<T>) -> Self
Converts to this type from the input type.
Source§impl<T: Float> From<SignificanceLevel<T>> for ConfidenceLevel<T>
impl<T: Float> From<SignificanceLevel<T>> for ConfidenceLevel<T>
Source§fn from(significance_level: SignificanceLevel<T>) -> Self
fn from(significance_level: SignificanceLevel<T>) -> Self
Converts to this type from the input type.
Source§impl<T: PartialEq> PartialEq for ConfidenceLevel<T>
impl<T: PartialEq> PartialEq for ConfidenceLevel<T>
impl<T: Copy> Copy for ConfidenceLevel<T>
impl<T> StructuralPartialEq for ConfidenceLevel<T>
Auto Trait Implementations§
impl<T> Freeze for ConfidenceLevel<T>where
T: Freeze,
impl<T> RefUnwindSafe for ConfidenceLevel<T>where
T: RefUnwindSafe,
impl<T> Send for ConfidenceLevel<T>where
T: Send,
impl<T> Sync for ConfidenceLevel<T>where
T: Sync,
impl<T> Unpin for ConfidenceLevel<T>where
T: Unpin,
impl<T> UnwindSafe for ConfidenceLevel<T>where
T: UnwindSafe,
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<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.