Changeset ca4a891 in git
- Timestamp:
- Jul 3, 2006, 7:12:55 AM (18 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 178d03dd7562b3d36fc0f55c2e57b4d2beb913be
- Parents:
- 79374dd582cd8e7733064c67bce179b0d0f03b31
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tgb.cc
r79374dd rca4a891 5 5 * Computer Algebra System SINGULAR * 6 6 ****************************************/ 7 /* $Id: tgb.cc,v 1.9 8 2006-06-30 08:45:44bricken Exp $ */7 /* $Id: tgb.cc,v 1.99 2006-07-03 05:12:55 bricken Exp $ */ 8 8 /* 9 9 * ABSTRACT: slimgb and F4 implementation … … 172 172 inline wlen_type pSLength(poly p,int l) 173 173 { 174 intc;174 wlen_type c; 175 175 number coef=pGetCoeff(p); 176 176 if (rField_is_Q(currRing)){ … … 192 192 { 193 193 int s=0; 194 intc;194 wlen_type c; 195 195 number coef; 196 196 if(lm==NULL) … … 440 440 if(c->isDifficultField) { 441 441 if(c->eliminationProblem){ 442 intcs;442 wlen_type cs; 443 443 number coef=pGetCoeff(p); 444 444 if (rField_is_Q(currRing)){ … … 446 446 } 447 447 else 448 cs=nSize(coef);448 cs=nSize(coef); 449 449 wlen_type erg=cs; 450 if(TEST_V_COEFSTRAT) 451 erg*=cs; 450 452 //erg*=cs;//for quadratic 451 453 erg*=pELength(p,c,l); … … 480 482 //s=kSBucketLength(bucket,this->p); 481 483 if(c->eliminationProblem){ 482 intcs;484 wlen_type cs; 483 485 number coef; 484 486 … … 507 509 //erg*=cs;//for quadratic 508 510 erg*=cs; 511 if (TEST_V_COEFSTRAT) 512 erg*=cs; 509 513 //return cs*kEBucketLength(this->bucket,this->p,c); 510 514 return erg; … … 702 706 703 707 //! returns position sets w as weight 704 int find_best(red_object* r,int l, int u, int&w, slimgb_alg* c){708 int find_best(red_object* r,int l, int u, wlen_type &w, slimgb_alg* c){ 705 709 int best=l; 706 710 int i; 707 711 w=r[l].guess_quality(c); 708 712 for(i=l+1;i<=u;i++){ 709 intw2=r[i].guess_quality(c);713 wlen_type w2=r[i].guess_quality(c); 710 714 if(w2<w){ 711 715 w=w2; … … 2862 2866 2863 2867 2864 static inline intquality_of_pos_in_strat_S(int pos, slimgb_alg* c){2868 static inline wlen_type quality_of_pos_in_strat_S(int pos, slimgb_alg* c){ 2865 2869 if (c->strat->lenSw!=NULL) return c->strat->lenSw[pos]; 2866 2870 return c->strat->lenS[pos]; 2867 2871 } 2868 static inline intquality_of_pos_in_strat_S_mult_high(int pos, poly high, slimgb_alg* c)2872 static inline wlen_type quality_of_pos_in_strat_S_mult_high(int pos, poly high, slimgb_alg* c) 2869 2873 //meant only for nc 2870 2874 { … … 2872 2876 pExpVectorDiff(m,high ,c->strat->S[pos]); 2873 2877 poly product=nc_mm_Mult_p(m, pCopy(c->strat->S[pos]), c->r); 2874 interg=pQuality(product,c);2878 wlen_type erg=pQuality(product,c); 2875 2879 pDelete(&m); 2876 2880 pDelete(&product); … … 2885 2889 { 2886 2890 int i; 2887 intquality_a=quality_of_pos_in_strat_S(erg.reduce_by,c);2891 wlen_type quality_a=quality_of_pos_in_strat_S(erg.reduce_by,c); 2888 2892 int best=erg.to_reduce_u+1; 2889 2893 /* … … 2896 2900 } 2897 2901 if(best!=erg.to_reduce_u+1){*/ 2898 intqc;2902 wlen_type qc; 2899 2903 best=find_best(los,erg.to_reduce_l,erg.to_reduce_u,qc,c); 2900 2904 if(qc<quality_a){ … … 2923 2927 2924 2928 int i; 2925 intquality_a=quality_of_pos_in_strat_S(erg.reduce_by,c);2929 wlen_type quality_a=quality_of_pos_in_strat_S(erg.reduce_by,c); 2926 2930 if (c->nc) 2927 2931 quality_a=quality_of_pos_in_strat_S_mult_high(erg.reduce_by, los[erg.to_reduce_u].p, c); 2928 2932 int best=erg.to_reduce_u+1; 2929 intqc;2933 wlen_type qc; 2930 2934 best=find_best(los,erg.to_reduce_l,erg.to_reduce_u,qc,c); 2931 2935 assume(qc==los[best].guess_quality(c)); … … 3001 3005 int best=erg.reduce_by; 3002 3006 wlen_type quality_a=los[erg.reduce_by].guess_quality(c); 3003 intqc;3007 wlen_type qc; 3004 3008 best=find_best(los,erg.to_reduce_l,erg.to_reduce_u,qc,c); 3005 3009 … … 3022 3026 //with same leading term 3023 3027 int il=erg.reduce_by; 3024 intquality_a =los[erg.reduce_by].guess_quality(c);3025 intqc;3028 wlen_type quality_a =los[erg.reduce_by].guess_quality(c); 3029 wlen_type qc; 3026 3030 while((il>0) && pLmEqual(los[il-1].p,los[il].p)){ 3027 3031 il--;
Note: See TracChangeset
for help on using the changeset viewer.