Lines Matching refs:W2
37 template<class W1, class W2> class PairWeight;
38 template <class W1, class W2>
39 istream &operator>>(istream &strm, PairWeight<W1, W2> &w);
41 template<class W1, class W2>
44 friend istream &operator>><W1, W2>(istream&, PairWeight<W1, W2>&);
47 typename W2::ReverseWeight>
54 PairWeight(W1 w1, W2 w2) : value1_(w1), value2_(w2) {} in PairWeight()
56 static const PairWeight<W1, W2> &Zero() { in Zero()
57 static const PairWeight<W1, W2> zero(W1::Zero(), W2::Zero()); in Zero()
61 static const PairWeight<W1, W2> &One() { in One()
62 static const PairWeight<W1, W2> one(W1::One(), W2::One()); in One()
66 static const PairWeight<W1, W2> &NoWeight() { in NoWeight()
67 static const PairWeight<W1, W2> no_weight(W1::NoWeight(), W2::NoWeight()); in NoWeight()
81 PairWeight<W1, W2> &operator=(const PairWeight<W1, W2> &w) {
97 PairWeight<W1, W2> Quantize(float delta = kDelta) const {
98 return PairWeight<W1, W2>(value1_.Quantize(delta),
108 const W2& Value2() const { return value2_; } in Value2()
112 void SetValue2(const W2 &w) { value2_ = w; } in SetValue2()
116 istream &strm, PairWeight<W1, W2>& w, char separator) { in ReadNoParen()
136 W2 w2 = W2::Zero(); in ReadNoParen()
139 w = PairWeight<W1, W2>(w1, w2); in ReadNoParen()
145 istream &strm, PairWeight<W1, W2>& w, in ReadWithParen()
199 W2 w2 = W2::Zero(); in ReadWithParen()
202 w = PairWeight<W1, W2>(w1, w2); in ReadWithParen()
208 W2 value2_;
212 template <class W1, class W2>
213 inline bool operator==(const PairWeight<W1, W2> &w,
214 const PairWeight<W1, W2> &v) {
218 template <class W1, class W2>
219 inline bool operator!=(const PairWeight<W1, W2> &w1,
220 const PairWeight<W1, W2> &w2) {
225 template <class W1, class W2>
226 inline bool ApproxEqual(const PairWeight<W1, W2> &w1,
227 const PairWeight<W1, W2> &w2,
233 template <class W1, class W2>
234 inline ostream &operator<<(ostream &strm, const PairWeight<W1, W2> &w) {
255 template <class W1, class W2>
256 inline istream &operator>>(istream &strm, PairWeight<W1, W2> &w) {
270 return PairWeight<W1, W2>::ReadWithParen(
274 return PairWeight<W1, W2>::ReadNoParen(strm, w, separator);