TWiki
>
FST Web
>
FstQuickTour
>
EqualDoc
(revision 4) (raw view)
Edit
Attach
---+ 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 | <verbatim> template <class Arc> bool Equal(const Fst<Arc> &fst1, const Fst<Arc> &fst2, double delta = kDelta); </verbatim> | %DOX{namespacefst.html#Equal[%H%]}% | | <verbatim> fstequal a.fst b.fst </verbatim> || ---++ Examples | ==A== | ==B== | ==C==| | %ATTACHURL%/eq1.png | %ATTACHURL%/eq1.png | %ATTACHURL%/eq2.png | <verbatim> 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 </verbatim> ---++ Complexity =Equal= * Time: linear i.e. O(_V<sub>1</sub>_ + _V<sub>2</sub>_ + _E<sub>1</sub>_ + _E<sub>2</sub>_) * Space: O(1) where _V<sub>i</sub>_ = # of states and _E<sub>i</sub>_ = # of transitions ---++ See Also [[EquivalentDoc][Equivalent]], [[IsomorphicDoc][Isomorphic]], [[RandEquivalentDoc][RandEquivalent]]
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
eq1.png
r1
manage
9.4 K
2014-04-23 - 00:28
MichaelRiley
png
eq2.png
r1
manage
9.5 K
2014-04-23 - 00:28
MichaelRiley
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r5
<
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r4 - 2014-04-23
-
MichaelRiley
FST
Log In
or
Register
FST Web
Create New Topic
Index
Search
Changes
Notifications
Statistics
Preferences
Webs
Contrib
FST
Forum
GRM
Kernel
Main
Sandbox
TWiki
Main
Copyright © 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