Trait TrSelector

Source
pub trait TrSelector: Debug {
    // Required method
    fn select_tr<W: Semiring, F: Fst<W>>(
        &mut self,
        fst: &F,
        state: StateId,
    ) -> Result<usize>;
}
Expand description

TrSelector implementors are used to select a random transition given an Fst state s, returning a number N such that 0 <= N <= fst.num_trs(s). If N is fst.num_trs(s), then the final weight is selected; otherwise the N-th transition is selected. It is assumed these are not applied to any state which is neither final nor has any arcs leaving it.

Required Methods§

Source

fn select_tr<W: Semiring, F: Fst<W>>( &mut self, fst: &F, state: StateId, ) -> Result<usize>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§