Changeset bb6c8a in git
- Timestamp:
- Mar 30, 2011, 4:57:03 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 21c6b368221deec3e5484f0c925b9ea662ef2f90
- Parents:
- 5948a892b49a72bd59d66e6d9874e51bcefaf93c
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-03-30 16:57:03+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:04:15+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/p_polys.h
r5948a8 rbb6c8a 39 39 #define __p_GetComp(p, r) (p)->exp[r->pCompIndex] 40 40 #define p_GetComp(p, r) ((long) (r->pCompIndex >= 0 ? __p_GetComp(p, r) : 0)) 41 42 /***************************************************************43 *44 * Comparisons: they are all done without regarding coeffs45 *46 ***************************************************************/47 #define p_LmCmpAction(p, q, r, actionE, actionG, actionS) \48 _p_LmCmpAction(p, q, r, actionE, actionG, actionS)49 50 // returns 1 if ExpVector(p)==ExpVector(q): does not compare numbers !!51 #define p_LmEqual(p1, p2, r) p_ExpVectorEqual(p1, p2, r)52 41 53 42 /*************************************************************** … … 709 698 ***************************************************************/ 710 699 711 // pCmp: args may be NULL712 // returns: (p2==NULL ? 1 : (p1 == NULL ? -1 : p_LmCmp(p1, p2)))713 static inline int p_Cmp(poly p1, poly p2, ring r)714 {715 if (p2==NULL)716 return 1;717 if (p1==NULL)718 return -1;719 return p_LmCmp(p1,p2,r);720 }721 700 722 701 static inline unsigned long p_GetMaxExp(const poly p, const ring r) … … 1477 1456 p_MemCmp_LengthGeneral_OrdGeneral(p->exp, q->exp, r->CmpL_Size, r->ordsgn, 1478 1457 return 0, return 1, return -1); 1458 } 1459 1460 1461 1462 /*************************************************************** 1463 * 1464 * Comparisons: they are all done without regarding coeffs 1465 * 1466 ***************************************************************/ 1467 #define p_LmCmpAction(p, q, r, actionE, actionG, actionS) \ 1468 _p_LmCmpAction(p, q, r, actionE, actionG, actionS) 1469 1470 // returns 1 if ExpVector(p)==ExpVector(q): does not compare numbers !! 1471 #define p_LmEqual(p1, p2, r) p_ExpVectorEqual(p1, p2, r) 1472 1473 // pCmp: args may be NULL 1474 // returns: (p2==NULL ? 1 : (p1 == NULL ? -1 : p_LmCmp(p1, p2))) 1475 static inline int p_Cmp(poly p1, poly p2, ring r) 1476 { 1477 if (p2==NULL) 1478 return 1; 1479 if (p1==NULL) 1480 return -1; 1481 return p_LmCmp(p1,p2,r); 1479 1482 } 1480 1483
Note: See TracChangeset
for help on using the changeset viewer.