Changeset 359d86d in git


Ignore:
Timestamp:
Jul 20, 2011, 6:22:55 PM (12 years ago)
Author:
mlee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
eaae7da539e9a22d6276d70ef09c436adadfeaba
Parents:
f69c6c699905fd079f239622d07125dfb15c8b09
git-author:
mlee <martinlee84@web.de>2011-07-20 18:22:55+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:52:44+01:00
Message:
moved p_Last from kpolys.cc to kInline.h
moved pLast(poly,int), pLast (poly) declaration from polys/monomials/p_polys.h
to kInline.h
added missing ->cf in kInline.h
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/kInline.h

    rf69c6c r359d86d  
    3333// #define HAVE_LM_BIN
    3434
     35/*2
     36* returns the length of a (numbers of monomials)
     37* respect syzComp
     38*/
     39poly 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
     79static inline poly pLast(poly a, int &length) { return p_Last (a, length, currRing); }
     80static inline poly pLast(poly a) { int l; return pLast(a, l); }
     81
    3582
    3683KINLINE TObject* skStrategy::S_2_T(int i)
     
    396443KINLINE long sTObject::pFDeg() const
    397444{
    398   if (p != NULL) return ::pFDeg(p, currRing);
     445  if (p != NULL) return p_FDeg(p, currRing);
    399446  return tailRing->pFDeg(t_p, tailRing);
    400447}
     
    10821129  if (!ret)
    10831130  {
    1084     if (! n_IsOne(coef, currRing))
     1131    if (! n_IsOne(coef, currRing->cf))
    10851132    {
    10861133      PR->Mult_nn(coef);
    10871134      // HANNES: mark for Normalize
    10881135    }
    1089     n_Delete(&coef, currRing);
     1136    n_Delete(&coef, currRing->cf);
    10901137  }
    10911138  return ret;
  • kernel/kpolys.cc

    rf69c6c r359d86d  
    115115}
    116116#endif
    117 /*2
    118 * returns the length of a (numbers of monomials)
    119 * respect syzComp
    120 */
    121 poly p_Last(poly a, int &l, const ring r)
    122 {
    123   if (a == NULL)
    124   {
    125     l = 0;
    126     return NULL;
    127   }
    128   l = 1;
    129   if (! rIsSyzIndexRing(r))
    130   {
    131     while (pNext(a)!=NULL)
    132     {
    133       pIter(a);
    134       l++;
    135     }
    136   }
    137   else
    138   {
    139     int curr_limit = rGetCurrSyzLimit(r);
    140     poly pp = a;
    141     while ((a=pNext(a))!=NULL)
    142     {
    143       if (p_GetComp(a,r)<=curr_limit/*syzComp*/)
    144         l++;
    145       else break;
    146       pp = a;
    147     }
    148     a=pp;
    149   }
    150   return a;
    151 }
     117
  • libpolys/polys/monomials/p_polys.h

    rf69c6c r359d86d  
    349349
    350350static inline long p_MinComp(poly p,ring lmRing) {return p_MinComp(p,lmRing,lmRing);}
    351 
    352 /***************************************************************
    353  *
    354  * poly things which are independent of ring
    355  *
    356  ***************************************************************/
    357 
    358 // returns the length of a polynomial (numbers of monomials)
    359 // respect syzComp
    360 // static inline poly pLast(poly a, int &length);
    361 // static inline poly pLast(poly a) { int l; return pLast(a, l); }
    362351
    363352
Note: See TracChangeset for help on using the changeset viewer.