Struct rustfst::semirings::GallicWeightMin
source · pub struct GallicWeightMin<W>(/* private fields */)
where
W: Semiring;
Expand description
Product of StringWeightRestrict and an arbitrary weight.
Implementations§
source§impl<W> GallicWeightMin<W>where
W: Semiring,
impl<W> GallicWeightMin<W>where
W: Semiring,
pub fn value1(&self) -> &StringWeightRestrict
pub fn value2(&self) -> &W
pub fn set_value1(&mut self, new_weight: StringWeightRestrict)
pub fn set_value2(&mut self, new_weight: W)
Trait Implementations§
source§impl<W> AsRef<GallicWeightMin<W>> for GallicWeightMin<W>where
W: Semiring,
impl<W> AsRef<GallicWeightMin<W>> for GallicWeightMin<W>where
W: Semiring,
source§impl<W> Clone for GallicWeightMin<W>
impl<W> Clone for GallicWeightMin<W>
source§fn clone(&self) -> GallicWeightMin<W>
fn clone(&self) -> GallicWeightMin<W>
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 for GallicWeightMin<W>
impl<W> Debug for GallicWeightMin<W>
source§impl<W> Display for GallicWeightMin<W>where
W: SerializableSemiring,
impl<W> Display for GallicWeightMin<W>where
W: SerializableSemiring,
source§impl<W: Semiring> FactorIterator<GallicWeightMin<W>> for GallicFactorMin<W>
impl<W: Semiring> FactorIterator<GallicWeightMin<W>> for GallicFactorMin<W>
source§impl<W> From<(StringWeightRestrict, W)> for GallicWeightMin<W>where
W: Semiring,
impl<W> From<(StringWeightRestrict, W)> for GallicWeightMin<W>where
W: Semiring,
source§fn from(w: (StringWeightRestrict, W)) -> Self
fn from(w: (StringWeightRestrict, W)) -> Self
Converts to this type from the input type.
source§impl<W> Hash for GallicWeightMin<W>
impl<W> Hash for GallicWeightMin<W>
source§impl<W> PartialEq for GallicWeightMin<W>
impl<W> PartialEq for GallicWeightMin<W>
source§fn eq(&self, other: &GallicWeightMin<W>) -> bool
fn eq(&self, other: &GallicWeightMin<W>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<W> PartialOrd for GallicWeightMin<W>where
W: Semiring + PartialOrd,
impl<W> PartialOrd for GallicWeightMin<W>where
W: Semiring + PartialOrd,
source§fn partial_cmp(&self, other: &GallicWeightMin<W>) -> Option<Ordering>
fn partial_cmp(&self, other: &GallicWeightMin<W>) -> 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<W: Semiring> ReverseBack<GallicWeightMin<W>> for <GallicWeightMin<W> as Semiring>::ReverseWeight
impl<W: Semiring> ReverseBack<GallicWeightMin<W>> for <GallicWeightMin<W> as Semiring>::ReverseWeight
fn reverse_back(&self) -> Result<GallicWeightMin<W>>
source§impl<W> Semiring for GallicWeightMin<W>where
W: Semiring,
impl<W> Semiring for GallicWeightMin<W>where
W: Semiring,
type Type = ProductWeight<StringWeightRestrict, W>
type ReverseWeight = GallicWeightMin<<W as Semiring>::ReverseWeight>
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: SerializableSemiring> SerializableSemiring for GallicWeightMin<W>
impl<W: SerializableSemiring> SerializableSemiring for GallicWeightMin<W>
source§impl<W> WeaklyDivisibleSemiring for GallicWeightMin<W>where
W: WeaklyDivisibleSemiring,
impl<W> WeaklyDivisibleSemiring for GallicWeightMin<W>where
W: WeaklyDivisibleSemiring,
fn divide_assign(&mut self, rhs: &Self, divide_type: DivideType) -> Result<()>
fn divide(&self, rhs: &Self, divide_type: DivideType) -> Result<Self>
source§impl<W: Semiring> WeightConverter<GallicWeightMin<W>, W> for FromGallicConverter
impl<W: Semiring> WeightConverter<GallicWeightMin<W>, W> for FromGallicConverter
fn tr_map(&mut self, tr: &Tr<GallicWeightMin<W>>) -> Result<Tr<W>>
fn final_tr_map( &mut self, final_tr: &FinalTr<GallicWeightMin<W>> ) -> Result<FinalTr<W>>
fn final_action(&self) -> MapFinalAction
fn properties(&self, inprops: FstProperties) -> FstProperties
source§impl<W> WeightConverter<W, GallicWeightMin<W>> for ToGallicConverterwhere
W: Semiring,
impl<W> WeightConverter<W, GallicWeightMin<W>> for ToGallicConverterwhere
W: Semiring,
fn tr_map(&mut self, tr: &Tr<W>) -> Result<Tr<GallicWeightMin<W>>>
fn final_tr_map( &mut self, final_tr: &FinalTr<W> ) -> Result<FinalTr<GallicWeightMin<W>>>
fn final_action(&self) -> MapFinalAction
fn properties(&self, inprops: FstProperties) -> FstProperties
source§impl<W> WeightQuantize for GallicWeightMin<W>where
W: WeightQuantize,
impl<W> WeightQuantize for GallicWeightMin<W>where
W: WeightQuantize,
impl<W> Eq for GallicWeightMin<W>
impl<W> StructuralPartialEq for GallicWeightMin<W>where
W: Semiring,
Auto Trait Implementations§
impl<W> Freeze for GallicWeightMin<W>where
W: Freeze,
impl<W> RefUnwindSafe for GallicWeightMin<W>where
W: RefUnwindSafe,
impl<W> Send for GallicWeightMin<W>where
W: Send,
impl<W> Sync for GallicWeightMin<W>
impl<W> Unpin for GallicWeightMin<W>where
W: Unpin,
impl<W> UnwindSafe for GallicWeightMin<W>where
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> 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