1 #ifndef __POLYNOMIAL_RING_CPP_ 2 #define __POLYNOMIAL_RING_CPP_ 23 #include "polynomial_ring.hpp" 31 if (new_names !=
nullptr)
42 if (new_names !=
nullptr) {
45 for (NVAR_TYPE i = 0; i <
n; ++i) {
46 names[i] = new_names[i];
57 for (NVAR_TYPE i = 0; i <
n; ++i)
65 static char my_name[2];
66 if (
names ==
nullptr) {
68 my_name[1] = i + char(i);
Polynomial_Ring(NVAR_TYPE num_vars, Prime_Field &field, string *var_names=nullptr)
Initialize the ring for the given field and number of indeterminates.
virtual Prime_Field & ground_field() const
ground field
~Polynomial_Ring()
Deletes the names.
Prime_Field & F
the ring's ground field
virtual NVAR_TYPE number_of_variables() const
number of indeterminates (variables) in the ring
Information necessary for a field modulo a prime.
bool set_names(string *new_names, NVAR_TYPE length)
sets the names of the indeterminates, if you do not want the default
virtual Indeterminate * indeterminates()
an array of the ring’s indeterminates; use only to biuld polynomials
virtual const string name(NVAR_TYPE i) const
name of the th indeterminate
Implementation of indeterminates, for easier building of polynomials.
string * names
optional names for the variables
NVAR_TYPE n
the number of indeterminates for every monomial in the ring