Changeset 391323 in git for kernel/kstd2.cc
- Timestamp:
- Oct 12, 2006, 10:55:42 AM (18 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 200e7290fa530efe0851712fa9c959236d73cb35
- Parents:
- 8fc1b4d51d3b74816a22e5b09d2875ca81a5c44d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note: See TracChangeset
for help on using the changeset viewer.