3 * converts a list of modules into a minimal resolution */
| 3277 | * converts a list of modules into a minimal resolution |
| 3278 | */ |
| 3279 | syStrategy syForceMin(lists li) |
| 3280 | { |
| 3281 | int typ0; |
| 3282 | syStrategy result=(syStrategy)omAlloc0(sizeof(ssyStrategy)); |
| 3283 | |
| 3284 | resolvente fr = liFindRes(li,&(result->length),&typ0); |
| 3285 | result->minres = (resolvente)omAlloc0((result->length+1)*sizeof(ideal)); |
| 3286 | for (int i=result->length-1;i>=0;i--) |
| 3287 | { |
| 3288 | if (fr[i]!=NULL) |
| 3289 | result->minres[i] = idCopy(fr[i]); |
| 3290 | } |
| 3291 | omFreeSize((ADDRESS)fr,(result->length)*sizeof(ideal)); |
| 3292 | return result; |
| 3293 | } |
| 3294 | #endif |
| 3295 | // from weight.cc |
| 3296 | BOOLEAN kWeight(leftv res,leftv id) |