FST  openfst-1.7.2
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/fst-class.h>
5 #include <fst/script/reweight.h>
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 
20 
21 } // namespace script
22 } // namespace fst
ReweightType
Definition: reweight.h:17
const string & ArcType() const final
Definition: fst-class.h:290
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
std::tuple< MutableFstClass *, const std::vector< WeightClass > &, ReweightType > ReweightArgs
Definition: reweight.h:19
void Reweight(ReweightArgs *args)
Definition: reweight.h:22