Home | History | Annotate | Download | only in fst

Lines Matching refs:weight

1 // random-weight.h
31 #include <fst/float-weight.h>
32 #include <fst/product-weight.h>
33 #include <fst/string-weight.h>
34 #include <fst/lexicographic-weight.h>
35 #include <fst/power-weight.h>
36 #include <fst/signed-log-weight.h>
37 #include <fst/sparse-power-weight.h>
43 // divisors should be returned in the random weight generation.
50 typedef TropicalWeightTpl<T> Weight;
57 Weight operator() () const {
60 return Weight::Zero();
62 return Weight(static_cast<T>(n));
82 typedef LogWeightTpl<T> Weight;
89 Weight operator() () const {
92 return Weight::Zero();
94 return Weight(static_cast<T>(n));
115 typedef MinMaxWeightTpl<T> Weight;
122 Weight operator() () const {
125 return Weight::Zero();
127 return Weight::One();
129 return Weight(static_cast<T>(n));
149 typedef StringWeight<L, S> Weight;
156 Weight operator() () const {
159 return Weight::Zero();
164 return Weight(v.begin(), v.end());
182 // This function object returns a weight generator over the product of the
185 class W = ProductWeight<typename G1::Weight, typename G2::Weight> >
188 typedef typename G1::Weight W1;
189 typedef typename G2::Weight W2;
190 typedef W Weight;
195 Weight operator() () const {
198 return Weight(w1, w2);
207 // This function object returns a weight generator for a lexicographic weight
214 typedef typename G1::Weight W1;
215 typedef typename G2::Weight W2;
216 typedef LexicographicWeight<W1, W2> Weight;
222 Weight operator() () const {
226 return Weight(W1::Zero(), W2::Zero());
230 return Weight(w1, w2);
244 // Product generator of a string weight generator and an
245 // arbitrary weight generator.
252 typedef typename G::Weight W;
253 typedef GallicWeight<L, W, S> Weight;
261 // This function object returms a weight generator over the catersian power
266 typedef typename G::Weight W;
267 typedef PowerWeight<W, n> Weight;
272 Weight operator()() const {
273 Weight w;
291 typedef SignedLogWeightTpl<T> Weight;
298 Weight operator() () const {
321 // This function object returms a weight generator over the catersian power
326 typedef typename G::Weight W;
327 typedef SparsePowerWeight<W, K> Weight;
332 Weight operator()() const {
333 Weight w;