[−][src]Struct uncertainty::AbUnc
Methods
impl AbUnc
[src]
pub fn new(val: f64, unc: f64) -> AbUnc
[src]
Create an absolute uncertainty. The first parameter is the base value, and the second parameter is the absolute uncertainty in that value.
Examples
use uncertainty::*; let u: AbUnc = AbUnc::new(10.0, 1.0); assert_eq!(u.val(), 10.0); assert_eq!(u.unc(), 1.0);
Trait Implementations
impl Uncertainty for AbUnc
[src]
fn to_ab(self) -> AbUnc
[src]
fn to_rel(self) -> RelUnc
[src]
fn val(&self) -> f64
[src]
fn unc(&self) -> f64
[src]
fn min(&self) -> f64
[src]
Return the minimum possible value of the uncertainty. This is functionally the base value - the uncertainty value. Read more
fn max(&self) -> f64
[src]
Return the maximum possible value of the uncertainty. This is functionally the base value + the uncertainty value. Read more
fn overlap<T: Uncertainty>(&self, other: &T) -> bool
[src]
Given two uncertainty values, determine whether they overlap. This is done by comparing the minimums and maximums to see whether they intersect. Intersecting uncertainties are said to be equal or overlap. Read more
impl From<f64> for AbUnc
[src]
impl From<RelUnc> for AbUnc
[src]
impl From<AbUnc> for RelUnc
[src]
impl Clone for AbUnc
[src]
fn clone(&self) -> AbUnc
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for AbUnc
[src]
impl Display for AbUnc
[src]
impl Debug for AbUnc
[src]
impl Add<AbUnc> for AbUnc
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl Add<f64> for AbUnc
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: f64) -> Self
[src]
impl Add<AbUnc> for f64
[src]
type Output = AbUnc
The resulting type after applying the +
operator.
fn add(self, other: AbUnc) -> Self::Output
[src]
impl Sub<AbUnc> for AbUnc
[src]
type Output = AbUnc
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self::Output
[src]
impl Sub<f64> for AbUnc
[src]
type Output = AbUnc
The resulting type after applying the -
operator.
fn sub(self, other: f64) -> Self::Output
[src]
impl Sub<AbUnc> for f64
[src]
Auto Trait Implementations
impl Send for AbUnc
impl Unpin for AbUnc
impl Sync for AbUnc
impl UnwindSafe for AbUnc
impl RefUnwindSafe for AbUnc
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,