same as above, only with set S
| 419 | |
| 420 | // same as above, only with set S |
| 421 | int 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 |
no test coverage detected