2 * returns the presentation of an isomorphic, minimally * embedded module (arg represents the quotient!) */
| 2776 | * embedded module (arg represents the quotient!) |
| 2777 | */ |
| 2778 | static ideal idMinEmbedding1(ideal arg,BOOLEAN inPlace, intvec **w, |
| 2779 | int* red_comp, int &del) |
| 2780 | { |
| 2781 | if (idIs0(arg)) return idInit(1,arg->rank); |
| 2782 | int i,next_gen,next_comp; |
| 2783 | ideal res=arg; |
| 2784 | if (!inPlace) res = idCopy(arg); |
| 2785 | res->rank=si_max(res->rank,id_RankFreeModule(res,currRing)); |
| 2786 | for (i=res->rank;i>=0;i--) red_comp[i]=i; |
| 2787 | |
| 2788 | loop |
| 2789 | { |
| 2790 | next_gen = id_ReadOutPivot(res, &next_comp, currRing); |
| 2791 | if (next_gen<0) break; |
| 2792 | del++; |
| 2793 | syGaussForOne(res,next_gen,next_comp,0,IDELEMS(res)); |
| 2794 | for(i=next_comp+1;i<=arg->rank;i++) red_comp[i]--; |
| 2795 | if ((w !=NULL)&&(*w!=NULL)) |
| 2796 | { |
| 2797 | for(i=next_comp;i<(*w)->length();i++) (**w)[i-1]=(**w)[i]; |
| 2798 | } |
| 2799 | } |
| 2800 | |
| 2801 | idSkipZeroes(res); |
| 2802 |
no test coverage detected