Function rustfst::algorithms::top_sort[][src]

pub fn top_sort<W, F>(fst: &mut F) -> Result<()> where
    W: Semiring,
    F: MutableFst<W>, 
Expand description

This operation topologically sorts its input. When sorted, all transitions are from lower to higher state IDs.

Example

Input

topsort_in

Output

topsort_out