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

Function TestGBEngine

kernel/fglm/test.cc:67–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65#include "kernel/polys.h"
66
67void TestGBEngine()
68{
69
70 // R = MPolynomialRing_polydict(QQ,5,'w,x,y,z,C', order='degrevlex')
71 // J = (w*w - x*z, w*x - y*z, x*x - w*y, x*y - z*z, y*y - w*z)
72
73 const short w = 1;
74 const short x = 2;
75 const short y = 3;
76 const short z = 4;
77
78 const short N = (z - w + 1);
79
80 char **n=(char**)omalloc(N*sizeof(char*));
81
82
83 n[w-1]=omStrDup("w");
84 n[x-1]=omStrDup("x");
85 n[y-1]=omStrDup("y");
86 n[z-1]=omStrDup("z");
87
88
89 const int D = 3;
90 rRingOrder_t *order = (rRingOrder_t *) omAlloc0(D* sizeof(rRingOrder_t));
91 int *block0 = (int *)omAlloc0(D * sizeof(int));
92 int *block1 = (int *)omAlloc0(D * sizeof(int));
93
94 order[0] = ringorder_dp;
95 block0[0] = 1;
96 block1[0] = N;
97
98 order[1] = ringorder_C;
99 block0[1] = 1;
100 block1[1] = N;
101
102 ring R = rDefault(0, N, n, D, order, block0, block1);
103
104// ring R = rDefault(0, N, n);
105
106 rWrite(R); PrintLn();
107
108#ifdef RDEBUG
109 rDebugPrint(R);
110#endif
111
112 ideal I = idInit(5, 1);
113
114 int gen = 0;
115
116 {
117 // -xz
118 poly p = p_ISet(-1,R);
119
120 p_SetExp(p, x, 1, R);
121 p_SetExp(p, z, 1, R);
122 p_Setm(p, R);
123
124 assume( p_GetExp(p, x, R) == 1 );

Callers 1

mainFunction · 0.70

Calls 15

omAlloc0Function · 0.85
rWriteFunction · 0.85
rDebugPrintFunction · 0.85
idInitFunction · 0.85
p_ISetFunction · 0.85
p_SetExpFunction · 0.85
p_SetmFunction · 0.85
p_GetExpFunction · 0.85
p_Add_qFunction · 0.85
PrintSFunction · 0.85
idShowFunction · 0.85
rChangeCurrRingFunction · 0.85

Tested by

no test coverage detected