Changeset ba0fc3 in git


Ignore:
Timestamp:
Mar 22, 2011, 10:36:05 AM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '45e267b9942dec9429fe249ce3e5e44ab80a6a3a')
Children:
c462b558d2bcc56ce39d2181b2f9d9cd1b82345b
Parents:
f550e863b5113c076c1fa29a44f2bde2146f14cf
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-03-22 10:36:05+01:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:04:09+01:00
Message:
p_MinDeg, p_DegW -> p_polys.cc
Location:
libpolys/polys
Files:
4 edited

Legend:

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

    rf550e86 rba0fc3  
    518518  }
    519519  return  j;
     520}
     521
     522long p_DegW(poly p, const short *w, const ring R)
     523{
     524  long r=~0L;
     525
     526  while (p!=NULL)
     527  {
     528    long t=totaldegreeWecart_IV(p,R,w);
     529    if (t>r) r=t;
     530    pIter(p);
     531  }
     532  return r;
    520533}
    521534
     
    34283441}
    34293442
     3443/*************************************************************/
     3444int p_MinDeg(poly p,intvec *w, const ring R)
     3445{
     3446  if(p==NULL)
     3447    return -1;
     3448  int d=-1;
     3449  while(p!=NULL)
     3450  {
     3451    int d0=0;
     3452    for(int j=0;j<rVar(R);j++)
     3453      if(w==NULL||j>=w->length())
     3454        d0+=p_GetExp(p,j+1,R);
     3455      else
     3456        d0+=(*w)[j]*p_GetExp(p,j+1,R);
     3457    if(d0<d||d==-1)
     3458      d=d0;
     3459    pIter(p);
     3460  }
     3461  return d;
     3462}
     3463
    34303464/***************************************************************
    34313465 *
  • libpolys/polys/monomials/p_polys.h

    rf550e86 rba0fc3  
    180180static inline unsigned long p_GetTotalDegree(const unsigned long l, const ring r, const int number_of_exps);
    181181
     182int p_MinDeg(poly p,intvec *w, const ring R);
     183
     184long p_DegW(poly p, const short *w, const ring R);
     185
    182186
    183187// like the respective p_LmIs* routines, except that p might be empty
  • libpolys/polys/polys.h

    rf550e86 rba0fc3  
    317317#define   pNorm(p) p_Norm(p,currRing)
    318318#define   pSubst(p,n,e) p_Subst(p,n.e,currRing)
    319 poly      ppJet(poly p, int m);
    320 poly      pJet(poly p, int m);
    321 poly      ppJetW(poly p, int m, short * iv);
    322 poly      pJetW(poly p, int m, short * iv);
    323 int pMinDeg(poly p,intvec *w=NULL);
     319#define   ppJet(p,m) pp_Jet(p,m,currRing)
     320#define   pJet(p,m)  p_Jet(p,m,currRing)
     321#define   ppJetW(p,m,iv) pp_JetW(p,m,iv,currRing)
     322#define   pJetW(p,m,iv) p_JetW(p,m,iv,currRing)
     323#define   pMinDeg(p,w) p_MinDeg(p,w,currRing)
    324324poly      pSeries(int n,poly p,poly u=NULL,intvec *w=NULL);
    325325poly      pInvers(int n, poly p,intvec *w=NULL);
    326326// maximum weigthed degree of all monomials of p, w is indexed from
    327327// 1..pVariables
    328 long      pDegW(poly p, const short *w);
     328#define    pDegW(p,w) p_DegW(p,w,currRing)
    329329
    330330/*-----------type conversions ----------------------------*/
  • libpolys/polys/polys1.cc

    rf550e86 rba0fc3  
    3232#endif
    3333
    34 
    35 int pMinDeg(poly p,intvec *w)
    36 {
    37   if(p==NULL)
    38     return -1;
    39   int d=-1;
    40   while(p!=NULL)
    41   {
    42     int d0=0;
    43     for(int j=0;j<pVariables;j++)
    44       if(w==NULL||j>=w->length())
    45         d0+=pGetExp(p,j+1);
    46       else
    47         d0+=(*w)[j]*pGetExp(p,j+1);
    48     if(d0<d||d==-1)
    49       d=d0;
    50     pIter(p);
    51   }
    52   return d;
    53 }
    5434
    5535poly pSeries(int n,poly p,poly u, intvec *w)
     
    9070  omFreeSize((ADDRESS)ww,(pVariables+1)*sizeof(short));
    9171  return v;
    92 }
    93 
    94 long pDegW(poly p, const short *w)
    95 {
    96   long r=-LONG_MAX;
    97 
    98   while (p!=NULL)
    99   {
    100     long t=totaldegreeWecart_IV(p,currRing,w);
    101     if (t>r) r=t;
    102     pIter(p);
    103   }
    104   return r;
    10572}
    10673
Note: See TracChangeset for help on using the changeset viewer.