Changeset 7abd61 in git
- Timestamp:
- Nov 13, 2017, 5:19:33 PM (6 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- be94d37e5ac5d3409d99769283ea1d0f0e365d51
- Parents:
- bf6fa79192a542ca1e14fd45a92837cdd6ef38d2
- Location:
- libpolys/polys
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/clapconv.cc
rbf6fa7 r7abd61 68 68 else 69 69 { 70 poly term = p_Init(r); 71 pNext( term ) = NULL; 72 for ( int i = 1; i <= r->N; i++ ) 73 p_SetExp( term, i, exp[i], r); 74 pGetCoeff( term )=r->cf->convFactoryNSingN(f, r->cf); 75 p_Setm( term, r ); 76 if ( n_IsZero(pGetCoeff(term), r->cf) ) 77 { 78 p_Delete(&term,r); 70 number n=r->cf->convFactoryNSingN(f, r->cf); 71 if ( n_IsZero(n, r->cf) ) 72 { 73 n_Delete(&n,r->cf); 79 74 } 80 75 else 81 76 { 77 poly term = p_Init(r); 78 //pNext( term ) = NULL; // done by p_Init 79 pGetCoeff(term)=n; 80 p_SetExpV(term,exp,r); 82 81 sBucket_Merge_m(result,term); 83 82 } 84 83 } 85 84 } 86 87 85 88 86 CanonicalForm convSingPFactoryP( poly p, const ring r ) … … 178 176 { 179 177 poly term = p_Init(r); 180 pNext( term ) = NULL;178 //pNext( term ) = NULL; // done by p_Init 181 179 int i; 182 180 for ( i = rVar(r); i>0 ; i-- ) … … 257 255 { 258 256 poly a=NULL; 259 poly t;260 257 for( CFIterator i=f; i.hasTerms(); i++) 261 258 { 262 t= p_Init (r->cf->extRing); 263 p_GetCoeff(t, r->cf->extRing)= convFactoryNSingAN( i.coeff(), r ); 264 if (n_IsZero(p_GetCoeff(t,r->cf->extRing),r->cf->extRing->cf)) 265 { 266 p_Delete(&t,r->cf->extRing); 259 number n= convFactoryNSingAN( i.coeff(), r ); 260 if (n_IsZero(n,r->cf->extRing->cf)) 261 { 262 n_Delete(&n,r->cf->extRing->cf); 267 263 } 268 264 else 269 265 { 266 poly t= p_Init (r->cf->extRing); 267 pGetCoeff(t)=n; 270 268 p_SetExp(t,1,i.exp(),r->cf->extRing); 269 //p_Setm(t,r->cf->extRing);// not needed for rings with 1 variable 271 270 a=p_Add_q(a,t,r->cf->extRing); 272 271 } … … 349 348 { 350 349 poly term = p_Init(r); 351 pNext( term ) = NULL;350 //pNext( term ) = NULL; // done by p_Init 352 351 for ( int i = rVar(r); i>0; i-- ) 353 352 p_SetExp( term, i ,exp[i], r); -
libpolys/polys/monomials/p_polys.h
rbf6fa7 r7abd61 905 905 int shorter; 906 906 poly res = r->p_Procs->p_Add_q(p, q, shorter, r); 907 lp = (lp + lq)- shorter;907 lp += lq - shorter; 908 908 return res; 909 909 } … … 1482 1482 p_SetExp(p, j, ev[j], r); 1483 1483 1484 p_SetComp(p, ev[0],r);1484 if(ev[0]!=0) p_SetComp(p, ev[0],r); 1485 1485 p_Setm(p, r); 1486 1486 } -
libpolys/polys/sbuckets.cc
rbf6fa7 r7abd61 189 189 while (bucket->buckets[i].p != NULL) 190 190 { 191 p = p_Add_q(p, bucket->buckets[i].p, length, bucket->buckets[i].length, 192 bucket->bucket_ring); 191 int shorter; 192 p = bucket->bucket_ring->p_Procs->p_Add_q(p, bucket->buckets[i].p, 193 shorter, bucket->bucket_ring); 194 length+=bucket->buckets[i].length-shorter; 193 195 bucket->buckets[i].p = NULL; 194 196 bucket->buckets[i].length = 0; … … 218 220 while (bucket->buckets[i].p != NULL) 219 221 { 220 p = p_Add_q(p, bucket->buckets[i].p, length, bucket->buckets[i].length, 222 int shorter; 223 p = bucket->bucket_ring->p_Procs->p_Add_q(p, bucket->buckets[i].p, shorter, 221 224 bucket->bucket_ring); 225 length+= bucket->buckets[i].length-shorter; 222 226 bucket->buckets[i].p = NULL; 223 227 bucket->buckets[i].length = 0;
Note: See TracChangeset
for help on using the changeset viewer.