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

Function idInsertPoly

libpolys/polys/simpleideals.cc:831–847  ·  view source on GitHub ↗

insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted

Source from the content-addressed store, hash-verified

829/// insert h2 into h1 (if h2 is not the zero polynomial)
830/// return TRUE iff h2 was indeed inserted
831BOOLEAN idInsertPoly (ideal h1, poly h2)
832{
833 if (h2==NULL) return FALSE;
834 assume (h1 != NULL);
835
836 int j = IDELEMS(h1) - 1;
837
838 while ((j >= 0) && (h1->m[j] == NULL)) j--;
839 j++;
840 if (j==IDELEMS(h1))
841 {
842 pEnlargeSet(&(h1->m),IDELEMS(h1),16);
843 IDELEMS(h1)+=16;
844 }
845 h1->m[j]=h2;
846 return TRUE;
847}
848
849/// insert p into I on position pos
850BOOLEAN idInsertPolyOnPos (ideal I, poly p,int pos)

Callers 15

tropicalStarFunction · 0.85
ppreduceInitiallyFunction · 0.85
idMakeFunction · 0.85
idMakenFunction · 0.85
idMinusFunction · 0.85
sfreemonFunction · 0.85
id_complementFunction · 0.85
SimFacsetFunction · 0.85
idaddaFunction · 0.85
IsSimplexFunction · 0.85
complementsimplexFunction · 0.85
findbFunction · 0.85

Calls 1

pEnlargeSetFunction · 0.85

Tested by

no test coverage detected