[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:54:40 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit d17f9a22d483390f1076deb393a393ea122c5c71
Author: Martin Lee <martinlee84 at web.de>
Date:   Tue Dec 20 00:49:30 2011 +0000

    chg: use Flint factorization over finite fields instead of NTL

diff --git a/factory/cf_factor.cc b/factory/cf_factor.cc
index 87a80b5..cbb5abf 100644
--- a/factory/cf_factor.cc
+++ b/factory/cf_factor.cc
@@ -38,6 +38,10 @@
 #include "NTLconvert.h"
 #endif
 
+#ifdef HAVE_FLINT
+#include "FLINTconvert.h"
+#endif
+
 int getExp(); /* cf_char.cc */
 
 //static bool isUnivariateBaseDomain( const CanonicalForm & f )
@@ -427,7 +431,15 @@ CFFList factorize ( const CanonicalForm & f, bool issqrfree )
   {
     if (f.isUnivariate())
     {
-      #ifdef HAVE_NTL
+#ifdef HAVE_FLINT
+      nmod_poly_t f1;
+      convertFacCF2nmod_poly_t (f1, f);
+      nmod_poly_factor_t result;
+      nmod_poly_factor_init (result);
+      mp_limb_t leadingCoeff= nmod_poly_factor (result, f1);
+      F= convertFLINTnmod_poly_factor2FacCFFList (result, leadingCoeff, f.mvar());
+      nmod_poly_factor_clear (result);
+#else ifdef HAVE_NTL
       if (isOn(SW_USE_NTL) && (isPurePoly(f)))
       {
         // USE NTL

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list