2 *the pairset B of pairs of type (s[i],p) is complete now. It will be updated *using the chain-criterion in B and L and enters B to L */
| 3207 | *using the chain-criterion in B and L and enters B to L |
| 3208 | */ |
| 3209 | void chainCritNormal (poly p,int ecart,kStrategy strat) |
| 3210 | { |
| 3211 | int i,j,l; |
| 3212 | |
| 3213 | /* |
| 3214 | *pairtest[i] is TRUE if spoly(S[i],p) == 0. |
| 3215 | *In this case all elements in B such |
| 3216 | *that their lcm is divisible by the leading term of S[i] can be canceled |
| 3217 | */ |
| 3218 | if (strat->pairtest!=NULL) |
| 3219 | { |
| 3220 | #ifdef HAVE_SHIFTBBA |
| 3221 | // only difference is pLPDivisibleBy instead of pDivisibleBy |
| 3222 | if (rIsLPRing(currRing)) |
| 3223 | { |
| 3224 | for (j=0; j<=strat->sl; j++) |
| 3225 | { |
| 3226 | if (strat->pairtest[j]) |
| 3227 | { |
| 3228 | for (i=strat->Bl; i>=0; i--) |
| 3229 | { |
| 3230 | if (pLPDivisibleBy(strat->S[j],strat->B[i].lcm)) |
| 3231 | { |
| 3232 | deleteInL(strat->B,&strat->Bl,i,strat); |
| 3233 | strat->c3++; |
| 3234 | } |
| 3235 | } |
| 3236 | } |
| 3237 | } |
| 3238 | } |
| 3239 | else |
| 3240 | #endif |
| 3241 | { |
| 3242 | /*- i.e. there is an i with pairtest[i]==TRUE -*/ |
| 3243 | for (j=0; j<=strat->sl; j++) |
| 3244 | { |
| 3245 | if (strat->pairtest[j]) |
| 3246 | { |
| 3247 | for (i=strat->Bl; i>=0; i--) |
| 3248 | { |
| 3249 | if (pDivisibleBy(strat->S[j],strat->B[i].lcm)) |
| 3250 | { |
| 3251 | deleteInL(strat->B,&strat->Bl,i,strat); |
| 3252 | strat->c3++; |
| 3253 | } |
| 3254 | } |
| 3255 | } |
| 3256 | } |
| 3257 | } |
| 3258 | omFreeSize(strat->pairtest,(strat->sl+2)*sizeof(BOOLEAN)); |
| 3259 | strat->pairtest=NULL; |
| 3260 | } |
| 3261 | if (strat->Gebauer || strat->fromT) |
| 3262 | { |
| 3263 | if (strat->sugarCrit) |
| 3264 | { |
| 3265 | /* |
| 3266 | *suppose L[j] == (s,r) and p/lcm(s,r) |
nothing calls this directly
no test coverage detected