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

Function idMultSect

kernel/ideals.cc:471–587  ·  view source on GitHub ↗

2 * ideal/module intersection for a list of objects * given as 'resolvente' */

Source from the content-addressed store, hash-verified

469* given as 'resolvente'
470*/
471ideal idMultSect(resolvente arg, int length, GbVariant alg)
472{
473 int i,j=0,k=0,l,maxrk=-1,realrki;
474 unsigned syzComp;
475 ideal bigmat,tempstd,result;
476 poly p;
477 int isIdeal=0;
478
479 /* find 0-ideals and max rank -----------------------------------*/
480 for (i=0;i<length;i++)
481 {
482 if (!idIs0(arg[i]))
483 {
484 realrki=id_RankFreeModule(arg[i],currRing);
485 k++;
486 j += IDELEMS(arg[i]);
487 if (realrki>maxrk) maxrk = realrki;
488 }
489 else
490 {
491 if (arg[i]!=NULL)
492 {
493 return idInit(1,arg[i]->rank);
494 }
495 }
496 }
497 if (maxrk == 0)
498 {
499 isIdeal = 1;
500 maxrk = 1;
501 }
502 /* init -----------------------------------------------------------*/
503 j += maxrk;
504 syzComp = k*maxrk;
505
506 ring orig_ring=currRing;
507 ring syz_ring=rAssure_SyzOrder(orig_ring,TRUE);
508 rSetSyzComp(syzComp,syz_ring);
509 rChangeCurrRing(syz_ring);
510
511 bigmat = idInit(j,(k+1)*maxrk);
512 /* create unit matrices ------------------------------------------*/
513 for (i=0;i<maxrk;i++)
514 {
515 for (j=0;j<=k;j++)
516 {
517 p = pOne();
518 pSetComp(p,i+1+j*maxrk);
519 pSetmComp(p);
520 bigmat->m[i] = pAdd(bigmat->m[i],p);
521 }
522 }
523 /* enter given ideals ------------------------------------------*/
524 i = maxrk;
525 k = 0;
526 for (j=0;j<length;j++)
527 {
528 if (arg[j]!=NULL)

Callers 3

jjINTERSECT3Function · 0.85
jjINTERSECT_PLFunction · 0.85
Approx_StepFunction · 0.85

Calls 12

idIs0Function · 0.85
idInitFunction · 0.85
rAssure_SyzOrderFunction · 0.85
rSetSyzCompFunction · 0.85
rChangeCurrRingFunction · 0.85
prCopyRFunction · 0.85
p_ShiftFunction · 0.85
WarnSFunction · 0.85
idGroebnerFunction · 0.85
rDeleteFunction · 0.85
idSkipZeroesFunction · 0.85
id_RankFreeModuleFunction · 0.50

Tested by

no test coverage detected