Changeset b5d4d1 in git
 Timestamp:
 Jun 10, 2009, 5:34:50 PM (14 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
 Children:
 351764983bd71ea77010993df1b11657f12eda1d
 Parents:
 f3f82b18075080a5de27a36d453e93e4980b08d0
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/p_polys.cc
rf3f82b rb5d4d1 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: p_polys.cc,v 1.1 6 20090604 08:32:59Singular Exp $9 * Version: $Id: p_polys.cc,v 1.17 20090610 15:34:50 Singular Exp $ 10 10 *******************************************************************/ 11 11 … … 89 89 int64 ei,wi,ai; 90 90 for(int i=a;i<=e;i++) 91 91 { 92 92 //Print("exp %d w %d \n",p_GetExp(p,i,r),(int)w[ia]); 93 93 //ord+=((int64)p_GetExp(p,i,r))*w[ia]; … … 96 96 ai=ei*wi; 97 97 if(ei!=0 && ai/ei!=wi) 98 98 { 99 99 pSetm_error=TRUE; 100 100 #if SIZEOF_LONG == 4 101 101 Print("ai %lld, wi %lld\n",ai,wi); 102 102 #else 103 103 Print("ai %ld, wi %ld\n",ai,wi); 104 104 #endif 105 105 } 106 106 ord+=ai; 107 107 if (ord<ai) 108 108 { 109 109 pSetm_error=TRUE; 110 110 #if SIZEOF_LONG == 4 111 111 Print("ai %lld, ord %lld\n",ai,ord); 112 112 #else 113 113 Print("ai %ld, ord %ld\n",ai,ord); 114 114 #endif 115 115 } 116 116 } … … 237 237 /* */ 238 238 /* several possibilities for pFDeg: the degree of the head term */ 239 /*2 240 * compute the degree of the leading monomial of p 241 * the ordering is compatible with degree, use a>order 242 */ 243 inline long _pDeg(poly a, const ring r) 239 240 /* comptible with ordering */ 241 long pDeg(poly a, const ring r) 244 242 { 245 243 p_LmCheckPolyRing(a, r); 246 244 assume(p_GetOrder(a, r) == pWTotaldegree(a, r)); 247 245 return p_GetOrder(a, r); 248 }249 250 long pDeg(poly a, const ring r)251 {252 return _pDeg(a, r);253 246 } 254 247 … … 259 252 * the ordering is not compatible with degree so do not use p>Order 260 253 */ 261 inline long _pTotaldegree(poly p, const ring r)254 long pTotaldegree(poly p, const ring r) 262 255 { 263 256 p_LmCheckPolyRing(p, r); 264 257 return (long) p_ExpVectorQuerSum(p, r); 265 }266 long pTotaldegree(poly p, const ring r)267 {268 return (long) _pTotaldegree(p, r);269 258 } 270 259 … … 585 574 long t,max; 586 575 587 max= _pDeg(p, r);576 max=p_GetOrder(p, r); 588 577 if (k > 0) 589 578 { 590 579 while (((p=pNext(p))!=NULL) && (p_GetComp(p, r)==k)) 591 580 { 592 t= _pDeg(p, r);581 t=p_GetOrder(p, r); 593 582 if (t>max) max=t; 594 583 ll++; … … 599 588 while ((p=pNext(p))!=NULL) 600 589 { 601 t= _pDeg(p, r);590 t=p_GetOrder(p, r); 602 591 if (t>max) max=t; 603 592 ll++; … … 615 604 long t,max; 616 605 617 max= _pDeg(p, r);606 max=p_GetOrder(p, r); 618 607 if (rIsSyzIndexRing(r)) 619 608 { … … 623 612 if (p_GetComp(p, r)<=limit) 624 613 { 625 if ((t= _pDeg(p, r))>max) max=t;614 if ((t=p_GetOrder(p, r))>max) max=t; 626 615 ll++; 627 616 } … … 633 622 while ((p=pNext(p))!=NULL) 634 623 { 635 if ((t= _pDeg(p, r))>max) max=t;624 if ((t=p_GetOrder(p, r))>max) max=t; 636 625 ll++; 637 626 } … … 649 638 long t,max; 650 639 651 max= _pTotaldegree(p, r);640 max=p_ExpVectorQuerSum(p, r); 652 641 if (k > 0) 653 642 { 654 643 while (((p=pNext(p))!=NULL) && (p_GetComp(p, r)==k)) 655 644 { 656 t= _pTotaldegree(p, r);645 t=p_ExpVectorQuerSum(p, r); 657 646 if (t>max) max=t; 658 647 ll++; … … 663 652 while ((p=pNext(p))!=NULL) 664 653 { 665 t= _pTotaldegree(p, r);654 t=p_ExpVectorQuerSum(p, r); 666 655 if (t>max) max=t; 667 656 ll++; … … 678 667 long t,max; 679 668 680 max= _pTotaldegree(p, r);669 max=p_ExpVectorQuerSum(p, r); 681 670 if (rIsSyzIndexRing(r)) 682 671 { … … 686 675 if (p_GetComp(p, r)<=limit) 687 676 { 688 if ((t= _pTotaldegree(p, r))>max) max=t;677 if ((t=p_ExpVectorQuerSum(p, r))>max) max=t; 689 678 ll++; 690 679 } … … 696 685 while ((p=pNext(p))!=NULL) 697 686 { 698 if ((t= _pTotaldegree(p, r))>max) max=t;687 if ((t=p_ExpVectorQuerSum(p, r))>max) max=t; 699 688 ll++; 700 689 } … … 749 738 if (p_GetComp(p, r)<=limit) 750 739 { 751 if ((t= _pTotaldegree(p, r))>max) max=t;740 if ((t=p_ExpVectorQuerSum(p, r))>max) max=t; 752 741 ll++; 753 742 } … … 759 748 while ((p=pNext(p))!=NULL) 760 749 { 761 if ((t= _pTotaldegree(p, r))>max) max=t;750 if ((t=p_ExpVectorQuerSum(p, r))>max) max=t; 762 751 ll++; 763 752 }
Note: See TracChangeset
for help on using the changeset viewer.