Home | History | Annotate | Download | only in fst

Lines Matching defs:Weights

19 // Classes to accumulate arc weights. Useful for weight lookahead.
40 // This class accumulates arc weights using the semiring Plus().
77 // This class accumulates arc weights using the log semiring Plus()
79 // and from log64 weights.
135 vector<double> *Weights() { return &weights_; }
148 // weights_. Position -1 means no pre-computed weights for that
157 // This class accumulates arc weights using the log semiring Plus()
159 // from log64 weights. The member function Init(fst) has to be called
188 vector<double> &weights = *data_->Weights();
199 state_weights_ = &(weights[pos]);
213 // Finds begin and end of pre-stored weights
222 // Computes sum before pre-stored weights
229 // Computes sum between pre-stored weights
234 // Computes sum after pre-stored weights
248 vector<double> &weights = *data_->Weights();
250 if (!weights.empty() || arc_limit_ < arc_period_) {
263 weights.push_back(sum);
271 weights.push_back(sum);
330 ssize_t arc_period_; // Save cumulative weights per 'arc_period_'.
331 bool init_; // Cumulative weights initialized?
356 delete it->second.weights;
365 return it->second.weights;
371 void AddWeights(StateId s, vector<double> *weights) {
374 cache_.insert(make_pair(s, CacheState(weights, true)));
376 cache_size_ += weights->capacity() * sizeof(double);
386 vector<double>* weights; // Accumulated weights for this state.
389 CacheState(vector<double> *w, bool r) : weights(w), recent(r) {}
402 cache_size_ -= cs.weights->capacity() * sizeof(double);
403 delete cs.weights;
423 // This class accumulates arc weights using the log semiring Plus()
424 // has a WeightConvert specialization to and from log64 weights. It
426 // weights are pre-computed and stored only for the states that are
585 vector<double> *weights_; // Accumulated weights for cur. state
650 // This class accumulates weights in a ReplaceFst. The 'Init' method