- Timestamp:
- Sep 24, 2012, 2:52:20 PM (12 years ago)
- Branches:
- (u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
- Children:
- 92296297754bdb3c65ffad980c8e982ef37cf33b
- Parents:
- abe5c8b5ebdd2be025cd137e4a089c3780efb8a3
- Location:
- libpolys/polys/templates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/templates/p_kBucketSetLm__T.cc
rabe5c8 rf224d85 124 124 DECLARE_ORDSGN(const long* ordsgn = r->ordsgn); 125 125 poly p=NULL; 126 while(p==NULL){ 127 int found=-1000; 128 for (int i = 1; i<=bucket->buckets_used; i++) 126 while(p==NULL) 127 { 128 int found=-1000; 129 for (int i = 1; i<=bucket->buckets_used; i++) 130 { 131 if (bucket->buckets[i] != NULL) 132 { 133 if (p == NULL) 129 134 { 130 if (bucket->buckets[i] != NULL) 131 { 132 133 if (p == NULL) 134 { 135 p=bucket->buckets[i]; 136 found=i; 137 continue; 138 } 139 assume(p != NULL); 140 p_MemCmp__T(bucket->buckets[i]->exp, p->exp, length, ordsgn, goto Continue, goto Greater, goto Continue); 141 //assume(p_LmCmp(bucket->buckets[i],p,r)==1); 142 Greater: 143 //if (p_LmCmp(bucket->buckets[i],p,r)!=1) continue; 144 found=i; 145 p=bucket->buckets[i]; 146 Continue:; 147 } 135 p=bucket->buckets[i]; 136 found=i; 137 continue; 148 138 } 149 150 151 if (found<0) return; 152 assume(p==bucket->buckets[found]); 153 assume(p!=NULL); 154 155 p=kBucketExtractLmOfBucket(bucket, found); 156 assume(p!=NULL); 157 p_Test(p,r); 158 poly copy=p_LmInit(p, r); 159 160 for (int i = found+1; i<=bucket->buckets_used; i++) 161 { 162 163 if (bucket->buckets[i] != NULL) 164 { 165 if(p_LmEqual(bucket->buckets[i], copy,r)){ 166 poly q=kBucketExtractLmOfBucket(bucket,i); 167 assume(p!=q); 168 p=p_Add_q(p, q,r); 169 assume(pLength(bucket->buckets[i])==bucket->buckets_length[i]); 170 } 171 172 173 174 } 139 assume(p != NULL); 140 p_MemCmp__T(bucket->buckets[i]->exp, p->exp, length, ordsgn, goto Continue, goto Greater, goto Continue); 141 //assume(p_LmCmp(bucket->buckets[i],p,r)==1); 142 Greater: 143 //if (p_LmCmp(bucket->buckets[i],p,r)!=1) continue; 144 found=i; 145 p=bucket->buckets[i]; 146 Continue:; 147 } 148 } 149 if (found<0) return; 150 assume(p==bucket->buckets[found]); 151 assume(p!=NULL); 152 153 p=kBucketExtractLmOfBucket(bucket, found); 154 assume(p!=NULL); 155 p_Test(p,r); 156 poly copy=p_LmInit(p, r); 157 158 for (int i = found+1; i<=bucket->buckets_used; i++) 159 { 160 if (bucket->buckets[i] != NULL) 161 { 162 if(p_LmEqual(bucket->buckets[i], copy,r)) 163 { 164 poly q=kBucketExtractLmOfBucket(bucket,i); 165 assume(p!=q); 166 p=p_Add_q(p, q,r); 167 assume(pLength(bucket->buckets[i])==bucket->buckets_length[i]); 175 168 } 176 p_Delete(©, r); 169 } 170 } 171 p_Delete(©, r); 177 172 } 178 173 179 174 //assume(bucket->buckets[j] != NULL); 180 assume(pLength(p)==1); 181 lt = p; 182 175 assume(pLength(lt)==1); 176 183 177 bucket->buckets[0] = lt; 184 178 bucket->buckets_length[0] = 1; … … 186 180 kBucketAdjustBucketsUsed(bucket); 187 181 kbTest(bucket); 188 182 } 189 183 #endif -
libpolys/polys/templates/pp_Mult_mm__T.cc
rabe5c8 rf224d85 15 15 * 16 16 ***************************************************************/ 17 LINKAGE poly pp_Mult_mm__T(poly p, const poly m, const ring ri , poly &last)17 LINKAGE poly pp_Mult_mm__T(poly p, const poly m, const ring ri) 18 18 { 19 19 p_Test(p, ri); … … 21 21 if (p == NULL) 22 22 { 23 last = NULL;24 23 return NULL; 25 24 } … … 56 55 } 57 56 while (p != NULL); 58 last = q;59 57 pNext(q) = NULL; 60 58
Note: See TracChangeset
for help on using the changeset viewer.