Changeset 192bef4 in git
- Timestamp:
- Jan 22, 2003, 6:35:39 PM (21 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- e2f5202c134ce37732c7ae7c16e6c964c93813f3
- Parents:
- 88531526db18f23a3fcd4937830c69e1da7ea986
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/tgb.cc
r8853152 r192bef4 11 11 #ifdef LEN_VAR1 12 12 // erste Variante: Laenge: Anzahl der Monome 13 int pSLength(poly p ) {14 return pLength(p); }13 int pSLength(poly p, int l) { 14 return l; } 15 15 int kSBucketLength(kBucket* bucket) {return bucket_guess(bucket);} 16 16 #endif … … 18 18 #ifdef LEN_VAR2 19 19 // 2. Variante: Laenge: Platz fuer die Koeff. 20 int pSLength(poly p )20 int pSLength(poly p,int l) 21 21 { 22 22 int s=0; … … 30 30 for (i=MAX_BUCKET;i>=0;i--) 31 31 { 32 s+=pSLength(b->buckets[i] );32 s+=pSLength(b->buckets[i],0); 33 33 } 34 34 return s; … … 38 38 #ifdef LEN_VAR3 39 39 // 3.Variante: Laenge: Platz fuer Leitk * Monomanzahl 40 int pSLength(poly p )40 int pSLength(poly p,int l) 41 41 { 42 42 int c=nSize(pGetCoeff(p))+1; 43 return c* pLength(p);43 return c*l /*pLength(p)*/; 44 44 } 45 45 int kSBucketLength(kBucket* b) … … 50 50 for (i=MAX_BUCKET;i>0;i--) 51 51 { 52 s+= pLength(b->buckets[i]);52 s+=b->buckets_length[i] /*pLength(b->buckets[i])*/; 53 53 } 54 54 return s*c; … … 58 58 #ifdef LEN_VAR4 59 59 // 4.Variante: Laenge: Platz fuer Leitk * (1+Platz fuer andere Koeff.) 60 int pSLength(poly p )60 int pSLength(poly p, int l) 61 61 { 62 62 int s=1; … … 74 74 { 75 75 if(b->buckets[i]==NULL) continue; 76 s+=pSLength(b->buckets[i] );76 s+=pSLength(b->buckets[i],0); 77 77 } 78 78 return s*c; … … 300 300 int i; 301 301 if (c->is_char0) 302 i=simple_posInS(c->strat,h,pSLength(h ),c->is_char0);302 i=simple_posInS(c->strat,h,pSLength(h,len),c->is_char0); 303 303 else 304 304 i=simple_posInS(c->strat,h,len,c->is_char0); … … 321 321 322 322 if(c->strat->lenSw) 323 c->strat->lenSw[i]=pSLength(P.p );323 c->strat->lenSw[i]=pSLength(P.p,len); 324 324 325 325 … … 1383 1383 int new_pos; 1384 1384 if(c->is_char0) 1385 new_pos=simple_posInS(c->strat,sec_copy,pSLength(sec_copy),c->is_char0);//hac 1385 new_pos=simple_posInS(c->strat,sec_copy, 1386 pSLength(sec_copy,new_length), 1387 c->is_char0);//hac 1386 1388 else 1387 1389 new_pos=simple_posInS(c->strat,sec_copy,new_length,c->is_char0);//hack … … 1427 1429 c->strat->lenS[old_pos]=new_length; 1428 1430 if(c->strat->lenSw) 1429 c->strat->lenS[old_pos]=pSLength(sec_copy );1431 c->strat->lenS[old_pos]=pSLength(sec_copy,new_length); 1430 1432 int i=0; 1431 1433 for(i=new_pos;i<old_pos;i++){ … … 1604 1606 int new_pos; 1605 1607 if(c->is_char0) 1606 new_pos=simple_posInS(c->strat,sec_copy,pSLength(sec_copy),c->is_char0);//hac 1608 new_pos=simple_posInS(c->strat,sec_copy, 1609 pSLength(sec_copy,new_length), 1610 c->is_char0);//hac 1607 1611 else 1608 1612 new_pos=simple_posInS(c->strat,sec_copy,new_length,c->is_char0);//hack … … 1638 1642 c->strat->lenS[old_pos]=new_length; 1639 1643 if(c->strat->lenSw) 1640 c->strat->lenS[old_pos]=pSLength(sec_copy );1644 c->strat->lenS[old_pos]=pSLength(sec_copy,new_length); 1641 1645 int i=0; 1642 1646 for(i=new_pos;i<old_pos;i++){ … … 1913 1917 while (n<PAR_N) { 1914 1918 if 1915 ( p=find_next_pair2(c, TRUE)) //the = is wanted1919 ((p=find_next_pair2(c, TRUE))!=NULL) //the = is wanted 1916 1920 { 1917 1921 if(p->i<0){ … … 2230 2234 int new_pos; 2231 2235 if (c->is_char0) 2232 simple_posInS(c->strat,c->S->m[i],pSLength(c->S->m[i] ),c->is_char0);2236 simple_posInS(c->strat,c->S->m[i],pSLength(c->S->m[i],c->lengths[i]),c->is_char0); 2233 2237 else 2234 2238 simple_posInS(c->strat,c->S->m[i],c->lengths[i],c->is_char0); … … 2257 2261 c->strat->lenS[old_pos]=c->lengths[i]; 2258 2262 if (c->strat->lenSw) 2259 c->strat->lenSw[old_pos]=pSLength(c->S->m[i] );2263 c->strat->lenSw[old_pos]=pSLength(c->S->m[i],c->lengths[i]); 2260 2264 2261 2265 if (new_pos<old_pos)
Note: See TracChangeset
for help on using the changeset viewer.