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

Function k_SplitFrame

libpolys/polys/shiftop.cc:600–621  ·  view source on GitHub ↗

splits a frame (e.g. x(1)*y(5)) m1 into m1 and m2 (e.g. m1=x(1) and m2=y(1)) at is the number of the block to split at, starting at 1

Source from the content-addressed store, hash-verified

598// splits a frame (e.g. x(1)*y(5)) m1 into m1 and m2 (e.g. m1=x(1) and m2=y(1))
599// at is the number of the block to split at, starting at 1
600void k_SplitFrame(poly &m1, poly &m2, int at, const ring r)
601{
602 assume(at >= 1);
603 assume(at <= r->N/r->isLPring);
604 int lV = r->isLPring;
605 int split = (lV * (at - 1));
606
607 m2 = p_GetExp_k_n(m1, 1, split, r);
608 p_SetComp(m2, 0, r); // important, otherwise both m1 and m2 have a component set, this leads to problems later
609 p_Setm(m2, r); // p_mLPunshift also implicitly calls p_Setm(), but just for the case this changes in future.
610 p_mLPunshift(m2, r);
611
612 m1 = p_Head0(m1, r);
613 for(int i = split + 1; i <= r->N; i++)
614 {
615 p_SetExp(m1, i, 0, r);
616 }
617 p_Setm(m1, r);
618
619 assume(p_FirstVblock(m1,r) <= 1);
620 assume(p_FirstVblock(m2,r) <= 1);
621}
622
623BOOLEAN _p_mLPNCGenValid(poly p, const ring r)
624{

Callers 12

kBucketPolyRedFunction · 0.85
kbuckets.ccFile · 0.85
enterOneStrongPolyShiftFunction · 0.85
enterOnePairRingShiftFunction · 0.85
ksReducePolyZFunction · 0.85
ksReducePolyFunction · 0.85
ksReducePolyGCDFunction · 0.85
ksReducePolyLCFunction · 0.85
ksReducePolyBoundFunction · 0.85
ksReducePolySigFunction · 0.85
ksReducePolySigRingFunction · 0.85
ksCreateSpolyFunction · 0.85

Calls 7

p_GetExp_k_nFunction · 0.85
p_SetCompFunction · 0.85
p_SetmFunction · 0.85
p_mLPunshiftFunction · 0.85
p_Head0Function · 0.85
p_SetExpFunction · 0.85
p_FirstVblockFunction · 0.85

Tested by

no test coverage detected