Struct logprob::LogProb

source ·
pub struct LogProb<T>(/* private fields */);
Expand description

Struct that can only hold float values that correspond to negative log probabilities.

Implementations§

source§

impl<T: Float + Ln2> LogProb<T>

source

pub fn add_log_prob( &self, y: LogProb<T> ) -> Result<LogProb<T>, ProbabilitiesSumToGreaterThanOne>

Adds [LogProb] as raw probabilities and return the new log probability.

source

pub fn add_log_prob_clamped(&self, y: LogProb<T>) -> LogProb<T>

Adds log probabilities but clamping at 0.0.

source

pub fn add_log_prob_float(&self, y: LogProb<T>) -> T

Adds log probabilities and return a float (so can be greater than 0.0).

source§

impl<T: Float> LogProb<T>

source

pub fn new(val: T) -> Result<Self, FloatIsNanOrPositive>

Construct a new LogProb that is guaranteed to be negative (or +0.0).

source

pub fn from_raw_prob(val: T) -> Result<Self, FloatIsNanOrPositive>

Construct a new LogProb that is guaranteed to be negative (or +0.0) from a value in [0.0, 1.0].

source

pub fn into_inner(self) -> T

Gets out the value.

source

pub fn raw_prob(&self) -> T

Get the equivalent non-log probability

let x = LogProb::from_raw_prob(0.25).unwrap();
assert_eq!(x.raw_prob(), 0.25);
source

pub fn opposite_prob(&self) -> Self

Calculates the probability of the complement of this log-probability

let x = LogProb::from_raw_prob(0.25).unwrap();
let y = LogProb::from_raw_prob(0.75).unwrap();
assert_eq!(x.opposite_prob(), y);

Trait Implementations§

source§

impl<'a, 'b, T> Add<&'b LogProb<T>> for &'a LogProb<T>
where &'a T: Add<T>, T: Copy,

§

type Output = LogProb<<&'a T as Add<T>>::Output>

The resulting type after applying the + operator.
source§

fn add(self, other: &'b LogProb<T>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T> Add<&'a LogProb<T>> for LogProb<T>
where T: Add<&'a T>,

§

type Output = LogProb<<T as Add<&'a T>>::Output>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Self) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T> Add<LogProb<T>> for &'a LogProb<T>
where &'a T: Add<T>,

§

type Output = LogProb<<&'a T as Add<T>>::Output>

The resulting type after applying the + operator.
source§

fn add(self, other: LogProb<T>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: Add> Add for LogProb<T>

§

type Output = LogProb<<T as Add>::Output>

The resulting type after applying the + operator.
source§

fn add(self, other: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: AddAssign<&'a T>> AddAssign<&'a LogProb<T>> for LogProb<T>

source§

fn add_assign(&mut self, other: &'a Self)

Performs the += operation. Read more
source§

impl<T: AddAssign> AddAssign for LogProb<T>

source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
source§

impl Borrow<f32> for LogProb<f32>

source§

fn borrow(&self) -> &f32

Immutably borrows from an owned value. Read more
source§

impl Borrow<f64> for LogProb<f64>

source§

fn borrow(&self) -> &f64

Immutably borrows from an owned value. Read more
source§

impl<T: Clone> Clone for LogProb<T>

source§

fn clone(&self) -> LogProb<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for LogProb<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default> Default for LogProb<T>

source§

fn default() -> LogProb<T>

Returns the “default value” for a type. Read more
source§

impl<T: Float + Display> Display for LogProb<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<LogProb<f32>> for f32

source§

fn from(f: LogProb<f32>) -> f32

Converts to this type from the input type.
source§

impl From<LogProb<f64>> for f64

source§

fn from(f: LogProb<f64>) -> f64

Converts to this type from the input type.
source§

impl Mul<&LogProb<f32>> for &u128

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for &u16

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for &u32

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for &u64

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for &u8

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for &usize

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for u128

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a LogProb<f32>> for u16

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for u32

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for u64

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a LogProb<f32>> for u8

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f32>> for usize

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for &u128

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for &u16

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for &u32

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for &u64

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for &u8

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for &usize

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for u128

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a LogProb<f64>> for u16

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a LogProb<f64>> for u32

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for u64

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a LogProb<f64>> for u8

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&LogProb<f64>> for usize

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u128> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u128) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u128> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u128) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u128> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u128) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u128> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u128) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u16> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u16> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u16) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a u16> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a u16) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a u16> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a u16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u32> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u32> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u32> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u32) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a u32> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a u32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u64> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u64> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u64> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u64> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u8> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&u8> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u8) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a u8> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a u8) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<&'a u8> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a u8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&usize> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &usize) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&usize> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &usize) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&usize> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &usize) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&usize> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &usize) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for &u128

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for &u16

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for &u32

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for &u64

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for &u8

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for &usize

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for u128

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for u16

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for u32

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for u64

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for u8

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f32>> for usize

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for &u128

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for &u16

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for &u32

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for &u64

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for &u8

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for &usize

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for u128

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for u16

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for u32

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for u64

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for u8

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<LogProb<f64>> for usize

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: LogProb<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u128> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u128) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u128> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u128) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u128> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u128) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u128> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u128) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u16> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u16> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u16> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u16> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u32> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u32> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u32> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u32> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u64> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u64> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u64> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u64> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u8> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u8> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u8> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u8> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<usize> for &LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: usize) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<usize> for &LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: usize) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<usize> for LogProb<f32>

§

type Output = LogProb<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: usize) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<usize> for LogProb<f64>

§

type Output = LogProb<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: usize) -> Self::Output

Performs the * operation. Read more
source§

impl<T: Float> Ord for LogProb<T>

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T: PartialEq> PartialEq for LogProb<T>

source§

fn eq(&self, other: &LogProb<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd> PartialOrd for LogProb<T>

source§

fn partial_cmp(&self, other: &LogProb<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl TryFrom<f32> for LogProb<f32>

§

type Error = FloatIsNanOrPositive

The type returned in the event of a conversion error.
source§

fn try_from(value: f32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<f64> for LogProb<f64>

§

type Error = FloatIsNanOrPositive

The type returned in the event of a conversion error.
source§

fn try_from(value: f64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T: Copy> Copy for LogProb<T>

source§

impl<T: Float> Eq for LogProb<T>

source§

impl<T> StructuralPartialEq for LogProb<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for LogProb<T>
where T: RefUnwindSafe,

§

impl<T> Send for LogProb<T>
where T: Send,

§

impl<T> Sync for LogProb<T>
where T: Sync,

§

impl<T> Unpin for LogProb<T>
where T: Unpin,

§

impl<T> UnwindSafe for LogProb<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.