Changeset 1fdb6e in git


Ignore:
Timestamp:
Jul 20, 2011, 7:49:52 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
a778e6518804aecf7bb83784c8936b0868f52943
Parents:
eaae7da539e9a22d6276d70ef09c436adadfeaba
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-07-20 19:49:52+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:52:45+01:00
Message:
move code (p_Last) to p_polys.cc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/kInline.h

    reaae7d r1fdb6e  
    3333// #define HAVE_LM_BIN
    3434
    35 /*2
    36 * returns the length of a (numbers of monomials)
    37 * respect syzComp
    38 */
    39 poly p_Last(poly a, int &l, const ring r)
    40 {
    41   if (a == NULL)
    42   {
    43     l = 0;
    44     return NULL;
    45   }
    46   l = 1;
    47   if (! rIsSyzIndexRing(r))
    48   {
    49     while (pNext(a)!=NULL)
    50     {
    51       pIter(a);
    52       l++;
    53     }
    54   }
    55   else
    56   {
    57     int curr_limit = rGetCurrSyzLimit(r);
    58     poly pp = a;
    59     while ((a=pNext(a))!=NULL)
    60     {
    61       if (p_GetComp(a,r)<=curr_limit/*syzComp*/)
    62         l++;
    63       else break;
    64       pp = a;
    65     }
    66     a=pp;
    67   }
    68   return a;
    69 }
    70 
    71 /***************************************************************
    72  *
    73  * poly things which are independent of ring
    74  *
    75  ***************************************************************/
    76 
    77 // returns the length of a polynomial (numbers of monomials)
    78 // respect syzComp
    79 static inline poly pLast(poly a, int &length) { return p_Last (a, length, currRing); }
    80 static inline poly pLast(poly a) { int l; return pLast(a, l); }
    8135
    8236
  • libpolys/polys/monomials/p_polys.cc

    reaae7d r1fdb6e  
    37623762}
    37633763
     3764/*2
     3765* returns the length of a (numbers of monomials)
     3766* respect syzComp
     3767*/
     3768poly p_Last(poly a, int &l, const ring r)
     3769{
     3770  if (a == NULL)
     3771  {
     3772    l = 0;
     3773    return NULL;
     3774  }
     3775  l = 1;
     3776  if (! rIsSyzIndexRing(r))
     3777  {
     3778    while (pNext(a)!=NULL)
     3779    {
     3780      pIter(a);
     3781      l++;
     3782    }
     3783  }
     3784  else
     3785  {
     3786    int curr_limit = rGetCurrSyzLimit(r);
     3787    poly pp = a;
     3788    while ((a=pNext(a))!=NULL)
     3789    {
     3790      if (p_GetComp(a,r)<=curr_limit/*syzComp*/)
     3791        l++;
     3792      else break;
     3793      pp = a;
     3794    }
     3795    a=pp;
     3796  }
     3797  return a;
     3798}
    37643799
    37653800/***************************************************************
  • libpolys/polys/monomials/p_polys.h

    reaae7d r1fdb6e  
    19221922int   p_Var(poly mi,const ring r);
    19231923
    1924 
     1924/*----------------------------------------------------*/
     1925// returns the length of a polynomial (numbers of monomials) and the last mon.
     1926// respect syzComp
     1927poly p_Last(poly a, int &l, const ring r);
    19251928#endif // P_POLYS_H
    19261929
  • libpolys/polys/polys.h

    reaae7d r1fdb6e  
    348348
    349349
     350// returns the length of a polynomial (numbers of monomials)
     351// respect syzComp
     352static inline poly pLast(poly a, int &length) { return p_Last (a, length, currRing); }
     353static inline poly pLast(poly a) { int l; return pLast(a, l); }
    350354
    351355/***************************************************************
Note: See TracChangeset for help on using the changeset viewer.