FST  openfst-1.7.7
OpenFst Library
reweight.cc
Go to the documentation of this file.
1 // See www.openfst.org for extensive documentation on this weighted
2 // finite-state transducer library.
3 
4 #include <fst/script/reweight.h>
5 
7 
8 namespace fst {
9 namespace script {
10 
11 void Reweight(MutableFstClass *fst, const std::vector<WeightClass> &potential,
12  ReweightType reweight_type) {
13  ReweightArgs args(fst, potential, reweight_type);
14  Apply<Operation<ReweightArgs>>("Reweight", fst->ArcType(), &args);
15 }
16 
18 
19 } // namespace script
20 } // namespace fst
REGISTER_FST_OPERATION_3ARCS(Compress, CompressArgs)
ReweightType
Definition: reweight.h:18
const std::string & ArcType() const final
Definition: fst-class.h:300
std::tuple< MutableFstClass *, const std::vector< WeightClass > &, ReweightType > ReweightArgs
Definition: reweight.h:19
void Reweight(ReweightArgs *args)
Definition: reweight.h:22