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

Function id_IsZeroDim

libpolys/polys/simpleideals.cc:1889–1906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1887}
1888
1889BOOLEAN id_IsZeroDim(ideal I, const ring r)
1890{
1891 BOOLEAN *UsedAxis=(BOOLEAN *)omAlloc0(rVar(r)*sizeof(BOOLEAN));
1892 int i,n;
1893 poly po;
1894 BOOLEAN res=TRUE;
1895 for(i=IDELEMS(I)-1;i>=0;i--)
1896 {
1897 po=I->m[i];
1898 if ((po!=NULL) &&((n=p_IsPurePower(po,r))!=0)) UsedAxis[n-1]=TRUE;
1899 }
1900 for(i=rVar(r)-1;i>=0;i--)
1901 {
1902 if(UsedAxis[i]==FALSE) {res=FALSE; break;} // not zero-dim.
1903 }
1904 omFreeSize(UsedAxis,rVar(r)*sizeof(BOOLEAN));
1905 return res;
1906}
1907
1908void id_Normalize(ideal I,const ring r) /* for ideal/matrix */
1909{

Callers 1

idIsZeroDimFunction · 0.85

Calls 3

omAlloc0Function · 0.85
rVarFunction · 0.85
p_IsPurePowerFunction · 0.85

Tested by

no test coverage detected