Changeset ba0fc3 in git
- Timestamp:
- Mar 22, 2011, 10:36:05 AM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- 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
- Location:
- libpolys/polys
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/p_polys.cc
rf550e86 rba0fc3 518 518 } 519 519 return j; 520 } 521 522 long 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; 520 533 } 521 534 … … 3428 3441 } 3429 3442 3443 /*************************************************************/ 3444 int 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 3430 3464 /*************************************************************** 3431 3465 * -
libpolys/polys/monomials/p_polys.h
rf550e86 rba0fc3 180 180 static inline unsigned long p_GetTotalDegree(const unsigned long l, const ring r, const int number_of_exps); 181 181 182 int p_MinDeg(poly p,intvec *w, const ring R); 183 184 long p_DegW(poly p, const short *w, const ring R); 185 182 186 183 187 // like the respective p_LmIs* routines, except that p might be empty -
libpolys/polys/polys.h
rf550e86 rba0fc3 317 317 #define pNorm(p) p_Norm(p,currRing) 318 318 #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) 324 324 poly pSeries(int n,poly p,poly u=NULL,intvec *w=NULL); 325 325 poly pInvers(int n, poly p,intvec *w=NULL); 326 326 // maximum weigthed degree of all monomials of p, w is indexed from 327 327 // 1..pVariables 328 long pDegW(poly p, const short *w); 328 #define pDegW(p,w) p_DegW(p,w,currRing) 329 329 330 330 /*-----------type conversions ----------------------------*/ -
libpolys/polys/polys1.cc
rf550e86 rba0fc3 32 32 #endif 33 33 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 else47 d0+=(*w)[j]*pGetExp(p,j+1);48 if(d0<d||d==-1)49 d=d0;50 pIter(p);51 }52 return d;53 }54 34 55 35 poly pSeries(int n,poly p,poly u, intvec *w) … … 90 70 omFreeSize((ADDRESS)ww,(pVariables+1)*sizeof(short)); 91 71 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;105 72 } 106 73
Note: See TracChangeset
for help on using the changeset viewer.