Changeset d5856f in git for kernel/kutil.cc
- Timestamp:
- Dec 6, 2013, 4:05:10 PM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 1eba3916d70fdfa610391e2779d72b202c1b7915
- Parents:
- cda0b04282903cc2bac5f3b79cb72d0319602785
- git-author:
- Christian Eder <ederc@mathematik.uni-kl.de>2013-12-06 16:05:10+01:00
- git-committer:
- Christian Eder <ederc@mathematik.uni-kl.de>2013-12-12 13:51:29+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kutil.cc
rcda0b0 rd5856f 4639 4639 if (pLmCmp(strat->syz[strat->syzl-1],sig) != currRing->OrdSgn) 4640 4640 return strat->syzl; 4641 4642 4641 int i; 4643 4642 int an = 0; … … 5091 5090 for (int k=0; k<strat->syzl; k++) 5092 5091 { 5092 //printf("-%d",k); 5093 5093 //#if 1 5094 5094 #ifdef DEBUGF5 5095 Print("checking with: %d -- \n",k);5095 Print("checking with: %d / %d -- \n",k,strat->syzl); 5096 5096 pWrite(pHead(strat->syz[k])); 5097 5097 #endif … … 5102 5102 printf("DELETE!\n"); 5103 5103 #endif 5104 //printf("- T -\n\n"); 5104 5105 return TRUE; 5105 5106 } 5106 //k++;5107 }5107 } 5108 //printf("- F -\n\n"); 5108 5109 return FALSE; 5109 5110 } … … 5116 5117 //#if 1 5117 5118 #ifdef DEBUGF5 5118 Print(" syzygy criterion checks: ");5119 Print("--- syzygy criterion checks: "); 5119 5120 pWrite(sig); 5120 5121 #endif … … 5139 5140 for (int k=min; k<max; k++) 5140 5141 { 5141 #ifdef DEBUGF55142 #ifdef F5DEBUG 5142 5143 printf("COMP %d/%d - MIN %d - MAX %d - SYZL %ld\n",comp,strat->currIdx,min,max,strat->syzl); 5143 5144 Print("checking with: %d -- ",k); … … 5146 5147 if (p_LmShortDivisibleBy(strat->syz[k], strat->sevSyz[k], sig, not_sevSig, currRing)) 5147 5148 return TRUE; 5148 //k++;5149 5149 } 5150 5150 return FALSE; … … 6114 6114 strat->sevSyz = initsevS(ps); 6115 6115 strat->syz = (poly *)omAlloc(ps*sizeof(poly)); 6116 strat->syzl = strat->syzmax = ps; 6116 strat->syzmax = ps; 6117 strat->syzl = 0; 6117 6118 strat->syzidxmax = comp; 6118 6119 #if defined(DEBUGF5) || defined(DEBUGF51) … … 6152 6153 strat->syzIdx[j] = ctr; 6153 6154 j++; 6155 LObject Q; 6156 int pos; 6154 6157 for (k = 0; k<i; k++) 6155 6158 { 6156 poly p = pOne(); 6157 p_ExpVectorCopy(p,strat->S[k],currRing); 6158 strat->syz[ctr] = p; 6159 p_SetCompP (strat->syz[ctr], comp, currRing); 6160 poly q = p_Copy(p, currRing); 6159 Q.sig = pOne(); 6160 p_ExpVectorCopy(Q.sig,strat->S[k],currRing); 6161 p_SetCompP (Q.sig, comp, currRing); 6162 poly q = p_One(currRing); 6161 6163 p_ExpVectorCopy(q,strat->S[i],currRing); 6162 6164 q = p_Neg (q, currRing); 6163 6165 p_SetCompP (q, p_GetComp(strat->sig[k], currRing), currRing); 6164 strat->syz[ctr] = p_Add_q (strat->syz[ctr], q, currRing); 6165 #if defined(DEBUGF5) || defined(DEBUGF51) 6166 //#if 1 6167 printf(". . \n"); 6168 pWrite(strat->syz[ctr]); 6169 #endif 6170 strat->sevSyz[ctr] = p_GetShortExpVector(strat->syz[ctr],currRing); 6166 Q.sig = p_Add_q (Q.sig, q, currRing); 6167 Q.sevSig = p_GetShortExpVector(Q.sig,currRing); 6168 pos = posInSyz(strat, Q.sig); 6169 enterSyz(Q, strat, pos); 6171 6170 ctr++; 6172 6171 } … … 6194 6193 } 6195 6194 strat->syzIdx[j] = ctr; 6195 LObject Q; 6196 int pos; 6196 6197 for (k = 0; k<strat->sl+1; k++) 6197 6198 { 6198 poly p = pOne(); 6199 p_ExpVectorCopy(p,strat->S[k],currRing); 6200 strat->syz[ctr] = p; 6201 p_SetCompP (strat->syz[ctr], comp, currRing); 6202 poly q = p_Copy(p, currRing); 6199 Q.sig = pOne(); 6200 p_ExpVectorCopy(Q.sig,strat->S[k],currRing); 6201 p_SetCompP (Q.sig, comp, currRing); 6202 poly q = p_One(currRing); 6203 6203 p_ExpVectorCopy(q,strat->L[strat->Ll].p,currRing); 6204 6204 q = p_Neg (q, currRing); 6205 6205 p_SetCompP (q, p_GetComp(strat->sig[k], currRing), currRing); 6206 strat->syz[ctr] = p_Add_q (strat->syz[ctr], q, currRing); 6207 //#if 1 6208 #if DEBUGF5 || DEBUGF51 6209 printf(".."); 6210 pWrite(strat->syz[ctr]); 6211 #endif 6212 strat->sevSyz[ctr] = p_GetShortExpVector(strat->syz[ctr],currRing); 6206 Q.sig = p_Add_q (Q.sig, q, currRing); 6207 Q.sevSig = p_GetShortExpVector(Q.sig,currRing); 6208 pos = posInSyz(strat, Q.sig); 6209 enterSyz(Q, strat, pos); 6213 6210 ctr++; 6214 6211 } … … 6220 6217 printf("ps %d\n",ps); 6221 6218 Print("--------------------------------\n"); 6222 for(i=0;i<=ps-1;i++) 6223 { 6219 for(i=0;i<=strat->syzl-1;i++) 6220 { 6221 printf("%d - ",i); 6224 6222 pWrite(strat->syz[i]); 6223 } 6224 for(i=0;i<strat->currIdx;i++) 6225 { 6226 printf("%d - %d\n",i,strat->syzIdx[i]); 6225 6227 } 6226 6228 Print("--------------------------------\n"); … … 7233 7235 int i; 7234 7236 strat->newt = TRUE; 7235 if (strat->syzl == strat->syzmax )7237 if (strat->syzl == strat->syzmax-1) 7236 7238 { 7237 7239 pEnlargeSet(&strat->syz,strat->syzmax,setmaxTinc); … … 7242 7244 strat->syzmax += setmaxTinc; 7243 7245 } 7244 if (atT < strat->syzl -1)7246 if (atT < strat->syzl) 7245 7247 { 7246 7248 #ifdef ENTER_USE_MEMMOVE … … 7258 7260 } 7259 7261 } 7260 i = strat->syzl;7261 //i = atT;7262 strat->syz[ i] = p.sig;7263 strat->sevSyz[ i] = p.sevSig;7262 //i = strat->syzl; 7263 i = atT; 7264 strat->syz[atT] = p.sig; 7265 strat->sevSyz[atT] = p.sevSig; 7264 7266 strat->syzl++; 7265 #if def DEBUGF57266 Print(" last element in strat->syz: %d--%d ",i+1,strat->syzmax);7267 pWrite(strat->syz[ i]);7267 #if F5DEBUG 7268 Print("element in strat->syz: %d--%d ",atT+1,strat->syzmax); 7269 pWrite(strat->syz[atT]); 7268 7270 #endif 7269 7271 // recheck pairs in strat->L with new rule and delete correspondingly … … 7278 7280 cc--; 7279 7281 } 7282 //#if 1 7283 #ifdef DEBUGF5 7284 Print("--- Syzygies ---\n"); 7285 printf("syzl %d\n",strat->syzl); 7286 printf("syzmax %d\n",strat->syzmax); 7287 Print("--------------------------------\n"); 7288 for(i=0;i<=strat->syzl-1;i++) 7289 { 7290 printf("%d - ",i); 7291 pWrite(strat->syz[i]); 7292 } 7293 Print("--------------------------------\n"); 7294 #endif 7280 7295 } 7281 7296
Note: See TracChangeset
for help on using the changeset viewer.