| 213 | |
| 214 | #if defined(HAVE_NTL) || defined(HAVE_FLINT) |
| 215 | CFList |
| 216 | extFactorRecombination (const CFList& factors, const CanonicalForm& F, |
| 217 | const CFList& M, const ExtensionInfo& info, |
| 218 | const CFList& evaluation) |
| 219 | { |
| 220 | Variable alpha= info.getAlpha(); |
| 221 | Variable beta= info.getBeta(); |
| 222 | CanonicalForm gamma= info.getGamma(); |
| 223 | CanonicalForm delta= info.getDelta(); |
| 224 | int k= info.getGFDegree(); |
| 225 | CFList source, dest; |
| 226 | if (factors.length() == 1) |
| 227 | { |
| 228 | CanonicalForm buf= reverseShift (F, evaluation); |
| 229 | return CFList (mapDown (buf, info, source, dest)); |
| 230 | } |
| 231 | if (factors.length() < 1) |
| 232 | return CFList(); |
| 233 | |
| 234 | int degMipoBeta= 1; |
| 235 | if (!k && beta.level() != 1) |
| 236 | degMipoBeta= degree (getMipo (beta)); |
| 237 | |
| 238 | CFList T, S; |
| 239 | T= factors; |
| 240 | |
| 241 | int s= 1; |
| 242 | CFList result; |
| 243 | CanonicalForm buf; |
| 244 | |
| 245 | buf= F; |
| 246 | |
| 247 | Variable x= Variable (1); |
| 248 | CanonicalForm g, LCBuf= LC (buf, x); |
| 249 | CanonicalForm buf2, quot; |
| 250 | int * v= new int [T.length()]; |
| 251 | for (int i= 0; i < T.length(); i++) |
| 252 | v[i]= 0; |
| 253 | bool noSubset= false; |
| 254 | CFArray TT; |
| 255 | TT= copy (factors); |
| 256 | bool recombination= false; |
| 257 | bool trueFactor= false; |
| 258 | while (T.length() >= 2*s) |
| 259 | { |
| 260 | while (noSubset == false) |
| 261 | { |
| 262 | if (T.length() == s) |
| 263 | { |
| 264 | delete [] v; |
| 265 | if (recombination) |
| 266 | { |
| 267 | T.insert (LCBuf); |
| 268 | g= prodMod (T, M); |
| 269 | T.removeFirst(); |
| 270 | result.append (g/myContent (g)); |
| 271 | g= reverseShift (g, evaluation); |
| 272 | g /= Lc (g); |
no test coverage detected