Changeset 30e184 in git
- Timestamp:
- Apr 20, 2021, 3:24:46 PM (3 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 805315e6bd818709b77fe41703334096a97e6a52
- Parents:
- ddebd75a4ce9e60424c1454a22dee815afe211fe
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-04-20 15:24:46+02:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-04-20 15:28:45+02:00
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Tst/Short/ok_s.lst
rddebd7 r30e184 9 9 bug_heuristic 10 10 bug_imap_alg 11 bug_liftstd2 11 12 bug_liftstd4 12 13 bug_mem_Z -
kernel/GBEngine/kLiftstd.cc
rddebd7 r30e184 25 25 #endif 26 26 27 static poly kSplitAt(int k,poly p, const ring r) 28 { 29 if((p==NULL) || (p->next==NULL)) return NULL; 30 while(p_GetComp(p->next,r)<=k) 31 { 32 pIter(p); 33 if (p->next==NULL) return NULL; 34 } 35 poly t=p->next; 36 p->next=NULL; 37 return t; 38 } 39 static poly kSplitAt(int k,TObject* h,int *l,kStrategy strat) 27 static poly kSplitAt(int k,TObject* h,kStrategy strat) 40 28 { 41 29 poly p; … … 53 41 p=h->t_p; 54 42 if (p->next==NULL) return NULL; 55 int ll=1;56 43 const ring tailRing=strat->tailRing; 57 44 while(p_GetComp(p->next,tailRing)<=k) 58 45 { 59 46 pIter(p); 60 *l=ll; 61 if ((p==NULL)||(p->next==NULL)) return NULL; 62 ll++; 47 if ((p==NULL)||(p->next==NULL)) 48 { 49 h->pLength=0; // force re-computation 50 return NULL; 51 } 63 52 } 64 53 poly t=p->next; 65 54 p->next=NULL; 66 *l=ll;55 h->pLength=0; // force re-computation 67 56 return t; 68 57 } … … 97 86 } 98 87 if (p->next==NULL) return NULL; 99 while(p_GetComp(p->next,tailRing)<=k) pIter(p); 88 while(p_GetComp(p->next,tailRing)<=k) 89 { 90 pIter(p); 91 if (p->next==NULL) break; 92 } 100 93 poly t=p->next; 101 94 p->next=NULL; … … 105 98 kBucketInit(h->bucket,pr,l); 106 99 } 107 return t;108 }109 static poly kTailAt(int k,TObject* h,kStrategy strat)110 {111 poly p;112 if (h->t_p!=NULL)113 p=h->t_p;114 else115 p=h->p;116 assume(p_GetComp(p,strat->tailRing)<=k);117 if (p->next==NULL) return NULL;118 const ring tailRing=strat->tailRing;119 while(p_GetComp(p->next,tailRing)<=k) pIter(p);120 poly t=p->next;121 100 return t; 122 101 } … … 132 111 if ((h->p!=NULL)&&(h->t_p!=NULL)) pNext(h->p)=pNext(h->t_p); 133 112 } 134 static void kAppend(poly t,LObject* h)135 {136 if (h->bucket!=NULL)137 {138 int l=-1;139 kBucket_Add_q(h->bucket,t,&l);140 }141 else142 {143 poly p;144 if (h->t_p!=NULL)145 p=h->t_p;146 else147 p=h->p;148 while(p->next!=NULL) pIter(p);149 p->next=t;150 if ((h->p!=NULL)&&(h->t_p!=NULL)) pNext(h->p)=pNext(h->t_p);151 }152 }153 154 113 static poly lazyComp(number* A, poly* M,poly* T,int index,poly s,int *l,const ring tailR) 155 114 { … … 184 143 assume(h->FDeg == h->pFDeg()); 185 144 poly h_p; 186 int i,j, at,pass,ei, ii, h_d,ci;145 int i,j,pass,ei, ii, h_d,ci; 187 146 unsigned long not_sev; 188 147 long reddeg,d; … … 282 241 int l_orig=strat->T[ii].pLength; 283 242 // split strat->T[ii] 284 poly T_tail=kSplitAt(strat->syzComp,&strat->T[ii],&strat->T[ii].pLength,strat); 243 poly T_tail=kSplitAt(strat->syzComp,&strat->T[ii],strat); 244 h->pLength=0; // force re-computation of length 285 245 ksReducePoly(h,&(strat->T[ii]),NULL,&A[pass],&C[pass], strat); 286 246 // restore T[ii]:
Note: See TracChangeset
for help on using the changeset viewer.