Changeset 391323 in git
- Timestamp:
- Oct 12, 2006, 10:55:42 AM (17 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 200e7290fa530efe0851712fa9c959236d73cb35
- Parents:
- 8fc1b4d51d3b74816a22e5b09d2875ca81a5c44d
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kstd1.cc
r8fc1b4d r391323 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd1.cc,v 1.1 2 2006-10-05 18:26:09 Singular Exp $ */4 /* $Id: kstd1.cc,v 1.13 2006-10-12 08:55:39 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 295 295 if (at <= strat->Ll) 296 296 { 297 if (kFindDivisibleByInS(strat, h) < 0) 297 int dummy=strat->sl; 298 if (kFindDivisibleByInS(strat, &dummy, h) < 0) 298 299 { 299 300 if (strat->honey && !strat->posInLDependsOnLength) … … 416 417 if (at <= strat->Ll) 417 418 { 418 if (kFindDivisibleByInS(strat, h) < 0) 419 int dummy=strat->sl; 420 if (kFindDivisibleByInS(strat,&dummy, h) < 0) 419 421 return 1; 420 422 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); -
kernel/kstd2.cc
r8fc1b4d r391323 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd2.cc,v 1.2 1 2006-10-05 18:26:10 Singular Exp $ */4 /* $Id: kstd2.cc,v 1.22 2006-10-12 08:55:40 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: alg. of Buchberger … … 81 81 82 82 // same as above, only with set S 83 int kFindDivisibleByInS(const kStrategy strat, LObject* L)83 int kFindDivisibleByInS(const kStrategy strat, int* max_ind, LObject* L) 84 84 { 85 85 unsigned long not_sev = ~L->sev; … … 88 88 89 89 pAssume(~not_sev == p_GetShortExpVector(p, currRing)); 90 int ende=posInS(strat,strat->sl,p,0)+1; 91 if (ende>strat->sl) ende=strat->sl; 90 int ende=strat->sl; 91 if ((*max_ind)<ende) ende=posInS(strat,*max_ind,p,0)+1; 92 if (ende>(*max_ind)) ende=(*max_ind); 93 (*max_ind)=ende; 92 94 loop 93 95 { … … 708 710 if (at <= strat->Ll) 709 711 { 710 if (kFindDivisibleByInS(strat, h) < 0) 712 int dummy=strat->sl; 713 if (kFindDivisibleByInS(strat, &dummy, h) < 0) 711 714 return 1; 712 715 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); … … 730 733 */ 731 734 732 poly redNF (poly h, kStrategy strat)735 poly redNF (poly h,int &max_ind,kStrategy strat) 733 736 { 734 737 if (h==NULL) return NULL; 735 738 int j; 739 max_ind=strat->sl; 736 740 737 741 if (0 > strat->sl) … … 755 759 #endif 756 760 */ 757 j=kFindDivisibleByInS(strat,& P);761 j=kFindDivisibleByInS(strat,&max_ind,&P); 758 762 if (j>=0) 759 763 { … … 1062 1066 kTest(strat); 1063 1067 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } 1064 p = redNF(pCopy(q),strat); 1068 int max_ind; 1069 p = redNF(pCopy(q),max_ind,strat); 1065 1070 if ((p!=NULL)&&(lazyReduce==0)) 1066 1071 { 1067 1072 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 1068 p = redtailBba(p, strat->sl,strat);1073 p = redtailBba(p,max_ind,strat); 1069 1074 } 1070 1075 /*- release temp data------------------------------- -*/ … … 1089 1094 int i; 1090 1095 ideal res; 1096 int max_ind; 1091 1097 1092 1098 if (idIs0(q)) … … 1117 1123 { 1118 1124 if (TEST_OPT_PROT) { PrintS("r");mflush(); } 1119 p = redNF(pCopy(q->m[i]), strat);1125 p = redNF(pCopy(q->m[i]),max_ind,strat); 1120 1126 if ((p!=NULL)&&(lazyReduce==0)) 1121 1127 { 1122 1128 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 1123 p = redtailBba(p, strat->sl,strat);1129 p = redtailBba(p,max_ind,strat); 1124 1130 } 1125 1131 res->m[i]=p; -
kernel/kutil.cc
r8fc1b4d r391323 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.3 1 2006-10-05 10:30:03Singular Exp $ */4 /* $Id: kutil.cc,v 1.32 2006-10-12 08:55:40 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for kStd … … 1223 1223 if (strat->sugarCrit) 1224 1224 { 1225 if( 1226 (!((strat->ecartS[i]>0)&&(ecart>0))) 1225 if((!((strat->ecartS[i]>0)&&(ecart>0))) 1227 1226 && pHasNotCF(p,strat->S[i])) 1228 1227 { … … 1460 1459 { 1461 1460 //PrintS("prod-crit\n"); 1462 1463 1464 1465 1466 1461 if (!rIsPluralRing(currRing)) 1462 { 1463 strat->cp++; 1464 return; 1465 } 1467 1466 } 1468 1467 … … 2651 2650 * otherwise, bba has to be changed 2652 2651 */ 2653 int posInS (kStrategy strat, int length,poly p, int ecart_p) 2652 int posInS (const kStrategy strat, const int length,const poly p, 2653 const int ecart_p) 2654 2654 { 2655 2655 if(length==-1) return 0; -
kernel/kutil.h
r8fc1b4d r391323 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: kutil.h,v 1. 19 2006-10-05 18:26:10Singular Exp $ */6 /* $Id: kutil.h,v 1.20 2006-10-12 08:55:41 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: kernel: utils for kStd … … 354 354 void initEcartPairBba (LObject* Lp,poly f,poly g,int ecartF,int ecartG); 355 355 void initEcartPairMora (LObject* Lp,poly f,poly g,int ecartF,int ecartG); 356 int posInS (kStrategy strat,int length,poly p, int ecart_p); 356 int posInS (const kStrategy strat, const int length, const poly p, 357 const int ecart_p); 357 358 int posInT0 (const TSet set,const int length,LObject &p); 358 359 int posInT1 (const TSet set,const int length,LObject &p); … … 391 392 poly redtail (poly p,int pos,kStrategy strat); 392 393 poly redtail (LObject *L,int pos,kStrategy strat); 393 poly redNF (poly h, kStrategy strat);394 poly redNF (poly h,int & max_ind,kStrategy strat); 394 395 int redNF0 (LObject *P,kStrategy strat); 395 396 poly redNFTail (poly h,const int sl,kStrategy strat); … … 444 445 const int tl, const LObject* L, const int start=0); 445 446 // same with S 446 int kFindDivisibleByInS(const kStrategy strat, LObject* L);447 int kFindDivisibleByInS(const kStrategy strat, int *max_ind, LObject* L); 447 448 448 449 TObject* -
kernel/tgb.cc
r8fc1b4d r391323 5 5 * Computer Algebra System SINGULAR * 6 6 ****************************************/ 7 /* $Id: tgb.cc,v 1.10 1 2006-10-05 18:26:10Singular Exp $ */7 /* $Id: tgb.cc,v 1.102 2006-10-12 08:55:42 Singular Exp $ */ 8 8 /* 9 9 * ABSTRACT: slimgb and F4 implementation … … 767 767 int i=0; 768 768 LObject P; 769 while(i<=strat->sl){ 769 while(i<=strat->sl) 770 { 770 771 P.p=strat->S[i]; 771 772 P.sev=strat->sevS[i]; 772 if(kFindDivisibleByInS(strat,&P)!=i) 773 int dummy=strat->sl; 774 if(kFindDivisibleByInS(strat,&dummy,&P)!=i) 773 775 { 774 776 deleteInS(i,strat); … … 777 779 int j; 778 780 for(j=0;j<c->n;j++) 779 if(c->S->m[j]==P.p) 780 { 781 found=TRUE; 782 break; 783 } 781 { 782 if(c->S->m[j]==P.p) 783 { 784 found=TRUE; 785 break; 786 } 787 } 784 788 if (!found) 785 789 pDelete(&P.p); … … 1546 1550 //int max_pos=simple_posInS(strat,P.p); 1547 1551 loop 1548 { 1549 j=kFindDivisibleByInS(strat,&P); 1552 { 1553 int dummy=strat->sl; 1554 j=kFindDivisibleByInS(strat,&dummy,&P); 1550 1555 if ((j>=0) && ((!n)|| 1551 1556 ((strat->lenS[j]<=n) && … … 2026 2031 loop 2027 2032 { 2028 j=kFindDivisibleByInS(strat,&P); 2033 int dummy=strat->sl; 2034 j=kFindDivisibleByInS(strat,&dummy,&P); 2029 2035 if (j>=0) 2030 2036 {
Note: See TracChangeset
for help on using the changeset viewer.