|
Macaulay2 Engine
|
PolynomialRing — abstract polynomial-ring base, the engine's most-reused class. More...
#include "ringelem.hpp"#include <vector>#include "interface/computation.h"#include "skew.hpp"#include "ring.hpp"#include "qring.hpp"Go to the source code of this file.
Classes | |
| class | PolynomialRing |
| Abstract base for the engine's polynomial-ring hierarchy. More... | |
| class | PolyRingFlat |
| PolynomialRing subclass whose elements are represented as a single flat Nterm* linked list (no fraction / quotient wrapper). More... | |
PolynomialRing — abstract polynomial-ring base, the engine's most-reused class.
Declares the abstract PolynomialRing (R[x_1, ..., x_n]) and the intermediate PolyRingFlat further down in the same file — the latter asserts that the coefficient ring is not itself polynomial, and is what the concrete commutative PolyRing (poly.hpp) and the quotient PolyRingQuotient (polyquotient.hpp) inherit from. The forward declarations for PolyRingSkew / PolyRingWeyl / PolyRingNC / PolyQuotient near the top of the file are stale — those class names have no definitions anywhere. The real non-commutative-flavoured PolyRing subclasses use different names: SkewPolynomialRing (skewpoly.hpp), WeylAlgebra (weylalg.hpp), SolvableAlgebra (solvable.hpp), and SchurRing (schur.hpp). Inside that hierarchy PolynomialRing itself also carries is_skew_ / is_weyl_ / is_solvable_ flags so cheap branches in tight loops can skip the virtual call when the answer is statically known.
The base carries the monoid (Monoid*, see monoid.hpp) and the coefficient ring (Ring*, typically an aring wrapper), a graded-ring flag, a QRingInfo* qinfo_ for quotient bookkeeping, and the SkewMultiplication configuration used when same-variable multiplications collapse to zero in exterior-like rings. A small friend graph (GBRing, GBRingSkew, GBComputation) reaches into the encoded monomial layout without going through virtual calls — the tight-loop performance lever.
Definition in file polyring.hpp.