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

Function copyT

kernel/GBEngine/kstdfac.cc:25–55  ·  view source on GitHub ↗

3 * copy o->T to n->T, assumes that n->S is already copied */

Source from the content-addressed store, hash-verified

23* copy o->T to n->T, assumes that n->S is already copied
24*/
25static void copyT (kStrategy o,kStrategy n)
26{
27 int i,j;
28 poly p;
29 TSet t=(TSet)omAlloc0(o->tmax*sizeof(TObject));
30 TObject** r = (TObject**)omAlloc0(o->tmax*sizeof(TObject*));
31
32 for (j=0; j<=o->tl; j++)
33 {
34 t[j] = o->T[j];
35 r[t[j].i_r] = &t[j];
36 p = o->T[j].p;
37 i = -1;
38 loop
39 {
40 i++;
41 if (i>o->sl)
42 {
43 t[j].p=pCopy(p);
44 break;
45 }
46 if (p == o->S[i])
47 {
48 t[j].p=n->S[i];
49 break;
50 }
51 }
52 t[j].t_p = NULL; // ?? or t[j].p ??
53 t[j].max_exp = NULL; // ?? or p_GetMaxExpP(t[j].t_p,o->tailRing); ??
54 t[j].pLength = pLength(p);
55 }
56 n->T=t;
57 n->R=r;
58}

Callers 1

kStratCopyFunction · 0.85

Calls 2

omAlloc0Function · 0.85
pLengthFunction · 0.85

Tested by

no test coverage detected