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

Function evalPoints

factory/facFactorize.cc:47–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45TIMING_DEFINE_PRINT(fac_compress)
46
47CFList evalPoints (const CanonicalForm& F, CFList& eval, Evaluation& E)
48{
49 CFList result;
50 Variable x= Variable (1);
51
52 CanonicalForm LCF=LC (F,x);
53 CFList LCFeval;
54
55 bool found= false;
56 bool allZero= true;
57 bool foundZero= false;
58 CanonicalForm deriv_x, gcd_deriv;
59 CFListIterator iter;
60 do
61 {
62 eval.insert (F);
63 LCFeval.insert (LCF);
64 bool bad= false;
65 for (int i= E.max(); i >= E.min(); i--)
66 {
67 eval.insert (eval.getFirst()( E [i], i));
68 LCFeval.insert (LCFeval.getFirst() (E [i], i));
69 result.append (E[i]);
70 if (!E[i].isZero())
71 allZero= false;
72 else
73 foundZero= true;
74 if (!allZero && foundZero)
75 {
76 result= CFList();
77 eval= CFList();
78 LCFeval= CFList();
79 bad= true;
80 foundZero= false;
81 break;
82 }
83 if (degree (eval.getFirst(), i - 1) != degree (F, i - 1))
84 {
85 result= CFList();
86 eval= CFList();
87 LCFeval= CFList();
88 bad= true;
89 break;
90 }
91 if ((i != 2) && (degree (LCFeval.getFirst(), i-1) != degree (LCF, i-1)))
92 {
93 result= CFList();
94 eval= CFList();
95 LCFeval= CFList();
96 bad= true;
97 break;
98 }
99 }
100
101 if (bad)
102 {
103 E.nextpoint();
104 continue;

Callers 1

multiFactorizeFunction · 0.70

Calls 15

VariableFunction · 0.85
LCFunction · 0.85
degreeFunction · 0.85
derivFunction · 0.85
contentFunction · 0.85
removeFirstMethod · 0.80
gcdFunction · 0.70
insertMethod · 0.45
maxMethod · 0.45
minMethod · 0.45
getFirstMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected