|
Macaulay2 Engine
|
GBRing and gbvector — the GB-tuned polynomial-ring view used by classical Buchberger code. More...
#include <M2/math-include.h>#include "engine-includes.hpp"#include <iostream>#include <string>#include "buffer.hpp"#include "monoid.hpp"#include "newdelete.hpp"#include "ringelem.hpp"#include "skew.hpp"#include "style.hpp"Go to the source code of this file.
Classes | |
| struct | gbvector |
| struct | POLY |
| Pairs a gbvector with its evolving syzygy gbvector. More... | |
| class | GBRing |
| Polynomial-ring view tuned for the inner loop of classical Buchberger Groebner-basis computations. More... | |
| class | GBRingPoly |
| GBRing specialisation for ordinary commutative polynomial rings. More... | |
| class | GBRingWeyl |
| GBRing specialisation for Weyl algebras over a field. More... | |
| class | GBRingWeylZZ |
| GBRingWeyl specialisation for Weyl algebras over ZZ. More... | |
| class | GBRingSkew |
| GBRing specialisation for skew-commutative (exterior-like) polynomial rings. More... | |
| class | GBRingSolvable |
| GBRing specialisation for solvable polynomial algebras (PBW-style non-commutative rings whose relations have the form x_j * x_i = c_ij * x_i * x_j + lower-order terms). More... | |
| class | gbvectorHeap |
Typedefs | |
| typedef int * | monomial |
Functions | |
| template<typename container, typename fcn> | |
| void | displayElements (std::string header, GBRing *R, container a, fcn f) |
GBRing and gbvector — the GB-tuned polynomial-ring view used by classical Buchberger code.
gbvector is the value type: a singly-linked list of { gbvector *next; ring_elem coeff; int Computations; int monom[1]; } nodes, with the flexible-array monom[1] trailing whatever variable-length encoding the monoid uses. POLY { gbvector *f; gbvector *fsyz; } pairs the polynomial with its evolving syzygy. GBRing is the matching ring view: it inherits from our_new_delete, holds the coefficient ring and monoid, and exposes the core polynomial-arithmetic primitives the GB inner loop needs — in particular gbvector_add_to (general-coefficient addition) and its gbvector_add_to_zzp specialisation for prime-field hot paths. Concrete subclasses (GBRingPoly, GBRingSkew, GBRingWeyl, GBRingWeylZZ, GBRingSolvable) cover the cross of ring flavour and coefficient kind; the in-source comment block enumerates the full Schreyer-encoded / KK vs ZZ / quotient axes.
Compared with polyring.hpp's PolynomialRing, this view trades the opaque ring_elem for an explicit linked-list representation that makes head/tail decomposition cheap and lets the companion gbvectorHeap accumulator absorb the many summands of a GB reduction without quadratic merge cost. A GBRing is constructed once per GB computation from a PolynomialRing and torn down at the end.
Definition in file gbring.hpp.