Changeset c79a9d in git for factory/facFqFactorize.cc
- Timestamp:
- Oct 13, 2011, 1:21:35 PM (12 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 5f9b47ed5a8e9e527497f05d9afe96ec3e076cbf
- Parents:
- 3e70950f6eff7e879a05817dd9e4bb45aeb175ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFqFactorize.cc
r3e7095 rc79a9d 1990 1990 } 1991 1991 1992 CFList recoverFactors (const CanonicalForm& F, const CFList& factors, 1993 const CFList& evaluation) 1994 { 1995 CFList result; 1996 CanonicalForm tmp, tmp2; 1997 CanonicalForm G= F; 1998 for (CFListIterator i= factors; i.hasItem(); i++) 1999 { 2000 tmp= reverseShift (i.getItem(), evaluation); 2001 tmp /= content (tmp, 1); 2002 if (fdivides (tmp, G, tmp2)) 2003 { 2004 G= tmp2; 2005 result.append (tmp); 2006 } 2007 } 2008 return result; 2009 } 2010 1992 2011 CFList 1993 2012 extNonMonicFactorRecombination (const CFList& factors, const CanonicalForm& F, 1994 const ExtensionInfo& info, 1995 const CFList& evaluation) 2013 const ExtensionInfo& info) 1996 2014 { 1997 2015 Variable alpha= info.getAlpha(); … … 2034 2052 T.removeFirst(); 2035 2053 result.append (g/myContent (g)); 2036 g= reverseShift (g, evaluation);2037 2054 g /= Lc (g); 2038 2055 appendTestMapDown (result, g, info, source, dest); … … 2040 2057 } 2041 2058 else 2042 {2043 buf= reverseShift (buf, evaluation);2044 2059 return CFList (buf); 2045 }2046 2060 } 2047 2061 … … 2053 2067 if (fdivides (g, buf, quot)) 2054 2068 { 2055 buf2= reverseShift (g, evaluation);2069 buf2= g; 2056 2070 buf2 /= Lc (buf2); 2057 2071 if (!k && beta == Variable (1)) … … 2082 2096 { 2083 2097 delete [] v; 2084 buf= reverseShift (buf, evaluation);2085 2098 buf /= Lc (buf); 2086 2099 appendTestMapDown (result, buf, info, source, dest); … … 2098 2111 { 2099 2112 delete [] v; 2100 buf= reverseShift (buf, evaluation);2101 2113 appendTestMapDown (result, buf, info, source, dest); 2102 2114 return result; … … 2107 2119 } 2108 2120 if (T.length() < 2*s) 2109 { 2110 buf= reverseShift (F, evaluation); 2111 appendMapDown (result, buf, info, source, dest); 2112 } 2121 appendMapDown (result, F, info, source, dest); 2113 2122 2114 2123 delete [] v; … … 2317 2326 evaluationWRTDifferentSecondVars (bufAeval2, bufEvaluation, A); 2318 2327 2319 for (int j= 0; j < A.level() - 1; j++)2328 for (int j= 0; j < A.level() - 2; j++) 2320 2329 { 2321 2330 if (!bufAeval2[j].isEmpty()) … … 2515 2524 Pi, liftBounds, liftBoundsLength, noOneToOne); 2516 2525 2526 2517 2527 if (!noOneToOne) 2518 2528 { 2519 2529 int check= factors.length(); 2520 factors= recoverFactors (A, factors); 2530 A= reverseShift (oldA, evaluation); 2531 factors= recoverFactors (A, factors, evaluation); 2521 2532 if (check != factors.length()) 2522 2533 noOneToOne= true; 2523 2534 2524 2535 if (extension && !noOneToOne) 2525 factors= extNonMonicFactorRecombination (factors, oldA, info, evaluation);2536 factors= extNonMonicFactorRecombination (factors, A, info); 2526 2537 } 2527 2538 if (noOneToOne) … … 2580 2591 if (earlySuccess) 2581 2592 factors= Union (factors, earlyFactors); 2582 } 2583 2584 if (!extension) 2585 { 2586 for (CFListIterator i= factors; i.hasItem(); i++) 2587 { 2588 int kk= Aeval.getLast().level(); 2589 for (CFListIterator j= evaluation; j.hasItem(); j++, kk--) 2590 { 2591 if (i.getItem().level() < kk) 2592 continue; 2593 i.getItem()= i.getItem() (Variable (kk) - j.getItem(), kk); 2594 } 2595 } 2596 } 2593 if (!extension) 2594 { 2595 for (CFListIterator i= factors; i.hasItem(); i++) 2596 { 2597 int kk= Aeval.getLast().level(); 2598 for (CFListIterator j= evaluation; j.hasItem(); j++, kk--) 2599 { 2600 if (i.getItem().level() < kk) 2601 continue; 2602 i.getItem()= i.getItem() (Variable (kk) - j.getItem(), kk); 2603 } 2604 } 2605 } 2606 } 2607 2608 2597 2609 2598 2610 if (v.level() != 1)
Note: See TracChangeset
for help on using the changeset viewer.