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

Function p_mLPunshift

libpolys/polys/shiftop.cc:327–350  ·  view source on GitHub ↗

unshifts the monomial m

Source from the content-addressed store, hash-verified

325
326// unshifts the monomial m
327void p_mLPunshift(poly m, const ring ri)
328{
329 if (m == NULL || p_LmIsConstantComp(m,ri)) return;
330
331 int lV = ri->isLPring;
332
333 int shift = p_mFirstVblock(m, ri) - 1;
334
335 if (shift == 0) return;
336
337 int *e=(int *)omAlloc((ri->N+1)*sizeof(int));
338 int *s=(int *)omAlloc0((ri->N+1)*sizeof(int));
339 p_GetExpV(m, e, ri);
340
341 int expVoffset = shift*lV;
342 for (int i = 1 + expVoffset; i <= ri->N; i++)
343 {
344 assume(e[i] <= 1);
345 s[i - expVoffset] = e[i];
346 }
347 p_SetExpV(m,s,ri);
348 omFreeSize((ADDRESS) e, (ri->N+1)*sizeof(int));
349 omFreeSize((ADDRESS) s, (ri->N+1)*sizeof(int));
350}
351
352// unshifts the polynomial p, note: the ordering can be destroyed if the shifts for the monomials are not equal
353void p_LPunshift(poly p, const ring ri)

Callers 8

shift_pp_Mult_mmFunction · 0.85
shift_p_Mult_mmFunction · 0.85
shift_pp_mm_MultFunction · 0.85
shift_p_mm_MultFunction · 0.85
p_LPunshiftFunction · 0.85
k_SplitFrameFunction · 0.85
_p_LPLmDivisibleByNoCompFunction · 0.85
p_mLPSubstFunction · 0.85

Calls 5

p_LmIsConstantCompFunction · 0.85
p_mFirstVblockFunction · 0.85
omAlloc0Function · 0.85
p_GetExpVFunction · 0.85
p_SetExpVFunction · 0.85

Tested by

no test coverage detected