Changeset 99bdcf in git


Ignore:
Timestamp:
Aug 3, 2010, 7:25:10 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
9053a74f3bbb046a786d061474c8bd82302c42c3
Parents:
11ca48d1c9122a424d601a3ee5e6544661d36ee2
Message:
pTotaldegree/p_Totaldegree

git-svn-id: file:///usr/local/Singular/svn/trunk@13084 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r11ca48 r99bdcf  
    24562456  pFDegProc deg;
    24572457  if (pLexOrder && (currRing->order[0]==ringorder_lp))
    2458     deg=pTotaldegree;
     2458    deg=p_Totaldegree;
    24592459   else
    24602460    deg=pFDeg;
  • Singular/janet.cc

    r11ca48 r99bdcf  
    955955  {
    956956    degree_compatible=0;
    957     jDeg=pTotaldegree;
     957    jDeg=p_Totaldegree;
    958958    ListGreatMove=ListGreatMoveOrder;
    959959  }
  • doc/C-STYLEGUIDE

    r11ca48 r99bdcf  
    134134    if you really need C++ extensions, use "class".
    135135  - "and"/"or"/"not" are not recognized by all compilers, use &&, &, ||, |, !
    136   - TODO: What about namespaces!?
    137 
    138   ? Classes - with starts capital letter (better no "C" at the beginning)
    139     and Camel style further (no "_")
    140   ? member Methods - small letters with "_"
    141   ? member Variables - start with "m_" or "_" and Camel style further
  • kernel/clapsing.cc

    r11ca48 r99bdcf  
    710710  pTest(f);
    711711#ifdef FACTORIZE2_DEBUG
    712   printf("singclap_factorize, degree %d\n",pTotaldegree(f));
     712  printf("singclap_factorize, degree %ld\n",pTotaldegree(f));
    713713#endif
    714714  // with_exps: 3,1 return only true factors, no exponents
  • kernel/fast_maps.cc

    r11ca48 r99bdcf  
    673673  if(ggT!=NULL)
    674674  {
    675     int dq =pTotaldegree(fq_p,r);
     675    int dq =p_Totaldegree(fq_p,r);
    676676    if (dq!=0)
    677677    {
  • kernel/ideals.cc

    r11ca48 r99bdcf  
    31583158  pFDegProc d;
    31593159  if (pLexOrder && (currRing->order[0]==ringorder_lp))
    3160      d=pTotaldegree;
     3160     d=p_Totaldegree;
    31613161  else
    31623162     d=pFDeg;
  • kernel/kInline.cc

    r11ca48 r99bdcf  
    392392KINLINE long sTObject::pTotalDeg() const
    393393{
    394   if (p != NULL) return pTotaldegree(p, currRing);
    395   return pTotaldegree(t_p,tailRing);
     394  if (p != NULL) return p_Totaldegree(p, currRing);
     395  return p_Totaldegree(t_p,tailRing);
    396396}
    397397KINLINE long sTObject::SetpFDeg()
  • kernel/khstd.cc

    r11ca48 r99bdcf  
    7070    // if weights for variables were given to std computations,
    7171    // then pFDeg == degp == kHomModDeg (see kStd)
    72     if ((degp!=kModDeg) && (degp!=kHomModDeg)) degp=pTotaldegree;
     72    if ((degp!=kModDeg) && (degp!=kHomModDeg)) degp=p_Totaldegree;
    7373    // degp = pWDegree;
    7474    l = hilb->length()-1;
  • kernel/longalg.cc

    r11ca48 r99bdcf  
    178178#define napComp(p,q)     p_LmCmp((poly)p,(poly)q, nacRing)
    179179#define napMultT(A,E)    A=(napoly)p_Mult_mm((poly)A,(poly)E,nacRing)
    180 #define napDeg(p)        (int)p_ExpVectorQuerSum(p, nacRing)
     180#define napDeg(p)        (int)p_Totaldegree(p, nacRing)
    181181
    182182/*3
  • kernel/pInline1.h

    r11ca48 r99bdcf  
    290290}
    291291
    292 PINLINE1 unsigned long p_ExpVectorQuerSum(poly p, const ring r)
     292PINLINE1 long p_Totaldegree(poly p, const ring r)
    293293{
    294294  p_LmCheckPolyRing1(p, r);
     
    300300    s += p_GetTotalDegree(p->exp[r->VarL_Offset[i]], r);
    301301  }
    302   return s;
     302  return (long)s;
    303303}
    304304
  • kernel/p_polys.cc

    r11ca48 r99bdcf  
    356356{
    357357  p_LmCheckPolyRing(p, r);
    358   p->exp[r->pOrdIndex] = p_ExpVectorQuerSum(p, r);
     358  p->exp[r->pOrdIndex] = p_Totaldegree(p, r);
    359359}
    360360
     
    398398  assume(p_GetOrder(a, r) == pWTotaldegree(a, r));
    399399  return p_GetOrder(a, r);
    400 }
    401 
    402 /*2
    403 * compute the degree of the leading monomial of p
    404 * with respect to weigths 1
    405 * (all are 1 so save multiplications or they are of different signs)
    406 * the ordering is not compatible with degree so do not use p->Order
    407 */
    408 long pTotaldegree(poly p, const ring r)
    409 {
    410   p_LmCheckPolyRing(p, r);
    411   return (long)p_ExpVectorQuerSum(p, r);
    412400}
    413401
     
    524512long pWDegree(poly p, const ring r)
    525513{
    526   if (r->firstwv==NULL) return pTotaldegree(p, r);
     514  if (r->firstwv==NULL) return p_Totaldegree(p, r);
    527515  p_LmCheckPolyRing(p, r);
    528516  int i, k;
     
    794782  long  t,max;
    795783
    796   max=p_ExpVectorQuerSum(p, r);
     784  max=p_Totaldegree(p, r);
    797785  if (k > 0)
    798786  {
    799787    while (((p=pNext(p))!=NULL) && (p_GetComp(p, r)==k))
    800788    {
    801       t=p_ExpVectorQuerSum(p, r);
     789      t=p_Totaldegree(p, r);
    802790      if (t>max) max=t;
    803791      ll++;
     
    808796    while ((p=pNext(p))!=NULL)
    809797    {
    810       t=p_ExpVectorQuerSum(p, r);
     798      t=p_Totaldegree(p, r);
    811799      if (t>max) max=t;
    812800      ll++;
     
    823811  long  t,max;
    824812
    825   max=p_ExpVectorQuerSum(p, r);
     813  max=p_Totaldegree(p, r);
    826814  if (rIsSyzIndexRing(r))
    827815  {
     
    831819      if (p_GetComp(p, r)<=limit)
    832820      {
    833         if ((t=p_ExpVectorQuerSum(p, r))>max) max=t;
     821        if ((t=p_Totaldegree(p, r))>max) max=t;
    834822        ll++;
    835823      }
     
    841829    while ((p=pNext(p))!=NULL)
    842830    {
    843       if ((t=p_ExpVectorQuerSum(p, r))>max) max=t;
     831      if ((t=p_Totaldegree(p, r))>max) max=t;
    844832      ll++;
    845833    }
     
    894882      if (p_GetComp(p, r)<=limit)
    895883      {
    896         if ((t=p_ExpVectorQuerSum(p, r))>max) max=t;
     884        if ((t=p_Totaldegree(p, r))>max) max=t;
    897885        ll++;
    898886      }
     
    904892    while ((p=pNext(p))!=NULL)
    905893    {
    906       if ((t=p_ExpVectorQuerSum(p, r))>max) max=t;
     894      if ((t=p_Totaldegree(p, r))>max) max=t;
    907895      ll++;
    908896    }
  • kernel/p_polys.h

    r11ca48 r99bdcf  
    130130PINLINE1 BOOLEAN p_ExpVectorEqual(poly p1, poly p2, ring r);
    131131// returns sum of all exponents of p
    132 PINLINE1 unsigned long p_ExpVectorQuerSum(poly p, ring r);
     132PINLINE1 long p_Totaldegree(poly p, ring r);
    133133
    134134PINLINE1 void p_GetExpV(poly p, int *ev, ring r);
     
    378378int  pWeight(int i, ring r);
    379379long pDeg(poly p, ring r);
    380 long pTotaldegree(poly p, ring r);
    381380long pWFirstTotalDegree(poly p, ring r);
    382381long pWTotaldegree(poly p, ring r);
  • kernel/polys.cc

    r11ca48 r99bdcf  
    312312  pFDegProc deg;
    313313  if (pLexOrder && (currRing->order[0]==ringorder_lp))
    314     deg=pTotaldegree;
     314    deg=p_Totaldegree;
    315315  else
    316316    deg=pFDeg;
  • kernel/polys.h

    r11ca48 r99bdcf  
    120120#define pExpVectorDiff(pr, p1, p2)  p_ExpVectorDiff(pr, p1, p2, currRing)
    121121#define pExpVectorEqual(p1, p2)     p_ExpVectorEqual(p1, p2, currRing)
    122 #define pExpVectorQuerSum(p)        p_ExpVectorQuerSum(p, currRing)
    123122
    124123// Gets a copy of (resp. set) the exponent vector, where e is assumed
     
    291290int  pWeight(int c, const ring r = currRing);
    292291long pDeg(poly p,const ring r = currRing);
    293 long pTotaldegree(poly p,const ring r = currRing);
     292static inline long pTotaldegree(poly p) { return p_Totaldegree(p,currRing); }
    294293long pWTotaldegree(poly p,const ring r = currRing);
    295294long pWDegree(poly p,const ring r = currRing);
  • kernel/polys1.cc

    r11ca48 r99bdcf  
    11941194  pFDegProc d;
    11951195  if (pLexOrder && (currRing->order[0]==ringorder_lp))
    1196     d=pTotaldegree;
     1196    d=p_Totaldegree;
    11971197  else
    11981198    d=pFDeg;
     
    15691569  while (p!=NULL)
    15701570  {
    1571     if (pTotaldegree(p)<=m)
     1571    if (p_Totaldegree(p,currRing)<=m)
    15721572    {
    15731573      if (r==NULL)
     
    15941594  poly t=NULL;
    15951595
    1596   while((p!=NULL) && (pTotaldegree(p)>m)) pLmDelete(&p);
     1596  while((p!=NULL) && (p_Totaldegree(p,currRing)>m)) pLmDelete(&p);
    15971597  if (p==NULL) return NULL;
    15981598  poly r=p;
    15991599  while (pNext(p)!=NULL)
    16001600  {
    1601     if (pTotaldegree(pNext(p))>m)
     1601    if (p_Totaldegree(pNext(p),currRing)>m)
    16021602    {
    16031603      pLmDelete(&pNext(p));
  • kernel/ring.cc

    r11ca48 r99bdcf  
    32173217      r->pLDeg = pLDeg1c_Deg;
    32183218  }
    3219   else if (r->pFDeg == pTotaldegree)
     3219  else if (r->pFDeg == p_Totaldegree)
    32203220  {
    32213221    if (r->pLDeg == pLDeg1)
     
    32513251  r->MixedOrder = FALSE;
    32523252  r->ComponentOrder = 1;
    3253   r->pFDeg = pTotaldegree;
     3253  r->pFDeg = p_Totaldegree;
    32543254  r->pLDeg = (r->OrdSgn == 1 ? pLDegb : pLDeg0);
    32553255
     
    32763276      r->LexOrder=TRUE;
    32773277      r->pLDeg = pLDeg1c;
    3278       r->pFDeg = pTotaldegree;
     3278      r->pFDeg = p_Totaldegree;
    32793279    }
    32803280    if ((order[0] == ringorder_a)
     
    33053305      r->LexOrder=TRUE;
    33063306      r->pLDeg = pLDeg1c;
    3307       r->pFDeg = pTotaldegree;
     3307      r->pFDeg = p_Totaldegree;
    33083308    }
    33093309    r->firstBlockEnds=block1[1];
     
    33473347      r->pLDeg = pLDeg1;
    33483348    }
    3349     r->pFDeg = pWTotaldegree; // may be improved: pTotaldegree for lp/dp/ls/.. blocks
     3349    r->pFDeg = pWTotaldegree; // may be improved: p_Totaldegree for lp/dp/ls/.. blocks
    33503350  }
    33513351  if (rOrd_is_Totaldegree_Ordering(r) || rOrd_is_WeightedDegree_Ordering(r))
  • kernel/tgb_internal.h

    r11ca48 r99bdcf  
    273273  {
    274274      pTest(p);
    275       //assume(pDeg(p,r)==::pTotaldegree(p,r));
    276       assume(((unsigned long)::pTotaldegree(p,r))==p->exp[deg_pos]);
     275      //assume(pDeg(p,r)==::p_Totaldegree(p,r));
     276      assume(((unsigned long)::p_Totaldegree(p,r))==p->exp[deg_pos]);
    277277      return p->exp[deg_pos];
    278278      //return ::pTotaldegree(p,this->r);
  • kernel/walkSupport.cc

    r11ca48 r99bdcf  
    3535{
    3636  int res=0;
    37   if(p!=NULL) res=pTotaldegree(p, currRing);
     37  if(p!=NULL) res=pTotaldegree(p);
    3838  return(res);
    3939}
     
    5959    if ((I->m)[j]!=NULL)
    6060    {
    61       int temp=pTotaldegree((I->m)[j], currRing);
     61      int temp=pTotaldegree((I->m)[j]);
    6262      if(temp>res) {res=temp;}
    6363    }
Note: See TracChangeset for help on using the changeset viewer.