Changeset b5d4d1 in git


Ignore:
Timestamp:
Jun 10, 2009, 5:34:50 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
Children:
351764983bd71ea77010993df1b11657f12eda1d
Parents:
f3f82b18075080a5de27a36d453e93e4980b08d0
Message:
*hannesd: code cleanup


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

Legend:

Unmodified
Added
Removed
  • kernel/p_polys.cc

    rf3f82b rb5d4d1  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_polys.cc,v 1.16 2009-06-04 08:32:59 Singular Exp $
     9 *  Version: $Id: p_polys.cc,v 1.17 2009-06-10 15:34:50 Singular Exp $
    1010 *******************************************************************/
    1111
     
    8989          int64 ei,wi,ai;
    9090          for(int i=a;i<=e;i++)
    91           {
     91          {
    9292            //Print("exp %d w %d \n",p_GetExp(p,i,r),(int)w[i-a]);
    9393            //ord+=((int64)p_GetExp(p,i,r))*w[i-a];
     
    9696            ai=ei*wi;
    9797            if(ei!=0 && ai/ei!=wi)
    98             {
     98            {
    9999              pSetm_error=TRUE;
    100               #if SIZEOF_LONG == 4
     100              #if SIZEOF_LONG == 4
    101101              Print("ai %lld, wi %lld\n",ai,wi);
    102               #else
     102              #else
    103103              Print("ai %ld, wi %ld\n",ai,wi);
    104               #endif
     104              #endif
    105105            }
    106106            ord+=ai;
    107107            if (ord<ai)
    108             {
     108            {
    109109              pSetm_error=TRUE;
    110               #if SIZEOF_LONG == 4
     110              #if SIZEOF_LONG == 4
    111111              Print("ai %lld, ord %lld\n",ai,ord);
    112               #else
     112              #else
    113113              Print("ai %ld, ord %ld\n",ai,ord);
    114               #endif
     114              #endif
    115115            }
    116116          }
     
    237237/* -------------------------------------------------------------------*/
    238238/* several possibilities for pFDeg: the degree of the head term       */
    239 /*2
    240 * compute the degree of the leading monomial of p
    241 * the ordering is compatible with degree, use a->order
    242 */
    243 inline long _pDeg(poly a, const ring r)
     239
     240/* comptible with ordering */
     241long pDeg(poly a, const ring r)
    244242{
    245243  p_LmCheckPolyRing(a, r);
    246244  assume(p_GetOrder(a, r) == pWTotaldegree(a, r));
    247245  return p_GetOrder(a, r);
    248 }
    249 
    250 long pDeg(poly a, const ring r)
    251 {
    252   return _pDeg(a, r);
    253246}
    254247
     
    259252* the ordering is not compatible with degree so do not use p->Order
    260253*/
    261 inline long _pTotaldegree(poly p, const ring r)
     254long pTotaldegree(poly p, const ring r)
    262255{
    263256  p_LmCheckPolyRing(p, r);
    264257  return (long) p_ExpVectorQuerSum(p, r);
    265 }
    266 long pTotaldegree(poly p, const ring r)
    267 {
    268   return (long) _pTotaldegree(p, r);
    269258}
    270259
     
    585574  long  t,max;
    586575
    587   max=_pDeg(p, r);
     576  max=p_GetOrder(p, r);
    588577  if (k > 0)
    589578  {
    590579    while (((p=pNext(p))!=NULL) && (p_GetComp(p, r)==k))
    591580    {
    592       t=_pDeg(p, r);
     581      t=p_GetOrder(p, r);
    593582      if (t>max) max=t;
    594583      ll++;
     
    599588    while ((p=pNext(p))!=NULL)
    600589    {
    601       t=_pDeg(p, r);
     590      t=p_GetOrder(p, r);
    602591      if (t>max) max=t;
    603592      ll++;
     
    615604  long  t,max;
    616605
    617   max=_pDeg(p, r);
     606  max=p_GetOrder(p, r);
    618607  if (rIsSyzIndexRing(r))
    619608  {
     
    623612      if (p_GetComp(p, r)<=limit)
    624613      {
    625         if ((t=_pDeg(p, r))>max) max=t;
     614        if ((t=p_GetOrder(p, r))>max) max=t;
    626615        ll++;
    627616      }
     
    633622    while ((p=pNext(p))!=NULL)
    634623    {
    635       if ((t=_pDeg(p, r))>max) max=t;
     624      if ((t=p_GetOrder(p, r))>max) max=t;
    636625      ll++;
    637626    }
     
    649638  long  t,max;
    650639
    651   max=_pTotaldegree(p, r);
     640  max=p_ExpVectorQuerSum(p, r);
    652641  if (k > 0)
    653642  {
    654643    while (((p=pNext(p))!=NULL) && (p_GetComp(p, r)==k))
    655644    {
    656       t=_pTotaldegree(p, r);
     645      t=p_ExpVectorQuerSum(p, r);
    657646      if (t>max) max=t;
    658647      ll++;
     
    663652    while ((p=pNext(p))!=NULL)
    664653    {
    665       t=_pTotaldegree(p, r);
     654      t=p_ExpVectorQuerSum(p, r);
    666655      if (t>max) max=t;
    667656      ll++;
     
    678667  long  t,max;
    679668
    680   max=_pTotaldegree(p, r);
     669  max=p_ExpVectorQuerSum(p, r);
    681670  if (rIsSyzIndexRing(r))
    682671  {
     
    686675      if (p_GetComp(p, r)<=limit)
    687676      {
    688         if ((t=_pTotaldegree(p, r))>max) max=t;
     677        if ((t=p_ExpVectorQuerSum(p, r))>max) max=t;
    689678        ll++;
    690679      }
     
    696685    while ((p=pNext(p))!=NULL)
    697686    {
    698       if ((t=_pTotaldegree(p, r))>max) max=t;
     687      if ((t=p_ExpVectorQuerSum(p, r))>max) max=t;
    699688      ll++;
    700689    }
     
    749738      if (p_GetComp(p, r)<=limit)
    750739      {
    751         if ((t=_pTotaldegree(p, r))>max) max=t;
     740        if ((t=p_ExpVectorQuerSum(p, r))>max) max=t;
    752741        ll++;
    753742      }
     
    759748    while ((p=pNext(p))!=NULL)
    760749    {
    761       if ((t=_pTotaldegree(p, r))>max) max=t;
     750      if ((t=p_ExpVectorQuerSum(p, r))>max) max=t;
    762751      ll++;
    763752    }
Note: See TracChangeset for help on using the changeset viewer.