[−][src]Trait uncertainty::Uncertainty
Used to define behaviour for values which have uncertain values.
Required methods
fn to_ab(self) -> AbUnc
Convert any uncertainty value into one which has an absolute uncertain value.
fn to_rel(self) -> RelUnc
Convert any uncertainty value into one which has a relative uncertain value.
fn val(&self) -> f64
Get the base value of the uncertainty.
fn unc(&self) -> f64
Get the uncertainty value; this will depend on whether the base type is a relative or absolute uncertainty.
Provided methods
fn min(&self) -> f64
Return the minimum possible value of the uncertainty. This is functionally the base value - the uncertainty value.
fn max(&self) -> f64
Return the maximum possible value of the uncertainty. This is functionally the base value + the uncertainty value.
fn overlap<T: Uncertainty>(&self, other: &T) -> bool
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.