Struct rustfst::semirings::IntegerWeight
source · pub struct IntegerWeight { /* private fields */ }
Expand description
Probability semiring: (x, +, 0.0, 1.0).
Trait Implementations§
source§impl AsRef<IntegerWeight> for IntegerWeight
impl AsRef<IntegerWeight> for IntegerWeight
source§fn as_ref(&self) -> &IntegerWeight
fn as_ref(&self) -> &IntegerWeight
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for IntegerWeight
impl Clone for IntegerWeight
source§fn clone(&self) -> IntegerWeight
fn clone(&self) -> IntegerWeight
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for IntegerWeight
impl Debug for IntegerWeight
source§impl Default for IntegerWeight
impl Default for IntegerWeight
source§fn default() -> IntegerWeight
fn default() -> IntegerWeight
Returns the “default value” for a type. Read more
source§impl Display for IntegerWeight
impl Display for IntegerWeight
source§impl From<i32> for IntegerWeight
impl From<i32> for IntegerWeight
source§impl Hash for IntegerWeight
impl Hash for IntegerWeight
source§impl PartialEq for IntegerWeight
impl PartialEq for IntegerWeight
source§fn eq(&self, other: &IntegerWeight) -> bool
fn eq(&self, other: &IntegerWeight) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for IntegerWeight
impl PartialOrd for IntegerWeight
source§fn partial_cmp(&self, other: &IntegerWeight) -> Option<Ordering>
fn partial_cmp(&self, other: &IntegerWeight) -> Option<Ordering>
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<IntegerWeight> for IntegerWeight
impl ReverseBack<IntegerWeight> for IntegerWeight
fn reverse_back(&self) -> Result<IntegerWeight>
source§impl Semiring for IntegerWeight
impl Semiring for IntegerWeight
type Type = i32
type ReverseWeight = IntegerWeight
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 IntegerWeight
impl SerializableSemiring for IntegerWeight
source§impl StarSemiring for IntegerWeight
impl StarSemiring for IntegerWeight
impl CompleteSemiring for IntegerWeight
impl Copy for IntegerWeight
impl Eq for IntegerWeight
impl StructuralPartialEq for IntegerWeight
Auto Trait Implementations§
impl Freeze for IntegerWeight
impl RefUnwindSafe for IntegerWeight
impl Send for IntegerWeight
impl Sync for IntegerWeight
impl Unpin for IntegerWeight
impl UnwindSafe for IntegerWeight
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