20 #ifndef FST_INTERSECT_H_ 21 #define FST_INTERSECT_H_ 36 template <
class Arc,
class M = Matcher<Fst<Arc>>,
37 class Filter = SequenceComposeFilter<M>,
39 GenericComposeStateTable<Arc,
typename Filter::FilterState>>
75 const bool acceptors =
78 FSTERROR() <<
"IntersectFst: Input FSTs are not acceptors";
79 GetMutableImpl()->SetProperties(
kError);
83 template <
class M,
class Filter,
class StateTable>
87 const bool acceptors =
90 FSTERROR() <<
"IntersectFst: input FSTs are not acceptors";
91 GetMutableImpl()->SetProperties(
kError);
146 switch (opts.filter_type) {
190 if (opts.connect)
Connect(ofst);
195 #endif // FST_INTERSECT_H_
ArcIterator(const IntersectFst< Arc > &fst, StateId s)
typename ComposeFst< Arc >::Arc Arc
CacheOptions(bool gc=FST_FLAGS_fst_default_cache_gc, size_t gc_limit=FST_FLAGS_fst_default_cache_gc_limit)
virtual uint64_t Properties(uint64_t mask, bool test) const =0
IntersectFst(const Fst< Arc > &fst1, const Fst< Arc > &fst2, const IntersectFstOptions< Arc, M, Filter, StateTable > &opts)
IntersectFst(const Fst< Arc > &fst1, const Fst< Arc > &fst2, const CacheOptions &opts=CacheOptions())
StateIterator(const IntersectFst< Arc > &fst)
constexpr uint64_t kError
IntersectFst * Copy(bool safe=false) const override
void Intersect(const Fst< Arc > &ifst1, const Fst< Arc > &ifst2, MutableFst< Arc > *ofst, const IntersectOptions &opts=IntersectOptions())
void Connect(MutableFst< Arc > *fst)
typename ComposeFst< Arc >::Arc Arc
typename Arc::Weight Weight
typename Arc::StateId StateId
IntersectFst(const IntersectFst &fst, bool safe=false)
typename Arc::StateId StateId
ComposeOptions IntersectOptions
IntersectFstOptions(const CacheOptions &opts, M *matcher1=nullptr, M *matcher2=nullptr, Filter *filter=nullptr, StateTable *state_table=nullptr)
constexpr uint64_t kAcceptor