MCPcopy Create free account
hub / github.com/Singular/Singular / idMinEmbedding1

Function idMinEmbedding1

kernel/ideals.cc:2778–2799  ·  view source on GitHub ↗

2 * returns the presentation of an isomorphic, minimally * embedded module (arg represents the quotient!) */

Source from the content-addressed store, hash-verified

2776* embedded module (arg represents the quotient!)
2777*/
2778static 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

Callers 3

idMinEmbeddingFunction · 0.85
idMinEmbedding_with_mapFunction · 0.85

Calls 8

idIs0Function · 0.85
idInitFunction · 0.85
idCopyFunction · 0.85
si_maxFunction · 0.85
id_ReadOutPivotFunction · 0.85
syGaussForOneFunction · 0.85
id_RankFreeModuleFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected