Lines Matching refs:Ring
42 typedef T Ring;
52 PolynomialOver(const Ring &ring, unsigned int count)
56 PolynomialOver(const PolynomialOver<Ring> &t)
68 PolynomialOver(const char *str, const Ring &ring) {FromStr(str, ring);}
80 PolynomialOver(RandomNumberGenerator &rng, const RandomizationParameter ¶meter, const Ring &ring)
87 int Degree(const Ring &ring) const {return int(CoefficientCount(ring))-1;}
89 unsigned int CoefficientCount(const Ring &ring) const;
91 CoefficientType GetCoefficient(unsigned int i, const Ring &ring) const;
97 PolynomialOver<Ring>& operator=(const PolynomialOver<Ring>& t);
100 void Randomize(RandomNumberGenerator &rng, const RandomizationParameter ¶meter, const Ring &ring);
103 void SetCoefficient(unsigned int i, const CoefficientType &value, const Ring &ring);
106 void Negate(const Ring &ring);
109 void swap(PolynomialOver<Ring> &t);
115 bool Equals(const PolynomialOver<Ring> &t, const Ring &ring) const;
116 bool IsZero(const Ring &ring) const {return CoefficientCount(ring)==0;}
118 PolynomialOver<Ring> Plus(const PolynomialOver<Ring>& t, const Ring &ring) const;
119 PolynomialOver<Ring> Minus(const PolynomialOver<Ring>& t, const Ring &ring) const;
120 PolynomialOver<Ring> Inverse(const Ring &ring) const;
122 PolynomialOver<Ring> Times(const PolynomialOver<Ring>& t, const Ring &ring) const;
123 PolynomialOver<Ring> DividedBy(const PolynomialOver<Ring>& t, const Ring &ring) const;
124 PolynomialOver<Ring> Modulo(const PolynomialOver<Ring>& t, const Ring &ring) const;
125 PolynomialOver<Ring> MultiplicativeInverse(const Ring &ring) const;
126 bool IsUnit(const Ring &ring) const;
128 PolynomialOver<Ring>& Accumulate(const PolynomialOver<Ring>& t, const Ring &ring);
129 PolynomialOver<Ring>& Reduce(const PolynomialOver<Ring>& t, const Ring &ring);
132 PolynomialOver<Ring> Doubled(const Ring &ring) const {return Plus(*this, ring);}
134 PolynomialOver<Ring> Squared(const Ring &ring) const {return Times(*this, ring);}
136 CoefficientType EvaluateAt(const CoefficientType &x, const Ring &ring) const;
138 PolynomialOver<Ring>& ShiftLeft(unsigned int n, const Ring &ring);
139 PolynomialOver<Ring>& ShiftRight(unsigned int n, const Ring &ring);
142 static void Divide(PolynomialOver<Ring> &r, PolynomialOver<Ring> &q, const PolynomialOver<Ring> &a, const PolynomialOver<Ring> &d, const Ring &ring);
147 std::istream& Input(std::istream &in, const Ring &ring);
148 std::ostream& Output(std::ostream &out, const Ring &ring) const;
152 void FromStr(const char *str, const Ring &ring);
165 typedef T Ring;
306 static const Ring ms_fixedRing;
309 //! Ring of polynomials over another ring
392 template <class Ring, class Element>
393 void PrepareBulkPolynomialInterpolation(const Ring &ring, Element *w, const Element x[], unsigned int n);
394 template <class Ring, class Element>
395 void PrepareBulkPolynomialInterpolationAt(const Ring &ring, Element *v, const Element &position, const Element x[], const Element w[], unsigned int n);
396 template <class Ring, class Element>
397 Element BulkPolynomialInterpolateAt(const Ring &ring, const Element y[], const Element v[], unsigned int n);