Equal

Description

This operation determines if two transducers have the same states with the same numbering and the same transitions with the same labels and weights in the same order.

Usage

template <class Arc>
bool Equal(const Fst<Arc> &fst1,
           const Fst<Arc> &fst2,
           double delta = kDelta);
fstequal a.fst b.fst

Examples

A B C
eq1.png eq1.png eq2.png

Equal(A, B);  // returns true
Equal(A, C);  // returns false

$ if fstequal a.fst b.fst; then echo true; else echo false; fi
true
$ if fstequal a.fst c.fst; then echo true; else echo false; fi
false

Complexity

Equal

  • Time: linear i.e. O(V1 + V2 + E1 + E2)
  • Space: O(1)
where Vi = # of states and Ei = # of transitions

See Also

Equivalent, Isomorphic, RandEquivalent

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng eq1.png r1 manage 9.4 K 2014-04-23 - 00:28 MichaelRiley  
PNGpng eq2.png r1 manage 9.5 K 2014-04-23 - 00:28 MichaelRiley  
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 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