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

Function id_Compactify

libpolys/polys/simpleideals.cc:1396–1417  ·  view source on GitHub ↗

2 *skips all zeroes and double elements, searches also for units */

Source from the content-addressed store, hash-verified

1394*skips all zeroes and double elements, searches also for units
1395*/
1396void id_Compactify(ideal id, const ring r)
1397{
1398 int i;
1399 BOOLEAN b=FALSE;
1400
1401 i = IDELEMS(id)-1;
1402 while ((! b) && (i>=0))
1403 {
1404 b=p_IsUnit(id->m[i],r);
1405 i--;
1406 }
1407 if (b)
1408 {
1409 for(i=IDELEMS(id)-1;i>=0;i--) p_Delete(&id->m[i],r);
1410 id->m[0]=p_One(r);
1411 }
1412 else
1413 {
1414 id_DelMultiples(id,r);
1415 }
1416 idSkipZeroes(id);
1417}
1418
1419/// returns the ideals of initial terms
1420ideal id_Head(ideal h,const ring r)

Callers 3

id_AddFunction · 0.85
id_MultFunction · 0.85
do_t_rep_gbFunction · 0.85

Calls 5

p_IsUnitFunction · 0.85
p_DeleteFunction · 0.85
p_OneFunction · 0.85
id_DelMultiplesFunction · 0.85
idSkipZeroesFunction · 0.85

Tested by

no test coverage detected