Struct rustfst::semirings::UnionWeight
source · pub struct UnionWeight<W: Semiring, O: UnionWeightOption<W>> { /* private fields */ }
Expand description
Semiring that uses Times() and One() from W and union and the empty set for Plus() and Zero(), respectively. Template argument O specifies the union weight options as above.
Implementations§
Trait Implementations§
source§impl<W, O> AsRef<UnionWeight<W, O>> for UnionWeight<W, O>where
W: Semiring,
O: UnionWeightOption<W>,
impl<W, O> AsRef<UnionWeight<W, O>> for UnionWeight<W, O>where
W: Semiring,
O: UnionWeightOption<W>,
source§impl<W: Clone + Semiring, O: Clone + UnionWeightOption<W>> Clone for UnionWeight<W, O>
impl<W: Clone + Semiring, O: Clone + UnionWeightOption<W>> Clone for UnionWeight<W, O>
source§fn clone(&self) -> UnionWeight<W, O>
fn clone(&self) -> UnionWeight<W, O>
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<W: Debug + Semiring, O: Debug + UnionWeightOption<W>> Debug for UnionWeight<W, O>
impl<W: Debug + Semiring, O: Debug + UnionWeightOption<W>> Debug for UnionWeight<W, O>
source§impl<W: Default + Semiring, O: Default + UnionWeightOption<W>> Default for UnionWeight<W, O>
impl<W: Default + Semiring, O: Default + UnionWeightOption<W>> Default for UnionWeight<W, O>
source§fn default() -> UnionWeight<W, O>
fn default() -> UnionWeight<W, O>
Returns the “default value” for a type. Read more
source§impl<W, O> Display for UnionWeight<W, O>where
W: SerializableSemiring,
O: UnionWeightOption<W>,
impl<W, O> Display for UnionWeight<W, O>where
W: SerializableSemiring,
O: UnionWeightOption<W>,
source§impl<W: Hash + Semiring, O: Hash + UnionWeightOption<W>> Hash for UnionWeight<W, O>
impl<W: Hash + Semiring, O: Hash + UnionWeightOption<W>> Hash for UnionWeight<W, O>
source§impl<W: PartialEq + Semiring, O: PartialEq + UnionWeightOption<W>> PartialEq for UnionWeight<W, O>
impl<W: PartialEq + Semiring, O: PartialEq + UnionWeightOption<W>> PartialEq for UnionWeight<W, O>
source§impl<W: PartialOrd + Semiring, O: PartialOrd + UnionWeightOption<W>> PartialOrd for UnionWeight<W, O>
impl<W: PartialOrd + Semiring, O: PartialOrd + UnionWeightOption<W>> PartialOrd for UnionWeight<W, O>
source§impl<W: Semiring, O: UnionWeightOption<W>> ReverseBack<UnionWeight<W, O>> for <UnionWeight<W, O> as Semiring>::ReverseWeight
impl<W: Semiring, O: UnionWeightOption<W>> ReverseBack<UnionWeight<W, O>> for <UnionWeight<W, O> as Semiring>::ReverseWeight
fn reverse_back(&self) -> Result<UnionWeight<W, O>>
source§impl<W: Semiring, O: UnionWeightOption<W>> Semiring for UnionWeight<W, O>
impl<W: Semiring, O: UnionWeightOption<W>> Semiring for UnionWeight<W, O>
type Type = Vec<W>
type ReverseWeight = UnionWeight<<W as Semiring>::ReverseWeight, <O as UnionWeightOption<W>>::ReverseOptions>
fn zero() -> Self
fn one() -> Self
fn new(value: Self::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::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<W, O> SerializableSemiring for UnionWeight<W, O>where
W: SerializableSemiring,
O: UnionWeightOption<W>,
impl<W, O> SerializableSemiring for UnionWeight<W, O>where
W: SerializableSemiring,
O: UnionWeightOption<W>,
source§impl<W, O> WeaklyDivisibleSemiring for UnionWeight<W, O>where
W: WeaklyDivisibleSemiring,
O: UnionWeightOption<W>,
impl<W, O> WeaklyDivisibleSemiring for UnionWeight<W, O>where
W: WeaklyDivisibleSemiring,
O: UnionWeightOption<W>,
fn divide_assign(&mut self, rhs: &Self, divide_type: DivideType) -> Result<()>
fn divide(&self, rhs: &Self, divide_type: DivideType) -> Result<Self>
source§impl<W, O> WeightQuantize for UnionWeight<W, O>where
W: WeightQuantize,
O: UnionWeightOption<W>,
impl<W, O> WeightQuantize for UnionWeight<W, O>where
W: WeightQuantize,
O: UnionWeightOption<W>,
impl<W: Eq + Semiring, O: Eq + UnionWeightOption<W>> Eq for UnionWeight<W, O>
impl<W: Semiring, O: UnionWeightOption<W>> StructuralPartialEq for UnionWeight<W, O>
Auto Trait Implementations§
impl<W, O> Freeze for UnionWeight<W, O>
impl<W, O> RefUnwindSafe for UnionWeight<W, O>where
O: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, O> Send for UnionWeight<W, O>
impl<W, O> Sync for UnionWeight<W, O>
impl<W, O> Unpin for UnionWeight<W, O>
impl<W, O> UnwindSafe for UnionWeight<W, O>where
O: UnwindSafe,
W: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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