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

Function _pp_Test

libpolys/polys/pDebug.cc:332–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332BOOLEAN _pp_Test(poly p, ring lmRing, ring tailRing, int level)
333{
334 if (PDEBUG > level) level = PDEBUG;
335 if (level < 0 || p == NULL) return TRUE;
336 if (pNext(p) == NULL || lmRing == tailRing) return _p_Test(p, lmRing, level);
337
338 pFalseReturn(_p_LmTest(p, lmRing, level));
339 pFalseReturn(_p_Test(pNext(p), tailRing, level));
340
341 // check that lm > Lm(tail)
342 if (level > 1)
343 {
344 poly lm = p;
345 poly tail = p_DebugInit(pNext(p), tailRing, lmRing);
346 poly pnext = pNext(lm);
347 pNext(lm) = tail;
348 BOOLEAN cmp = p_LmCmp(lm, tail, lmRing);
349 if (cmp != 1)
350 dPolyReportError(lm, lmRing, "wrong order: lm <= Lm(tail)");
351 p_LmFree(tail, lmRing);
352 pNext(lm) = pnext;
353 return (cmp == 1);
354 }
355 return TRUE;
356}
357
358#endif // PDEBUG
359

Callers 1

id_DBTestFunction · 0.85

Calls 6

_p_TestFunction · 0.85
_p_LmTestFunction · 0.85
p_DebugInitFunction · 0.85
p_LmCmpFunction · 0.85
dPolyReportErrorFunction · 0.85
p_LmFreeFunction · 0.85

Tested by

no test coverage detected