Invert

Description

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

Usage

template<class Arc>
void Invert(MutableFst<Arc> *fst);
 
template <class Arc> InvertFst<Arc>::
InvertFst(const Fst<Arc> &fst);
doc
fstinvert a.fst out.fst
 

Examples

A:

invert1.jpg

A-1:

invert2.jpg

Invert(&A);
InvertFst<Arc>(A);
fstinvert a.fst out.fst

Complexity

Invert:

  • Time: O(V + E)
  • Space: O(1)
where V = # of states and E = # of arcs.

InvertFst:

  • Time:: O(v + e)
  • Space: O(1)
where v = # of states visited, e = # of arcs visited. Constant time and space to visit an input state or arc is assumed and exclusive of caching.

-- MichaelRiley - 1 Jul 2007

Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg invert1.jpg r1 manage 5.5 K 2007-07-02 - 03:03 MichaelRiley  
JPEGjpg invert2.jpg r1 manage 5.5 K 2007-07-02 - 03:03 MichaelRiley  
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2018-04-27 - MichaelRiley
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback