Changeset bb6c8a in git


Ignore:
Timestamp:
Mar 30, 2011, 4:57:03 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
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
Message:
FIX: poly-cmp procedures should be in a correct order
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.h

    r5948a8 rbb6c8a  
    3939#define __p_GetComp(p, r)   (p)->exp[r->pCompIndex]
    4040#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 coeffs
    45  *
    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)
    5241
    5342/***************************************************************
     
    709698 ***************************************************************/
    710699
    711 // pCmp: args may be NULL
    712 // 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 }
    721700
    722701static inline unsigned long p_GetMaxExp(const poly p, const ring r)
     
    14771456  p_MemCmp_LengthGeneral_OrdGeneral(p->exp, q->exp, r->CmpL_Size, r->ordsgn,
    14781457                                    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)))
     1475static 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);
    14791482}
    14801483
Note: See TracChangeset for help on using the changeset viewer.