Struct rustfst::algorithms::FinalTr
source · pub struct FinalTr<W: Semiring> {
pub ilabel: Label,
pub olabel: Label,
pub weight: W,
}
Expand description
Struct used to map final weights when performing a transition mapping.
It will always be of the form (EPS_LABEL, EPS_LABEL, final_weight)
where final_weight
is the final_weight
of the current state.
If the mapper modifies the input label or output one, a super final state will need to be created.
Fields§
§ilabel: Label
Input label. Default to EPS_LABEL
.
olabel: Label
Output label. Default to EPS_LABEL
.
weight: W
Weight. Default to the final weight of the current state.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for FinalTr<W>where
W: Freeze,
impl<W> RefUnwindSafe for FinalTr<W>where
W: RefUnwindSafe,
impl<W> Send for FinalTr<W>where
W: Send,
impl<W> Sync for FinalTr<W>
impl<W> Unpin for FinalTr<W>where
W: Unpin,
impl<W> UnwindSafe for FinalTr<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