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

Function syGetAlgorithm

kernel/ideals.cc:3642–3712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3640}
3641
3642GbVariant syGetAlgorithm(char *n, const ring r, const ideal /*M*/)
3643{
3644 GbVariant alg=GbDefault;
3645 if (strcmp(n,"default")==0) alg=GbDefault;
3646 else if (strcmp(n,"slimgb")==0) alg=GbSlimgb;
3647 else if (strcmp(n,"std")==0) alg=GbStd;
3648 else if (strcmp(n,"sba")==0) alg=GbSba;
3649 else if (strcmp(n,"singmatic")==0) alg=GbSingmatic;
3650 else if (strcmp(n,"groebner")==0) alg=GbGroebner;
3651 else if (strcmp(n,"modstd")==0) alg=GbModstd;
3652 else if (strcmp(n,"ffmod")==0) alg=GbFfmod;
3653 else if (strcmp(n,"nfmod")==0) alg=GbNfmod;
3654 else if (strcmp(n,"std:sat")==0) alg=GbStdSat;
3655 else Warn(">>%s<< is an unknown algorithm",n);
3656
3657 if (alg==GbSlimgb) // test conditions for slimgb
3658 {
3659 if(rHasGlobalOrdering(r)
3660 &&(!rIsNCRing(r))
3661 &&(r->qideal==NULL)
3662 &&(!rField_is_Ring(r)))
3663 {
3664 return GbSlimgb;
3665 }
3666 if (TEST_OPT_PROT)
3667 WarnS("requires: coef:field, commutative, global ordering, not qring");
3668 }
3669 else if (alg==GbSba) // cond. for sba
3670 {
3671 if(rField_is_Domain(r)
3672 &&(!rIsNCRing(r))
3673 &&(rHasGlobalOrdering(r)))
3674 {
3675 return GbSba;
3676 }
3677 if (TEST_OPT_PROT)
3678 WarnS("requires: coef:domain, commutative, global ordering");
3679 }
3680 else if (alg==GbGroebner) // cond. for groebner
3681 {
3682 return GbGroebner;
3683 }
3684 else if(alg==GbModstd) // cond for modstd: Q or Q(a)
3685 {
3686 if(ggetid("modStd")==NULL)
3687 {
3688 WarnS(">>modStd<< not found");
3689 }
3690 else if(rField_is_Q(r)
3691 &&(!rIsNCRing(r))
3692 &&(rHasGlobalOrdering(r)))
3693 {
3694 return GbModstd;
3695 }
3696 if (TEST_OPT_PROT)
3697 WarnS("requires: coef:QQ, commutative, global ordering");
3698 }
3699 else if(alg==GbStdSat) // cond for std:sat: 2 blocks of variables

Callers 8

jjSYZ_2Function · 0.85
jjELIMIN_ALGFunction · 0.85
jjINTERSEC3SFunction · 0.85
jjMODULO3SFunction · 0.85
jjLIFTSTD_ALGFunction · 0.85
jjLIFT_4Function · 0.85
jjLIFTSTD_MFunction · 0.85
jjMODULO4Function · 0.85

Calls 7

WarnFunction · 0.85
rHasGlobalOrderingFunction · 0.85
rIsNCRingFunction · 0.85
WarnSFunction · 0.85
rField_is_DomainFunction · 0.85
ggetidFunction · 0.85
rField_is_QFunction · 0.85

Tested by

no test coverage detected