|
Macaulay2 Engine
|
Native univariate polynomial arithmetic over QQ extensions and finite fields. More...
#include <cstdio>#include <sstream>#include <vector>#include "ExponentVector.hpp"#include "ringelem.hpp"#include "buffer.hpp"Go to the source code of this file.
Classes | |
| struct | TowerPolynomial |
| Heap-allocated node of a tower polynomial: a dense degree-indexed coefficient array that recurses through levels. More... | |
| class | DPoly |
| Arithmetic engine for tower-polynomial rings: (Z/p)[x_0][x_1]...[x_{nvars-1}] modulo a chain of extensions. More... | |
| class | DRing |
| Single-level view of a tower-polynomial ring: a DPoly plus a fixed working level and a Tower-flavoured ring_type typedef. More... | |
| class | DPolyTraverser |
| Visitor base class that walks every term of a TowerPolynomial, calling viewTerm(coeff, exponents) once per leaf. More... | |
Native univariate polynomial arithmetic over QQ extensions and finite fields.
Declares TowerPolynomialStruct (a (deg, len, union {long* ints; TowerPolynomial* polys;}) recursive layout that bottoms out at long coefficients at level 0 and recurses upward through pointers at each higher level), the DPoly class that drives arithmetic over such towers, and the DPolyTraverser visitor. DPoly provides the engine's dependency-free GCD machinery for algebraic-extension construction and modular factorisation paths: "monic GCD mod p" over a finite extension field, and a modular GCD over QQ (lift to many Z/p, then CRT back). The in-file comment flags multivariate and function-field extensions as planned but not yet implemented.
The point of having this code alongside Factory (interface/factory.h) is twofold: it gives the engine a dependency-free path that still works when Factory is unavailable, and it provides an end-to-end-debuggable native implementation that the tower layers reach into. Real consumers are tower.hpp (the legacy Tower : public Ring class, which holds a DRing* back-end pointing at this machinery) and aring-tower.hpp (the modern ARingTower aring, whose element pointers are reinterpreted as TowerPolynomials).
Definition in file dpoly.hpp.