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

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


The following commit has been merged in the cleanedupstream branch:
commit 3e37c41d5a7ec130fa30a5bc3d0bc31fcd3b7a3b
Author: Martin Lee <martinlee84 at web.de>
Date:   Tue Feb 21 16:59:02 2012 +0100

    fix: compilation of factory without NTL

diff --git a/factory/cfModResultant.cc b/factory/cfModResultant.cc
index 004069f..1c7c1fa 100644
--- a/factory/cfModResultant.cc
+++ b/factory/cfModResultant.cc
@@ -18,6 +18,7 @@
 #include "templates/ftmpl_functions.h"
 #include "cf_map.h"
 #include "cf_algorithm.h"
+#include "cf_iter.h"
 
 #ifdef HAVE_NTL
 #include "NTLconvert.h"
diff --git a/factory/cf_factor.cc b/factory/cf_factor.cc
index f65aeed..87a80b5 100644
--- a/factory/cf_factor.cc
+++ b/factory/cf_factor.cc
@@ -804,7 +804,11 @@ CFFList factorize ( const CanonicalForm & f, const Variable & alpha )
   }
   else //Q(a)[x1,...,xn]
   {
+#ifdef HAVE_NTL
     F= ratFactorize (f, alpha);
+#else
+    ASSERT( f.isUnivariate(), "multivariate factorization not implemented" );
+#endif
   }
   if(isOn(SW_USE_NTL_SORT)) F.sort(cmpCF);
   return F;
diff --git a/factory/cf_gcd.cc b/factory/cf_gcd.cc
index ab318b1..65c2bd6 100644
--- a/factory/cf_gcd.cc
+++ b/factory/cf_gcd.cc
@@ -19,6 +19,7 @@
 #include "cf_gcd_smallp.h"
 #include "cf_map_ext.h"
 #include "cf_util.h"
+#include "gfops.h"
 
 #ifdef HAVE_NTL
 #include <NTL/ZZX.h>
@@ -83,6 +84,7 @@ gcd_test_one ( const CanonicalForm & f, const CanonicalForm & g, bool swap )
         setCharacteristic (p, 2, 'Z');
       passToGF= true;
     }
+#ifdef HAVE_NTL
     else if (p > 0 && CFFactory::gettype() == GaloisFieldDomain && ipower (p , getGFDegree()) < TEST_ONE_MAX)
     {
       k= getGFDegree();
@@ -149,6 +151,7 @@ gcd_test_one ( const CanonicalForm & f, const CanonicalForm & g, bool swap )
         v= v2;
       }
     }
+#endif
 
     CFRandom * sample;
     if ((!algExtension && p > 0) || p == 0)
diff --git a/factory/facAlgExt.cc b/factory/facAlgExt.cc
index aeadea7..b155343 100755
--- a/factory/facAlgExt.cc
+++ b/factory/facAlgExt.cc
@@ -26,6 +26,7 @@
 #include "facFqBivarUtil.h"
 #include "facAlgExt.h"
 #include "cfModResultant.h"
+#include "fac_sqrfree.h"
 
 // squarefree part of F
 CanonicalForm
diff --git a/factory/facBivar.cc b/factory/facBivar.cc
index d9c61a5..9a3d980 100644
--- a/factory/facBivar.cc
+++ b/factory/facBivar.cc
@@ -19,6 +19,7 @@
 #include "facFqBivar.h"
 #include "facBivar.h"
 
+#ifdef HAVE_NTL
 TIMING_DEFINE_PRINT(fac_uni_factorizer)
 TIMING_DEFINE_PRINT(fac_hensel_lift)
 TIMING_DEFINE_PRINT(fac_factor_recombination)
@@ -391,3 +392,5 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
 
   return factors;
 }
+
+#endif
diff --git a/factory/facBivar.h b/factory/facBivar.h
index 1b92b63..63c5092 100644
--- a/factory/facBivar.h
+++ b/factory/facBivar.h
@@ -25,6 +25,7 @@
 #include "cfNewtonPolygon.h"
 #include "algext.h"
 
+#ifdef HAVE_NTL
 /// @return @a biFactorize returns a list of factors of F. If F is not monic
 ///         its leading coefficient is not outputted.
 CFList
@@ -194,3 +195,5 @@ CFList conv (const CFFList& L ///< [in] a CFFList
 
 #endif
 
+#endif
+
diff --git a/factory/facFactorize.cc b/factory/facFactorize.cc
index 410c2d4..632062b 100644
--- a/factory/facFactorize.cc
+++ b/factory/facFactorize.cc
@@ -27,6 +27,7 @@
 #include "cf_reval.h"
 #include "facSparseHensel.h"
 
+#ifdef HAVE_NTL
 TIMING_DEFINE_PRINT(fac_bi_factorizer)
 TIMING_DEFINE_PRINT(fac_hensel_lift)
 TIMING_DEFINE_PRINT(fac_factor_recombination)
@@ -1014,3 +1015,5 @@ multiFactorize (const CanonicalForm& F, const Variable& v)
 
   return factors;
 }
+
+#endif
diff --git a/factory/facFactorize.h b/factory/facFactorize.h
index c6802a6..1d48ac1 100644
--- a/factory/facFactorize.h
+++ b/factory/facFactorize.h
@@ -18,6 +18,7 @@
 #include "facBivar.h"
 #include "facFqBivarUtil.h"
 
+#ifdef HAVE_NTL
 /// Factorization over Q (a)
 ///
 /// @return @a multiFactorize returns a factorization of F
@@ -138,3 +139,5 @@ ratFactorize (const CanonicalForm& G,        ///<[in] a multivariate poly
 
 #endif
 
+#endif
+
diff --git a/factory/facFqFactorize.h b/factory/facFqFactorize.h
index 19ac77c..fc29817 100644
--- a/factory/facFqFactorize.h
+++ b/factory/facFqFactorize.h
@@ -23,6 +23,7 @@
 #include "facFqSquarefree.h"
 #include "facFqBivarUtil.h"
 
+#ifdef HAVE_NTL
 /// Factorization over a finite field
 ///
 /// @return @a multiFactorize returns a factorization of F
@@ -742,5 +743,7 @@ evaluateAtEval (const CanonicalForm& F,  ///<[in] some poly
                );
 
 #endif
+
+#endif
 /* FAC_FQ_FACTORIZE_H */
 
diff --git a/factory/facSparseHensel.cc b/factory/facSparseHensel.cc
index 17e0c88..49e2756 100644
--- a/factory/facSparseHensel.cc
+++ b/factory/facSparseHensel.cc
@@ -13,11 +13,15 @@
  **/
 /*****************************************************************************/
 
+#include <config.h>
+
 #include "facSparseHensel.h"
 #include "cf_algorithm.h"
 #include "cf_gcd_smallp.h"
 #include "facFqFactorize.h"
 
+#ifdef HAVE_NTL
+
 bool
 LucksWangSparseHeuristic (const CanonicalForm& F, const CFList& factors,
                           int level, const CFList& leadingCoeffs, CFList& result)
@@ -392,3 +396,5 @@ sparseHeuristic (const CanonicalForm& A, const CFList& biFactors,
 
   return result;
 }
+
+#endif
diff --git a/factory/facSparseHensel.h b/factory/facSparseHensel.h
index 83f3d4c..c890356 100644
--- a/factory/facSparseHensel.h
+++ b/factory/facSparseHensel.h
@@ -493,6 +493,8 @@ CanonicalForm patch (const CanonicalForm& F1, const CanonicalForm& F2,
   return result;
 }
 
+#ifdef HAVE_NTL
+
 /// sparse heuristic lifting by Wang and Lucks
 ///
 /// @return @a LucksWangSparseHeuristic returns true if it was successful
@@ -525,3 +527,5 @@ sparseHeuristic (const CanonicalForm& A,  ///<[in] polynomial to be factored
                 );
 
 #endif
+
+#endif

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list