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

Function prodMod

factory/facMul.cc:3185–3210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3183}
3184
3185CanonicalForm prodMod (const CFList& L, const CanonicalForm& M)
3186{
3187 if (L.isEmpty())
3188 return 1;
3189 int l= L.length();
3190 if (l == 1)
3191 return mod (L.getFirst(), M);
3192 else if (l == 2) {
3193 CanonicalForm result= mulMod2 (L.getFirst(), L.getLast(), M);
3194 return result;
3195 }
3196 else
3197 {
3198 l /= 2;
3199 CFList tmp1, tmp2;
3200 CFListIterator i= L;
3201 CanonicalForm buf1, buf2;
3202 for (int j= 1; j <= l; j++, i++)
3203 tmp1.append (i.getItem());
3204 tmp2= Difference (L, tmp1);
3205 buf1= prodMod (tmp1, M);
3206 buf2= prodMod (tmp2, M);
3207 CanonicalForm result= mulMod2 (buf1, buf2, M);
3208 return result;
3209 }
3210}
3211
3212CanonicalForm prodMod (const CFList& L, const CFList& M)
3213{

Callers 4

extFactorRecombinationFunction · 0.85
factorRecombinationFunction · 0.85
extFactorRecombinationFunction · 0.85
factorRecombinationFunction · 0.85

Calls 9

mulMod2Function · 0.85
DifferenceFunction · 0.85
mulModFunction · 0.85
modFunction · 0.70
isEmptyMethod · 0.45
lengthMethod · 0.45
getFirstMethod · 0.45
getLastMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected