@@ -33,26 +33,27 @@ namespace poly {
3333 /* * Construct a zero polynomial. */
3434 Polynomial ();
3535
36+ /* * Construct a constant polynomial from an internal context pointer. */
37+ Polynomial (const lp_polynomial_context_t * c, const Variable& v);
3638 /* * Construct from a variable and a custom context. */
37- Polynomial (const Context& c, Variable v);
39+ Polynomial (const Context& c, const Variable& v);
3840 /* * Construct from a variable. */
39- Polynomial (Variable v);
41+ Polynomial (const Variable& v);
4042
43+ /* * Construct a constant polynomial from an internal context pointer. */
44+ Polynomial (const lp_polynomial_context_t * c, const Integer& i, const Variable& v, unsigned n);
4145 /* * Construct i * v^n from a custom context. */
42- Polynomial (const Context& c, const Integer& i, Variable v, unsigned n);
46+ Polynomial (const Context& c, const Integer& i, const Variable& v, unsigned n);
4347 /* * Construct i * v^n. */
44- Polynomial (const Integer& i, Variable v, unsigned n);
48+ Polynomial (const Integer& i, const Variable& v, unsigned n);
4549
50+ /* * Construct a constant polynomial from an internal context pointer. */
51+ Polynomial (const lp_polynomial_context_t * c, const Integer& i);
4652 /* * Construct from an integer and a custom context. */
4753 Polynomial (const Context& c, const Integer& i);
4854 /* * Construct from an integer. */
4955 Polynomial (const Integer& i);
5056
51- /* * Construct from an integer and a custom context. */
52- Polynomial (const Context& c, long i);
53- /* * Construct from an integer. */
54- Polynomial (long i);
55-
5657 /* * Copy from a Polynomial. */
5758 Polynomial (const Polynomial& p);
5859 /* * Move from a Polynomial. */
@@ -132,16 +133,28 @@ namespace poly {
132133
133134 /* * Compare polynomials. */
134135 bool operator ==(const Polynomial& lhs, const Polynomial& rhs);
136+ bool operator ==(const Integer& lhs, const Polynomial& rhs);
137+ bool operator ==(const Polynomial& lhs, const Integer& rhs);
135138 /* * Compare polynomials. */
136139 bool operator !=(const Polynomial& lhs, const Polynomial& rhs);
140+ bool operator !=(const Integer& lhs, const Polynomial& rhs);
141+ bool operator !=(const Polynomial& lhs, const Integer& rhs);
137142 /* * Compare polynomials. */
138143 bool operator <(const Polynomial& lhs, const Polynomial& rhs);
144+ bool operator <(const Integer& lhs, const Polynomial& rhs);
145+ bool operator <(const Polynomial& lhs, const Integer& rhs);
139146 /* * Compare polynomials. */
140147 bool operator <=(const Polynomial& lhs, const Polynomial& rhs);
148+ bool operator <=(const Integer& lhs, const Polynomial& rhs);
149+ bool operator <=(const Polynomial& lhs, const Integer& rhs);
141150 /* * Compare polynomials. */
142151 bool operator >(const Polynomial& lhs, const Polynomial& rhs);
152+ bool operator >(const Integer& lhs, const Polynomial& rhs);
153+ bool operator >(const Polynomial& lhs, const Integer& rhs);
143154 /* * Compare polynomials. */
144155 bool operator >=(const Polynomial& lhs, const Polynomial& rhs);
156+ bool operator >=(const Integer& lhs, const Polynomial& rhs);
157+ bool operator >=(const Polynomial& lhs, const Integer& rhs);
145158
146159 /* * Add two polynomials. */
147160 Polynomial operator +(const Polynomial& lhs, const Polynomial& rhs);
@@ -151,6 +164,8 @@ namespace poly {
151164 Polynomial operator +(const Integer& lhs, const Polynomial& rhs);
152165 /* * Add and assign two polynomials. */
153166 Polynomial& operator +=(Polynomial& lhs, const Polynomial& rhs);
167+ /* * Add and assign a polynomial with an integer. */
168+ Polynomial& operator +=(Polynomial& lhs, const Integer& rhs);
154169 /* * Compute lhs += rhs1 * rhs2. */
155170 Polynomial& add_mul (Polynomial& lhs, const Polynomial& rhs1, const Polynomial& rhs2);
156171
@@ -164,6 +179,8 @@ namespace poly {
164179 Polynomial operator -(const Integer& lhs, const Polynomial& rhs);
165180 /* * Subtract and assign two polynomials. */
166181 Polynomial& operator -=(Polynomial& lhs, const Polynomial& rhs);
182+ /* * Subtract and assigns a polynomial with an integer. */
183+ Polynomial& operator -=(Polynomial& lhs, const Integer& rhs);
167184 /* * Compute lhs -= rhs1 * rhs2. */
168185 Polynomial& sub_mul (Polynomial& lhs, const Polynomial& rhs1, const Polynomial& rhs2);
169186
@@ -175,6 +192,8 @@ namespace poly {
175192 Polynomial operator *(const Integer& lhs, const Polynomial& rhs);
176193 /* * Multiply and assign two polynomials. */
177194 Polynomial& operator *=(Polynomial& lhs, const Polynomial& rhs);
195+ /* * Multiply and assign a polynomial with an integer */
196+ Polynomial& operator *=(Polynomial& lhs, const Integer& rhs);
178197
179198 /* * Multiply with x^n where x is the main variable. */
180199 Polynomial shl (const Polynomial& lhs, unsigned n);
0 commit comments