Changeset 2921f5 in git
- Timestamp:
- Jun 30, 2006, 10:43:31 AM (18 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- bfcd466f2a497cdcc37609173c8398e5da768bac
- Parents:
- 0025179624f84149e5d9951df92d3f1f9c08474c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tgb.cc
r002517 r2921f5 5 5 * Computer Algebra System SINGULAR * 6 6 ****************************************/ 7 /* $Id: tgb.cc,v 1.9 6 2006-06-08 08:12:51 bricken Exp $ */7 /* $Id: tgb.cc,v 1.97 2006-06-30 08:43:31 bricken Exp $ */ 8 8 /* 9 9 * ABSTRACT: slimgb and F4 implementation … … 320 320 } 321 321 #endif 322 323 static BOOLEAN elength_is_normal_length(poly p, slimgb_alg* c){ 324 ring r=c->r; 325 if (p_GetComp(p,r)!=0) return FALSE; 326 if (c->lastDpBlockStart<=pVariables){ 327 int i; 328 for(i=1;i<=pVariables;i++){ 329 if (p_GetExp(p,i,r)!=0){ 330 break; 331 } 332 } 333 if (i>=c->lastDpBlockStart) { 334 //wrp(p); 335 //PrintS("\n"); 336 return TRUE; 337 } 338 else return FALSE; 339 }else 340 return FALSE; 341 } 342 static BOOLEAN get_last_dp_block_start(ring r){ 343 //ring r=c->r; 344 int last_block; 345 346 if (rRing_has_CompLastBlock(r)){ 347 last_block=rBlocks(r) - 3; 348 } 349 else {last_block=rBlocks(r)-2;} 350 assume(last_block>=0); 351 if (r->order[last_block]==ringorder_dp) 352 return r->block0[last_block]; 353 return pVariables+1; 354 355 } 356 322 357 static wlen_type do_pELength(poly p, slimgb_alg* c, int dlm=-1){ 358 323 359 if(p==NULL) return 0; 324 360 wlen_type s=0; … … 369 405 } 370 406 if(lm==NULL) return 0; 407 if(elength_is_normal_length(lm,ca)) { 408 return bucket_guess(b); 409 } 371 410 int d=pTotaldegree(lm,ca->r); 372 411 int i; … … 374 413 { 375 414 if(b->buckets[i]==NULL) continue; 415 416 if ((pTotaldegree(b->buckets[i])<=d) &&(elength_is_normal_length(b->buckets[i],ca))){ 417 s+=b->buckets_length[i]; 418 } else 419 { 376 420 s+=do_pELength(b->buckets[i],ca,d); 421 } 377 422 } 378 423 return s; … … 381 426 static inline int pELength(poly p, slimgb_alg* c,int l){ 382 427 if (p==NULL) return 0; 428 if ((l>0) &&(elength_is_normal_length(p,c))) 429 return l; 383 430 return do_pELength(p,c); 384 431 } … … 2111 2158 r=currRing; 2112 2159 nc=rIsPluralRing(r); 2113 2160 this->lastDpBlockStart=get_last_dp_block_start(r); 2161 //Print("last dp Block start: %i\n", this->lastDpBlockStart); 2114 2162 is_homog=TRUE; 2115 2163 {
Note: See TracChangeset
for help on using the changeset viewer.