1 #ifndef __POLYNOMIAL_LINKED_LIST_H_ 2 #define __POLYNOMIAL_LINKED_LIST_H_ 26 #include "monomial.hpp" 27 #include "polynomial.hpp" 28 #include "polynomial_ring.hpp" 77 void *
operator new(size_t);
79 void operator delete(
void *);
121 virtual void restart_iteration()
override;
128 virtual void moveRight()
override { iter_curr = iter_curr->next; }
132 virtual void moveLeft()
override { iter_curr = iter_curr->prev; }
134 virtual bool canMoveLeft()
const override;
136 virtual bool canMoveRight()
const override;
140 virtual bool fellOff()
const override;
143 virtual const Monomial & currMonomial()
const override;
155 virtual void set_currMonomial(
const Monomial &
t)
override;
215 virtual bool is_zero()
const override;
220 virtual Monomial & leading_monomial()
const override;
226 virtual unsigned length()
const override;
227 virtual void set_monomial_ordering(
263 virtual void add_polynomial_multiple(
272 virtual void sort_by_order()
override;
The general class of a polynomial.
Monomial_Node * iter_curr
the node at which we have stopped
Monomial_Node(const Prime_Field_Element &a, const Monomial &u)
Monomial u with coefficient a. Both are copied, and can be deleted.
Prime_Field_Element & coefficient()
This term’s coefficient.
Tool for Polynomial_Linked_List.
Monomial t
the monomial in this node
virtual void moveLeft() override
Moves the iterator left: to the next larger monomial.
Iterator over linked list polynomials.
Monomial_Node * next
for linking
Information necessary for a field modulo a prime.
virtual void moveRight() override
Returns the monomial the iterator currently points to.
Monomial_Node * head
first monomial in the list, returned by leading_monomial()
Polynomial_Linked_List * p
@
Polynomials that need arithmetic typically descend from this class.
Monomial_Node * prev
for linking
Implementation of monomials.
Element of a field of prime characteristic.
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.
Monomial & monomial()
This term’s monomial, or power product. The coefficient is not included.
Polynomials represented as a doubly linked list.
Used to iterate through a polynomial.
Prime_Field_Element c
the monomial’s coefficient