Struct rustfst::semirings::BooleanWeight
source · pub struct BooleanWeight { /* private fields */ }
Expand description
Boolean semiring: (&, |, false, true).
Trait Implementations§
source§impl Clone for BooleanWeight
impl Clone for BooleanWeight
source§fn clone(&self) -> BooleanWeight
fn clone(&self) -> BooleanWeight
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 BooleanWeight
impl Debug for BooleanWeight
source§impl Default for BooleanWeight
impl Default for BooleanWeight
source§fn default() -> BooleanWeight
fn default() -> BooleanWeight
Returns the “default value” for a type. Read more
source§impl Display for BooleanWeight
impl Display for BooleanWeight
source§impl From<bool> for BooleanWeight
impl From<bool> for BooleanWeight
source§impl Hash for BooleanWeight
impl Hash for BooleanWeight
source§impl PartialEq for BooleanWeight
impl PartialEq for BooleanWeight
source§fn eq(&self, other: &BooleanWeight) -> bool
fn eq(&self, other: &BooleanWeight) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for BooleanWeight
impl PartialOrd for BooleanWeight
source§fn partial_cmp(&self, other: &BooleanWeight) -> Option<Ordering>
fn partial_cmp(&self, other: &BooleanWeight) -> 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<BooleanWeight> for BooleanWeight
impl ReverseBack<BooleanWeight> for BooleanWeight
fn reverse_back(&self) -> Result<BooleanWeight>
source§impl Semiring for BooleanWeight
impl Semiring for BooleanWeight
type Type = bool
type ReverseWeight = BooleanWeight
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 StarSemiring for BooleanWeight
impl StarSemiring for BooleanWeight
impl CompleteSemiring for BooleanWeight
impl Copy for BooleanWeight
impl Eq for BooleanWeight
impl StructuralPartialEq for BooleanWeight
Auto Trait Implementations§
impl Freeze for BooleanWeight
impl RefUnwindSafe for BooleanWeight
impl Send for BooleanWeight
impl Sync for BooleanWeight
impl Unpin for BooleanWeight
impl UnwindSafe for BooleanWeight
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