| 2833 | } |
| 2834 | |
| 2835 | ideal idMinEmbedding_with_map_v(ideal arg,intvec **w, ideal &trans, int* g) |
| 2836 | { |
| 2837 | if (idIs0(arg)) |
| 2838 | { |
| 2839 | trans=idFreeModule(arg->rank); |
| 2840 | if (g!=NULL) |
| 2841 | { |
| 2842 | for(int i=0;i<arg->rank;i++) g[i]=i+1; |
| 2843 | } |
| 2844 | return arg; |
| 2845 | } |
| 2846 | int *red_comp=(int*)omAlloc((arg->rank+1)*sizeof(int)); |
| 2847 | int del=0; |
| 2848 | ideal res=idMinEmbedding1(arg,FALSE,w,red_comp,del); |
| 2849 | trans=idLift(arg,res,NULL,TRUE,FALSE,FALSE,NULL); |
| 2850 | for(int i=1;i<=arg->rank;i++) |
| 2851 | { |
| 2852 | g[i-1]=red_comp[i]; |
| 2853 | } |
| 2854 | idDeleteComps(res,red_comp,del); |
| 2855 | return res; |
| 2856 | } |
| 2857 | |
| 2858 | extern void ipPrint_MA0(matrix m, const char *name); |
| 2859 | #if 0 // unused |
no test coverage detected