Struct bio::stats::probs::Prob
[−]
pub struct Prob(pub f64);
A newtype for probabilities.
Example
#[macro_use] extern crate approx; use bio::stats::Prob; let p = Prob(0.5); let q = Prob(0.2); assert_relative_eq!(*(p + q), *Prob(0.7));
Methods
impl Prob
[src]
Methods from Deref<Target = f64>
Trait Implementations
impl PartialEq for Prob
fn eq(&self, __arg_0: &Prob) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Prob) -> bool
This method tests for !=
.
impl PartialOrd for Prob
fn partial_cmp(&self, __arg_0: &Prob) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Prob) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Prob) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Prob) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Prob) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Copy for Prob
impl Clone for Prob
fn clone(&self) -> Prob
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Prob
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Prob
impl From<f64> for Prob
impl From<Prob> for f64
impl Deref for Prob
type Target = f64
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
Dereferences the value.
impl Add<Prob> for Prob
type Output = Prob
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Prob
Performs the +
operation.
impl<'a> Add<&'a Prob> for &'a Prob
type Output = Prob
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Prob
Performs the +
operation.
impl<'a> Add<&'a Prob> for Prob
type Output = Prob
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Prob) -> Prob
Performs the +
operation.
impl<'a> Add<Prob> for &'a Prob
type Output = Prob
The resulting type after applying the +
operator.
fn add(self, rhs: Prob) -> Prob
Performs the +
operation.
impl Sub<Prob> for Prob
type Output = Prob
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Prob
Performs the -
operation.
impl<'a> Sub<&'a Prob> for &'a Prob
type Output = Prob
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Prob
Performs the -
operation.
impl<'a> Sub<&'a Prob> for Prob
type Output = Prob
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a Prob) -> Prob
Performs the -
operation.
impl<'a> Sub<Prob> for &'a Prob
type Output = Prob
The resulting type after applying the -
operator.
fn sub(self, rhs: Prob) -> Prob
Performs the -
operation.
impl Mul<Prob> for Prob
type Output = Prob
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Prob
Performs the *
operation.
impl<'a> Mul<&'a Prob> for &'a Prob
type Output = Prob
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Prob
Performs the *
operation.
impl<'a> Mul<&'a Prob> for Prob
type Output = Prob
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a Prob) -> Prob
Performs the *
operation.
impl<'a> Mul<Prob> for &'a Prob
type Output = Prob
The resulting type after applying the *
operator.
fn mul(self, rhs: Prob) -> Prob
Performs the *
operation.
impl Div<Prob> for Prob
type Output = Prob
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Prob
Performs the /
operation.
impl<'a> Div<&'a Prob> for &'a Prob
type Output = Prob
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Prob
Performs the /
operation.
impl<'a> Div<&'a Prob> for Prob
type Output = Prob
The resulting type after applying the /
operator.
fn div(self, rhs: &'a Prob) -> Prob
Performs the /
operation.
impl<'a> Div<Prob> for &'a Prob
type Output = Prob
The resulting type after applying the /
operator.
fn div(self, rhs: Prob) -> Prob
Performs the /
operation.