pub struct LogWeight { /* private fields */ }
Expand description
Log semiring: (log(e^-x + e^-y), +, inf, 0).
Trait Implementations§
source§impl PartialEq for LogWeight
impl PartialEq for LogWeight
source§impl PartialOrd for LogWeight
impl PartialOrd for LogWeight
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl ReverseBack<LogWeight> for LogWeight
impl ReverseBack<LogWeight> for LogWeight
fn reverse_back(&self) -> Result<LogWeight>
source§impl Semiring for LogWeight
impl Semiring for LogWeight
type Type = f32
type ReverseWeight = LogWeight
fn zero() -> Self
fn one() -> Self
fn new(value: <Self as Semiring>::Type) -> Self
fn plus_assign<P: Borrow<Self>>(&mut self, rhs: P) -> Result<()>
fn times_assign<P: Borrow<Self>>(&mut self, rhs: P) -> Result<()>
fn approx_equal<P: Borrow<Self>>(&self, rhs: P, delta: f32) -> bool
source§fn take_value(self) -> Self::Type
fn take_value(self) -> Self::Type
Move underneath value.
fn set_value(&mut self, value: <Self as Semiring>::Type)
fn reverse(&self) -> Result<Self::ReverseWeight>
fn properties() -> SemiringProperties
fn plus<P: Borrow<Self>>(&self, rhs: P) -> Result<Self>
fn times<P: Borrow<Self>>(&self, rhs: P) -> Result<Self>
fn is_one(&self) -> bool
fn is_zero(&self) -> bool
source§impl SerializableSemiring for LogWeight
impl SerializableSemiring for LogWeight
source§impl WeaklyDivisibleSemiring for LogWeight
impl WeaklyDivisibleSemiring for LogWeight
fn divide_assign(&mut self, rhs: &Self, _divide_type: DivideType) -> Result<()>
fn divide(&self, rhs: &Self, divide_type: DivideType) -> Result<Self>
source§impl WeightQuantize for LogWeight
impl WeightQuantize for LogWeight
impl CompleteSemiring for LogWeight
impl Copy for LogWeight
impl Eq for LogWeight
Auto Trait Implementations§
impl Freeze for LogWeight
impl RefUnwindSafe for LogWeight
impl Send for LogWeight
impl Sync for LogWeight
impl Unpin for LogWeight
impl UnwindSafe for LogWeight
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more