Changeset d64382 in git
- Timestamp:
- Nov 9, 2006, 9:15:52 AM (17 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- bc5e56344b6761dd9dc617b39142ba3893b23a0c
- Parents:
- c84b905c9f27db30242a080d84876253a7ce9e2c
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tgb.cc
rc84b90 rd64382 5 5 * Computer Algebra System SINGULAR * 6 6 ****************************************/ 7 /* $Id: tgb.cc,v 1.10 4 2006-10-25 10:14:51 bricken Exp $ */7 /* $Id: tgb.cc,v 1.105 2006-11-09 08:15:51 bricken Exp $ */ 8 8 /* 9 9 * ABSTRACT: slimgb and F4 implementation … … 11 11 //#include <vector> 12 12 //using namespace std; 13 14 15 ///@TODO: delay nur auf Sugarvergrößerung 16 ///@TODO: grade aus ecartS, setze dazu strat->honey; und nutze p.ecart 13 17 #include "mod2.h" 14 18 #include "tgb.h" … … 397 401 } 398 402 399 wlen_type kEBucketLength(kBucket* b, poly lm, slimgb_alg* ca)403 wlen_type kEBucketLength(kBucket* b, poly lm,int sugar,slimgb_alg* ca) 400 404 { 401 405 wlen_type s=0; … … 408 412 } 409 413 int d=pTotaldegree(lm,ca->r); 414 #if 1 415 assume(sugar>=d); 416 s=1+(bucket_guess(b)-1)*(sugar-d+1); 417 return s; 418 #else 419 420 421 //int d=pTotaldegree(lm,ca->r); 410 422 int i; 411 423 for (i=b->buckets_used;i>=0;i--) … … 421 433 } 422 434 return s; 435 #endif 423 436 } 424 437 … … 505 518 #endif 506 519 //FIXME:not quadratic 507 wlen_type erg=kEBucketLength(this->bucket,this->p, c);520 wlen_type erg=kEBucketLength(this->bucket,this->p,this->sugar,c); 508 521 //erg*=cs;//for quadratic 509 522 erg*=cs; … … 519 532 if(c->eliminationProblem) 520 533 //if (false) 521 s=kEBucketLength(this->bucket,this->p, c);534 s=kEBucketLength(this->bucket,this->p,this->sugar,c); 522 535 else s=bucket_guess(bucket); 523 536 } … … 1800 1813 buf[j].sev=pGetShortExpVector(p[j]); 1801 1814 buf[j].bucket = kBucketCreate(currRing); 1802 1815 if (c->eliminationProblem){ 1816 buf[j].sugar=pTotaldegree_full(p[j]); 1817 } 1803 1818 int len=pLength(p[j]); 1804 1819 kBucketInit(buf[j].bucket,buf[j].p,len); … … 3090 3105 int old_length=c->strat->lenS[j];// in view of S 3091 3106 los[bp].p=p; 3107 if (c->eliminationProblem){ 3108 los[bp].sugar=pTotaldegree_full(p); 3109 } 3092 3110 kBucketInit(los[bp].bucket,p,old_length); 3093 3111 wlen_type qal=pQuality(clear_into,c,new_length); … … 3222 3240 assume((i==losl-1)||(pLmCmp(los[i].p,los[i+1].p)<=0)); 3223 3241 assume(is_valid_ro(los[i])); 3242 assume((!(c->eliminationProblem))||(los[i].sugar>=pTotaldegree(los[i].p))); 3224 3243 j=kFindDivisibleByInS_easy(strat,los[i]); 3225 3244 if(j>=0){ … … 3499 3518 //debug start 3500 3519 int im; 3501 3520 3521 int reducer_deg; 3522 if(c->eliminationProblem){ 3523 assume(p_LmEqual(r[l].p,r[u].p,c->r)); 3524 int lm_deg=pTotaldegree(r[l].p); 3525 reducer_deg=lm_deg+pTotaldegree_full(p)-pTotaldegree(p); 3526 } 3502 3527 3503 3528 for(i=l;i<=u;i++){ … … 3506 3531 3507 3532 this->do_reduce(r[i]); 3508 3533 if (c->eliminationProblem){ 3534 r[i].sugar=si_max(r[i].sugar,reducer_deg); 3535 } 3509 3536 } 3510 3537 for(i=l;i<=u;i++){ … … 3553 3580 } 3554 3581 pNormalize(red); 3555 3582 if (c->eliminationProblem){ 3583 r[rn].sugar=pTotaldegree_full(red); 3584 } 3556 3585 3557 3586 if ((!(erg.fromS))&&(TEST_V_UPTORADICAL)){ -
kernel/tgb_internal.h
rc84b90 rd64382 5 5 * Computer Algebra System SINGULAR * 6 6 ****************************************/ 7 /* $Id: tgb_internal.h,v 1.4 5 2006-10-25 10:14:52 bricken Exp $ */7 /* $Id: tgb_internal.h,v 1.46 2006-11-09 08:15:52 bricken Exp $ */ 8 8 /* 9 9 * ABSTRACT: tgb internal .h file … … 174 174 poly p; 175 175 unsigned long sev; 176 int sugar; 176 177 void flatten(); 177 178 void validate();
Note: See TracChangeset
for help on using the changeset viewer.