2 *sorts the kbase for idCoef* in a special way (lexicographically *with x_max,...,x_1) */
| 2541 | *with x_max,...,x_1) |
| 2542 | */ |
| 2543 | ideal idCreateSpecialKbase(ideal kBase,intvec ** convert) |
| 2544 | { |
| 2545 | int i; |
| 2546 | ideal result; |
| 2547 | |
| 2548 | if (idIs0(kBase)) return NULL; |
| 2549 | result = idInit(IDELEMS(kBase),kBase->rank); |
| 2550 | *convert = idSort(kBase,FALSE); |
| 2551 | for (i=0;i<(*convert)->length();i++) |
| 2552 | { |
| 2553 | result->m[i] = pCopy(kBase->m[(**convert)[i]-1]); |
| 2554 | } |
| 2555 | return result; |
| 2556 | } |
| 2557 | |
| 2558 | /*2 |
| 2559 | *returns the index of a given monom in the list of the special kbase |
no test coverage detected