MCPcopy Create free account
hub / github.com/Singular/Singular / bit_reduce

Function bit_reduce

kernel/digitech.cc:15–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13STATIC_INST_VAR ideal zero_ideal;
14
15void bit_reduce(poly & f,ring r)
16{
17 poly p=f;
18 kBucket_pt erg_bucket= kBucketCreate(r);
19 kBucketInit(erg_bucket,NULL,0 /*pLength(P.p)*/);
20 while(p)
21 {
22 poly next=pNext(p);
23 pNext(p)=NULL;
24
25 int i;
26 int max=rVar(r);
27 for(i=1;i<=max;i++)
28 {
29 unsigned long exp=p_GetExp(p,i,r);
30 if(exp!=0)
31 p_SetExp(p,i,1,r);
32
33 }
34 p_Setm(p,r);
35 int pseudo_len=0;
36 kBucket_Add_q(erg_bucket,p,&pseudo_len);
37 p=next;
38 }
39
40 int len=0;
41 poly erg;
42 kBucketClear(erg_bucket,&erg, &len);
43 kBucketDestroy(&erg_bucket);
44 f=erg;
45}
46
47poly uni_subst_bits(poly outer_uni, poly inner_multi, ring r)
48{

Callers 2

uni_subst_bitsFunction · 0.85
redTailShortFunction · 0.85

Calls 9

kBucketCreateFunction · 0.85
kBucketInitFunction · 0.85
rVarFunction · 0.85
p_GetExpFunction · 0.85
p_SetExpFunction · 0.85
p_SetmFunction · 0.85
kBucket_Add_qFunction · 0.85
kBucketDestroyFunction · 0.85
kBucketClearFunction · 0.50

Tested by

no test coverage detected