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

Function kstd

Singular/dyn_modules/loctriv/loctriv.cc:17–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include "Singular/ipid.h"
16
17static BOOLEAN kstd(leftv res, leftv args)
18{
19 const short t1[]={2,MODUL_CMD,INT_CMD};
20 if (iiCheckTypes(args,t1,1))
21 {
22 ideal h1=(ideal)args->CopyD();
23 int k=(int)(long)args->next->Data();
24 ideal s_h1;
25 ideal s_h3;
26 ring orig_ring;
27 ring syz_ring;
28 intvec *w=NULL;
29
30 assume(currRing != NULL);
31 orig_ring=currRing;
32 syz_ring=rAssure_SyzComp(orig_ring);
33 rSetSyzComp(k,syz_ring);
34 rChangeCurrRing(syz_ring);
35
36 if (orig_ring != syz_ring)
37 {
38 s_h1=idrCopyR_NoSort(h1,orig_ring,syz_ring);
39 }
40 else
41 {
42 s_h1 = h1;
43 }
44
45 s_h3=kStd(s_h1,NULL,testHomog,&w,NULL,k);
46
47 if (orig_ring != syz_ring)
48 {
49 idDelete(&s_h1);
50 idSkipZeroes(s_h3);
51 rChangeCurrRing(orig_ring);
52 s_h3 = idrMoveR_NoSort(s_h3, syz_ring, orig_ring);
53 rKill(syz_ring);
54 }
55 else
56 {
57 idSkipZeroes(s_h3);
58 }
59 res->data=(void *)s_h3;
60 res->rtyp=MODUL_CMD;
61 return FALSE;
62 }
63 else
64 return TRUE;
65}
66
67//------------------------------------------------------------------------
68// initialisation of the module

Callers

nothing calls this directly

Calls 11

iiCheckTypesFunction · 0.85
rAssure_SyzCompFunction · 0.85
rSetSyzCompFunction · 0.85
rChangeCurrRingFunction · 0.85
idrCopyR_NoSortFunction · 0.85
kStdFunction · 0.85
idSkipZeroesFunction · 0.85
idrMoveR_NoSortFunction · 0.85
rKillFunction · 0.85
CopyDMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected