[][src]Struct uncertainty::AbUnc

pub struct AbUnc { /* fields omitted */ }

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 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_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.

impl Add<f64> for AbUnc[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<AbUnc> for f64[src]

type Output = AbUnc

The resulting type after applying the + operator.

impl Sub<AbUnc> for AbUnc[src]

type Output = AbUnc

The resulting type after applying the - operator.

impl Sub<f64> for AbUnc[src]

type Output = AbUnc

The resulting type after applying the - operator.

impl Sub<AbUnc> for f64[src]

type Output = AbUnc

The resulting type after applying the - operator.

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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]