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

Function syConvRes

Singular/ipshell.cc:3177–3244  ·  view source on GitHub ↗

3 * converts a resolution into a list of modules */

Source from the content-addressed store, hash-verified

3175* converts a resolution into a list of modules
3176*/
3177lists syConvRes(syStrategy syzstr,BOOLEAN toDel,int add_row_shift)
3178{
3179 resolvente fullres = syzstr->fullres;
3180 resolvente minres = syzstr->minres;
3181
3182 const int length = syzstr->length;
3183
3184 if ((fullres==NULL) && (minres==NULL))
3185 {
3186 if (syzstr->hilb_coeffs==NULL)
3187 { // La Scala
3188 fullres = syReorder(syzstr->res, length, syzstr);
3189 }
3190 else
3191 { // HRES
3192 minres = syReorder(syzstr->orderedRes, length, syzstr);
3193 syKillEmptyEntres(minres, length);
3194 }
3195 }
3196
3197 resolvente tr;
3198 int typ0=IDEAL_CMD;
3199
3200 if (minres!=NULL)
3201 tr = minres;
3202 else
3203 tr = fullres;
3204
3205 resolvente trueres=NULL;
3206 intvec ** w=NULL;
3207
3208 if (length>0)
3209 {
3210 trueres = (resolvente)omAlloc0((length)*sizeof(ideal));
3211 for (int i=length-1;i>=0;i--)
3212 {
3213 if (tr[i]!=NULL)
3214 {
3215 trueres[i] = idCopy(tr[i]);
3216 }
3217 }
3218 if ( id_RankFreeModule(trueres[0], currRing) > 0)
3219 typ0 = MODUL_CMD;
3220 if (syzstr->weights!=NULL)
3221 {
3222 w = (intvec**)omAlloc0(length*sizeof(intvec*));
3223 for (int i=length-1;i>=0;i--)
3224 {
3225 if (syzstr->weights[i]!=NULL) w[i] = ivCopy(syzstr->weights[i]);
3226 }
3227 }
3228 }
3229
3230 lists li = liMakeResolv(trueres, length, syzstr->list_length,typ0,
3231 w, add_row_shift);
3232
3233 if (toDel)
3234 syKillComputation(syzstr);

Callers 4

jjLIST_PLFunction · 0.85
iiR2L_lFunction · 0.85
StringMethod · 0.85
jiA_LIST_RESFunction · 0.85

Calls 8

syReorderFunction · 0.85
syKillEmptyEntresFunction · 0.85
omAlloc0Function · 0.85
idCopyFunction · 0.85
ivCopyFunction · 0.85
liMakeResolvFunction · 0.85
syKillComputationFunction · 0.85
id_RankFreeModuleFunction · 0.50

Tested by

no test coverage detected