Lines Matching refs:weight
58 typedef typename Arc::Weight Weight;
62 vector<Weight> *distance,
79 vector<Weight> *distance_;
85 vector<Weight> rdistance_; // Relaxation distance.
99 if (!(Weight::Properties() & kRightSemiring))
100 LOG(FATAL) << "ShortestDistance: Weight needs to be right distributive: "
101 << Weight::Type();
115 distance_->push_back(Weight::Zero());
116 rdistance_.push_back(Weight::Zero());
124 (*distance_)[source] = Weight::One();
125 rdistance_[source] = Weight::One();
134 distance_->push_back(Weight::Zero());
135 rdistance_.push_back(Weight::Zero());
139 Weight r = rdistance_[s];
140 rdistance_[s] = Weight::Zero();
145 if (!arc_filter_(arc) || arc.weight == Weight::Zero())
148 distance_->push_back(Weight::Zero());
149 rdistance_.push_back(Weight::Zero());
156 (*distance_)[arc.nextstate] = Weight::Zero();
157 rdistance_[arc.nextstate] = Weight::Zero();
162 Weight &nd = (*distance_)[arc.nextstate];
163 Weight &nr = rdistance_[arc.nextstate];
164 Weight w = Times(r, arc.weight);
201 vector<typename Arc::Weight> *distance,
231 vector<typename Arc::Weight> *distance,
234 typedef typename Arc::Weight Weight;
244 typedef typename ReverseArc::Weight ReverseWeight;