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

Function p_LmCheckIsFromRing

libpolys/polys/pDebug.cc:74–103  ·  view source on GitHub ↗

* * checking for ring stuff * ***************************************************************/

Source from the content-addressed store, hash-verified

72 *
73 ***************************************************************/
74BOOLEAN p_LmCheckIsFromRing(poly p, ring r)
75{
76 if (p != NULL)
77 {
78 #if (OM_TRACK > 0) && defined(OM_TRACK_CUSTOM)
79 void* custom = omGetCustomOfAddr(p);
80 if (custom != NULL)
81 {
82 pPolyAssumeReturnMsg(custom == r ||
83 // be more sloppy for qrings
84 (r->qideal != NULL &&
85 omIsBinPageAddr(p) &&
86 omSizeWOfAddr(p)==omSizeWOfBin(r->PolyBin)) ||
87 rSamePolyRep((ring) custom, r),
88 "monomial not from specified ring",p,r);
89 return TRUE;
90 }
91 else
92 #endif
93 #ifndef X_OMALLOC
94 {
95 _pPolyAssumeReturn(omIsBinPageAddr(p),p,r);
96 _pPolyAssumeReturn(omSizeWOfAddr(p)==omSizeWOfBin(r->PolyBin),p,r);
97 return TRUE;
98 }
99 return FALSE;
100 #endif
101 }
102 return TRUE;
103}
104
105BOOLEAN p_CheckIsFromRing(poly p, ring r)
106{

Callers 4

p_CheckIsFromRingFunction · 0.85
p_LmCheckPolyRingFunction · 0.85
_p_TestFunction · 0.85
enterOnePairShiftFunction · 0.85

Calls 2

omSizeWOfAddrFunction · 0.85
rSamePolyRepFunction · 0.85

Tested by

no test coverage detected