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

Function uniAbsFactorize

factory/facAbsBiFact.cc:38–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36TIMING_DEFINE_PRINT(fac_evalpoint)
37
38CFAFList uniAbsFactorize (const CanonicalForm& F, bool full)
39{
40 CFAFList result;
41 if (degree (F) == 1)
42 {
43 bool isRat= isOn (SW_RATIONAL);
44 On (SW_RATIONAL);
45 result= CFAFList (CFAFactor (F/Lc(F), 1, 1));
46 result.insert (CFAFactor (Lc (F), 1, 1));
47 if (!isRat)
48 Off (SW_RATIONAL);
49 return result;
50 }
51 CanonicalForm LcF= 1;
52 Variable alpha;
53 CFFList QaFactors;
54 CFFListIterator iter;
55 alpha= rootOf (F);
56 QaFactors= factorize (F, alpha);
57 iter= QaFactors;
58 if (iter.getItem().factor().inCoeffDomain())
59 {
60 LcF = iter.getItem().factor();
61 iter++;
62 }
63 for (;iter.hasItem(); iter++)
64 {
65 if (full)
66 result.append (CFAFactor (iter.getItem().factor(), getMipo (alpha),
67 iter.getItem().exp()));
68 if (!full && degree (iter.getItem().factor()) == 1)
69 {
70 result.append (CFAFactor (iter.getItem().factor(), getMipo (alpha),
71 iter.getItem().exp()));
72 break;
73 }
74 }
75 result.insert (CFAFactor (LcF, 1, 1));
76 return result;
77}
78
79//TODO optimize choice of p -> choose p as large as possible (better than small p since factorization mod p does not require field extension, also less lifting)
80int

Callers 2

absBiFactorizeMainFunction · 0.85
absFactorizeMainFunction · 0.85

Calls 14

degreeFunction · 0.85
isOnFunction · 0.85
OnFunction · 0.85
LcFunction · 0.85
OffFunction · 0.85
rootOfFunction · 0.85
factorizeFunction · 0.85
getMipoFunction · 0.85
hasItemMethod · 0.80
insertMethod · 0.45
inCoeffDomainMethod · 0.45
factorMethod · 0.45

Tested by

no test coverage detected