| 7679 | } |
| 7680 | |
| 7681 | void initSL (ideal F, ideal Q,kStrategy strat) |
| 7682 | { |
| 7683 | int i,pos; |
| 7684 | |
| 7685 | if (Q!=NULL) |
| 7686 | { |
| 7687 | i=((IDELEMS(Q)+(setmaxTinc-1))/setmaxTinc)*setmaxTinc; |
| 7688 | if (i<setmaxTinc) i=setmaxT; |
| 7689 | } |
| 7690 | else i=setmaxT; |
| 7691 | strat->ecartS=initec(i); |
| 7692 | strat->sevS=initsevS(i); |
| 7693 | strat->S_2_R=initS_2_R(i); |
| 7694 | strat->fromQ=NULL; |
| 7695 | strat->Shdl=idInit(i,F->rank); |
| 7696 | strat->S=strat->Shdl->m; |
| 7697 | /*- put polys into S -*/ |
| 7698 | if (Q!=NULL) |
| 7699 | { |
| 7700 | strat->fromQ=initec(i); |
| 7701 | memset(strat->fromQ,0,i*sizeof(int)); |
| 7702 | for (i=0; i<IDELEMS(Q); i++) |
| 7703 | { |
| 7704 | if (Q->m[i]!=NULL) |
| 7705 | { |
| 7706 | LObject h; |
| 7707 | h.p = pCopy(Q->m[i]); |
| 7708 | if (rHasLocalOrMixedOrdering(currRing)) |
| 7709 | { |
| 7710 | deleteHC(&h,strat); |
| 7711 | } |
| 7712 | if (TEST_OPT_INTSTRATEGY) |
| 7713 | { |
| 7714 | h.pCleardenom(); // also does remove Content |
| 7715 | } |
| 7716 | else |
| 7717 | { |
| 7718 | h.pNorm(); |
| 7719 | } |
| 7720 | if (h.p!=NULL) |
| 7721 | { |
| 7722 | strat->initEcart(&h); |
| 7723 | if (strat->sl==-1) |
| 7724 | pos =0; |
| 7725 | else |
| 7726 | { |
| 7727 | pos = posInS(strat,strat->sl,h.p,h.ecart); |
| 7728 | } |
| 7729 | h.sev = pGetShortExpVector(h.p); |
| 7730 | strat->enterS(h,pos,strat,-1); |
| 7731 | strat->fromQ[pos]=1; |
| 7732 | } |
| 7733 | } |
| 7734 | } |
| 7735 | } |
| 7736 | for (i=0; i<IDELEMS(F); i++) |
| 7737 | { |
| 7738 | if (F->m[i]!=NULL) |
no test coverage detected