Changeset d491e3 in git for kernel/tgb_obsolete.cc
- Timestamp:
- Jul 20, 2005, 1:12:43 PM (19 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 634dab087e9b393fec1655c78c584e20750b3db3
- Parents:
- cf2307dc9864719fabb9577ce88d785d229b1eea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tgb_obsolete.cc
rcf2307d rd491e3 1 1 #include "tgb_internal.h" 2 static poly redNF (poly h,kStrategy strat, int &len) 3 { 4 len=0; 5 if (h==NULL) return NULL; 6 int j; 7 8 len=pLength(h); 9 if (0 > strat->sl) 10 { 11 return h; 12 } 13 LObject P(h); 14 P.SetShortExpVector(); 15 P.bucket = kBucketCreate(currRing); 16 kBucketInit(P.bucket,P.p,len /*pLength(P.p)*/); 17 //int max_pos=simple_posInS(strat,P.p); 18 loop 19 { 20 j=kFindDivisibleByInS(strat->S,strat->sevS,strat->sl,&P); 21 if (j>=0) 22 { 23 nNormalize(pGetCoeff(P.p)); 24 #ifdef KDEBUG 25 if (TEST_OPT_DEBUG) 26 { 27 PrintS("red:"); 28 wrp(h); 29 PrintS(" with "); 30 wrp(strat->S[j]); 31 } 32 #endif 33 number coef=kBucketPolyRed(P.bucket,strat->S[j], 34 strat->lenS[j]/*pLength(strat->S[j])*/, 35 strat->kNoether); 36 nDelete(&coef); 37 h = kBucketGetLm(P.bucket); 38 if (h==NULL) return NULL; 39 P.p=h; 40 P.t_p=NULL; 41 P.SetShortExpVector(); 42 #ifdef KDEBUG 43 if (TEST_OPT_DEBUG) 44 { 45 PrintS("\nto:"); 46 wrp(h); 47 PrintLn(); 48 } 49 #endif 50 } 51 else 52 { 53 kBucketClear(P.bucket,&(P.p),&len); 54 kBucketDestroy(&P.bucket); 55 pNormalize(P.p); 56 return P.p; 57 } 58 } 59 } 2 60 int find_best(red_object* r,int l, int u, int &w, calc_dat* c){ 3 61
Note: See TracChangeset
for help on using the changeset viewer.