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

Function kNF2Bound

kernel/GBEngine/kstd2.cc:4012–4085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4010}
4011
4012poly kNF2Bound (ideal F,ideal Q,poly q,int bound,kStrategy strat, int lazyReduce)
4013{
4014 assume(q!=NULL);
4015 assume(!(idIs0(F)&&(Q==NULL))); // NF(q, std(0) in polynomial ring?
4016
4017// lazy_reduce flags: can be combined by |
4018//#define KSTD_NF_LAZY 1
4019 // do only a reduction of the leading term
4020//#define KSTD_NF_NONORM 4
4021 // only global: avoid normalization, return a multiply of NF
4022 poly p;
4023
4024 //if ((idIs0(F))&&(Q==NULL))
4025 // return pCopy(q); /*F=0*/
4026 //strat->ak = idRankFreeModule(F);
4027 /*- creating temp data structures------------------- -*/
4028 BITSET save1;
4029 SI_SAVE_OPT1(save1);
4030 si_opt_1|=Sy_bit(OPT_REDTAIL);
4031 initBuchMoraCrit(strat);
4032 strat->initEcart = initEcartBBA;
4033 strat->enterS = enterSBba;
4034#ifndef NO_BUCKETS
4035 strat->use_buckets = (!TEST_OPT_NOT_BUCKETS) && (!rIsPluralRing(currRing));
4036#endif
4037 /*- set S -*/
4038 strat->sl = -1;
4039 /*- init local data struct.---------------------------------------- -*/
4040 /*Shdl=*/initS(F,Q,strat);
4041 /*- compute------------------------------------------------------- -*/
4042 //if ((TEST_OPT_INTSTRATEGY)&&(lazyReduce==0))
4043 //{
4044 // for (i=strat->sl;i>=0;i--)
4045 // pNorm(strat->S[i]);
4046 //}
4047 kTest(strat);
4048 if (TEST_OPT_PROT) { PrintS("r"); mflush(); }
4049 if (BVERBOSE(23)) kDebugPrint(strat);
4050 int max_ind;
4051 p = redNFBound(pCopy(q),max_ind,lazyReduce & KSTD_NF_NONORM,strat,bound);
4052 if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0))
4053 {
4054 if (TEST_OPT_PROT) { PrintS("t"); mflush(); }
4055 if (rField_is_Z(currRing)||(rField_is_Zn(currRing)))
4056 {
4057 p = redtailBba_Z(p,max_ind,strat);
4058 }
4059 else if (rField_is_Ring(currRing))
4060 {
4061 p = redtailBba_Ring(p,max_ind,strat);
4062 }
4063 else
4064 {
4065 si_opt_1 &= ~Sy_bit(OPT_INTSTRATEGY);
4066 p = redtailBbaBound(p,max_ind,strat,bound,(lazyReduce & KSTD_NF_NONORM)==0);
4067 //p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0);
4068 }
4069 }

Callers 1

kNFBoundFunction · 0.85

Calls 15

idIs0Function · 0.85
initBuchMoraCritFunction · 0.85
rIsPluralRingFunction · 0.85
initSFunction · 0.85
kTestFunction · 0.85
PrintSFunction · 0.85
kDebugPrintFunction · 0.85
redNFBoundFunction · 0.85
rField_is_ZFunction · 0.85
rField_is_ZnFunction · 0.85
idInitFunction · 0.85
si_maxFunction · 0.85

Tested by

no test coverage detected