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

Function redNF

kernel/GBEngine/kstd2.cc:2302–2436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2300*/
2301
2302poly redNF (poly h,int &max_ind,int nonorm,kStrategy strat)
2303{
2304 if (h==NULL) return NULL;
2305 int j,j_ring;
2306 int cnt=REDNF_CANONICALIZE;
2307 max_ind=strat->sl;
2308
2309 if (0 > strat->sl)
2310 {
2311 return h;
2312 }
2313 LObject P(h);
2314 P.SetShortExpVector();
2315 P.t_p=NULL;
2316 BOOLEAN is_ring = rField_is_Ring(currRing);
2317 if(is_ring) nonorm=TRUE;
2318#ifdef KDEBUG
2319// if (TEST_OPT_DEBUG)
2320// {
2321// PrintS("redNF: starting S:\n");
2322// for( j = 0; j <= max_ind; j++ )
2323// {
2324// Print("S[%d] (of size: %d): ", j, pSize(strat->S[j]));
2325// pWrite(strat->S[j]);
2326// }
2327// };
2328#endif
2329 if (rField_is_Z(currRing))
2330 {
2331 redRing_Z_S(&P,strat);
2332 if (P.bucket!=NULL)
2333 {
2334 P.p=kBucketClear(P.bucket);
2335 kBucketDestroy(&P.bucket);
2336 }
2337 return P.p;
2338 }
2339 else if (rField_is_Ring(currRing))
2340 {
2341 redRing_S(&P,strat);
2342 if (P.bucket!=NULL)
2343 {
2344 P.p=kBucketClear(P.bucket);
2345 kBucketDestroy(&P.bucket);
2346 }
2347 return P.p;
2348 }
2349
2350 P.bucket = kBucketCreate(currRing);
2351 kBucketInit(P.bucket,P.p,pLength(P.p));
2352 kbTest(P.bucket);
2353 P.p=kBucketGetLm(P.bucket);
2354 loop
2355 {
2356 j_ring=j=kFindDivisibleByInS_noCF(strat,&max_ind,&P);
2357 while ((j>=0)
2358 && (nonorm)
2359 && (!n_DivBy(pGetCoeff(P.p),pGetCoeff(strat->S[j]),currRing->cf)))

Callers 8

kVerify1Function · 0.70
kVerify2Function · 0.70
kNF2Function · 0.70
redtailBba_NFFunction · 0.70
jjREDUCE3_CPFunction · 0.50
jjREDUCE3_CIDFunction · 0.50
jjREDUCE4Function · 0.50
jjREDUCE5Function · 0.50

Calls 15

rField_is_ZFunction · 0.85
redRing_Z_SFunction · 0.85
kBucketDestroyFunction · 0.85
redRing_SFunction · 0.85
kBucketCreateFunction · 0.85
kBucketInitFunction · 0.85
pLengthFunction · 0.85
kbTestFunction · 0.85
kFindDivisibleByInS_noCFFunction · 0.85
n_DivByFunction · 0.85
kFindNextDivisibleByInSFunction · 0.85
pNormFunction · 0.85

Tested by

no test coverage detected