Skip to content

Commit 0f11c4d

Browse files
mahrudd-torrance
authored andcommitted
removed duplicates from engine.h
1 parent 726b53e commit 0f11c4d

File tree

2 files changed

+27
-95
lines changed

2 files changed

+27
-95
lines changed

M2/Macaulay2/e/engine.h

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -116,100 +116,6 @@ extern "C" {
116116

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

119-
/*******************************************
120-
* Computation routines for Groebner bases *
121-
*******************************************/
122-
123-
/*
124-
routine to compute a Groebner basis of an ideal in a polynomial ring
125-
over a finite prime field. Interfaces to mathicgb.
126-
reducer: 0 is ClassicReducer, 1 is MatrixReducer
127-
*/
128-
const Matrix* /* or null */ rawMGB(const Matrix* input,
129-
int reducer,
130-
int spairGroupSize,
131-
int nthreads,
132-
const M2_string logging
133-
); /* connected: rawMGB */
134-
135-
Computation /* or null */ *IM2_GB_make(const Matrix *m,
136-
M2_bool collect_syz,
137-
int n_rows_to_keep,
138-
M2_arrayint gb_weights,
139-
M2_bool use_max_degree,
140-
int max_degree,
141-
int algorithm,
142-
int strategy,
143-
int max_reduction_count); /* drg: connected rawGB */
144-
145-
Computation /* or null */ *IM2_GB_force(const Matrix *m,
146-
const Matrix *gb,
147-
const Matrix *change,
148-
const Matrix *syz); /* drg: connected rawGBForce */
149-
150-
Computation /* or null */ *rawMarkedGB(const Matrix *leadterms,
151-
const Matrix *m,
152-
const Matrix *gb,
153-
const Matrix *change,
154-
const Matrix *syz); /* mes: connected rawMarkedGB */
155-
156-
Computation /* or null */ *rawGroebnerWalk(const Matrix *gb,
157-
const MonomialOrdering *order1);
158-
/* Create a GB algorithm which will compute using the generic Groebner walk algorithm
159-
Input: gb: a matrix which, under order1, would be a Groebner basis, except that
160-
'gb' is a matrix over a polynomial ring whose order is 'order2'.
161-
order1: a monomial ordering
162-
Output: a Groebner basis computation object which will compute a GB of gb wrt
163-
order2, using the Geneeric Groebner Walk algorithm of ...
164-
Assumptions: the base ring is a polynomial ring over a field, with NO quotient elements
165-
*/
166-
167-
Computation /* or null */ *IM2_GB_set_hilbert_function(Computation *G,
168-
const RingElement *h); /* drg: connected rawGBSetHilbertFunction */
169-
170-
171-
const Matrix /* or null */ *rawGBGetMatrix(Computation *C);
172-
/* Get the minimal, auto-reduced GB of a GB computation.
173-
Each call to this may produce a different raw matrix */
174-
175-
const Matrix /* or null */ *rawGBGetLeadTerms(Computation *G, int nparts);
176-
177-
const Matrix /* or null */ *rawGBGetParallelLeadTerms(Computation *C, M2_arrayint w);
178-
179-
const Matrix /* or null */ *rawGBMinimalGenerators(Computation *C);
180-
/* Yields a matrix whose columns form a minimal generating set
181-
for the ideal or submodule, as computed so far. In the
182-
inhomogeneous case, this yields a generating set which is
183-
sometimes smaller than the entire Groebner basis. */
184-
185-
const Matrix /* or null */ *rawGBChangeOfBasis(Computation *C);
186-
/* Yields the change of basis matrix from the Groebner basis to
187-
the original generators, at least if n_rows_to_keep was set
188-
when creating the GB computation. This matrix, after the
189-
computation has run to completion, should satisfy:
190-
(original matrix) = (GB matrix) * (change of basis matrix). */
191-
192-
const Matrix /* or null */ *rawGBSyzygies(Computation *C);
193-
/* Yields a matrix containing the syzygies computed so far
194-
via the GB computation C, assuming that 'collect_syz' was
195-
set when the computation was created. If 'n_rows_to_keep' was
196-
set to a non-negative integer, then only that many rows of each
197-
syzygy are kept. */
198-
199-
const Matrix /* or null */ *rawGBMatrixRemainder(Computation *G,
200-
const Matrix *m); /* drg: connected rawGBMatrixRemainder */
201-
202-
M2_bool IM2_GB_matrix_lift(Computation *G,
203-
const Matrix *m,
204-
const Matrix /* or null */ **result_remainder,
205-
const Matrix /* or null */ **result_quotient
206-
); /* drg: connected rawGBMatrixLift */
207-
/* false is returned if there is an error or if the remainder is NON-zero */
208-
209-
int IM2_GB_contains(Computation *G,
210-
const Matrix *m); /* drg: connected rawGBContains */
211-
212-
213119
/*******************************************
214120
* Computation routines for Resolutions ****
215121
*******************************************/

M2/Macaulay2/e/interface/groebner.h

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*******************************************
2+
* Computation routines for Groebner bases *
3+
*******************************************/
4+
15
// FIXME: this header is based on what is defined in groebner.cpp,
26
// but the declarations in engine.h don't seem to match
37

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

87+
/* rawGBSetHilbertFunction */
8388
Computation /* or null */ *IM2_GB_set_hilbert_function(Computation *C,
8489
const RingElement *h);
8590

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

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

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

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

121136
int rawStatus2(Computation *C);
122137
void rawShowComputation(const Computation *C);
138+
123139
const Matrix /* or null */ *rawGBGetMatrix(Computation *C);
124140
/* Get the minimal, auto-reduced GB of a GB computation.
125141
Each call to this will produce a different raw matrix */
@@ -149,14 +165,21 @@ const Matrix /* or null */ *rawGBSyzygies(Computation *C);
149165
set to a non-negative integer, then only that many rows of each
150166
syzygy are kept. */
151167

168+
/* rawGBMatrixRemainder */
152169
const Matrix /* or null */ *rawGBMatrixRemainder(Computation *C,
153170
const Matrix *m);
154171

172+
/* rawGBMatrixLift: false is returned if there is an error or if the
173+
remainder is NON-zero */
155174
M2_bool IM2_GB_matrix_lift(Computation *C,
156175
const Matrix *m,
157176
const Matrix /* or null */ **result_remainder,
158177
const Matrix /* or null */ **result_quotient);
159178

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

162185
/*******************************************
@@ -254,8 +277,11 @@ Matrix /* or null */ *rawSubduction1(int numparts,
254277

255278
void rawDisplayMatrixStream(const Matrix *inputMatrix);
256279

280+
/* rawMGB: interface to mathicgb for computing a Groebner basis of an ideal
281+
in a polynomial ring over a finite prime field.
282+
reducer: 0 is ClassicReducer, 1 is MatrixReducer */
257283
const Matrix *rawMGB(
258-
const Matrix *inputMatrix,
284+
const Matrix *input,
259285
int reducer,
260286
int spairGroupSize, // a value of 0 means let the algorithm choose
261287
int nthreads,

0 commit comments

Comments
 (0)