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

Function evaluationPoints

factory/cfModGcd.cc:2055–2181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2053}
2054
2055CFList
2056evaluationPoints (const CanonicalForm& F, const CanonicalForm& G,
2057 CanonicalForm& Feval, CanonicalForm& Geval,
2058 const CanonicalForm& LCF, const bool& GF,
2059 const Variable& alpha, bool& fail, CFList& list
2060 )
2061{
2062 int k= tmax (F.level(), G.level()) - 1;
2063 Variable x= Variable (1);
2064 CFList result;
2065 FFRandom genFF;
2066 GFRandom genGF;
2067 int p= getCharacteristic ();
2068 double bound;
2069 if (alpha != Variable (1))
2070 {
2071 bound= pow ((double) p, (double) degree (getMipo(alpha)));
2072 bound= pow (bound, (double) k);
2073 }
2074 else if (GF)
2075 {
2076 bound= pow ((double) p, (double) getGFDegree());
2077 bound= pow ((double) bound, (double) k);
2078 }
2079 else
2080 bound= pow ((double) p, (double) k);
2081
2082 CanonicalForm random;
2083 int j;
2084 bool zeroOneOccured= false;
2085 bool allEqual= false;
2086 CanonicalForm buf;
2087 do
2088 {
2089 random= 0;
2090 // possible overflow if list.length() does not fit into a int
2091 if (list.length() >= bound)
2092 {
2093 fail= true;
2094 break;
2095 }
2096 for (int i= 0; i < k; i++)
2097 {
2098 if (GF)
2099 {
2100 result.append (genGF.generate());
2101 random += result.getLast()*power (x, i);
2102 }
2103 else if (alpha.level() != 1)
2104 {
2105 AlgExtRandomF genAlgExt (alpha);
2106 result.append (genAlgExt.generate());
2107 random += result.getLast()*power (x, i);
2108 }
2109 else
2110 {
2111 result.append (genFF.generate());
2112 random += result.getLast()*power (x, i);

Callers 2

monicSparseInterpolFunction · 0.85
nonMonicSparseInterpolFunction · 0.85

Calls 15

tmaxFunction · 0.85
VariableFunction · 0.85
getCharacteristicFunction · 0.85
degreeFunction · 0.85
getMipoFunction · 0.85
getGFDegreeFunction · 0.85
powerFunction · 0.85
findFunction · 0.85
hasTermsMethod · 0.80
hasItemMethod · 0.80
powFunction · 0.50
levelMethod · 0.45

Tested by

no test coverage detected