Changeset 2c872b in git


Ignore:
Timestamp:
Oct 11, 2010, 12:20:08 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
aea40759739b334553cb320189732f1de02b87cd
Parents:
0b6a83add40d1bd5dc62559eddd3e9d6b4586af6
Message:
improve sortvec/idSort

git-svn-id: file:///usr/local/Singular/svn/trunk@13444 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r0b6a83a r2c872b  
    413413  if (a==NULL) return -1;
    414414
    415   if (nolex) return pLmCmp(a,b);
     415  if (nolex)
     416  {
     417    int r=pLmCmp(a,b);
     418    if (r!=0) return r;
     419    number h=nSub(pGetCoeff(a),pGetCoeff(b));
     420    r = -1+nIsZero(h)+2*nGreaterZero(h); /* -1: <, 0:==, 1: > */
     421    nDelete(&h);
     422    return r;
     423  }
    416424  int l=pVariables;
    417425  while ((l>0) && (pGetExp(a,l)==pGetExp(b,l))) l--;
    418426  if (l==0)
    419427  {
    420     if (pGetComp(a)==pGetComp(b)) return 0;
     428    if (pGetComp(a)==pGetComp(b))
     429    {
     430      int r;
     431      number h=nSub(pGetCoeff(a),pGetCoeff(b));
     432      r = -1+nIsZero(h)+2*nGreaterZero(h); /* -1: <, 0:==, 1: > */
     433      nDelete(&h);
     434      return r;
     435    }
    421436    if (pGetComp(a)>pGetComp(b)) return 1;
    422437  }
Note: See TracChangeset for help on using the changeset viewer.