Function rustfst::algorithms::invert[][src]

pub fn invert<W: Semiring, F: MutableFst<W>>(fst: &mut F)
Expand description

This operation inverts the transduction corresponding to an FST by exchanging the FST’s input and output labels.

Example 1

let mut fst : VectorFst<IntegerWeight> = fst![2 => 3];
invert(&mut fst);

assert_eq!(fst, fst![3 => 2]);

Example 2

Input

invert_in

Invert

invert_out