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

Function redSig

kernel/GBEngine/kstd2.cc:1326–1489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1324*/
1325
1326int redSig (LObject* h,kStrategy strat)
1327{
1328 if (strat->tl<0) return 1;
1329 //if (h->GetLmTailRing()==NULL) return 0; // HS: SHOULD NOT BE NEEDED!
1330 //printf("FDEGS: %ld -- %ld\n",h->FDeg, h->pFDeg());
1331 assume(h->FDeg == h->pFDeg());
1332//#if 1
1333#ifdef DEBUGF5
1334 PrintS("------- IN REDSIG -------\n");
1335 Print("p: ");
1336 pWrite(pHead(h->p));
1337 PrintS("p1: ");
1338 pWrite(pHead(h->p1));
1339 PrintS("p2: ");
1340 pWrite(pHead(h->p2));
1341 PrintS("---------------------------\n");
1342#endif
1343 poly h_p;
1344 int i,j,at,pass, ii;
1345 int start=0;
1346 int sigSafe;
1347 unsigned long not_sev;
1348 // long reddeg,d;
1349 BOOLEAN test_opt_length=TEST_OPT_LENGTH;
1350 int li;
1351
1352 pass = j = 0;
1353 h->SetShortExpVector();
1354 h_p = h->GetLmTailRing();
1355 not_sev = ~ h->sev;
1356 loop
1357 {
1358 j = kFindDivisibleByInT(strat, h, start);
1359 if (j < 0)
1360 {
1361 return 1;
1362 }
1363
1364 li = strat->T[j].pLength;
1365 if (li<=0) li=strat->T[j].GetpLength();
1366 ii = j;
1367 /*
1368 * the polynomial to reduce with (up to the moment) is;
1369 * pi with length li
1370 */
1371 i = j;
1372#if 1
1373 if (test_opt_length)
1374 loop
1375 {
1376 /*- search the shortest possible with respect to length -*/
1377 i++;
1378 if (i > strat->tl)
1379 break;
1380 if (li==1)
1381 break;
1382 if ((strat->T[i].pLength < li)
1383 &&

Callers

nothing calls this directly

Calls 15

PrintSFunction · 0.85
pWriteFunction · 0.85
kFindDivisibleByInTFunction · 0.85
p_LmShortDivisibleByFunction · 0.85
ksReducePolySigFunction · 0.85
pLengthFunction · 0.85
kDeleteLcmFunction · 0.85
kFindDivisibleByInSFunction · 0.85
enterLFunction · 0.85
pFDegMethod · 0.80
SetShortExpVectorMethod · 0.80
GetLmTailRingMethod · 0.80

Tested by

no test coverage detected