Macaulay2 Engine
Loading...
Searching...
No Matches
matrix.h
Go to the documentation of this file.
1#ifndef _matrix_h_
2# define _matrix_h_
3` trailers name the M2-side binding.
13 * Promotion / lifting between coefficient rings:
14 * `IM2_Matrix_promote` / `IM2_Matrix_lift` (`rawPromote` /
15 * `rawLift`). Inspection: `IM2_Matrix_get_target` / `_get_source`
16 * (`rawTarget` / `rawSource`), `IM2_Matrix_n_rows` / `_n_cols`
17 * (`rawNumberOfRows` / `rawNumberOfColumns`),
18 * `IM2_Matrix_get_degree` (`rawMultiDegree`),
19 * `IM2_Matrix_get_entry` (`rawMatrixEntry`),
20 * `IM2_Matrix_is_zero` / `_is_equal` / `_is_homogeneous`
21 * (`rawIsZero` / `rawIsEqual` / `rawIsHomogeneous`), plus
22 * `rawIsDense`. Construction: `rawIdentity`, `rawZero`,
23 * `rawMatrix1` / `rawMatrix2` (vec-list and ring-element-list
24 * variants), `rawSparseMatrix1` / `rawSparseMatrix2`,
25 * `rawMatrixRemake1` / `rawMatrixRemake2`,
26 * `rawRandomConstantMatrix`, plus
28 * for ingesting MSolve-format text.
29 *
30 * Combinators: `rawConcat`, `rawDirectSum`, `rawTensor`,
31 * `rawDual`, `rawReshape`, `rawFlip`, `rawWedgeProduct`,
32 * `rawSubmatrix`, `rawKoszul` / `rawKoszulMonomials`,
33 * `rawSymmetricPower`, `rawExteriorPower`, `rawSortColumns`.
34 * Determinantal: `rawMinors`, `rawPfaffians`. Cleanup /
35 * compression: `rawMatrixCompress`,
36 * `rawRemoveMonomialFactors`, `rawRemoveContent`.
37 * Differential and polynomial-term operations:
38 * `rawMatrixDiff`, `rawMatrixContract`, `rawHomogenize`,
39 * `rawCoefficients`, `rawMonomials`, `rawInitial`,
40 * `rawTopCoefficients`, `rawEliminateVariables`,
41 * `rawKeepVariables`, `rawDivideByVariable`. There are **no**
42 * element-wise `add` / `subtract` / `multiply` bindings in
43 * this header --- those operations live at the M2 interpreter
44 * level.
45 *
46 * `Matrix` is immutable, so every transformation returns a
47 * fresh pointer; the implementation in `matrix.cpp` validates
48 * ring and dimension agreement before delegating to
49 * `MatrixConstructor`, and reports failures through the engine
50 * `error()` channel.
51 *
52 * @see matrix.cpp
53 * @see mutable-matrix.h
54 * @see engine-includes.hpp
55 */
56
57# include "engine-includes.hpp"
58
59// TODO: fix this
60# if defined(__cplusplus)
61class FreeModule;
62class Matrix;
63class Ring;
64class RingElement;
65# else
66typedef struct FreeModule FreeModule;
67typedef struct Matrix Matrix;
68typedef struct Ring Ring;
69typedef struct RingElement RingElement;
70# endif
71
75
76# if defined(__cplusplus)
77extern "C" {
78# endif
79
80const Matrix /* or null */ *IM2_Matrix_promote(const FreeModule *newTarget,
81 const Matrix *f);
82/* connected to rawPromote*/
83
84const Matrix /* or null */ *IM2_Matrix_lift(int *success_return,
85 const FreeModule *newTarget,
86 const Matrix *f);
87/* connected to rawLift */
88// returns null if lifting not possible
89
90/**************************************************/
91/**** Matrix routines *****************************/
92/**************************************************/
93
95 const Matrix *M); /* drg: connected rawTarget*/
96
98 const Matrix *M); /* drg: connected rawSource, used in rawMatrixColumns*/
99
100int IM2_Matrix_n_rows(const Matrix *M); /* drg: connected rawNumberOfRows*/
101
102int IM2_Matrix_n_cols(const Matrix *M); /* drg: connected rawNumberOfColumns*/
103
105 const Matrix *M); /* drg: connected rawMultiDegree*/
106
107M2_string IM2_Matrix_to_string(const Matrix *M); /* drg: connected */
108
109unsigned int rawMatrixHash(const Matrix *M); /* drg: connected to "hash" */
110
111const RingElement /* or null */ *IM2_Matrix_get_entry(
112 const Matrix *M,
113 int r,
114 int c); /* drg: connected rawMatrixEntry, OK*/
115
117
118/*******************************************************************************/
120 const FreeModule *F,
121 int preference); /* drg: connected rawIdentity, OK*/
122
123const Matrix /* or null */ *IM2_Matrix_zero(
124 const FreeModule *F,
125 const FreeModule *G,
126 int preference); /* drg: connected rawZero, OK */
127
128const Matrix /* or null */ *IM2_Matrix_make1(
129 const FreeModule *target,
130 int ncols,
131 const engine_RawRingElementArray M,
132 int preference); /* drg: connected rawMatrix1, OK */
133
134const Matrix /* or null */ *IM2_Matrix_make2(
135 const FreeModule *target,
136 const FreeModule *source,
137 M2_arrayint deg,
138 const engine_RawRingElementArray M,
139 int preference); /* drg: connected rawMatrix2, OK */
140
141const Matrix /* or null */ *IM2_Matrix_make_sparse1(
142 const FreeModule *target,
143 int ncols,
144 M2_arrayint rows,
145 M2_arrayint cols,
146 const engine_RawRingElementArray entries,
147 int preference); /* drg: connected rawSparseMatrix1, OK */
148
149const Matrix /* or null */ *IM2_Matrix_make_sparse2(
150 const FreeModule *target,
151 const FreeModule *source,
152 M2_arrayint deg,
153 M2_arrayint rows,
154 M2_arrayint cols,
155 const engine_RawRingElementArray entries,
156 int preference); /* drg: connected rawSparseMatrix2, OK */
157
159 const Matrix *M); /* connected to rawIsDense */
160/* Is the matrix M implemented in the engine as a dense matrix? */
161
162const Matrix /* or null */ *IM2_Matrix_remake1(
163 const FreeModule *target,
164 const Matrix *M,
165 int preference); /* drg: connected rawMatrixRemake1, OK */
166/* Create a new matrix (mutable or immutable), from M, with new target,
167 and/or mutable-ness. The target free module must have the expected rank.
168 The source free module is computed heuristically from the target and the
169 columns of the matrix.
170*/
171
172const Matrix /* or null */ *IM2_Matrix_remake2(
173 const FreeModule *target,
174 const FreeModule *source,
175 M2_arrayint deg,
176 const Matrix *M,
177 int preference); /* drg: connected rawMatrixRemake2, OK */
178/* Create a new matrix (mutable or immutable), from M, with new target,
179 source, deg and/or mutable-ness. The new free modules must have
180 the expected rank.
181*/
182
183const Matrix /* or null */ *IM2_Matrix_random(
184 const Ring *R,
185 int r,
186 int c,
187 double fraction_non_zero,
188 int special_type, /* 0: general, 1:upper triangular, others? */
189 int preference); /* connected to rawRandomConstantMatrix, OK */
190
191const Matrix* /* or null */ rawMatrixReadMsolveString(const Ring* R, M2_string contents);
192
193const Matrix* /* or null */ rawMatrixReadMsolveFile(const Ring* R, M2_string filename);
194
195/**********************************************************************************/
196
197M2_bool IM2_Matrix_is_zero(const Matrix *M); /* drg: connected rawIsZero*/
198
200 const Matrix *M,
201 const Matrix *N); /* drg: connected === and to rawIsEqual for use with == */
202 // 1 = true, 0 = false, -1 = error
203/* This checks that the entries of M,N are the same, as well as
204 that the source and target are the same (as graded free modules).
205 Therefore, it can happen that M-N == 0, but M != N.
206*/
207
209 const Matrix *M); /* drg: connected rawIsHomogeneous*/
210
211const Matrix /* or null */ *IM2_Matrix_concat(
212 const engine_RawMatrixArray Ms); /* drg: connected rawConcat*/
213
214const Matrix /* or null */ *IM2_Matrix_direct_sum(
215 const engine_RawMatrixArray Ms); /* drg: connected rawDirectSum*/
216
217const Matrix /* or null */ *IM2_Matrix_tensor(
218 const Matrix *M,
219 const Matrix *N); /* drg: connected rawTensor*/
220
221const Matrix /* or null */ *IM2_Matrix_transpose(
222 const Matrix *M); /* drg: connected rawDual*/
223
224const Matrix /* or null */ *IM2_Matrix_reshape(
225 const Matrix *M,
226 const FreeModule *F,
227 const FreeModule *G); /* drg: connected rawReshape*/
228
229const Matrix /* or null */ *IM2_Matrix_flip(
230 const FreeModule *F,
231 const FreeModule *G); /* drg: connected rawFlip*/
232
233const Matrix /* or null */ *rawWedgeProduct(
234 int p,
235 int q,
236 const FreeModule *F); /* drg: connected rawWedgeProduct */
237/* Constructs the map
238 exterior(p,F) ** exterior(q,F) --> exterior(p+q,F)
239*/
240
241const Matrix /* or null */ *IM2_Matrix_submatrix(
242 const Matrix *M,
243 M2_arrayint rows,
244 M2_arrayint cols); /* drg: connected rawSubmatrix*/
245
246const Matrix /* or null */ *IM2_Matrix_submatrix1(
247 const Matrix *M,
248 M2_arrayint cols); /* drg: connected rawSubmatrix*/
249
250const Matrix /* or null */ *IM2_Matrix_koszul(
251 int p,
252 const Matrix *M); /* drg: connected rawKoszul*/
253
254const Matrix /* or null */ *rawKoszulMonomials(
255 int nskew,
256 const Matrix *M,
257 const Matrix *N); /* drg: connected rawKoszulMonomials */
258/* M and N should each have one row, and the base ring should be a
259 polynomial ring. The (i,j) th entry of the resulting matrix is
260 1 or -1 times N_j/M_i (if M_i divides N_j). The sign is determined only from
261 the first nskew variables. The sign is the sign of M_i * (N_j/M_i) in
262 exterior algebra (on this set of variables). The actual commutativity of the
263 common ring of M and N is ignored. */
264
265const Matrix /* or null */ *IM2_Matrix_symm(
266 int p,
267 const Matrix *M); /* drg: connected rawSymmetricPower*/
268
269const Matrix /* or null */ *IM2_Matrix_exterior(
270 int p,
271 const Matrix *M,
272 int strategy); /* drg: connected rawExteriorPower*/
273
275 const Matrix *M,
276 int deg_order,
277 int mon_order); /* drg: connected rawSortColumns*/
278
279const Matrix /* or null */ *
280IM2_Matrix_minors(int p, const Matrix *M, int strategy); /* drg: unconnected*/
281
282const Matrix /* or null */ *rawMinors(
283 int p,
284 const Matrix *M,
285 int strategy,
286 int n_minors_to_compute, /* -1 means all */
287 M2_arrayintOrNull first_row_set,
288 M2_arrayintOrNull first_col_set); /* connected to rawMinors */
289/* If first_row_set or first_col_set is not NULL, they should both be non-NULL,
290 and both have length p. If not, NULL is returned.
291 Compute n_minors_to_compute minors, starting at (first_row_set,first_col_set)
292 if given, otherwise starting at the first (0..p-1,0..p-1).
293*/
294
295const Matrix /* or null */ *IM2_Matrix_pfaffians(
296 int p,
297 const Matrix *M); /* drg: connected rawPfaffians*/
298
299const RingElement /* or null */ *IM2_Matrix_pfaffian(
300 const Matrix *M);
301
303 const Matrix *M); /* connected rawMatrixCompress */
304
305const Matrix /* or null */ *IM2_Matrix_uniquify(const Matrix *M); /* TODO */
306/* if any two columns are the same up to a scalar multiple, then keep only
307 one of the columns. Remove any zero columns too.
308 The definition of "same up to a scalar" is this:
309 if K is the base field or ring (i.e. QQ in QQ(x,y,z)[s,t]),
310 and if c and d are the lead scalar coeff's of vecs v,w, resp, then
311 v and w are scalar multiplies iff d*v == c*w.
312 Warning: Over non-domains, this might not be the intended effect.
313*/
314
315const Matrix *rawRemoveScalarMultiples(const Matrix *m); /* connected */
316
318 M2_bool make_squarefree_only);
319/* connected to rawRemoveMonomialFactors */
320
322// The content of a ring element, polynomial or vector is defined to be an
323// element of the base (either a finite field, ZZ, QQ, or a fraction)
324// If base is ZZ: the result is the gcd of all of the terms appearing in the
325// polynomial or vector
326// The sign is chosen so that after division by the content the resulting
327// polynomial is monic
328// If base is QQ or frac(A): the numerator is the gcd of all of the numerators,
329// the denominator is the lcm of all of the denominators
330// If base is kk: the result is the lead coefficient. For vectors, what should
331// this mean?
333
334const Matrix /* or null */ *rawMatrixContent(
335 const Matrix *M); /* connect to rawContent */
336// returns the matrix of the content of each column of M
337
338const Matrix /* or null */ *rawMatrixRemoveContent(
339 const Matrix *M); /* connect to rawRemoveContent */
340// returns the matrix with the content (as defined above) removed
341
342const Matrix /* or null */ *rawMatrixSplitContent(
343 const Matrix *M,
344 const Matrix /* or null */ **result); /* connect to rawSplitContent */
345// returns the matrix of the content of each column of M,
346// and result is set to the result of rawMatrixRemoveContent.
347
348const Matrix /* or null */ *IM2_Matrix_remove_content(
349 const Matrix *M); /* connected rawRemoveContent*/
350
351/* Routines for use when the base ring is a polynomial ring of some sort */
352
353const Matrix /* or null */ *IM2_Matrix_diff(
354 const Matrix *M,
355 const Matrix *N); /* drg: connected rawMatrixDiff*/
356
357const Matrix /* or null */ *IM2_Matrix_contract(
358 const Matrix *M,
359 const Matrix *N); /* drg: connected rawMatrixContract*/
360
361const Matrix /* or null */ *IM2_Matrix_homogenize(
362 const Matrix *M,
363 int var,
364 M2_arrayint wts); /* drg: connected rawHomogenize*/
365
366const Matrix /* or null */ *rawCoefficients(
367 M2_arrayint vars,
368 const Matrix *monoms,
369 const Matrix *M); /* drg: connected as rawCoefficients*/
370/* Given:
371 * vars : a list of variable indices in the (common) ring R of monoms and M
372 * monoms : a map R^b --> R^a such that each column has exactly one monomial
373 * which is only in the variables in 'vars'.
374 * M : a map R^c --> R^a such that every (module) monomial of each column of M
375 * matches one of the columns of 'monoms', in the variables 'vars'.
376 *
377 * Returns: a matrix C : R^c --> R^b such that
378 * (i) the entries of C do not involve the variables in 'vars', and
379 * (ii) monoms * C == M
380 *
381 * Assumptions on rings: if R is non-commutative, then the variables in 'vars'
382 * should commute with the variables outside of 'vars'.
383 *
384 * If each column of monoms has more than one monomial, or if variables other
385 * than those in 'vars' occur, then only the first monomial is used, and the
386 * other variables are ignored. If a monomial occurs twice, then one of them
387 * will be used (which one is left undefined)
388 */
389
390const Matrix /* or null */ *IM2_Matrix_monomials(
391 M2_arrayint vars,
392 const Matrix *M); /* drg: connected rawMonomials*/
393
395 int nparts,
396 const Matrix *M); /* drg: connected rawInitial*/
397
399 int nparts,
400 const Matrix *M); /* drg: connected rawEliminateVariables*/
401
403 int nparts,
404 const Matrix *M); /* drg: connected rawKeepVariables*/
405
407 const Matrix *M,
408 int var,
409 int maxdegree); /* drg: connected rawDivideByVariable*/
410/* If M = [v1, ..., vn], and x = 'var'th variable in the ring,
411 return the matrix [w1,...,wn], where wi * x^(ai) = vi,
412 and wi is not divisible by x, or ai = maxdegree,
413 and the integer which is the maximum of the ai's.
414 QUESTION: what rings should this work over?
415*/
416
418 const Matrix *M); /* connected to rawTopCoefficients */
419/* Returns a pair of matrices: the first is a list of monomials (of form
420 var^exp), and the second has the same row space as M. For each column, find
421 the smallest index variable, var, which occurs, and exp, the largest degree
422 to which it occurs in that column. Place var^exp in the first matrix. Place
423 the coeff of var^exp (a vector) into the second matrix. If the ring is not a
424 polynomial ring, an error is given, and Null is returned.
425*/
426
428 const Matrix *f); /* connected to rawIndices */
429
431 M2_arrayint vars); /* TODO */
432
433const Matrix /* or null */ *IM2_Matrix_auto_reduce(const Matrix *M); /* TODO */
434
435const Matrix /* or null */ *IM2_Matrix_reduce(const Matrix *M,
436 const Matrix *N); /* TODO */
437
439 const Matrix *M,
440 const Matrix *N); /* TODO */
441
442/* Routines when considering matrices as modules of some sort */
443
444const Matrix /* or null */ *rawModuleTensor(
445 const Matrix *M,
446 const Matrix *N); /* connected rawModuleTensor */
447
448const Matrix /* or null */ *rawBasis(
449 const Matrix *M,
450 M2_arrayint lo_degree, /* possibly length 0 */
451 M2_arrayint hi_degree,
452 M2_arrayint wt,
453 M2_arrayint vars,
454 M2_bool do_truncation,
455 int limit); /* connected to rawBasis */
456/* Yields a monomial basis of part of the graded R-module cokernel(M).
457 * Returns a matrix of monomials which maps to the target of M, such that
458 * (i) The image spans the sum of M_i, for lo_degree <= i <= hi_degree
459 * where M_i is the degree i piece of M.
460 * Notes:
461 * -- 'vars' is a list of variables. The entries of the result will only
462 * involve these variables.
463 * -- 'wt' should be a list of integers of length <= number of degrees,
464 * with the property that each variable in 'vars' has (its degree) dot wt >
465 * 0.
466 * -- if lo_degree has length 0, then it is assumed to be -infinity
467 * -- if hi_degree has length 0, then it is assumed to be infinity
468 * -- in either of these cases, or if lo_degree is not equal to hi_degree, then
469 * the degree ring of R must have one variable.
470 * -- if limit >= 0, then only the first 'limit' monomials are placed into the
471 * result.
472 * -- if do_truncation is set, then monomials of degree higher than hi_degree
473 * will be placed into .
474 *
475 * If R is a quotient ring, then the monomial order had better be a product
476 * order such that the first block (or blocks) consists of the variables in
477 * 'vars'.
478 *
479 */
480
481int IM2_Matrix_dimension(const Matrix *M); /* TODO */
482
483# if defined(__cplusplus)
484}
485# endif
486
487#endif /* _matrix_h_ */
488
489// Local Variables:
490// indent-tabs-mode: nil
491// End:
Engine-side free module R^n over a Ring.
Definition freemod.hpp:66
Mutable builder used to assemble an immutable Matrix one column (or one term) at a time.
const Ring * R
Definition relem.hpp:68
Front-end-visible "ring element" value: an engine ring_elem paired with the Ring* that gives it meani...
Definition relem.hpp:67
xxx xxx xxx
Definition ring.hpp:102
Engine-wide include prelude — a single point of truth for portability shims.
int error()
Definition error.c:48
#define Matrix
Definition factory.cpp:14
int p
void subtract(int &result, int a, int b)
int IM2_Matrix_n_rows(const Matrix *M)
Definition matrix.cpp:32
const Matrix * rawMatrixReadMsolveString(const Ring *R, M2_string contents)
Definition matrix.cpp:280
const FreeModule * IM2_Matrix_get_target(const Matrix *M)
Definition matrix.cpp:30
engine_RawMatrixPairOrNull rawTopCoefficients(const Matrix *M)
Definition matrix.cpp:691
const Matrix * rawCoefficients(M2_arrayint vars, const Matrix *monoms, const Matrix *M)
Definition matrix.cpp:648
const Matrix * rawRemoveMonomialFactors(const Matrix *m, M2_bool make_squarefree_only)
Definition matrix.cpp:723
const RingElement * IM2_Matrix_get_entry(const Matrix *M, int r, int c)
Definition matrix.cpp:55
const Matrix * rawMatrixReadMsolveFile(const Ring *R, M2_string filename)
Definition matrix.cpp:294
M2_arrayint IM2_Matrix_get_degree(const Matrix *M)
Definition matrix.cpp:35
const Matrix * rawKoszulMonomials(int nskew, const Matrix *M, const Matrix *N)
Definition matrix.cpp:518
const Matrix * rawMatrixCompress(const Matrix *M)
Definition matrix.cpp:721
const Matrix * IM2_Matrix_promote(const FreeModule *newTarget, const Matrix *f)
Definition matrix.cpp:764
M2_bool IM2_Matrix_is_zero(const Matrix *M)
Definition matrix.cpp:309
const Matrix * rawWedgeProduct(int p, int q, const FreeModule *F)
Definition matrix.cpp:464
const Matrix * rawMinors(int p, const Matrix *M, int strategy, int n_minors_to_compute, M2_arrayintOrNull first_row_set, M2_arrayintOrNull first_col_set)
Definition matrix.cpp:595
const Matrix * IM2_Matrix_lift(int *success_return, const FreeModule *newTarget, const Matrix *f)
Definition matrix.cpp:792
VALGRIND_MAKE_MEM_DEFINED & result(result)
M2_arrayint M2_arrayintOrNull
Definition m2-types.h:99
struct engine_RawMatrixAndInt_struct * engine_RawMatrixAndInt
Definition m2-types.h:199
char M2_bool
Definition m2-types.h:82
engine_RawMatrixPair engine_RawMatrixPairOrNull
Definition m2-types.h:203
engine_RawRingElementArrayArray engine_RawRingElementArrayArrayOrNull
Definition m2-types.h:180
const Matrix * IM2_Matrix_monomials(M2_arrayint vars, const Matrix *M)
Definition matrix.cpp:670
const Matrix * IM2_Matrix_homogenize(const Matrix *M, int var, M2_arrayint wts)
Definition matrix.cpp:641
M2_bool IM2_Matrix_is_implemented_as_dense(const Matrix *M)
Definition matrix.cpp:215
const Matrix * IM2_Matrix_remove_content(const Matrix *M)
Definition matrix.cpp:754
const Matrix * IM2_Matrix_koszul(int p, const Matrix *M)
Definition matrix.cpp:506
int IM2_Matrix_n_rows(const Matrix *M)
Definition matrix.cpp:32
const Matrix * rawMatrixReadMsolveString(const Ring *R, M2_string contents)
Definition matrix.cpp:280
const Matrix * IM2_Matrix_tensor(const Matrix *M, const Matrix *N)
Definition matrix.cpp:401
M2_string IM2_Matrix_to_string(const Matrix *M)
Definition matrix.cpp:40
const FreeModule * IM2_Matrix_get_target(const Matrix *M)
Definition matrix.cpp:30
const Matrix * IM2_Matrix_submatrix1(const Matrix *M, M2_arrayint cols)
Definition matrix.cpp:493
engine_RawMatrixPairOrNull rawTopCoefficients(const Matrix *M)
Definition matrix.cpp:691
const Matrix * rawCoefficients(M2_arrayint vars, const Matrix *monoms, const Matrix *M)
Definition matrix.cpp:648
const Matrix * rawMatrixRemoveContent(const Matrix *M)
Definition matrix.cpp:742
const Matrix * IM2_Matrix_make2(const FreeModule *target, const FreeModule *source, M2_arrayint deg, const engine_RawRingElementArray M, int preference)
Definition matrix.cpp:171
const Matrix * IM2_Matrix_submatrix(const Matrix *M, M2_arrayint rows, M2_arrayint cols)
Definition matrix.cpp:479
const Matrix * rawRemoveMonomialFactors(const Matrix *m, M2_bool make_squarefree_only)
Definition matrix.cpp:723
const Matrix * IM2_Matrix_reduce_by_ideal(const Matrix *M, const Matrix *N)
const Matrix * IM2_Matrix_concat(const engine_RawMatrixArray Ms)
Definition matrix.cpp:328
const Matrix * IM2_Matrix_make_sparse1(const FreeModule *target, int ncols, M2_arrayint rows, M2_arrayint cols, const engine_RawRingElementArray entries, int preference)
Definition matrix.cpp:184
const RingElement * IM2_Matrix_get_entry(const Matrix *M, int r, int c)
Definition matrix.cpp:55
const Matrix * IM2_Matrix_minors(int p, const Matrix *M, int strategy)
Definition matrix.cpp:581
const Matrix * IM2_Matrix_reduce(const Matrix *M, const Matrix *N)
const Matrix * IM2_Matrix_transpose(const Matrix *M)
Definition matrix.cpp:425
const Matrix * IM2_Matrix_reshape(const Matrix *M, const FreeModule *F, const FreeModule *G)
Definition matrix.cpp:437
const Matrix * IM2_Matrix_auto_reduce(const Matrix *M)
int IM2_Matrix_is_equal(const Matrix *M, const Matrix *N)
Definition matrix.cpp:311
const Matrix * IM2_Matrix_exterior(int p, const Matrix *M, int strategy)
Definition matrix.cpp:552
const Matrix * IM2_Matrix_uniquify(const Matrix *M)
unsigned int rawMatrixHash(const Matrix *M)
Definition matrix.cpp:54
int IM2_Matrix_dimension(const Matrix *M)
const Matrix * IM2_Matrix_contract(const Matrix *M, const Matrix *N)
Definition matrix.cpp:635
const Matrix * rawBasis(const Matrix *M, M2_arrayint lo_degree, M2_arrayint hi_degree, M2_arrayint wt, M2_arrayint vars, M2_bool do_truncation, int limit)
Definition matrix.cpp:655
const Matrix * IM2_Matrix_remake2(const FreeModule *target, const FreeModule *source, M2_arrayint deg, const Matrix *M, int preference)
Definition matrix.cpp:225
const Matrix * rawMatrixContent(const Matrix *M)
Definition matrix.cpp:736
M2_arrayint IM2_Matrix_sort_columns(const Matrix *M, int deg_order, int mon_order)
Definition matrix.cpp:567
int IM2_Matrix_n_cols(const Matrix *M)
Definition matrix.cpp:33
engine_RawMatrixAndInt IM2_Matrix_divide_by_var(const Matrix *M, int var, int maxdegree)
Definition matrix.cpp:703
const Matrix * rawMatrixReadMsolveFile(const Ring *R, M2_string filename)
Definition matrix.cpp:294
const Matrix * IM2_Matrix_direct_sum(const engine_RawMatrixArray Ms)
Definition matrix.cpp:369
M2_arrayint IM2_Matrix_get_degree(const Matrix *M)
Definition matrix.cpp:35
M2_arrayint IM2_Matrix_elim_vars(int nparts, const Matrix *M)
Definition matrix.cpp:681
const Matrix * IM2_Matrix_make_sparse2(const FreeModule *target, const FreeModule *source, M2_arrayint deg, M2_arrayint rows, M2_arrayint cols, const engine_RawRingElementArray entries, int preference)
Definition matrix.cpp:199
const Matrix * IM2_Matrix_zero(const FreeModule *F, const FreeModule *G, int preference)
Definition matrix.cpp:148
engine_RawRingElementArrayArrayOrNull IM2_Matrix_get_entries(const Matrix *M)
Definition matrix.cpp:85
const Matrix * IM2_Matrix_remake1(const FreeModule *target, const Matrix *M, int preference)
Definition matrix.cpp:242
const Matrix * IM2_Matrix_diff(const Matrix *M, const Matrix *N)
Definition matrix.cpp:630
const Matrix * rawKoszulMonomials(int nskew, const Matrix *M, const Matrix *N)
Definition matrix.cpp:518
const Matrix * IM2_Matrix_initial(int nparts, const Matrix *M)
Definition matrix.cpp:676
const RingElement * IM2_Matrix_pfaffian(const Matrix *M)
Definition matrix.cpp:625
const Matrix * rawModuleTensor(const Matrix *M, const Matrix *N)
Definition matrix.cpp:413
const Matrix * IM2_Matrix_flip(const FreeModule *F, const FreeModule *G)
Definition matrix.cpp:451
M2_arrayint IM2_Matrix_keep_vars(int nparts, const Matrix *M)
Definition matrix.cpp:686
const Matrix * IM2_Matrix_symm(int p, const Matrix *M)
Definition matrix.cpp:540
M2_bool IM2_Matrix_is_graded(const Matrix *M)
Definition matrix.cpp:327
const Matrix * rawMatrixSplitContent(const Matrix *M, const Matrix **result)
Definition matrix.cpp:747
const Matrix * rawMatrixCompress(const Matrix *M)
Definition matrix.cpp:721
const Matrix * IM2_Matrix_promote(const FreeModule *newTarget, const Matrix *f)
Definition matrix.cpp:764
const Matrix * IM2_Matrix_pfaffians(int p, const Matrix *M)
Definition matrix.cpp:620
M2_bool IM2_Matrix_is_zero(const Matrix *M)
Definition matrix.cpp:309
const Matrix * rawWedgeProduct(int p, int q, const FreeModule *F)
Definition matrix.cpp:464
const Matrix * rawRemoveScalarMultiples(const Matrix *m)
Definition matrix.cpp:729
const FreeModule * IM2_Matrix_get_source(const Matrix *M)
Definition matrix.cpp:31
const Matrix * IM2_Matrix_identity(const FreeModule *F, int preference)
Definition matrix.cpp:139
M2_arrayint IM2_Matrix_min_leadterms(const Matrix *M, M2_arrayint vars)
const Matrix * IM2_Matrix_random(const Ring *R, int r, int c, double fraction_non_zero, int special_type, int preference)
Definition matrix.cpp:265
const Matrix * rawMinors(int p, const Matrix *M, int strategy, int n_minors_to_compute, M2_arrayintOrNull first_row_set, M2_arrayintOrNull first_col_set)
Definition matrix.cpp:595
const Matrix * IM2_Matrix_lift(int *success_return, const FreeModule *newTarget, const Matrix *f)
Definition matrix.cpp:792
const Matrix * IM2_Matrix_make1(const FreeModule *target, int ncols, const engine_RawRingElementArray M, int preference)
Definition matrix.cpp:159
M2_arrayintOrNull rawMatrixIndices(const Matrix *f)
Definition matrix.cpp:667
Definition aring-CC.cpp:3
tbb::flow::graph G