Macaulay2 Engine
Loading...
Searching...
No Matches
groebner.h File Reference

Engine-boundary C API for Gröbner basis, resolution, and Hilbert-series computations. More...

Go to the source code of this file.

Functions

void test_over_RR_or_CC (const Ring *R)
M2_arrayint rawMinimalBetti (Computation *G, M2_arrayint slanted_degree_limit, M2_arrayint length_limit)
const RingElementIM2_Matrix_Hilbert (const Matrix *M)
const MatrixrawKernelOfGB (const Matrix *M)
ComputationIM2_GB_make (const Matrix *m, M2_bool collect_syz, int n_rows_to_keep, M2_arrayint gb_weights, M2_bool use_max_degree, int max_degree, int algorithm, int strategy, int max_reduction_count)
ComputationIM2_res_make (const Matrix *m, M2_bool resolve_cokernel, int max_level, M2_bool use_max_slanted_degree, int max_slanted_degree, int algorithm, int strategy, M2_bool parallelizeByDegree)
ComputationIM2_GB_set_hilbert_function (Computation *C, const RingElement *h)
ComputationIM2_GB_force (const Matrix *m, const Matrix *gb, const Matrix *change, const Matrix *syz)
ComputationrawMarkedGB (const Matrix *leadterms, const Matrix *m, const Matrix *gb, const Matrix *change, const Matrix *syz)
ComputationrawGroebnerWalk (const Matrix *gb, const MonomialOrdering *order1)
ComputationIM2_Computation_set_stop (Computation *G, M2_bool always_stop, M2_arrayint degree_limit, int basis_element_limit, int syzygy_limit, int pair_limit, int codim_limit, int subring_limit, M2_bool just_min_gens, M2_arrayint length_limit)
ComputationrawStartComputation (Computation *C)
enum ComputationStatusCode rawStatus1 (Computation *C)
int rawStatus2 (Computation *C)
void rawShowComputation (const Computation *C)
const MatrixrawGBGetMatrix (Computation *C)
const MatrixrawGBMinimalGenerators (Computation *C)
const MatrixrawGBChangeOfBasis (Computation *C)
const MatrixrawGBGetLeadTerms (Computation *C, int nparts)
const MatrixrawGBGetParallelLeadTerms (Computation *C, M2_arrayint w)
const MatrixrawGBSyzygies (Computation *C)
const MatrixrawGBMatrixRemainder (Computation *C, const Matrix *m)
M2_bool IM2_GB_matrix_lift (Computation *C, const Matrix *m, const Matrix **result_remainder, const Matrix **result_quotient)
int IM2_GB_contains (Computation *C, const Matrix *m)
const MatrixrawNCGroebnerBasisTwoSided (const Matrix *input, int maxdeg, int strategy)
const MatrixrawNCReductionTwoSided (const Matrix *toBeReduced, const Matrix *reducers)
const MatrixrawNCBasis (const Matrix *gb2SidedIdeal, M2_arrayint lo_degree, M2_arrayint hi_degree, int limit)
const MatrixrawResolutionGetMatrix (Computation *C, int level)
MutableMatrixrawResolutionGetMatrix2 (Computation *C, int level, int degree)
MutableMatrixrawResolutionGetMutableMatrixB (Computation *C, const Ring *R, int level)
MutableMatrixrawResolutionGetMutableMatrix2B (Computation *C, const Ring *KK, int level, int degree)
const FreeModulerawResolutionGetFree (Computation *C, int level)
int IM2_Resolution_status (Computation *C, int *complete_up_through_this_degree, int *complete_up_through_this_level)
enum ComputationStatusCode IM2_Resolution_status_level (Computation *C, int level, M2_bool minimize, int *complete_up_through_this_degree)
M2_arrayintOrNull rawResolutionBetti (Computation *C, int type)
M2_string IM2_GB_to_string (Computation *C)
unsigned int rawComputationHash (const Computation *C)
MatrixrawSubduction (int numparts, const Matrix *M, const RingMap *F, Computation *C)
MatrixrawSubduction1 (int numparts, const Ring *rawT, const Ring *rawS, const Matrix *m, const RingMap *inclusionAmbient, const RingMap *fullSubstitution, const RingMap *substitutionInclusion, Computation *rawGBI, Computation *rawGBReductionIdeal)
void rawDisplayMatrixStream (const Matrix *inputMatrix)
const MatrixrawMGB (const Matrix *input, int reducer, int spairGroupSize, int nthreads, M2_string logging)

Detailed Description

Engine-boundary C API for Gröbner basis, resolution, and Hilbert-series computations.

Note
AI-generated documentation. Verify against the source before relying on it.

Declares the extern "C" factories the M2 interpreter calls to start, drive, and inspect every long-running ideal-theory computation in the engine. Every factory returns the opaque Computation* typedef (which the engine sees as a GBComputation* or ResolutionComputation* internally): IM2_GB_make (rawGB), IM2_res_make, rawMarkedGB, IM2_GB_force, and rawGroebnerWalk build computations; IM2_GB_set_hilbert_function, IM2_Computation_set_stop, and rawStartComputation configure / step them; rawStatus1 / rawStatus2 / rawShowComputation poll their state. Result extraction: rawGBGetMatrix, rawGBMinimalGenerators, rawGBChangeOfBasis, rawGBGetLeadTerms, rawGBGetParallelLeadTerms, rawGBSyzygies, rawGBMatrixRemainder, IM2_GB_matrix_lift, IM2_GB_contains, plus the resolution-only rawMinimalBetti. IM2_Matrix_Hilbert and rawKernelOfGB cover GB-adjacent operations (Hilbert numerator on coker leadterms, Schreyer-induced kernel) that have no Computation surface of their own.

This header is the source of truth for what groebner.cpp exports — the in-file FIXME at the top notes "this header is based on what is defined in groebner.cpp, but the declarations in engine.h don't seem to match", and there is an explicit "will be removed once the new code is functional" banner before the legacy entry-point block. Implementation dispatches through GBComputation::choose_gb and ResolutionComputation::choose_res so the interpreter never sees algorithm selection; it just gets back an opaque pointer it polls via the shared computation.h ComputationStatusCode enum.

See also
groebner.cpp
computation.h
comp-gb.hpp
comp-res.hpp

Definition in file groebner.h.