| 198 | } |
| 199 | |
| 200 | int * iv2array(intvec * iv, const ring R) |
| 201 | { |
| 202 | int *s=(int *)omAlloc0((rVar(R)+1)*sizeof(int)); |
| 203 | int len=0; |
| 204 | if(iv!=NULL) |
| 205 | len=si_min(iv->length(),rVar(R)); // usually: rVar(R)==length() |
| 206 | int i; |
| 207 | //for(i=pVariables;i>len;i--) s[i]=1; |
| 208 | for(i=len;i>0;i--) s[i]=(*iv)[i-1]; |
| 209 | return s; |
| 210 | } |
| 211 | |
| 212 | /*2 |
| 213 | *computes the degree of the leading term of the polynomial |
no test coverage detected