Changeset b45eec in git for libpolys/polys/shiftop.cc
- Timestamp:
- Apr 19, 2020, 9:57:14 PM (4 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- ffcf715a570941627bf020648e93955f1596f2ef
- Parents:
- d49a473d44aa25c5ecc3126360ab3179ddb8af7e636fa5455e699fa8c0a820dd60e00a059f96f8ef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/shiftop.cc
r636fa5 rb45eec 598 598 void k_SplitFrame(poly &m1, poly &m2, int at, const ring r) 599 599 { 600 assume(at >= 1); 601 assume(at <= r->N/r->isLPring); 600 602 int lV = r->isLPring; 601 602 number m1Coeff = n_Copy(pGetCoeff(m1), r->cf); // important to copy 603 604 int hole = lV * at; 605 m2 = p_GetExp_k_n(m1, 1, hole, r); 606 m1 = p_GetExp_k_n(m1, hole, r->N, r); 607 603 int split = (lV * (at - 1)); 604 605 m2 = p_GetExp_k_n(m1, 1, split, r); 608 606 p_mLPunshift(m2, r); 609 p_SetCoeff(m1, m1Coeff, r); 607 608 m1 = p_Head(m1, r); 609 for(int i = split + 1; i <= r->N; i++) 610 { 611 p_SetExp(m1, i, 0, r); 612 } 613 p_Setm(m1, r); 610 614 611 615 assume(p_FirstVblock(m1,r) <= 1); … … 794 798 p_mLPunshift(b, r); 795 799 #endif 796 for (int i = (r->N / r->isLPring) - p_LastVblock(a, r); i >= 0; i--) 800 int aLastVblock = p_mLastVblock(a, r); 801 int bLastVblock = p_mLastVblock(b, r); 802 for (int i = 0; i <= bLastVblock - aLastVblock; i++) 797 803 { 798 804 bool divisible = true; 799 for (int j = r->N - (i * r->isLPring); j >= 0; j--)805 for (int j = 1; j <= aLastVblock * r->isLPring; j++) 800 806 { 801 807 if (p_GetExp(a, j, r) > p_GetExp(b, j + (i * r->isLPring), r))
Note: See TracChangeset
for help on using the changeset viewer.