Changeset e78f35 in git for Singular/MinorInterface.cc
- Timestamp:
- Feb 19, 2013, 8:32:57 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 2a3743b6431021631dff0bb9d7b7888a205302b1bc03ea6301177ce6360abcfc3922ff0edc5f9a73
- Parents:
- 26e817f3b4db82c0b0a5376b16c2e9648ecf55e3d81e39d347055cad093a2ae53302e036ae2a449c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/MinorInterface.cc
r26e817f re78f35 190 190 /* before we return the result, let's omit zero generators 191 191 in iii which come after the computed minors */ 192 ideal jjj; 193 if (collectedMinors == 0) jjj = idInit(1); 194 else jjj = idCopyFirstK(iii, collectedMinors); 195 idDelete(&iii); 192 idKeepFirstK(iii, collectedMinors); 196 193 delete[] myColumnIndices; 197 194 delete[] myRowIndices; 198 return jjj;195 return(iii); 199 196 } 200 197 … … 542 539 else 543 540 { /* k == 0, i.e., all minors are requested */ 544 int minorCount = 1; 545 for (int i = rowCount - minorSize + 1; i <= rowCount; i++) 546 minorCount = minorCount * i; 547 for (int i = 2; i <= minorSize; i++) minorCount = minorCount / i; 548 for (int i = columnCount - minorSize + 1; i <= columnCount; i++) 549 minorCount = minorCount * i; 550 for (int i = 2; i <= minorSize; i++) minorCount = minorCount / i; 551 /* now: minorCount = (rowCount over minorSize) 552 * (columnCount over minorSize) */ 541 int minorCount = binom(rowCount, minorSize); 542 minorCount *= binom(columnCount, minorSize); 553 543 if ((minorSize >= 3) && (vars <= 4) 554 544 && (minorCount >= 100)) c = true;
Note: See TracChangeset
for help on using the changeset viewer.