2 *construct the set s from F */
| 7586 | *construct the set s from F |
| 7587 | */ |
| 7588 | void initS (ideal F, ideal Q, kStrategy strat) |
| 7589 | { |
| 7590 | int i,pos; |
| 7591 | |
| 7592 | if (Q!=NULL) i=((IDELEMS(F)+IDELEMS(Q)+(setmaxTinc-1))/setmaxTinc)*setmaxTinc; |
| 7593 | else i=((IDELEMS(F)+(setmaxTinc-1))/setmaxTinc)*setmaxTinc; |
| 7594 | if (i<setmaxTinc) i=setmaxT; |
| 7595 | strat->ecartS=initec(i); |
| 7596 | strat->sevS=initsevS(i); |
| 7597 | strat->S_2_R=initS_2_R(i); |
| 7598 | strat->fromQ=NULL; |
| 7599 | strat->Shdl=idInit(i,F->rank); |
| 7600 | strat->S=strat->Shdl->m; |
| 7601 | /*- put polys into S -*/ |
| 7602 | if (Q!=NULL) |
| 7603 | { |
| 7604 | strat->fromQ=initec(i); |
| 7605 | memset(strat->fromQ,0,i*sizeof(int)); |
| 7606 | for (i=0; i<IDELEMS(Q); i++) |
| 7607 | { |
| 7608 | if (Q->m[i]!=NULL) |
| 7609 | { |
| 7610 | LObject h; |
| 7611 | h.p = pCopy(Q->m[i]); |
| 7612 | if (TEST_OPT_INTSTRATEGY) |
| 7613 | { |
| 7614 | h.pCleardenom(); // also does remove Content |
| 7615 | } |
| 7616 | else |
| 7617 | { |
| 7618 | h.pNorm(); |
| 7619 | } |
| 7620 | if (rHasLocalOrMixedOrdering(currRing)) |
| 7621 | { |
| 7622 | deleteHC(&h, strat); |
| 7623 | } |
| 7624 | if (h.p!=NULL) |
| 7625 | { |
| 7626 | strat->initEcart(&h); |
| 7627 | if (strat->sl==-1) |
| 7628 | pos =0; |
| 7629 | else |
| 7630 | { |
| 7631 | pos = posInS(strat,strat->sl,h.p,h.ecart); |
| 7632 | } |
| 7633 | h.sev = pGetShortExpVector(h.p); |
| 7634 | strat->enterS(h,pos,strat,-1); |
| 7635 | strat->fromQ[pos]=1; |
| 7636 | } |
| 7637 | } |
| 7638 | } |
| 7639 | } |
| 7640 | for (i=0; i<IDELEMS(F); i++) |
| 7641 | { |
| 7642 | if (F->m[i]!=NULL) |
| 7643 | { |
| 7644 | LObject h; |
| 7645 | h.p = pCopy(F->m[i]); |
no test coverage detected