Changeset a642361 in git
- Timestamp:
- Oct 14, 2011, 1:46:29 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
- Children:
- 5e600bf8be6b726a72f343024cd7f273e718f71a
- Parents:
- 5f9b47ed5a8e9e527497f05d9afe96ec3e076cbf
- Location:
- kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kInline.cc
r5f9b47 ra642361 40 40 { 41 41 int sri= S_2_R[i]; 42 if ( sri >= 0 && sri <= tl)42 if ((sri >= 0) && (sri <= tl)) 43 43 { 44 44 TObject* t = R[sri]; 45 if ( t != NULL && t->p == S[i])45 if ((t != NULL) && (t->p == S[i])) 46 46 return t; 47 47 } -
kernel/kstd1.cc
r5f9b47 ra642361 2419 2419 if (pos<strat->sl) 2420 2420 { 2421 2421 need_retry++; 2422 2422 // move all "larger" elements fromS to L 2423 2423 // remove them from T … … 2427 2427 LObject h; 2428 2428 memset(&h,0,sizeof(h)); 2429 2429 h.tailRing=strat->tailRing; 2430 2430 h.p=strat->S[ii]; strat->S[ii]=NULL; 2431 2431 strat->initEcart(&h); … … 2451 2451 int lpos=strat->posInL(strat->L,strat->Ll,&h,strat); 2452 2452 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,lpos); 2453 #ifdef KDEBUG 2454 if (TEST_OPT_DEBUG) 2455 { 2456 Print("move S[%d] -> L[%d]: ",ii,pos); 2457 p_wrp(h.p,currRing, strat->tailRing); 2458 PrintLn(); 2459 } 2460 #endif 2461 } 2462 if (strat->fromQ!=NULL) 2463 { 2464 for(ii=pos+1;ii<=strat->sl;ii++) strat->fromQ[ii]=0; 2453 2465 } 2454 2466 strat->sl=pos; … … 2457 2469 2458 2470 #ifdef KDEBUG 2471 messageSets(strat); 2459 2472 memset(&(strat->P), 0, sizeof(strat->P)); 2460 2473 #endif … … 2466 2479 /* complete reduction of the standard basis--------- */ 2467 2480 2468 if((need_retry ==0) && (TEST_OPT_REDSB))2481 if((need_retry<=0) && (TEST_OPT_REDSB)) 2469 2482 { 2470 2483 completeReduce(strat); … … 2528 2541 while (need_retry && (counter>0)) 2529 2542 { 2543 #ifdef KDEBUG 2544 if (TEST_OPT_DEBUG) { Print("retry counter %d\n",counter); } 2545 #endif 2530 2546 ideal res1=kInterRedBba(res,Q,need_retry); 2531 2547 int new_elems=idElem(res1); -
kernel/kutil.cc
r5f9b47 ra642361 5401 5401 if (TEST_OPT_INTSTRATEGY) 5402 5402 { 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5403 if (TEST_OPT_CONTENTSB) 5404 { 5405 number n; 5406 p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent 5407 if (!nIsOne(n)) 5408 { 5409 denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s)); 5410 denom->n=nInvers(n); 5411 denom->next=DENOMINATOR_LIST; 5412 DENOMINATOR_LIST=denom; 5413 } 5414 nDelete(&n); 5415 } 5416 else 5417 { 5418 //pContent(strat->S[i]); 5419 strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent 5420 } 5421 5421 } 5422 5422 else … … 5488 5488 if (TEST_OPT_INTSTRATEGY) 5489 5489 { 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5490 if (TEST_OPT_CONTENTSB) 5491 { 5492 number n; 5493 p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent 5494 if (!nIsOne(n)) 5495 { 5496 denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s)); 5497 denom->n=nInvers(n); 5498 denom->next=DENOMINATOR_LIST; 5499 DENOMINATOR_LIST=denom; 5500 } 5501 nDelete(&n); 5502 } 5503 else 5504 { 5505 //pContent(strat->S[i]); 5506 strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent 5507 } 5508 5508 } 5509 5509 else … … 6128 6128 if (strat->ak==0) end_pos=i-1; 6129 6129 TObject* T_j = strat->s_2_t(i); 6130 if ( T_j != NULL)6130 if ((T_j != NULL)&&(T_j->p==strat->S[i])) 6131 6131 { 6132 6132 L = *T_j; 6133 #ifdef KDEBUG 6134 if (TEST_OPT_DEBUG) 6135 { 6136 Print("test S[%d]:",i); 6137 p_wrp(L.p,currRing,strat->tailRing); 6138 PrintLn(); 6139 } 6140 #endif 6133 6141 poly p; 6134 6142 if (pOrdSgn == 1) … … 6136 6144 else 6137 6145 strat->S[i] = redtail(&L, strat->sl, strat); 6146 #ifdef KDEBUG 6147 if (TEST_OPT_DEBUG) 6148 { 6149 Print("to (tailR) S[%d]:",i); 6150 p_wrp(strat->S[i],currRing,strat->tailRing); 6151 PrintLn(); 6152 } 6153 #endif 6138 6154 6139 6155 if (strat->redTailChange && strat->tailRing != currRing) … … 6151 6167 { 6152 6168 assume(currRing == strat->tailRing); 6169 #ifdef KDEBUG 6170 if (TEST_OPT_DEBUG) 6171 { 6172 Print("test S[%d]:",i); 6173 p_wrp(strat->S[i],currRing,strat->tailRing); 6174 PrintLn(); 6175 } 6176 #endif 6153 6177 if (pOrdSgn == 1) 6154 6178 strat->S[i] = redtailBba(strat->S[i], end_pos, strat, withT); … … 6156 6180 strat->S[i] = redtail(strat->S[i], strat->sl, strat); 6157 6181 if (TEST_OPT_INTSTRATEGY) 6158 { 6159 if (TEST_OPT_CONTENTSB) 6160 { 6161 number n; 6162 p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent 6163 if (!nIsOne(n)) 6164 { 6165 denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s)); 6166 denom->n=nInvers(n); 6167 denom->next=DENOMINATOR_LIST; 6168 DENOMINATOR_LIST=denom; 6169 } 6170 nDelete(&n); 6171 } 6172 else 6173 { 6174 //pContent(strat->S[i]); 6175 strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent 6176 } 6177 } 6182 { 6183 if (TEST_OPT_CONTENTSB) 6184 { 6185 number n; 6186 p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent 6187 if (!nIsOne(n)) 6188 { 6189 denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s)); 6190 denom->n=nInvers(n); 6191 denom->next=DENOMINATOR_LIST; 6192 DENOMINATOR_LIST=denom; 6193 } 6194 nDelete(&n); 6195 } 6196 else 6197 { 6198 //pContent(strat->S[i]); 6199 strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent 6200 } 6201 } 6202 #ifdef KDEBUG 6203 if (TEST_OPT_DEBUG) 6204 { 6205 Print("to (-tailR) S[%d]:",i); 6206 p_wrp(strat->S[i],currRing,strat->tailRing); 6207 PrintLn(); 6208 } 6209 #endif 6178 6210 } 6179 6211 if (TEST_OPT_PROT)
Note: See TracChangeset
for help on using the changeset viewer.