52 {
return bucket->bucket_ring; }
65 if(
bucket->buckets[
i].length != 0 )
69 return(
bucket->max_bucket == 0 );
77 const ring
r =
bucket->bucket_ring;
83 for(
int i = 0;
i <=
bucket->max_bucket;
i++)
109 if (
i == 0)
return j;
164 length +=
bucket->buckets[
i].length;
172 bucket->buckets[
i].length = length;
181 if (
p ==
NULL)
return;
182 if (length <= 0) length =
pLength(
p);
184 int i =
LOG2(length);
189 length +=
bucket->buckets[
i].length;
197 bucket->buckets[
i].length = length;
206 if (
p ==
NULL)
return;
207 if (length <= 0) length =
pLength(
p);
209 int i =
LOG2(length);
226 bucket->buckets[
i].length = length;
241 if (
i >
bucket->max_bucket)
goto done;
245 lr =
bucket->buckets[
i].length;
250 while (i <= bucket->max_bucket)
255 lr +=
bucket->buckets[
i].length;
280 if (
i >
bucket->max_bucket)
goto done;
284 lr =
bucket->buckets[
i].length;
292 while (i <= bucket->max_bucket)
343 if (
p ==
NULL)
break;
380 if (
p ==
NULL)
break;
sBucketPoly buckets[BIT_SIZEOF_LONG - 3]
void sBucket_Add_p(sBucket_pt bucket, poly p, int length)
adds poly p to bucket destroys p!
static poly p_Copy(poly p, const ring r)
returns a copy of p
poly sBucketSortMerge(poly p, const ring r)
Sorts p with bucketSort: assumes all monomials of p are different
poly sBucketSortAdd(poly p, const ring r)
Sorts p with bucketSort: p may have equal monomials
void sBucket_Merge_p(sBucket_pt bucket, poly p, int length)
Merges p into Spoly: assumes Bpoly and p have no common monoms destroys p!
void sBucketDestroy(sBucket_pt *bucket)
sBucket_pt sBucketCreate(const ring r)
void sBucketClearMerge(sBucket_pt bucket, poly *p, int *length)
static unsigned pLength(poly a)
static void p_Delete(poly *p, const ring r)
#define omGetSpecBin(size)
ring sBucketGetRing(const sBucket_pt bucket)
Returns bucket ring.
static poly p_Merge_q(poly p, poly q, const ring r)
void sBucketDeleteAndDestroy(sBucket_pt *bucket_pt)
bool sIsEmpty(const sBucket_pt bucket)
Test whether bucket is empty!?
static poly p_Add_q(poly p, poly q, const ring r)
#define omFreeBin(addr, bin)
void sBucketClearAdd(sBucket_pt bucket, poly *p, int *length)
static void sBucket_Merge_m(sBucket_pt bucket, poly p)
sBucket_pt sBucketCopy(const sBucket_pt bucket)
Copy sBucket non-intrusive!!!