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);
doc
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  
Topic revision: r2 - 2007-07-02 - MichaelRiley
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback