1 #ifndef __POLYNOMIAL_H_ 2 #define __POLYNOMIAL_H_ 29 using std::cout;
using std::endl;
32 #include "monomial.hpp" 33 #include "strategies.hpp" 34 #include "polynomial_ring.hpp" 128 unsigned number_of_variables()
const;
131 return leading_monomial().monomial_ordering();
134 virtual Monomial & leading_monomial()
const = 0;
138 virtual unsigned length()
const = 0;
140 virtual bool is_zero()
const = 0;
146 virtual DEG_TYPE standard_degree()
const;
152 virtual DEG_TYPE weighted_degree(
const WT_TYPE * w =
nullptr)
const;
178 virtual void set_monomial_ordering(
187 virtual void sort_by_order() = 0;
199 friend ostream & operator << (ostream & os,
201 virtual void print(ostream & os=cout)
const;
202 virtual void println(ostream & os=cout)
const;
203 virtual void printlncout()
const { println(); }
235 virtual void restart_iteration() = 0;
237 virtual void moveRight() = 0;
241 virtual bool canMoveRight()
const = 0;
243 virtual void moveLeft() = 0;
245 virtual bool canMoveLeft()
const = 0;
252 virtual bool fellOff()
const = 0;
259 virtual const Monomial & currMonomial()
const = 0;
291 virtual void set_currMonomial(
const Monomial &) = 0;
333 bool subtract =
false 338 virtual void multiply_by_monomial(
const Monomial &
t);
Mutable_Polynomial(Polynomial_Ring &R, const Monomial_Ordering *ordering=generic_grevlex_ptr)
constructor
The general class of a polynomial.
const Monomial_Ordering * monomial_ordering() const
reports leading monomial’s monomial ordering
polynomial-related strategy data
const Prime_Field_Element & coefficient()
the coefficient for this term
Information necessary for a field modulo a prime.
const Abstract_Polynomial * p
the polynomial this points to
ray operator*(RAYENT_TYPE a, ray &r)
Multiply every coordinate in the given ray by the given scalar.
virtual const Abstract_Polynomial * my_poly() const
Reports the polynomial on which this is iterating.
const Prime_Field_Element & c
the coefficient of this term
Polynomials that need arithmetic typically descend from this class.
Implementation of monomials.
Element of a field of prime characteristic.
const Polynomial_Iterator & operator++()
Moves right in the polynomial, to the next smaller monomial.
interface to a monomial ordering
Encapsulates information about a polynomial ring for easy access: ground field, number of indetermina...
A Mutable_Polynomial_Iterator allows one to modify the terms of a polynomial.
const Monomial & monomial()
the monomial of this term
Abstract_Polynomial(Polynomial_Ring &ring, const Monomial_Ordering *ordering)
const Monomial & t
the monomial part of this term
convenience class to help iterate through polynomials
Used to iterate through a polynomial.
virtual const Monomial & currMonomial() const =0
Reports the monomial at the current position.
Polynomial_Ring & R
data about polynomial ring
virtual Poly_Strategy_Data * strategy() const
strategy related information