1 #ifndef __CYCLIC_N_HPP_ 2 #define __CYCLIC_N_HPP_ 25 using std::cout;
using std::endl;
27 #include "system_constants.hpp" 30 #include "monomial.hpp" 31 #include "polynomial.hpp" 32 #include "polynomial_ring.hpp" 33 #include "monomial_ordering.hpp" 34 #include "algorithm_buchberger_basic.hpp" 61 list <Abstract_Polynomial *> result;
65 NVAR_TYPE max_n = (homog) ? n + 1 : n;
69 for (NVAR_TYPE i = 0; i < n; ++i) {
75 for (NVAR_TYPE i = 0; i < n - 1; ++i) {
77 for (NVAR_TYPE j = 0; j < n; ++j)
81 for (NVAR_TYPE k = 0; k < max_n; ++k)
82 M[j].set_exponent(k,0);
84 for (NVAR_TYPE k = j; k < i + j + 1; ++k)
86 NVAR_TYPE l = (k >= n) ? k - n : k;
95 for (NVAR_TYPE i = 0; i < max_n; ++i) {
96 if (!homog or i < max_n - 1) {
110 for (DEG_TYPE i = 0; i < n; ++i) M[i].deinitialize();
A Constant_Polynomial is a polynomial that should not change.
Information necessary for a field modulo a prime.
void set_monomial_ordering(const Monomial_Ordering *mord)
sets the Monomial_Ordering associated with this Monomial
Prime_Field_Element unity()
“unity” is the multiplicative identity.
void set_exponent(NVAR_TYPE i, DEG_TYPE e)
change th exponent to
virtual void sort_by_order() override
sort by order
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...
void initialize_exponents(NVAR_TYPE number_of_vars)
allocates memory for exponents This is useful when you want to allocate an array of monomials...
void common_initialization(const Monomial_Ordering *ord=nullptr)
things all Monomial initializers must do
list< Abstract_Polynomial * > cyclic_n(NVAR_TYPE n, Prime_Field &F, bool homog, Monomial_Ordering *mord=generic_grevlex_ptr)
generates the Cyclic- system