#include <fst/compose.h>
Inherits ImplToFst< ComposeFstImplBase< A > >.
Inherited by fst::DifferenceFst< A >, and fst::IntersectFst< A >.

Public Types | |
| typedef A | Arc |
| typedef A::Weight | Weight |
| typedef A::StateId | StateId |
| typedef CacheState< A > | State |
| typedef ComposeFstImplBase< A > | Impl |
Public Member Functions | |
| ComposeFst (const Fst< A > &fst1, const Fst< A > &fst2, const CacheOptions &opts=CacheOptions()) | |
| Compose specifying only caching options. | |
| template<class M , class F , class T > | |
| ComposeFst (const Fst< A > &fst1, const Fst< A > &fst2, const ComposeFstOptions< A, M, F, T > &opts) | |
| template<class M1 , class M2 , class F , class T > | |
| ComposeFst (const typename M1::FST &fst1, const typename M2::FST &fst2, const ComposeFstImplOptions< M1, M2, F, T > &opts) | |
| ComposeFst (const ComposeFst< A > &fst, bool safe=false) | |
| See Fst<>::Copy() for doc. | |
| virtual ComposeFst< A > * | Copy (bool safe=false) const |
| Get a copy of this ComposeFst. See Fst<>::Copy() for further doc. | |
| virtual void | InitStateIterator (StateIteratorData< A > *data) const |
| virtual void | InitArcIterator (StateId s, ArcIteratorData< A > *data) const |
Protected Member Functions | |
| ComposeFst () | |
Static Protected Member Functions | |
| template<class M1 , class M2 , class F , class T > | |
| static Impl * | CreateBase2 (const typename M1::FST &fst1, const typename M2::FST &fst2, const ComposeFstImplOptions< M1, M2, F, T > &opts) |
| Create compose implementation specifying two matcher types. | |
| template<class M , class F , class T > | |
| static Impl * | CreateBase1 (const Fst< A > &fst1, const Fst< A > &fst2, const ComposeFstOptions< A, M, F, T > &opts) |
| static Impl * | CreateBase (const Fst< A > &fst1, const Fst< A > &fst2, const CacheOptions &opts) |
| Create compose implementation specifying no matcher type. | |
Friends | |
| class | ArcIterator< ComposeFst< A > > |
| class | StateIterator< ComposeFst< A > > |
Computes the composition of two transducers. This version is a delayed Fst. If FST1 transduces string x to y with weight a and FST2 transduces y to z with weight b, then their composition transduces string x to z with weight Times(x, z).
The output labels of the first transducer or the input labels of the second transducer must be sorted (with the default matcher). The weights need to form a commutative semiring (valid for TropicalWeight and LogWeight).
Complexity: Assuming the first FST is unsorted and the second is sorted:
Caveats:
This class attaches interface to implementation and handles reference counting, delegating most methods to ImplToFst.
Definition at line 430 of file compose.h.
| typedef A fst::ComposeFst< A >::Arc |
Reimplemented from fst::ImplToFst< ComposeFstImplBase< A > >.
Reimplemented in fst::DifferenceFst< A >, and fst::IntersectFst< A >.
| typedef ComposeFstImplBase<A> fst::ComposeFst< A >::Impl |
| typedef CacheState<A> fst::ComposeFst< A >::State |
| typedef A::StateId fst::ComposeFst< A >::StateId |
Reimplemented from fst::ImplToFst< ComposeFstImplBase< A > >.
Reimplemented in fst::DifferenceFst< A >, and fst::IntersectFst< A >.
| typedef A::Weight fst::ComposeFst< A >::Weight |
Reimplemented from fst::ImplToFst< ComposeFstImplBase< A > >.
Reimplemented in fst::DifferenceFst< A >, and fst::IntersectFst< A >.
| fst::ComposeFst< A >::ComposeFst | ( | const Fst< A > & | fst1, | |
| const Fst< A > & | fst2, | |||
| const CacheOptions & | opts = CacheOptions() | |||
| ) | [inline] |
| fst::ComposeFst< A >::ComposeFst | ( | const Fst< A > & | fst1, | |
| const Fst< A > & | fst2, | |||
| const ComposeFstOptions< A, M, F, T > & | opts | |||
| ) | [inline] |
| fst::ComposeFst< A >::ComposeFst | ( | const typename M1::FST & | fst1, | |
| const typename M2::FST & | fst2, | |||
| const ComposeFstImplOptions< M1, M2, F, T > & | opts | |||
| ) | [inline] |
Compose specifying two matcher types M1 and M2. Requires input Fsts (of the same Arc type but o.w. arbitrary) match the corresponding matcher FST types (M1::FST, M2::FST). Recommended only for advanced use in demanding or specialized applications due to potential code bloat and matcher incompatibilities.
| fst::ComposeFst< A >::ComposeFst | ( | const ComposeFst< A > & | fst, | |
| bool | safe = false | |||
| ) | [inline] |
See Fst<>::Copy() for doc.
| fst::ComposeFst< A >::ComposeFst | ( | ) | [inline, protected] |
| virtual ComposeFst<A>* fst::ComposeFst< A >::Copy | ( | bool | safe = false |
) | const [inline, virtual] |
Get a copy of this ComposeFst. See Fst<>::Copy() for further doc.
Implements fst::Fst< typename ComposeFstImplBase< A >::Arc >.
Reimplemented in fst::DifferenceFst< A >, and fst::IntersectFst< A >.
| static Impl* fst::ComposeFst< A >::CreateBase | ( | const Fst< A > & | fst1, | |
| const Fst< A > & | fst2, | |||
| const CacheOptions & | opts | |||
| ) | [inline, static, protected] |
| static Impl* fst::ComposeFst< A >::CreateBase1 | ( | const Fst< A > & | fst1, | |
| const Fst< A > & | fst2, | |||
| const ComposeFstOptions< A, M, F, T > & | opts | |||
| ) | [inline, static, protected] |
| static Impl* fst::ComposeFst< A >::CreateBase2 | ( | const typename M1::FST & | fst1, | |
| const typename M2::FST & | fst2, | |||
| const ComposeFstImplOptions< M1, M2, F, T > & | opts | |||
| ) | [inline, static, protected] |
| virtual void fst::ComposeFst< A >::InitArcIterator | ( | StateId | s, | |
| ArcIteratorData< A > * | data | |||
| ) | const [inline, virtual] |
| void fst::ComposeFst< A >::InitStateIterator | ( | StateIteratorData< A > * | data | ) | const [inline, virtual] |
friend class ArcIterator< ComposeFst< A > > [friend] |
friend class StateIterator< ComposeFst< A > > [friend] |
1.7.1