Go to the source code of this file.
|
| bool | arrayIsNumberArray (const poly *polyArray, const ideal iSB, const int length, int *intArray, poly *nfPolyArray, int &zeroCounter) |
| |
| ideal | getMinorIdeal_Int (const int *intMatrix, const int rowCount, const int columnCount, const int minorSize, const int k, const char *algorithm, const ideal i, const bool allDifferent) |
| |
| ideal | getMinorIdeal_Poly (const poly *polyMatrix, const int rowCount, const int columnCount, const int minorSize, const int k, const char *algorithm, const ideal i, const bool allDifferent) |
| |
| ideal | getMinorIdeal_toBeDone (const matrix mat, const int minorSize, const int k, const char *algorithm, const ideal i, const bool allDifferent) |
| |
| ideal | getMinorIdeal (const matrix mat, const int minorSize, const int k, const char *algorithm, const ideal iSB, const bool allDifferent) |
| | Returns the specified set of minors (= subdeterminantes) of the given matrix.
|
| |
| ideal | getMinorIdealCache_Int (const int *intMatrix, const int rowCount, const int columnCount, const int minorSize, const int k, const ideal i, const int cacheStrategy, const int cacheN, const int cacheW, const bool allDifferent) |
| |
| ideal | getMinorIdealCache_Poly (const poly *polyMatrix, const int rowCount, const int columnCount, const int minorSize, const int k, const ideal i, const int cacheStrategy, const int cacheN, const int cacheW, const bool allDifferent) |
| |
| ideal | getMinorIdealCache_toBeDone (const matrix mat, const int minorSize, const int k, const ideal iSB, const int cacheStrategy, const int cacheN, const int cacheW, const bool allDifferent) |
| |
| ideal | getMinorIdealCache (const matrix mat, const int minorSize, const int k, const ideal iSB, const int cacheStrategy, const int cacheN, const int cacheW, const bool allDifferent) |
| | Returns the specified set of minors (= subdeterminantes) of the given matrix.
|
| |
| ideal | getMinorIdealHeuristic (const matrix mat, const int minorSize, const int k, const ideal iSB, const bool allDifferent) |
| | Returns the specified set of minors (= subdeterminantes) of the given matrix.
|
| |
◆ arrayIsNumberArray()
Definition at line 29 of file MinorInterface.cc.
32{
36
38 {
41 {
45 }
47 {
50 }
51 else
52 {
53 bool isConstant = true;
54 for (
int j = 1;
j <= n;
j++)
56 isConstant = false;
57 if (!isConstant)
result =
false;
58 else
59 {
62 }
63 }
64 }
66}
static FORCE_INLINE long n_Int(number &n, const coeffs r)
conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 ....
static BOOLEAN length(leftv result, leftv arg)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#define pGetExp(p, i)
Exponent.
#define pCopy(p)
return a copy of the poly
◆ getMinorIdeal()
Returns the specified set of minors (= subdeterminantes) of the given matrix.
These minors form the set of generators of the ideal which is actually returned.
If k == 0, all non-zero minors will be computed. For k > 0, only the first k non-zero minors (to some fixed ordering among all minors) will be computed. Use k < 0 to compute the first |k| minors (including zero minors).
algorithm must be one of "Bareiss" and "Laplace".
i must be either NULL or an ideal capturing a standard basis. In the later case all minors will be reduced w.r.t. i. If allDifferent is true, each minor will be included as generator in the resulting ideal only once; otherwise as often as it occurs as minor value during the computation.
- Parameters
-
| m | the matrix from which to compute minors |
| minorSize | the size of the minors to be computed |
| k | the number of minors to be computed |
| algorithm | the algorithm to be used for the computation |
| i | NULL or an ideal which encodes a standard basis |
| allDifferent | if true each minor is considered only once |
- Returns
- the ideal which has as generators the specified set of minors
Definition at line 238 of file MinorInterface.cc.
241{
242
243
244
245
246
252
255 {
256
257
258
259
260
261
264 }
265 else
266 {
267
268
269
272 {
274 {
276 }
277 }
278 else
279 {
281 {
283 }
284 }
287
288
291 }
292
294}
ideal getMinorIdeal_Poly(const poly *polyMatrix, const int rowCount, const int columnCount, const int minorSize, const int k, const char *algorithm, const ideal i, const bool allDifferent)
ideal idMinors(matrix a, int ar, ideal R)
compute all ar-minors of the matrix a the caller of mpRecMin the elements of the result are not in R ...
#define rField_is_Ring(R)
◆ getMinorIdeal_Int()
Definition at line 74 of file MinorInterface.cc.
78{
79
88
89
91
94
95
97
99
102
103
105 {
106
112 }
113
114
115
123}
Class IntMinorProcessor is derived from class MinorProcessor.
void defineMatrix(const int numberOfRows, const int numberOfColumns, const int *matrix)
A method for defining a matrix with integer entries.
IntMinorValue getNextMinor(const int characteristic, const ideal &iSB, const char *algorithm)
A method for obtaining the next minor when iterating through all minors of a given size within a pre-...
Class IntMinorValue is derived from MinorValue and can be used for representing values in a cache for...
void setMinorSize(const int minorSize)
Sets the size of the minor(s) of interest.
void defineSubMatrix(const int numberOfRows, const int *rowIndices, const int numberOfColumns, const int *columnIndices)
A method for defining a sub-matrix within a pre-defined matrix.
bool hasNextMinor()
A method for checking whether there is a next choice of rows and columns when iterating through all m...
#define idDelete(H)
delete an ideal
BOOLEAN idInsertPolyWithTests(ideal h1, const int validEntries, const poly h2, const bool zeroOk, const bool duplicateOk)
static ideal idCopyFirstK(const ideal ide, const int k)
ideal idInit(int idsize, int rank)
initialise an ideal / module
◆ getMinorIdeal_Poly()
Definition at line 129 of file MinorInterface.cc.
133{
134
143
144
148
149
151
153
156#ifdef COUNT_AND_PRINT_OPERATIONS
159#endif
160
162 {
163
165#if (defined COUNT_AND_PRINT_OPERATIONS) && (COUNT_AND_PRINT_OPERATIONS > 1)
169#endif
174 }
175#ifdef COUNT_AND_PRINT_OPERATIONS
177#endif
178
179
180
185}
void printCounters(char *prefix, bool resetToZero)
Class PolyMinorProcessor is derived from class MinorProcessor.
PolyMinorValue getNextMinor(const char *algorithm, const ideal &iSB)
A method for obtaining the next minor when iterating through all minors of a given size within a pre-...
void defineMatrix(const int numberOfRows, const int numberOfColumns, const poly *polyMatrix)
A method for defining a matrix with polynomial entries.
Class PolyMinorValue is derived from MinorValue and can be used for representing values in a cache fo...
void idKeepFirstK(ideal id, const int k)
keeps the first k (>= 1) entries of the given ideal (Note that the kept polynomials may be zero....
◆ getMinorIdeal_toBeDone()
Definition at line 187 of file MinorInterface.cc.
190{
196
197
198
205 else
206 {
209 {
210
211
212
213
214
215
217 }
218 else
219 {
222 }
223 }
224
225
229
231}
ideal getMinorIdeal_Int(const int *intMatrix, const int rowCount, const int columnCount, const int minorSize, const int k, const char *algorithm, const ideal i, const bool allDifferent)
bool arrayIsNumberArray(const poly *polyArray, const ideal iSB, const int length, int *intArray, poly *nfPolyArray, int &zeroCounter)
static BOOLEAN rField_is_Z(const ring r)
◆ getMinorIdealCache()
Returns the specified set of minors (= subdeterminantes) of the given matrix.
These minors form the set of generators of the ideal which is actually returned.
If k == 0, all non-zero minors will be computed. For k > 0, only the first k non-zero minors (to some fixed ordering among all minors) will be computed. Use k < 0 to compute the first |k| minors (including zero minors).
The underlying algorithm is Laplace's algorithm with caching of certain subdeterminantes. The caching strategy can be set; see int MinorValue::getUtility () const in Minor.cc. cacheN is the maximum number of cached polynomials (=subdeterminantes); cacheW the maximum weight of the cache during all computations.
i must be either NULL or an ideal capturing a standard basis. In the later case all minors will be reduced w.r.t. i. If allDifferent is true, each minor will be included as generator in the resulting ideal only once; otherwise as often as it occurs as minor value during the computation.
- Parameters
-
| m | the matrix from which to compute minors |
| minorSize | the size of the minors to be computed |
| k | the number of minors to be computed |
| i | NULL or an ideal which encodes a standard basis |
| cacheStrategy | one of {1, .., 5}; see Minor.cc |
| cacheN | maximum number of cached polynomials (=subdeterminantes) |
| cacheW | maximum weight of the cache |
| allDifferent | if true each minor is considered only once |
- Returns
- the ideal which has as generators the specified set of minors
Definition at line 457 of file MinorInterface.cc.
461{
462
463
464
465
466
473
474
475
477 {
480 else
482 }
483
487
488
491
493}
ideal getMinorIdealCache_Poly(const poly *polyMatrix, const int rowCount, const int columnCount, const int minorSize, const int k, const ideal i, const int cacheStrategy, const int cacheN, const int cacheW, const bool allDifferent)
◆ getMinorIdealCache_Int()
Definition at line 302 of file MinorInterface.cc.
307{
308
319
320
322
325
326
328
330
333
334
336 {
337
343 }
344
345
346
354}
static void SetRankingStrategy(const int rankingStrategy)
A method for determining the value ranking strategy.
◆ getMinorIdealCache_Poly()
Definition at line 360 of file MinorInterface.cc.
365{
366
377
378
382
383
385
387
390#ifdef COUNT_AND_PRINT_OPERATIONS
393#endif
394
396 {
397
399#if (defined COUNT_AND_PRINT_OPERATIONS) && (COUNT_AND_PRINT_OPERATIONS > 1)
403#endif
408 }
409#ifdef COUNT_AND_PRINT_OPERATIONS
411#endif
412
413
414
422}
◆ getMinorIdealCache_toBeDone()
Definition at line 424 of file MinorInterface.cc.
428{
434
435
436
444 else
448
449
453
455}
ideal getMinorIdealCache_Int(const int *intMatrix, const int rowCount, const int columnCount, const int minorSize, const int k, const ideal i, const int cacheStrategy, const int cacheN, const int cacheW, const bool allDifferent)
◆ getMinorIdealHeuristic()
Returns the specified set of minors (= subdeterminantes) of the given matrix.
These minors form the set of generators of the ideal which is actually returned.
If k == 0, all non-zero minors will be computed. For k > 0, only the first k non-zero minors (to some fixed ordering among all minors) will be computed. Use k < 0 to compute the first |k| minors (including zero minors).
The algorithm is heuristically chosen among "Bareiss", "Laplace", and Laplace with caching (of subdeterminants).
i must be either NULL or an ideal capturing a standard basis. In the later case all minors will be reduced w.r.t. i. If allDifferent is true, each minor will be included as generator in the resulting ideal only once; otherwise as often as it occurs as minor value during the computation.
- Parameters
-
| m | the matrix from which to compute minors |
| minorSize | the size of the minors to be computed |
| k | the number of minors to be computed |
| i | NULL or an ideal which encodes a standard basis |
| allDifferent | if true each minor is considered only once |
- Returns
- the ideal which has as generators the specified set of minors
Definition at line 495 of file MinorInterface.cc.
498{
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
523
525 {
527 else if (
vars <= 2)
b =
true;
531 }
533 {
534 if (
k != 0)
l =
true;
535 else
536 {
538 }
539 }
540
547}
ideal getMinorIdealCache(const matrix mat, const int minorSize, const int k, const ideal iSB, const int cacheStrategy, const int cacheN, const int cacheW, const bool allDifferent)
Returns the specified set of minors (= subdeterminantes) of the given matrix.
ideal getMinorIdeal(const matrix mat, const int minorSize, const int k, const char *algorithm, const ideal iSB, const bool allDifferent)
Returns the specified set of minors (= subdeterminantes) of the given matrix.
static BOOLEAN rField_is_Domain(const ring r)