Skip to content

removed duplicates from engine.h #3925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 0 additions & 94 deletions M2/Macaulay2/e/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,100 +116,6 @@ extern "C" {

void rawShowComputation(const Computation *C); /* Dan: connected to rawShowComputation */

/*******************************************
* Computation routines for Groebner bases *
*******************************************/

/*
routine to compute a Groebner basis of an ideal in a polynomial ring
over a finite prime field. Interfaces to mathicgb.
reducer: 0 is ClassicReducer, 1 is MatrixReducer
*/
const Matrix* /* or null */ rawMGB(const Matrix* input,
int reducer,
int spairGroupSize,
int nthreads,
const M2_string logging
); /* connected: rawMGB */

Computation /* or null */ *IM2_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); /* drg: connected rawGB */

Computation /* or null */ *IM2_GB_force(const Matrix *m,
const Matrix *gb,
const Matrix *change,
const Matrix *syz); /* drg: connected rawGBForce */

Computation /* or null */ *rawMarkedGB(const Matrix *leadterms,
const Matrix *m,
const Matrix *gb,
const Matrix *change,
const Matrix *syz); /* mes: connected rawMarkedGB */

Computation /* or null */ *rawGroebnerWalk(const Matrix *gb,
const MonomialOrdering *order1);
/* Create a GB algorithm which will compute using the generic Groebner walk algorithm
Input: gb: a matrix which, under order1, would be a Groebner basis, except that
'gb' is a matrix over a polynomial ring whose order is 'order2'.
order1: a monomial ordering
Output: a Groebner basis computation object which will compute a GB of gb wrt
order2, using the Geneeric Groebner Walk algorithm of ...
Assumptions: the base ring is a polynomial ring over a field, with NO quotient elements
*/

Computation /* or null */ *IM2_GB_set_hilbert_function(Computation *G,
const RingElement *h); /* drg: connected rawGBSetHilbertFunction */


const Matrix /* or null */ *rawGBGetMatrix(Computation *C);
/* Get the minimal, auto-reduced GB of a GB computation.
Each call to this may produce a different raw matrix */

const Matrix /* or null */ *rawGBGetLeadTerms(Computation *G, int nparts);

const Matrix /* or null */ *rawGBGetParallelLeadTerms(Computation *C, M2_arrayint w);

const Matrix /* or null */ *rawGBMinimalGenerators(Computation *C);
/* Yields a matrix whose columns form a minimal generating set
for the ideal or submodule, as computed so far. In the
inhomogeneous case, this yields a generating set which is
sometimes smaller than the entire Groebner basis. */

const Matrix /* or null */ *rawGBChangeOfBasis(Computation *C);
/* Yields the change of basis matrix from the Groebner basis to
the original generators, at least if n_rows_to_keep was set
when creating the GB computation. This matrix, after the
computation has run to completion, should satisfy:
(original matrix) = (GB matrix) * (change of basis matrix). */

const Matrix /* or null */ *rawGBSyzygies(Computation *C);
/* Yields a matrix containing the syzygies computed so far
via the GB computation C, assuming that 'collect_syz' was
set when the computation was created. If 'n_rows_to_keep' was
set to a non-negative integer, then only that many rows of each
syzygy are kept. */

const Matrix /* or null */ *rawGBMatrixRemainder(Computation *G,
const Matrix *m); /* drg: connected rawGBMatrixRemainder */

M2_bool IM2_GB_matrix_lift(Computation *G,
const Matrix *m,
const Matrix /* or null */ **result_remainder,
const Matrix /* or null */ **result_quotient
); /* drg: connected rawGBMatrixLift */
/* false is returned if there is an error or if the remainder is NON-zero */

int IM2_GB_contains(Computation *G,
const Matrix *m); /* drg: connected rawGBContains */


/*******************************************
* Computation routines for Resolutions ****
*******************************************/
Expand Down
28 changes: 27 additions & 1 deletion M2/Macaulay2/e/interface/groebner.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*******************************************
* Computation routines for Groebner bases *
*******************************************/

// FIXME: this header is based on what is defined in groebner.cpp,
// but the declarations in engine.h don't seem to match

Expand Down Expand Up @@ -80,22 +84,33 @@ Computation /* or null */ *IM2_res_make(const Matrix *m,
int strategy,
M2_bool parallelizeByDegree);

/* rawGBSetHilbertFunction */
Computation /* or null */ *IM2_GB_set_hilbert_function(Computation *C,
const RingElement *h);

/* rawGBForce */
Computation /* or null */ *IM2_GB_force(
const Matrix *m, /* trimmed or minimal gens, may be the same as gb */
const Matrix *gb,
const Matrix *change, /* same number of columns as 'gb', if not 0 */
const Matrix *syz); /* possibly 0 too, otherwise same rows as change */

/* rawMarkedGB */
Computation /* or null */ *rawMarkedGB(
const Matrix *leadterms,
const Matrix *m, /* trimmed or minimal gens, may be the same as gb */
const Matrix *gb,
const Matrix *change, /* same number of columns as 'gb', if not 0 */
const Matrix *syz); /* possibly 0 too, otherwise same rows as change */

/* Create a GB algorithm which will compute using the generic Groebner walk algorithm
Input: gb: a matrix which, under order1, would be a Groebner basis, except that
'gb' is a matrix over a polynomial ring whose order is 'order2'.
order1: a monomial ordering
Output: a Groebner basis computation object which will compute a GB of gb wrt
order2, using the Geneeric Groebner Walk algorithm of ...
Assumptions: the base ring is a polynomial ring over a field, with NO quotient elements
*/
Computation /* or null */ *rawGroebnerWalk(const Matrix *gb,
const MonomialOrdering *order1);

Expand All @@ -120,6 +135,7 @@ enum ComputationStatusCode rawStatus1(Computation *C);

int rawStatus2(Computation *C);
void rawShowComputation(const Computation *C);

const Matrix /* or null */ *rawGBGetMatrix(Computation *C);
/* Get the minimal, auto-reduced GB of a GB computation.
Each call to this will produce a different raw matrix */
Expand Down Expand Up @@ -149,14 +165,21 @@ const Matrix /* or null */ *rawGBSyzygies(Computation *C);
set to a non-negative integer, then only that many rows of each
syzygy are kept. */

/* rawGBMatrixRemainder */
const Matrix /* or null */ *rawGBMatrixRemainder(Computation *C,
const Matrix *m);

/* rawGBMatrixLift: false is returned if there is an error or if the
remainder is NON-zero */
M2_bool IM2_GB_matrix_lift(Computation *C,
const Matrix *m,
const Matrix /* or null */ **result_remainder,
const Matrix /* or null */ **result_quotient);

/* rawGBContains: given a Groebner basis computation C and matrix m, returns:
-2 for errors
-1 for containment of span(m) in span(C)
i for the smallest index of a column of m not contained in span(C) */
int IM2_GB_contains(Computation *C, const Matrix *m);

/*******************************************
Expand Down Expand Up @@ -254,8 +277,11 @@ Matrix /* or null */ *rawSubduction1(int numparts,

void rawDisplayMatrixStream(const Matrix *inputMatrix);

/* rawMGB: interface to mathicgb for computing a Groebner basis of an ideal
in a polynomial ring over a finite prime field.
reducer: 0 is ClassicReducer, 1 is MatrixReducer */
const Matrix *rawMGB(
const Matrix *inputMatrix,
const Matrix *input,
int reducer,
int spairGroupSize, // a value of 0 means let the algorithm choose
int nthreads,
Expand Down
Loading