Changeset a41623 in git for kernel/shiftgb.cc
- Timestamp:
- May 27, 2011, 3:52:46 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 410ea0fb1e22ebcb52e33b6789cf294a2d1f663b
- Parents:
- 6e80ab1defd5ab31610bce94c4f375be2fec8d0e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/shiftgb.cc
r6e80ab ra41623 60 60 poly s = p_mLPshift(p, sh, uptodeg, lV, r); // lm in currRing 61 61 poly pp = pNext(p); 62 62 63 63 while (pp != NULL) 64 64 { … … 119 119 120 120 int j; 121 // for (j=1; j<=r->N; j++) 121 // for (j=1; j<=r->N; j++) 122 122 // L*lV gives the last position of the last block 123 123 for (j=1; j<= L*lV ; j++) … … 131 131 } 132 132 #ifdef PDEBUG 133 else 133 else 134 134 { 135 135 if (e[j]!=0) 136 136 { 137 137 // Print("p_mLPshift: ex[%d]=%d\n",j,e[j]); 138 138 } 139 139 } … … 149 149 // p_SetCoeff0(m,p_GetCoeff(p,r),r); 150 150 p_SetComp(m,p_GetComp(p,r),r); // component is preserved 151 p_SetCoeff0(m,p_GetCoeff(p,r),r); // coeff is preserved 151 p_SetCoeff0(m,p_GetCoeff(p,r),r); // coeff is preserved 152 152 return(m); 153 153 } … … 226 226 /* the 0th block is the 1st one */ 227 227 poly q = p; //p_Copy(p,currRing); /* need it ? */ 228 int ans = 0; 228 int ans = 0; 229 229 int ansnew = 0; 230 230 while (q!=NULL) … … 251 251 j = currRing->N; 252 252 while ( (!e[j]) && (j>=1) ) j--; 253 if (j==0) 253 if (j==0) 254 254 { 255 255 #ifdef PDEBUG 256 256 PrintS("pmLastVblock: unexpected zero exponent vector\n"); 257 #endif 257 #endif 258 258 return(j); 259 259 } … … 273 273 274 274 int ans = p_mLastVblock(p, lV, r); // Block of LM 275 poly q = pNext(p); 275 poly q = pNext(p); 276 276 int ansnew = 0; 277 277 while (q != NULL) … … 291 291 /* the 0th block is the 1st one */ 292 292 poly q = p; //p_Copy(p,currRing); /* need it ? */ 293 int ans = 0; 293 int ans = 0; 294 294 int ansnew = 0; 295 295 while (q!=NULL) … … 316 316 j = r->N; 317 317 while ( (!e[j]) && (j>=1) ) j--; 318 if (j==0) 318 if (j==0) 319 319 { 320 320 #ifdef PDEBUG 321 321 PrintS("pmLastVblock: unexpected zero exponent vector\n"); 322 #endif 322 #endif 323 323 return(j); 324 324 } … … 334 334 /* the 0th block is the 1st one */ 335 335 poly q = p; //p_Copy(p,currRing); /* need it ? */ 336 int ans = 0; 336 int ans = 0; 337 337 int ansnew = 0; 338 338 while (q!=NULL) … … 359 359 j = 1; 360 360 while ( (!e[j]) && (j<=currRing->N-1) ) j++; 361 if (j==currRing->N + 1) 361 if (j==currRing->N + 1) 362 362 { 363 363 #ifdef PDEBUG 364 364 PrintS("pmFirstVblock: unexpected zero exponent vector\n"); 365 #endif 365 #endif 366 366 return(j); 367 367 } … … 384 384 int *e = (int *)omAlloc0((currRing->N+1)*sizeof(int)); 385 385 int b = (int)((currRing->N +lV-1)/lV); /* the number of blocks */ 386 //int b = (int)(currRing->N)/lV; 386 //int b = (int)(currRing->N)/lV; 387 387 int *B = (int *)omAlloc0((b+1)*sizeof(int)); /* the num of elements in a block */ 388 388 pGetExpV(p,e); … … 413 413 // } 414 414 /* now B[j] != 0 and we test place-squarefreeness */ 415 for ( j; j>=1; j--)415 for (; j>=1; j--) 416 416 { 417 417 if (B[j]!=1) … … 472 472 i = si_max(i, p_LastVblock(pNext(p), lV, r) ); 473 473 } 474 // i = uptodeg - i +1; 475 i = uptodeg - i; 474 // i = uptodeg - i +1; 475 i = uptodeg - i; 476 476 // p_wrp(p,currRing,r); Print("----i:%d",i); PrintLn(); 477 477 return(i); … … 495 495 poly s = p_mShrink(p, lV, r); // lm in currRing 496 496 poly pp = pNext(p); 497 497 498 498 while (pp != NULL) 499 499 { … … 517 517 poly q = NULL; 518 518 poly pp = p; 519 519 520 520 while (pp != NULL) 521 521 { … … 546 546 for (i=(j-1)*lV + 1; i<= j*lV; i++) 547 547 { 548 if (e[i]==1) 548 if (e[i]==1) 549 549 { 550 550 // B[j] = B[j]+1; // for control in V? 551 551 S[(cnt-1)*lV + (i - (j-1)*lV)] = e[i]; 552 552 /* assuming we are in V, can interrupt here */ … … 568 568 /* p_Setm(s,r); // done by p_SetExpV */ 569 569 p_SetComp(s,p_GetComp(p,r),r); // component is preserved 570 p_SetCoeff(s,p_GetCoeff(p,r),r); // coeff is preserved 570 p_SetCoeff(s,p_GetCoeff(p,r),r); // coeff is preserved 571 571 #ifdef PDEBUG 572 572 // Print("p_mShrink: from "); p_wrp(p,r); Print(" to "); p_wrp(s,r); PrintLn();
Note: See TracChangeset
for help on using the changeset viewer.