Changeset c462b55 in git for libpolys/polys/monomials


Ignore:
Timestamp:
Mar 22, 2011, 11:04:13 AM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
494884581702ad06eefdf632a5e1abb42bd90f4d
Parents:
ba0fc3d4dcb089fc5523e7af222a8f52d7cb44b8
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-03-22 11:04:13+01:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:04:09+01:00
Message:
 p_MinComp, p_MaxComp
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.h

    rba0fc3 rc462b55  
    332332static inline   void p_SetCompP(poly a, int i, ring r);
    333333static inline   void p_SetCompP(poly a, int i, ring lmRing, ring tailRing);
    334 static inline   long p_MaxComp(poly p, ring lmRing, ring tailRing);
    335 inline long p_MaxComp(poly p,ring lmRing) {return p_MaxComp(p,lmRing,lmRing);}
    336 static inline   long p_MinComp(poly p, ring lmRing, ring tailRing);
    337 inline long p_MinComp(poly p,ring lmRing) {return p_MinComp(p,lmRing,lmRing);}
     334
     335// returns maximal column number in the modul element a (or 0)
     336static inline long p_MaxComp(poly p, ring lmRing, ring tailRing)
     337{
     338  long result,i;
     339
     340  if(p==NULL) return 0;
     341  result = p_GetComp(p, lmRing);
     342  if (result != 0)
     343  {
     344    loop
     345    {
     346      pIter(p);
     347      if(p==NULL) break;
     348      i = p_GetComp(p, tailRing);
     349      if (i>result) result = i;
     350    }
     351  }
     352  return result;
     353}
     354
     355static inline long p_MaxComp(poly p,ring lmRing) {return p_MaxComp(p,lmRing,lmRing);}
     356
     357static inline   long p_MinComp(poly p, ring lmRing, ring tailRing)
     358{
     359  long result,i;
     360
     361  if(p==NULL) return 0;
     362  result = p_GetComp(p,lmRing);
     363  if (result != 0)
     364  {
     365    loop
     366    {
     367      pIter(p);
     368      if(p==NULL) break;
     369      i = p_GetComp(p,tailRing);
     370      if (i<result) result = i;
     371    }
     372  }
     373  return result;
     374}
     375
     376static inline long p_MinComp(poly p,ring lmRing) {return p_MinComp(p,lmRing,lmRing);}
    338377
    339378/***************************************************************
Note: See TracChangeset for help on using the changeset viewer.