[][src]Struct rustfst::algorithms::union::UnionFst

pub struct UnionFst<W: Semiring, F: Fst<W> + 'static>(_, _);

Computes the union (sum) of two FSTs. This version is a delayed FST. If A transduces string x to y with weight a and B transduces string w to v with weight b, then their union transduces x to y with weight a and w to v with weight b.

Implementations

impl<W, F> UnionFst<W, F> where
    W: Semiring,
    F: MutableFst<W> + AllocableFst<W>, 
[src]

pub fn new(fst1: F, fst2: F) -> Result<Self>[src]

pub fn compute<F2: MutableFst<W> + AllocableFst<W>>(&self) -> Result<F2>[src]

Turns the Lazy FST into a static one.

Trait Implementations

impl<W, F> CoreFst<W> for UnionFst<W, F> where
    W: Semiring,
    F: Fst<W>, 
[src]

type TRS = TrsVec<W>

Weight use in the wFST. This type must implement the Semiring trait.

impl<W: Debug + Semiring, F: Debug + Fst<W> + 'static> Debug for UnionFst<W, F>[src]

impl<W, F> Fst<W> for UnionFst<W, F> where
    W: Semiring,
    F: Fst<W> + 'static, 
[src]

impl<'a, W, F> FstIterator<'a, W> for UnionFst<W, F> where
    W: Semiring,
    F: Fst<W> + 'a, 
[src]

type FstIter = <ReplaceFst<W, F, F> as FstIterator<'a, W>>::FstIter

impl<'a, W, F> StateIterator<'a> for UnionFst<W, F> where
    W: Semiring,
    F: Fst<W> + 'a, 
[src]

type Iter = <ReplaceFst<W, F, F> as StateIterator<'a>>::Iter

Iterator used to iterate over the state_id of the states of an FST.

Auto Trait Implementations

impl<W, F> RefUnwindSafe for UnionFst<W, F> where
    F: RefUnwindSafe,
    W: RefUnwindSafe

impl<W, F> Send for UnionFst<W, F> where
    F: Send,
    W: Send

impl<W, F> Sync for UnionFst<W, F> where
    F: Sync,
    W: Send

impl<W, F> Unpin for UnionFst<W, F> where
    F: Unpin,
    W: Unpin

impl<W, F> UnwindSafe for UnionFst<W, F> where
    F: UnwindSafe,
    W: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.