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

Function idPrepare_print

Singular/dyn_modules/customstd/customstd.cc:208–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208static ideal idPrepare_print (ideal h1, ideal h11, tHomog hom, int syzcomp, intvec **w)
209{
210 ideal h2,h22;
211 int j,k;
212 poly p,q;
213
214 assume(!idIs0(h1));
215 k = id_RankFreeModule(h1,currRing);
216 if (h11!=NULL)
217 {
218 k = si_max(k,(int)id_RankFreeModule(h11,currRing));
219 h22=idCopy(h11);
220 }
221 h2=idCopy(h1);
222 int i = IDELEMS(h2);
223 if (h11!=NULL) i+=IDELEMS(h22);
224 if (k == 0)
225 {
226 id_Shift(h2,1,currRing);
227 if (h11!=NULL) id_Shift(h22,1,currRing);
228 k = 1;
229 }
230 if (syzcomp<k)
231 {
232 Warn("syzcomp too low, should be %d instead of %d",k,syzcomp);
233 syzcomp = k;
234 rSetSyzComp(k,currRing);
235 }
236 h2->rank = syzcomp+i;
237
238 for (j=0; j<IDELEMS(h2); j++)
239 {
240 p = h2->m[j];
241 q = pOne();
242 pSetComp(q,syzcomp+1+j);
243 pSetmComp(q);
244 if (p!=NULL)
245 {
246 {
247 while (pNext(p)) pIter(p);
248 p->next = q;
249 }
250 }
251 else
252 h2->m[j]=q;
253 }
254 if (h11!=NULL)
255 {
256 ideal h=id_SimpleAdd(h2,h22,currRing);
257 id_Delete(&h2,currRing);
258 id_Delete(&h22,currRing);
259 h2=h;
260 }
261
262 idTest(h2);
263 #if 0
264 matrix TT=id_Module2Matrix(idCopy(h2),currRing);
265 PrintS(" --------------before std------------------------\n");

Callers 1

idSyzygies_printFunction · 0.85

Calls 14

idIs0Function · 0.85
si_maxFunction · 0.85
idCopyFunction · 0.85
id_ShiftFunction · 0.85
WarnFunction · 0.85
rSetSyzCompFunction · 0.85
id_SimpleAddFunction · 0.85
id_DeleteFunction · 0.85
id_Module2MatrixFunction · 0.85
PrintSFunction · 0.85
ipPrint_MA0Function · 0.85
idGroebner_printFunction · 0.85

Tested by

no test coverage detected