Lines Matching refs:Weight

75   typedef typename Arc::Weight Weight;
79 vector<Weight> *distance,
97 vector<Weight> *distance_;
104 vector<Weight> rdistance_; // Relaxation distance.
123 if (!(Weight::Properties() & kRightSemiring)) {
124 FSTERROR() << "ShortestDistance: Weight needs to be right distributive: "
125 << Weight::Type();
130 if (first_path_ && !(Weight::Properties() & kPath)) {
132 << "Weight does not have the path property: "
133 << Weight::Type();
150 distance_->push_back(Weight::Zero());
151 rdistance_.push_back(Weight::Zero());
159 (*distance_)[source] = Weight::One();
160 rdistance_[source] = Weight::One();
169 distance_->push_back(Weight::Zero());
170 rdistance_.push_back(Weight::Zero());
173 if (first_path_ && (fst_.Final(s) != Weight::Zero()))
176 Weight r = rdistance_[s];
177 rdistance_[s] = Weight::Zero();
185 distance_->push_back(Weight::Zero());
186 rdistance_.push_back(Weight::Zero());
193 (*distance_)[arc.nextstate] = Weight::Zero();
194 rdistance_[arc.nextstate] = Weight::Zero();
199 Weight &nd = (*distance_)[arc.nextstate];
200 Weight &nr = rdistance_[arc.nextstate];
201 Weight w = Times(r, arc.weight);
246 vector<typename Arc::Weight> *distance,
254 distance->resize(1, Arc::Weight::NoWeight());
282 vector<typename Arc::Weight> *distance,
286 typedef typename Arc::Weight Weight;
297 typedef typename ReverseArc::Weight ReverseWeight;
310 distance->resize(1, Arc::Weight::NoWeight());
323 typename Arc::Weight ShortestDistance(const Fst<Arc> &fst, float delta = kDelta) {
324 typedef typename Arc::Weight Weight;
326 vector<Weight> distance;
327 if (Weight::Properties() & kRightSemiring) {
330 return Arc::Weight::NoWeight();
331 Weight sum = Weight::Zero();
339 return Arc::Weight::NoWeight();
341 distance[s] : Weight::Zero();