Gröbner basis project
Codebase for research into Gröbner basis computation
|
Encapsulates information about a polynomial ring for easy access: ground field, number of variables, …. More...
#include <polynomial_ring.hpp>
Public Member Functions | |
Construction | |
Polynomial_Ring (NVAR_TYPE num_vars, Prime_Field &field, string *var_names=nullptr) | |
Initialize the ring for the given field and number of variables. More... | |
Destruction | |
~Polynomial_Ring () | |
Deletes the names. | |
Modification | |
bool | set_names (string *new_names, NVAR_TYPE length) |
sets the names of the variables, if you do not want the default More... | |
Basic properties | |
virtual NVAR_TYPE | number_of_variables () const |
number of indeterminates (variables) in the ring | |
virtual Indeterminate * | indeterminates () |
an array of the ring’s indeterminates; use only to biuld polynomials | |
virtual Prime_Field & | ground_field () const |
ground field | |
virtual const string | name (NVAR_TYPE i) const |
name of the \(i\)th variable | |
virtual const string * | name_list () const |
names of all the variabiles | |
Protected Attributes | |
Prime_Field & | F |
the ring's ground field | |
NVAR_TYPE | n |
the number of variables for every monomial in the ring More... | |
string * | names |
optional names for the variables | |
Encapsulates information about a polynomial ring for easy access: ground field, number of variables, ….
Definition at line 25 of file polynomial_ring.hpp.
Polynomial_Ring::Polynomial_Ring | ( | NVAR_TYPE | num_vars, |
Prime_Field & | field, | ||
string * | var_names = nullptr |
||
) |
Initialize the ring for the given field and number of variables.
The array of names is copied, so you can reuse or discard the memory as you prefer.
Definition at line 8 of file polynomial_ring.cpp.
bool Polynomial_Ring::set_names | ( | string * | new_names, |
NVAR_TYPE | length | ||
) |
sets the names of the variables, if you do not want the default
Returns True
if and only if successful. The array is copied, so you can reuse or discard the memory as you prefer.
length
is not the same as the number of variables, this will fail immediately. Definition at line 23 of file polynomial_ring.cpp.
|
protected |
the number of variables for every monomial in the ring
Definition at line 77 of file polynomial_ring.hpp.