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

Function kWeight

Singular/ipshell.cc:3296–3316  ·  view source on GitHub ↗

from weight.cc

Source from the content-addressed store, hash-verified

3294#endif
3295// from weight.cc
3296BOOLEAN kWeight(leftv res,leftv id)
3297{
3298 ideal F=(ideal)id->Data();
3299 intvec * iv = new intvec(rVar(currRing));
3300 polyset s;
3301 int sl, n, i;
3302 int *x;
3303
3304 res->data=(char *)iv;
3305 s = F->m;
3306 sl = IDELEMS(F) - 1;
3307 n = rVar(currRing);
3308 double wNsqr = (double)2.0 / (double)n;
3309 wFunctional = wFunctionalBuch;
3310 x = (int * )omAlloc(2 * (n + 1) * sizeof(int));
3311 wCall(s, sl, x, wNsqr, currRing);
3312 for (i = n; i!=0; i--)
3313 (*iv)[i-1] = x[i + n + 1];
3314 omFreeSize((ADDRESS)x, 2 * (n + 1) * sizeof(int));
3315 return FALSE;
3316}
3317
3318BOOLEAN kQHWeight(leftv res,leftv v)
3319{

Callers

nothing calls this directly

Calls 3

rVarFunction · 0.85
wCallFunction · 0.85
DataMethod · 0.45

Tested by

no test coverage detected