[]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]

pub fn checked(p: f64) -> Result<Self, ProbError>[src]

Trait Implementations

impl Clone for Prob

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Copy for Prob

impl From<f64> for Prob

impl From<Prob> for f64

impl From<LogProb> for Prob[src]

impl From<PHREDProb> for Prob[src]

impl From<Prob> for LogProb[src]

impl From<Prob> for PHREDProb[src]

impl Default for Prob

impl PartialEq<Prob> for Prob

impl PartialOrd<Prob> for Prob

impl Debug for Prob

impl Div<Prob> for Prob

type Output = Prob

The resulting type after applying the / operator.

impl<'a> Div<&'a Prob> for &'a Prob

type Output = Prob

The resulting type after applying the / operator.

impl<'a> Div<&'a Prob> for Prob

type Output = Prob

The resulting type after applying the / operator.

impl<'a> Div<Prob> for &'a Prob

type Output = Prob

The resulting type after applying the / operator.

impl Add<Prob> for Prob

type Output = Prob

The resulting type after applying the + operator.

impl<'a> Add<&'a Prob> for &'a Prob

type Output = Prob

The resulting type after applying the + operator.

impl<'a> Add<&'a Prob> for Prob

type Output = Prob

The resulting type after applying the + operator.

impl<'a> Add<Prob> for &'a Prob

type Output = Prob

The resulting type after applying the + operator.

impl Sub<Prob> for Prob

type Output = Prob

The resulting type after applying the - operator.

impl<'a> Sub<&'a Prob> for &'a Prob

type Output = Prob

The resulting type after applying the - operator.

impl<'a> Sub<&'a Prob> for Prob

type Output = Prob

The resulting type after applying the - operator.

impl<'a> Sub<Prob> for &'a Prob

type Output = Prob

The resulting type after applying the - operator.

impl Mul<Prob> for Prob

type Output = Prob

The resulting type after applying the * operator.

impl<'a> Mul<&'a Prob> for &'a Prob

type Output = Prob

The resulting type after applying the * operator.

impl<'a> Mul<&'a Prob> for Prob

type Output = Prob

The resulting type after applying the * operator.

impl<'a> Mul<Prob> for &'a Prob

type Output = Prob

The resulting type after applying the * operator.

impl Deref for Prob

type Target = f64

The resulting type after dereferencing.

impl Zero for Prob[src]

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl Serialize for Prob[src]

impl<'de> Deserialize<'de> for Prob[src]

Auto Trait Implementations

impl Sync for Prob

impl Unpin for Prob

impl Send for Prob

impl UnwindSafe for Prob

impl RefUnwindSafe for Prob

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, 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]

impl<M> Measure for M where
    M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]