# Changeset 26ae12 in git

Ignore:
Timestamp:
May 19, 1998, 11:02:40 AM (25 years ago)
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
Parents:
b1fa42d7299399bfcfb6cef7291df79a2a381178
Message:
```1998-05-19  Olaf Bachmann  <obachman@mathematik.uni-kl.de>

* ideals.cc (idDelLmEquals): added idDelLmEqual == simplify(16),
and idDelDiv == simplify(32); improved pComparePolys

Files:
7 edited

Unmodified
Removed
• ## Singular/ChangeLog

 rb1fa42 1998-05-19  Olaf Bachmann  * ideals.cc (idDelLmEquals): added idDelLmEqual == simplify(16), and idDelDiv == simplify(32); improved pComparePolys 1998-05-18  Olaf Bachmann
• ## Singular/ideals.cc

 rb1fa42 *  Computer Algebra System SINGULAR     * ****************************************/ /* \$Id: ideals.cc,v 1.26 1998-05-14 14:41:28 Singular Exp \$ */ /* \$Id: ideals.cc,v 1.27 1998-05-19 09:02:35 obachman Exp \$ */ /* * ABSTRACT - all basic methods to manipulate ideals } } // // Delete id[j], if Lm(j) == Lm(i) and j > i // void idDelLmEquals(ideal id) { int i, j, t; int k = IDELEMS(id), l = k; for (i=k-2; i>=0; i--) { for (j=l-1; j>i; j--) { if (pLmEqual(id->m[i], id->m[j])) { pDelete(&id->m[j]); l--; for(t=j; tm[t] = id->m[t+1]; } } } } if (l != k) { pEnlargeSet(&id->m, k, l-k); IDELEMS(id) = l; } } void idDelDiv(ideal id) { int i, j, t; int k = IDELEMS(id), l = k; for (i=k-2; i>=0; i--) { for (j=l-1; j>i; j--) { if (((id->m[j] != NULL) && pDivisibleBy(id->m[i], id->m[j])) || (id->m[i] == NULL && id->m[j] == NULL)) { pDelete(&id->m[j]); l--; for(t=j; tm[t] = id->m[t+1]; } } } } if (l != k) { pEnlargeSet(&id->m, k, l-k); IDELEMS(id) = l; } } /*2
• ## Singular/ideals.h

 rb1fa42 *  Computer Algebra System SINGULAR     * ****************************************/ /* \$Id: ideals.h,v 1.6 1998-02-19 12:45:40 siebert Exp \$ */ /* \$Id: ideals.h,v 1.7 1998-05-19 09:02:35 obachman Exp \$ */ /* * ABSTRACT - all basic methods to manipulate ideals void idDelMultiples(ideal id); void idDelEquals(ideal id); void idDelLmEquals(ideal id); void idDelDiv(ideal id); #ifdef PDEBUG
• ## Singular/iparith.cc

 rb1fa42 return (i==-1); } #define SIMPL_LMDIV 32 #define SIMPL_LMEQ  16 #define SIMPL_MULT 8 #define SIMPL_EQU  4 int sw = (int)v->Data(); ideal id = (ideal)u->CopyD(); if (sw & SIMPL_LMDIV) { idDelDiv(id); } if (sw & SIMPL_LMEQ) { idDelLmEquals(id); } if (sw & SIMPL_NULL) {
• ## Singular/polys.h

 rb1fa42 *  Computer Algebra System SINGULAR     * ****************************************/ /* \$Id: polys.h,v 1.12 1998-04-08 12:41:37 pohl Exp \$ */ /* \$Id: polys.h,v 1.13 1998-05-19 09:02:38 obachman Exp \$ */ /* * ABSTRACT - all basic methods to manipulate polynomials poly      pPower(poly p, int i); // return TRUE, if exponent and component of p1 and p2 are equal, // FALSE otherwise #define pEqual(p1, p2) _pEqual(p1, p2) // return TRUE, if exponent and component of Lm(p1) and Lm(p2) are equal, // FALSE otherwise; #define pEqual(p1, p2) _pEqual(p1, p2) // Assumes p1 != NULL & p2 != NULL inline BOOLEAN pLmEqual(poly p1, poly p2) // no assumptions { if (p1 != NULL) { if (p2 != NULL) return pEqual(p1, p2); return FALSE; } if (p2 == NULL) return TRUE; return FALSE; } // returns TRUE, if leading monom of a divides leading monom of b // i.e., if there exists a expvector c > 0, s.t. b = a + c // i.e., if there exists a expvector c > 0, s.t. b = a + c; assumes b != NULL #define pDivisibleBy(a, b)  _pDivisibleBy(a,b) // like pDivisibleBy, except that it is assumed that a!=NULL #define pDivisibleBy1(a,b)   _pDivisibleBy1(a,b) // like pDivisibleBy, assumes a != NULL, does not check components // like pDivisibleBy1, does not check components #define pDivisibleBy2(a, b) _pDivisibleBy2(a,b)
• ## Singular/polys1.cc

 rb1fa42 *  Computer Algebra System SINGULAR     * ****************************************/ /* \$Id: polys1.cc,v 1.13 1998-04-24 16:39:25 Singular Exp \$ */ /* \$Id: polys1.cc,v 1.14 1998-05-19 09:02:38 obachman Exp \$ */ /* { /* p1 and p2 are non-NULL, so we may use pComp0 instead of pComp */ if (pComp0(p1,p2) != 0) if (! pEqual(p1, p2)) { return FALSE; while ((p1 != NULL) /*&& (p2 != NULL)*/) { for (i=1; i<=pVariables; i++) { if (pGetExp(p1,i)!=pGetExp(p2,i)) { if ( ! pLmEqual(p1, p2)) { nDelete(&n); return FALSE; } } if (pGetComp(p1) != pGetComp(p2)) { nDelete(&n); return FALSE; } if (!nEqual(pGetCoeff(p1),nn=nMult(pGetCoeff(p2),n))) return TRUE; } //{ //  number m=NULL,n=NULL; // //  while ((p1 != NULL) && (p2 != NULL)) //  { //    if (pComp(p1,p2) != 0) //    { //      if (n!=NULL) nDelete(&n); //      return FALSE; //    } //    if (n == NULL) //    { //      n=nDiv(pGetCoeff(p1),pGetCoeff(p2)); //    } //    else //    { //      m=nDiv(pGetCoeff(p1),pGetCoeff(p2)); //      if (! nEqual(m,n)) //      { //        nDelete(&n); //        nDelete(&m); //        return FALSE; //      } //      nDelete(&m); //    } //    p1=pNext(p1); //    p2=pNext(p2); //  } //  nDelete(&n); //  //if (p1 != p2) //  //  return FALSE; //  //else //  //  return TRUE; //  return (p1==p2); //}
Note: See TracChangeset for help on using the changeset viewer.