Changeset a29995 in git for Singular/pp_Mult_mm_Noether__Template.cc
- Timestamp:
- Nov 28, 2000, 12:50:56 PM (23 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
- Children:
- 718add5b6d1cfeccd8e65b50d42db0fd515f126a
- Parents:
- 5e16f9ae5b8928fda665888d965340387f46c85c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/pp_Mult_mm_Noether__Template.cc
r5e16f9a ra29995 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: pp_Mult_mm_Noether__Template.cc,v 1. 1 2000-11-25 11:59:57 SingularExp $9 * Version: $Id: pp_Mult_mm_Noether__Template.cc,v 1.2 2000-11-28 11:50:56 obachman Exp $ 10 10 *******************************************************************/ 11 11 12 12 /*************************************************************** 13 13 * 14 * Returns: p*m 14 * Returns: p*m, ll 15 * ll == pLength(p*m) , if on input ll < 0 16 * pLength(p) - pLength(p*m), if on input ll >= 0 15 17 * Const: p, m 16 * monoms which are smaller than spNoether are cut17 18 * 18 19 ***************************************************************/ 19 poly pp_Mult_mm_Noether(poly p, const poly m, const poly spNoether, int &ll, const ring ri, poly &last) 20 poly pp_Mult_mm_Noether(poly p, const poly m, const poly spNoether, int &ll, 21 const ring ri, poly &last) 20 22 { 21 23 p_Test(p, ri); 22 24 p_LmTest(m, ri); 25 assume(spNoether != NULL); 23 26 if (p == NULL) 24 27 { 28 ll = 0; 25 29 last = NULL; 26 ll = 0;27 30 return NULL; 28 31 } 29 32 spolyrec rp; 30 33 poly q = &rp, r; 34 const unsigned long *spNoether_exp = spNoether->exp; 31 35 number ln = pGetCoeff(m); 32 36 omBin bin = ri->PolyBin; 33 assume(spNoether != NULL);34 unsigned long *spNoether_exp = spNoether->exp;35 37 DECLARE_LENGTH(const unsigned long length = ri->ExpL_Size); 36 38 DECLARE_ORDSGN(const long* ordsgn = ri->ordsgn); … … 40 42 int l = 0; 41 43 42 while (p != NULL)44 do 43 45 { 44 p_AllocBin( 46 p_AllocBin(r, bin, ri); 45 47 p_MemSum(r->exp, p->exp, m_e, length); 46 48 p_MemAddAdjust(r, ri); 47 p_MemCmp(r->exp, spNoether->exp, length, ordsgn, goto Continue, goto Continue, goto Break); 49 50 p_MemCmp(r->exp, spNoether_exp, length, ordsgn, goto Continue, goto Continue, goto Break); 48 51 49 52 Break: 50 53 p_FreeBinAddr(r, ri); 51 54 break; 52 55 53 56 Continue: 57 l++; 54 58 q = pNext(q) = r; 55 59 pSetCoeff0(q, n_Mult(ln, pGetCoeff(p), ri)); 56 l++;57 60 pIter(p); 58 } 59 if (q != &rp) last = q; 61 } while (p != NULL); 62 63 if (ll < 0) 64 ll = l; 65 else 66 ll = pLength(p); 67 68 if (q != &rp) 69 last = q; 60 70 pNext(q) = NULL; 61 ll = l;62 71 63 72 p_Test(pNext(&rp), ri);
Note: See TracChangeset
for help on using the changeset viewer.