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

Function initSLSba

kernel/GBEngine/kutil.cc:7780–7930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7778}
7779
7780void initSLSba (ideal F, ideal Q,kStrategy strat)
7781{
7782 int i,pos;
7783 if (Q!=NULL)
7784 {
7785 i=((IDELEMS(Q)+(setmaxTinc-1))/setmaxTinc)*setmaxTinc;
7786 if (i<setmaxTinc) i=setmaxT;
7787 }
7788 else i=setmaxT;
7789 strat->ecartS = initec(i);
7790 strat->sevS = initsevS(i);
7791 strat->sevSig = initsevS(i);
7792 strat->S_2_R = initS_2_R(i);
7793 strat->fromQ = NULL;
7794 strat->Shdl = idInit(i,F->rank);
7795 strat->S = strat->Shdl->m;
7796 strat->sig = (poly *)omAlloc0(i*sizeof(poly));
7797 if (strat->sbaOrder != 1)
7798 {
7799 strat->syz = (poly *)omAlloc0(i*sizeof(poly));
7800 strat->sevSyz = initsevS(i);
7801 strat->syzmax = i;
7802 strat->syzl = 0;
7803 }
7804 /*- put polys into S -*/
7805 if (Q!=NULL)
7806 {
7807 strat->fromQ=initec(i);
7808 memset(strat->fromQ,0,i*sizeof(int));
7809 for (i=0; i<IDELEMS(Q); i++)
7810 {
7811 if (Q->m[i]!=NULL)
7812 {
7813 LObject h;
7814 h.p = pCopy(Q->m[i]);
7815 if (rHasLocalOrMixedOrdering(currRing))
7816 {
7817 deleteHC(&h,strat);
7818 }
7819 if (TEST_OPT_INTSTRATEGY)
7820 {
7821 h.pCleardenom(); // also does remove Content
7822 }
7823 else
7824 {
7825 h.pNorm();
7826 }
7827 if (h.p!=NULL)
7828 {
7829 strat->initEcart(&h);
7830 if (strat->sl==-1)
7831 pos =0;
7832 else
7833 {
7834 pos = posInS(strat,strat->sl,h.p,h.ecart);
7835 }
7836 h.sev = pGetShortExpVector(h.p);
7837 strat->enterS(h,pos,strat,-1);

Callers 1

initSbaBuchMoraFunction · 0.85

Calls 15

idInitFunction · 0.85
omAlloc0Function · 0.85
rHasLocalOrMixedOrderingFunction · 0.85
deleteHCFunction · 0.85
posInSFunction · 0.85
p_SetCompFunction · 0.85
p_ExpVectorAddFunction · 0.85
pWriteFunction · 0.85
cancelunitFunction · 0.85
enterLFunction · 0.85
n_IsUnitFunction · 0.85
deleteInLFunction · 0.85

Tested by

no test coverage detected