| 1887 | } |
| 1888 | |
| 1889 | BOOLEAN 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 | |
| 1908 | void id_Normalize(ideal I,const ring r) /* for ideal/matrix */ |
| 1909 | { |
no test coverage detected