// Copyright 2005-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the 'License'); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an 'AS IS' BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // See www.openfst.org for extensive documentation on this weighted // finite-state transducer library. // // This file contains declarations of classes in the Fst template library. #ifndef FST_FST_DECL_H_ #define FST_FST_DECL_H_ // Do not let Include-What-You-Use suggest this file. #include #include #include // for allocator<> #include namespace fst { // Symbol table and iterator. class SymbolTable; class SymbolTableIterator; // Weight templates and weights. template class FloatWeightTpl; template class TropicalWeightTpl; template class LogWeightTpl; template class MinMaxWeightTpl; using FloatWeight = FloatWeightTpl; using TropicalWeight = TropicalWeightTpl; using LogWeight = LogWeightTpl; using MinMaxWeight = MinMaxWeightTpl; // Arc templates and arcs. template struct ArcTpl; using StdArc = ArcTpl; using LogArc = ArcTpl; // Stores. template class CompactArcStore; template class DefaultCacheStore; // Compactors. template > class CompactArcCompactor; // FST templates. template > class CompactFst; // The Unsigned type is used to represent indices into the compact arc array. template , class CacheStore = DefaultCacheStore> using CompactArcFst = CompactFst, CacheStore>; template class ConstFst; template class EditFst; template class ExpandedFst; template class Fst; template class MutableFst; template > class VectorState; template > class VectorFst; template class DefaultReplaceStateTable; // On-the-fly operations. template class ArcSortFst; template class ClosureFst; template > class ComposeFst; template class ConcatFst; template class DeterminizeFst; template class DifferenceFst; template class IntersectFst; template class InvertFst; template class ArcMapFst; template class ProjectFst; template class RandGenFst; template class RelabelFst; template , class Store = DefaultCacheStore> class ReplaceFst; template class RmEpsilonFst; template class UnionFst; // Heap. template class Heap; // ArcCompactors. template class AcceptorCompactor; template class StringCompactor; template class UnweightedAcceptorCompactor; template class UnweightedCompactor; template class WeightedStringCompactor; // Compact Arc FSTs. template using CompactStringFst = CompactArcFst, U>; template using CompactWeightedStringFst = CompactArcFst, U>; template using CompactAcceptorFst = CompactArcFst, U>; template using CompactUnweightedFst = CompactArcFst, U>; template using CompactUnweightedAcceptorFst = CompactArcFst, U>; // StdArc aliases for FSTs. using StdConstFst = ConstFst; using StdExpandedFst = ExpandedFst; using StdFst = Fst; using StdMutableFst = MutableFst; using StdVectorFst = VectorFst; // StdArc aliases for on-the-fly operations. template using StdArcSortFst = ArcSortFst; using StdClosureFst = ClosureFst; using StdComposeFst = ComposeFst; using StdConcatFst = ConcatFst; using StdDeterminizeFst = DeterminizeFst; using StdDifferenceFst = DifferenceFst; using StdIntersectFst = IntersectFst; using StdInvertFst = InvertFst; using StdProjectFst = ProjectFst; using StdRelabelFst = RelabelFst; using StdReplaceFst = ReplaceFst; using StdRmEpsilonFst = RmEpsilonFst; using StdUnionFst = UnionFst; // Filter states. template class IntegerFilterState; using CharFilterState = IntegerFilterState; using ShortFilterState = IntegerFilterState; // NOLINT using IntFilterState = IntegerFilterState; // Matchers and filters. template class Matcher; template class NullComposeFilter; template class TrivialComposeFilter; template class SequenceComposeFilter; template class AltSequenceComposeFilter; template class MatchComposeFilter; template class NoMatchComposeFilter; } // namespace fst #endif // FST_FST_DECL_H_