Lines Matching refs:W
38 template <class W, unsigned int n>
39 class PowerWeight : public TupleWeight<W, n> {
41 using TupleWeight<W, n>::Zero;
42 using TupleWeight<W, n>::One;
43 using TupleWeight<W, n>::NoWeight;
44 using TupleWeight<W, n>::Quantize;
45 using TupleWeight<W, n>::Reverse;
47 typedef PowerWeight<typename W::ReverseWeight, n> ReverseWeight;
51 PowerWeight(const TupleWeight<W, n> &w) : TupleWeight<W, n>(w) {} in PowerWeight() argument
54 PowerWeight(Iterator begin, Iterator end) : TupleWeight<W, n>(begin, end) {} in PowerWeight()
56 static const PowerWeight<W, n> &Zero() { in Zero()
57 static const PowerWeight<W, n> zero(TupleWeight<W, n>::Zero()); in Zero()
61 static const PowerWeight<W, n> &One() { in One()
62 static const PowerWeight<W, n> one(TupleWeight<W, n>::One()); in One()
66 static const PowerWeight<W, n> &NoWeight() { in NoWeight()
67 static const PowerWeight<W, n> no_weight(TupleWeight<W, n>::NoWeight()); in NoWeight()
76 type = W::Type() + "_^" + power; in Type()
82 uint64 props = W::Properties(); in Properties()
87 PowerWeight<W, n> Quantize(float delta = kDelta) const {
88 return TupleWeight<W, n>::Quantize(delta);
92 return TupleWeight<W, n>::Reverse(); in Reverse()
98 template <class W, unsigned int n>
99 inline PowerWeight<W, n> Plus(const PowerWeight<W, n> &w1, in Plus() argument
100 const PowerWeight<W, n> &w2) { in Plus()
101 PowerWeight<W, n> w; in Plus()
108 template <class W, unsigned int n>
109 inline PowerWeight<W, n> Times(const PowerWeight<W, n> &w1, in Times() argument
110 const PowerWeight<W, n> &w2) { in Times()
111 PowerWeight<W, n> w; in Times()
118 template <class W, unsigned int n>
119 inline PowerWeight<W, n> Divide(const PowerWeight<W, n> &w1,
120 const PowerWeight<W, n> &w2,
122 PowerWeight<W, n> w;
129 template <class W, unsigned int n>
130 inline PowerWeight<W, n> Times(const W &s, const PowerWeight<W, n> &w) { in Times() argument
131 PowerWeight<W, n> sw; in Times()
138 template <class W, unsigned int n>
139 inline PowerWeight<W, n> Times(const PowerWeight<W, n> &w, const W &s) { in Times() argument
140 PowerWeight<W, n> ws; in Times()
147 template <class W, unsigned int n>
148 inline W DotProduct(const PowerWeight<W, n> &w1, in DotProduct() argument
149 const PowerWeight<W, n> &w2) { in DotProduct()
150 W w = W::Zero(); in DotProduct()