|
Macaulay2 Engine
|
Engine-boundary C API for the legacy Ring hierarchy — coefficient, polynomial, and composite rings. More...
#include "engine-includes.hpp"Go to the source code of this file.
Functions | |
| unsigned int | rawRingHash (const Ring *R) |
| M2_string | IM2_Ring_to_string (const Ring *M) |
| long | rawRingCharacteristic (const Ring *R) |
| const Ring * | IM2_Ring_ZZ (void) |
| const Ring * | IM2_Ring_QQ (void) |
| const Ring * | IM2_Ring_ZZp (int p) |
| const Ring * | rawGaloisField (const RingElement *f) |
| const Ring * | IM2_Ring_RRi (unsigned long prec) |
| const Ring * | IM2_Ring_CCi (unsigned long prec) |
| const Ring * | IM2_Ring_RRR (unsigned long prec) |
| const Ring * | IM2_Ring_CCC (unsigned long prec) |
| const Ring * | IM2_Ring_polyring (const Ring *K, const Monoid *M) |
| const Ring * | IM2_Ring_trivial_polyring () |
| const Ring * | IM2_Ring_skew_polyring (const Ring *R, M2_arrayint skewvars) |
| const Ring * | IM2_Ring_weyl_algebra (const Ring *R, M2_arrayint comm_vars, M2_arrayint diff_vars, int homog_var) |
| const Ring * | IM2_Ring_solvable_algebra (const Ring *R, const Matrix *Q) |
| const Ring * | rawRingM2FreeAlgebra (const Ring *coefficientRing, M2_ArrayString names, const Ring *degreeRing, M2_arrayint degrees, M2_arrayint wtvecs, M2_arrayint heftVector) |
| const Ring * | rawRingM2FreeAlgebraQuotient (const Matrix *GB, int maxdeg) |
| const Ring * | IM2_Ring_frac (const Ring *R) |
| const Ring * | IM2_Ring_localization (const Ring *R, Computation *P) |
| const Ring * | IM2_Ring_quotient (const Ring *R, const Matrix *I) |
| const Ring * | IM2_Ring_quotient1 (const Ring *R, const Ring *B) |
| const Ring * | IM2_Ring_schur (const Ring *R) |
| const Ring * | rawSchurRing1 (const Ring *A) |
| const Ring * | rawSchurRing2 (const Ring *A, int n) |
| const Ring * | rawSchurSnRing (const Ring *A, int n) |
| const Ring * | rawTowerRing1 (long charac, M2_ArrayString names) |
| const Ring * | rawTowerRing2 (const Ring *R1, M2_ArrayString new_names) |
| const Ring * | rawTowerRing3 (const Ring *R1, engine_RawRingElementArray eqns) |
| const Ring * | rawARingTower1 (const Ring *R1, M2_ArrayString names) |
| const Ring * | rawARingTower2 (const Ring *R1, M2_ArrayString new_names) |
| const Ring * | rawARingTower3 (const Ring *R1, engine_RawRingElementArray eqns) |
| M2_bool | IM2_Ring_is_field (const Ring *K) |
| M2_bool | IM2_Ring_declare_field (const Ring *K) |
| const RingElement * | rawGetNonUnit (const Ring *K) |
| const Ring * | rawAmbientRing (const Ring *R) |
| const Ring * | rawDenominatorRing (const Ring *R) |
| M2_arrayintOrNull | rawConwayPolynomial (long charac, long deg, M2_bool find_random_if_no_conway_poly_available) |
Engine-boundary C API for the legacy Ring hierarchy — coefficient, polynomial, and composite rings.
Declares the extern "C" factories the M2 interpreter calls to build every Ring flavour. Coefficient rings: IM2_Ring_ZZ / _QQ (singleton getters), IM2_Ring_ZZp(p) (rawZZp, range 2 <= p <= 32749), rawGaloisField(prim), IM2_Ring_RRR / _CCC for arbitrary-precision real / complex, and IM2_Ring_RRi / _CCi for the MPFI-backed interval variants. Polynomial rings: IM2_Ring_polyring(K, M), IM2_Ring_trivial_polyring(), IM2_Ring_skew_polyring, IM2_Ring_weyl_algebra (with the homogenising variable index), IM2_Ring_solvable_algebra, IM2_Ring_schur plus rawSchurRing1 / rawSchurRing2 / rawSchurSnRing, and the non-commutative rawRingM2FreeAlgebra / rawRingM2FreeAlgebraQuotient. Tower extensions: rawTowerRing1 / _2 / _3 (legacy) and rawARingTower1 / _2 / _3 (aring-backed; not yet marked connected). Composite builds: IM2_Ring_quotient(R, I) (where I is a Matrix carrying the GB — not a GBComputation*), IM2_Ring_quotient1(R, B) (poly-ring extension over a coefficient quotient), IM2_Ring_frac, and IM2_Ring_localization(R, P) (where P is a Computation* — the in-source comment talks about a one-row matrix, indicating the signature is out of sync with the doc). Per-ring inspection: rawRingHash, IM2_Ring_to_string, rawRingCharacteristic, IM2_Ring_is_field (rawIsField), IM2_Ring_declare_field (rawDeclareField), rawGetNonUnit, rawAmbientRing, rawDenominatorRing.
Some coefficient rings exist twice: a legacy variant declared here (IM2_Ring_ZZp, rawGaloisField) and an aring-backed counterpart in interface/aring.h. Both build a Ring* the interpreter handles uniformly, but new code prefers aring for its templated arithmetic. The Computation forward declaration is here only because IM2_Ring_localization accepts one.
Definition in file ring.h.