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

Function scMult0Int

kernel/combinatorics/hdegree.cc:924–988  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

922}
923
924long scMult0Int(ideal S, ideal Q)
925{
926 id_LmTest(S, currRing);
927 if (Q!=NULL) id_LmTest(Q, currRing);
928
929 int mc;
930 hexist = hInit(S, Q, &hNexist);
931 if (!hNexist)
932 {
933 hMu = -1;
934 return -1;
935 }
936 else
937 hMu = 0;
938
939 const ring r = currRing;
940
941 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon));
942 hvar = (varset)omAlloc(((r->N) + 1) * sizeof(int));
943 hpur0 = (scmon)omAlloc((1 + ((r->N) * (r->N))) * sizeof(int));
944 mc = hisModule;
945 if (!mc)
946 {
947 hstc = hexist;
948 hNstc = hNexist;
949 }
950 else
951 hstc = (scfmon)omAlloc(hNexist * sizeof(scmon));
952 stcmem = hCreate((r->N) - 1);
953 loop
954 {
955 if (mc)
956 {
957 hComp(hexist, hNexist, mc, hstc, &hNstc);
958 if (!hNstc)
959 {
960 hMu = -1;
961 break;
962 }
963 }
964 hNvar = (r->N);
965 for (int i = hNvar; i; i--)
966 hvar[i] = i;
967 hStaircase(hstc, &hNstc, hvar, hNvar);
968 hSupp(hstc, hNstc, hvar, &hNvar);
969 if ((hNvar == (r->N)) && (hNstc >= (r->N)))
970 {
971 if ((hNvar > 2) && (hNstc > 10))
972 hOrdSupp(hstc, hNstc, hvar, hNvar);
973 memset(hpur0, 0, ((r->N) + 1) * sizeof(int));
974 hPure(hstc, 0, &hNstc, hvar, hNvar, hpur0, &hNpure);
975 if (hNpure == hNvar)
976 {
977 hLexS(hstc, hNstc, hvar, hNvar);
978 hMu += hZeroMult(hpur0, hstc, hNstc, hvar, hNvar);
979 }
980 else
981 hMu = -1;

Callers 3

jjVDIMFunction · 0.85
k_sca_moraFunction · 0.85
moraFunction · 0.85

Calls 9

hInitFunction · 0.85
hCreateFunction · 0.85
hCompFunction · 0.85
hStaircaseFunction · 0.85
hSuppFunction · 0.85
hOrdSuppFunction · 0.85
hPureFunction · 0.85
hZeroMultFunction · 0.85
ifFunction · 0.50

Tested by

no test coverage detected