Changeset f224d85 in git
- Timestamp:
- Sep 24, 2012, 2:52:20 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 92296297754bdb3c65ffad980c8e982ef37cf33b
- Parents:
- abe5c8b5ebdd2be025cd137e4a089c3780efb8a3
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kInline.h
rabe5c8 rf224d85 546 546 if (p != NULL) pNext(p) = NULL; 547 547 pLength = 0; 548 last = NULL; 549 } 550 } 551 } 552 553 KINLINE void sLObject::SetLmTail(poly lm, poly p_tail, int p_Length, int use_bucket, ring _tailRing, poly _last) 548 } 549 } 550 } 551 552 KINLINE void sLObject::SetLmTail(poly lm, poly p_tail, int p_Length, int use_bucket, ring _tailRing) 554 553 { 555 554 … … 561 560 pNext(lm) = NULL; 562 561 pLength = 0; 563 last = NULL;564 562 } 565 563 else … … 567 565 pNext(lm) = p_tail; 568 566 pLength = p_Length + 1; 569 last = _last; 570 } 571 567 } 572 568 } 573 569 … … 718 714 new_tailRing->PolyBin,p_shallow_copy_delete, 719 715 FALSE); 720 last = NULL;721 716 } 722 717 … … 747 742 } 748 743 TObject::Copy(); 749 last = NULL;750 744 } 751 745 752 746 KINLINE poly sLObject::CopyGetP() 753 747 { 754 last = NULL;755 748 if (bucket != NULL) 756 749 { … … 789 782 if (! deg_last || bucket != NULL) return sLObject::pLDeg(); 790 783 791 if (last == NULL || pLength == 0)792 last = pLast(GetLmTailRing(), pLength);793 #ifdef HAVE_ASSUME794 784 long ldeg; 795 785 ldeg = tailRing->pLDeg(GetLmTailRing(), &length, tailRing); 786 #ifdef HAVE_ASSUME 787 if ( pLength == 0) 788 p_Last(GetLmTailRing(), pLength, tailRing); 796 789 assume ( pLength == length || rIsSyzIndexRing(currRing)); 797 assume (ldeg == tailRing->pFDeg(last,tailRing)); 790 #else 791 pLength=length; 792 #endif 798 793 return ldeg; 799 #else800 length = pLength;801 return tailRing->pFDeg(last, tailRing);802 #endif803 794 } 804 795 … … 1173 1164 // dummy function for function pointer strat->rewCrit being usable in all 1174 1165 // possible choices for criteria 1175 KINLINE BOOLEAN arriRewDummy(poly sig, unsigned long not_sevSig, kStrategy strat, int start=0)1166 KINLINE BOOLEAN arriRewDummy(poly /*sig*/, unsigned long /*not_sevSig*/, kStrategy /*strat*/, int start=0) 1176 1167 { 1177 1168 return FALSE; -
kernel/kspoly.cc
rabe5c8 rf224d85 386 386 poly p1 = Pair->p1; 387 387 poly p2 = Pair->p2; 388 poly last;389 388 Pair->tailRing = tailRing; 390 389 … … 454 453 #endif 455 454 456 Pair->SetLmTail(m2, a2, l2, use_buckets, tailRing , last);455 Pair->SetLmTail(m2, a2, l2, use_buckets, tailRing); 457 456 458 457 // get m2*a2 - m1*a1 -
kernel/kstd1.cc
rabe5c8 rf224d85 265 265 // now we finally can reduce 266 266 doRed(h,&(strat->T[ii]),strat->fromT,strat); 267 h->last=NULL;268 267 strat->fromT=FALSE; 269 268 -
kernel/kstd2.cc
rabe5c8 rf224d85 900 900 /*- h will not become the next element to reduce -*/ 901 901 { 902 h->last=NULL;903 902 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 904 903 #ifdef KDEBUG … … 965 964 { 966 965 int dummy=strat->sl; 967 h->last=NULL;968 966 if (kFindDivisibleByInS(strat, &dummy, h) < 0) 969 967 return 1; … … 987 985 h->GetP(); 988 986 at = strat->posInL(strat->L,strat->Ll,h,strat); 989 h->last=NULL;990 987 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 991 988 h->Clear(); … … 1517 1514 LObject L; 1518 1515 BOOLEAN withT = FALSE; 1519 BOOLEAN newrules = FALSE;1520 1516 strat->max_lower_index = 0; 1521 1517 … … 1572 1568 #endif 1573 1569 /* compute------------------------------------------------------- */ 1574 arriAgain:1575 1570 while (strat->Ll >= 0) 1576 1571 { -
kernel/kutil.cc
rabe5c8 rf224d85 251 251 bucket = L->bucket; 252 252 L->bucket = NULL; 253 L->last = NULL;254 253 } 255 254 … … 267 266 if (p_LmCmp(pNext(p1), strat->kNoetherTail(), L->tailRing) == -1) 268 267 { 269 L->last = p1;270 268 p_Delete(&pNext(p1), L->tailRing); 271 269 if (p1 == p) … … 305 303 L->pLength = 0; 306 304 L->bucket = bucket; 307 L->last = NULL;308 305 } 309 306 else … … 367 364 //if (L->pLength > 0) 368 365 L->pLength = 1; 369 if (L->last != NULL) L->last = p;370 366 L->max = NULL; 371 367 … … 764 760 return dReportError("L[%d] wrong sev: has %o, specified to have %o", 765 761 lpos, p_GetShortExpVector(p, r), L->sev); 766 }767 if (lpos > 0 && L->last != NULL && pLast(p) != L->last)768 {769 return dReportError("L[%d] last wrong: has %p specified to have %p",770 lpos, pLast(p), L->last);771 762 } 772 763 } … … 5059 5050 // critical pair. In this situation we can discard the critical pair 5060 5051 // completely. 5061 BOOLEAN arriRewCriterion(poly sig, unsigned long not_sevSig, kStrategy strat, int start=0)5052 BOOLEAN arriRewCriterion(poly sig, unsigned long /*not_sevSig*/, kStrategy strat, int start=0) 5062 5053 { 5063 5054 //printf("Arri Rewritten Criterion\n"); … … 5272 5263 if (strat->redTailChange) 5273 5264 { 5274 L->last = NULL;5275 5265 L->pLength = 0; 5276 5266 } … … 5372 5362 if (strat->redTailChange) 5373 5363 { 5374 L->last = NULL;5375 5364 L->length = 0; 5376 5365 } … … 5479 5468 if (strat->redTailChange) 5480 5469 { 5481 L->last = NULL;5482 5470 L->length = 0; 5483 5471 } … … 5795 5783 void initSLSba (ideal F, ideal Q,kStrategy strat) 5796 5784 { 5797 int i, j,pos, ctr=0, ps=0;5785 int i,pos; 5798 5786 if (Q!=NULL) i=((IDELEMS(Q)+(setmaxTinc-1))/setmaxTinc)*setmaxTinc; 5799 5787 else i=setmaxT; … … 6878 6866 void enterSSba (LObject p,int atS,kStrategy strat, int atR) 6879 6867 { 6880 int i;6881 6868 strat->news = TRUE; 6882 6869 /*- puts p to the standardbasis s at position at -*/ … … 8791 8778 * put the pairs (sh \dot s[i],p) into the set B, ecart=ecart(p) 8792 8779 */ 8793 void enterOnePairManyShifts (int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int uptodeg, int lV)8780 void enterOnePairManyShifts (int i, poly p, int ecart, int isFromQ, kStrategy strat, int /*atR*/, int uptodeg, int lV) 8794 8781 { 8795 8782 /* p comes from strat->P.p, that is LObject with LM in currRing and Tail in tailRing */ … … 8867 8854 * despite the name, not only self shifts 8868 8855 */ 8869 void enterOnePairSelfShifts (poly qq, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int uptodeg, int lV)8856 void enterOnePairSelfShifts (poly qq, poly p, int ecart, int isFromQ, kStrategy strat, int /*atR*/, int uptodeg, int lV) 8870 8857 { 8871 8858 … … 8898 8885 #endif 8899 8886 8900 poly q , s;8887 poly q; 8901 8888 8902 8889 if (strat->interred_flag) return; // ? … … 8932 8919 * put the pair (q,p) into the set B, ecart=ecart(p), q is the shift of some s[i] 8933 8920 */ 8934 void enterOnePairShift (poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS, int uptodeg, int lV)8921 void enterOnePairShift (poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS, int /*uptodeg*/, int lV) 8935 8922 { 8936 8923 … … 9452 9439 if (strat->redTailChange) 9453 9440 { 9454 L->last = NULL;9455 9441 L->length = 0; 9456 9442 } -
kernel/kutil.h
rabe5c8 rf224d85 192 192 193 193 poly lcm; /*- the lcm of p1,p2 -*/ 194 poly last; // pLast(p) during reductions195 194 kBucket_pt bucket; 196 195 int i_r1, i_r2; … … 214 213 KINLINE void PrepareRed(BOOLEAN use_bucket); 215 214 KINLINE void SetLmTail(poly lm, poly new_p, int length, 216 int use_bucket, ring r , poly last);215 int use_bucket, ring r); 217 216 KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether); 218 217 KINLINE void Tail_Mult_nn(number n); -
libpolys/polys/templates/p_kBucketSetLm__T.cc
rabe5c8 rf224d85 124 124 DECLARE_ORDSGN(const long* ordsgn = r->ordsgn); 125 125 poly p=NULL; 126 while(p==NULL){ 127 int found=-1000; 128 for (int i = 1; i<=bucket->buckets_used; i++) 126 while(p==NULL) 127 { 128 int found=-1000; 129 for (int i = 1; i<=bucket->buckets_used; i++) 130 { 131 if (bucket->buckets[i] != NULL) 132 { 133 if (p == NULL) 129 134 { 130 if (bucket->buckets[i] != NULL) 131 { 132 133 if (p == NULL) 134 { 135 p=bucket->buckets[i]; 136 found=i; 137 continue; 138 } 139 assume(p != NULL); 140 p_MemCmp__T(bucket->buckets[i]->exp, p->exp, length, ordsgn, goto Continue, goto Greater, goto Continue); 141 //assume(p_LmCmp(bucket->buckets[i],p,r)==1); 142 Greater: 143 //if (p_LmCmp(bucket->buckets[i],p,r)!=1) continue; 144 found=i; 145 p=bucket->buckets[i]; 146 Continue:; 147 } 135 p=bucket->buckets[i]; 136 found=i; 137 continue; 148 138 } 149 150 151 if (found<0) return; 152 assume(p==bucket->buckets[found]); 153 assume(p!=NULL); 154 155 p=kBucketExtractLmOfBucket(bucket, found); 156 assume(p!=NULL); 157 p_Test(p,r); 158 poly copy=p_LmInit(p, r); 159 160 for (int i = found+1; i<=bucket->buckets_used; i++) 161 { 162 163 if (bucket->buckets[i] != NULL) 164 { 165 if(p_LmEqual(bucket->buckets[i], copy,r)){ 166 poly q=kBucketExtractLmOfBucket(bucket,i); 167 assume(p!=q); 168 p=p_Add_q(p, q,r); 169 assume(pLength(bucket->buckets[i])==bucket->buckets_length[i]); 170 } 171 172 173 174 } 139 assume(p != NULL); 140 p_MemCmp__T(bucket->buckets[i]->exp, p->exp, length, ordsgn, goto Continue, goto Greater, goto Continue); 141 //assume(p_LmCmp(bucket->buckets[i],p,r)==1); 142 Greater: 143 //if (p_LmCmp(bucket->buckets[i],p,r)!=1) continue; 144 found=i; 145 p=bucket->buckets[i]; 146 Continue:; 147 } 148 } 149 if (found<0) return; 150 assume(p==bucket->buckets[found]); 151 assume(p!=NULL); 152 153 p=kBucketExtractLmOfBucket(bucket, found); 154 assume(p!=NULL); 155 p_Test(p,r); 156 poly copy=p_LmInit(p, r); 157 158 for (int i = found+1; i<=bucket->buckets_used; i++) 159 { 160 if (bucket->buckets[i] != NULL) 161 { 162 if(p_LmEqual(bucket->buckets[i], copy,r)) 163 { 164 poly q=kBucketExtractLmOfBucket(bucket,i); 165 assume(p!=q); 166 p=p_Add_q(p, q,r); 167 assume(pLength(bucket->buckets[i])==bucket->buckets_length[i]); 175 168 } 176 p_Delete(©, r); 169 } 170 } 171 p_Delete(©, r); 177 172 } 178 173 179 174 //assume(bucket->buckets[j] != NULL); 180 assume(pLength(p)==1); 181 lt = p; 182 175 assume(pLength(lt)==1); 176 183 177 bucket->buckets[0] = lt; 184 178 bucket->buckets_length[0] = 1; … … 186 180 kBucketAdjustBucketsUsed(bucket); 187 181 kbTest(bucket); 188 182 } 189 183 #endif -
libpolys/polys/templates/pp_Mult_mm__T.cc
rabe5c8 rf224d85 15 15 * 16 16 ***************************************************************/ 17 LINKAGE poly pp_Mult_mm__T(poly p, const poly m, const ring ri , poly &last)17 LINKAGE poly pp_Mult_mm__T(poly p, const poly m, const ring ri) 18 18 { 19 19 p_Test(p, ri); … … 21 21 if (p == NULL) 22 22 { 23 last = NULL;24 23 return NULL; 25 24 } … … 56 55 } 57 56 while (p != NULL); 58 last = q;59 57 pNext(q) = NULL; 60 58
Note: See TracChangeset
for help on using the changeset viewer.