Gröbner basis project
Codebase for research into Gröbner basis computation
|
Implementation of indeterminates, for easier building of polynomials. More...
#include <indeterminate.hpp>
Public Member Functions | |
Construction | |
Indeterminate (Polynomial_Ring &P, NVAR_TYPE xi) | |
this will correspond to the xi th indeterminate of P . | |
Indeterminate (const Indeterminate &other) | |
copy constructor | |
Indeterminate & | operator= (const Indeterminate &other) |
Basic properties | |
Polynomial_Ring & | base_ring () |
the Polynomial_Ring this lives in | |
NVAR_TYPE | index_in_ring () |
which variable in base_ring() this is | |
Computation | |
Monomial | operator^ (EXP_TYPE a) |
returns this to the a th power | |
Monomial | operator* (Indeterminate y) |
returns the product of this and y | |
Monomial | operator* (Monomial t) |
returns the product of this and t | |
Protected Attributes | |
NVAR_TYPE | i |
which indeterminate in R this is | |
Polynomial_Ring * | R |
the ring this lives in | |
Friends | |
I/O | |
ostream & | operator<< (ostream &, Indeterminate &) |
prints this with the appropriate name | |
Implementation of indeterminates, for easier building of polynomials.
The main purpose of this class is to help make it easier to build polynomials. It is not especially useful otherwise, and is highly efficient. However, it makes the following possible:
…and the result should be \(x^3y\). Alternately, you could do:
…with the same result. Just be careful in the second case to destroy the evidence.
Definition at line 46 of file indeterminate.hpp.