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
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