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