|
Macaulay2 Engine
|
Ring — the legacy abstract base class for every coefficient and polynomial ring. More...
#include <utility>#include "aring.hpp"#include "error.h"#include "exceptions.hpp"#include "hash.hpp"#include "monoid.hpp"#include "newdelete.hpp"#include "ringelem.hpp"#include "ZZ.hpp"Go to the source code of this file.
Classes | |
| class | Ring |
| xxx xxx xxx More... | |
| class | SumCollector |
| Abstract incremental accumulator that builds a ring_elem from many add(f) calls. More... | |
Macros | |
| #define | ZERO_RINGELEM (ring_elem(static_cast<Nterm *>(0))) |
Functions | |
| RingZZ * | makeIntegerRing () |
Variables | |
| RingZZ * | globalZZ |
Ring — the legacy abstract base class for every coefficient and polynomial ring.
Declares Ring, the virtual base from which every ring in M2's legacy interface descends: RingZZ, Z_mod, PolyRing (with the flavoured subclasses SkewPolynomialRing, WeylAlgebra, SolvableAlgebra, SchurRing), PolyRingQuotient, SchurRing2, FractionField, LocalRing, GF, the M2FreeAlgebra / M2FreeAlgebraQuotient non-commutative pair, and — indirectly via aring-glue.hpp — the ConcreteRing<R> template (and its RingQQ instantiation) that wraps any aring-templated ring. Every operation a ring supports (add, mult, is_zero, is_unit, from_long, eval, text_out, ...) is a virtual method on this class, and callers dispatch through Ring* uniformly. The header forward-declares the friend ring types so the giant interface surface can keep its mutual references without dragging in every subsystem; the PolyQQ declaration near the top is stale (no class body exists in the tree).
Marked "legacy" because the 2012-onward aring.hpp framework replaces virtual dispatch with templates for hot paths; new rings should target aring. The legacy API persists everywhere existing code already speaks Ring*, and aring-glue.hpp's ConcreteRing<R> is what lets the frameworks coexist.
Definition in file ring.hpp.