MCPcopy Create free account
hub / github.com/Singular/Singular / elimOperationBucketNoDiv

Function elimOperationBucketNoDiv

kernel/linear_algebra/MinorProcessor.cc:1289–1314  ·  view source on GitHub ↗

computes the polynomial (p1 * p2 - p3 * p4) and puts result into p1; the method destroys the old value of p1; p2, p3, and p4 may be pNormalize-d but must, apart from that, not be changed; This can only be used in the case of coefficients coming from a field or at least an integral domain. */

Source from the content-addressed store, hash-verified

1287 This can only be used in the case of coefficients coming from a field
1288 or at least an integral domain. */
1289static void elimOperationBucketNoDiv(poly &p1, poly p2, poly p3, poly p4)
1290{
1291#ifdef COUNT_AND_PRINT_OPERATIONS
1292 if ((pLength(p1) != 0) && (pLength(p2) != 0))
1293 {
1294 multsPoly++;
1295 multsMon += pLength(p1) * pLength(p2);
1296 }
1297 if ((pLength(p3) != 0) && (pLength(p4) != 0))
1298 {
1299 multsPoly++;
1300 multsMon += pLength(p3) * pLength(p4);
1301 }
1302 if ((pLength(p1) != 0) && (pLength(p2) != 0) &&
1303 (pLength(p3) != 0) && (pLength(p4) != 0))
1304 addsPoly++;
1305#endif
1306 kBucket_pt myBucket = kBucketCreate(currRing);
1307 addOperationBucket(p1, p2, myBucket);
1308 poly p3Neg = pNeg(pCopy(p3));
1309 addOperationBucket(p3Neg, p4, myBucket);
1310 pDelete(&p3Neg);
1311 pDelete(&p1);
1312 p1 = kBucketClear(myBucket);
1313 kBucketDestroy(&myBucket);
1314}
1315
1316/* computes the polynomial (p1 * p2 - p3 * p4) / p5 and puts result into p1;
1317 the method destroys the old value of p1;

Callers 1

Calls 5

pLengthFunction · 0.85
kBucketCreateFunction · 0.85
addOperationBucketFunction · 0.85
kBucketDestroyFunction · 0.85
kBucketClearFunction · 0.50

Tested by

no test coverage detected