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

Function kFindDivisibleByInS

kernel/GBEngine/kstd2.cc:421–462  ·  view source on GitHub ↗

same as above, only with set S

Source from the content-addressed store, hash-verified

419
420// same as above, only with set S
421int kFindDivisibleByInS(const kStrategy strat, int* max_ind, LObject* L)
422{
423 unsigned long not_sev = ~L->sev;
424 poly p = L->GetLmCurrRing();
425 int j = 0;
426
427 pAssume(~not_sev == p_GetShortExpVector(p, currRing));
428
429 BOOLEAN is_Ring=rField_is_Ring(currRing);
430#if 1
431 int ende;
432 if (is_Ring
433 || (strat->ak>0)
434 || currRing->pLexOrder)
435 ende=strat->sl;
436 else
437 {
438 ende=posInS(strat,*max_ind,p,0)+1;
439 if (ende>(*max_ind)) ende=(*max_ind);
440 }
441#else
442 int ende=strat->sl;
443#endif
444 if(is_Ring)
445 {
446 loop
447 {
448 if (j > ende) return -1;
449#if defined(PDEBUG) || defined(PDIV_DEBUG)
450 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j],
451 p, not_sev, currRing))
452#else
453 if ( !(strat->sevS[j] & not_sev) &&
454 p_LmDivisibleBy(strat->S[j], p, currRing))
455#endif
456 {
457 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing->cf))
458 return j;
459 }
460 j++;
461 }
462 }
463 else
464 {
465 loop

Callers 9

redRing_Z_SFunction · 0.85
redRing_SFunction · 0.85
redHomogFunction · 0.85
redSigFunction · 0.85
kstd2.ccFile · 0.85
redLazyFunction · 0.85
redNFBoundFunction · 0.85
kstd1.ccFile · 0.85
redFirstFunction · 0.85

Calls 7

p_GetShortExpVectorFunction · 0.85
posInSFunction · 0.85
p_LmShortDivisibleByFunction · 0.85
p_LmDivisibleByFunction · 0.85
n_DivByFunction · 0.85
GetLmCurrRingMethod · 0.80
ifFunction · 0.50

Tested by

no test coverage detected