Skip to content

Commit

Permalink
fix: compilation of factory without NTL
Browse files Browse the repository at this point in the history
  • Loading branch information
mmklee committed Feb 21, 2012
1 parent 16d549d commit c9a4693
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions factory/cfModResultant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions factory/cf_factor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions factory/cf_gcd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions factory/facAlgExt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "facFqBivarUtil.h"
#include "facAlgExt.h"
#include "cfModResultant.h"
#include "fac_sqrfree.h"

// squarefree part of F
CanonicalForm
Expand Down
3 changes: 3 additions & 0 deletions factory/facBivar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -391,3 +392,5 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)

return factors;
}

#endif
3 changes: 3 additions & 0 deletions factory/facBivar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -194,3 +195,5 @@ CFList conv (const CFFList& L ///< [in] a CFFList

#endif

#endif

3 changes: 3 additions & 0 deletions factory/facFactorize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -1014,3 +1015,5 @@ multiFactorize (const CanonicalForm& F, const Variable& v)

return factors;
}

#endif
3 changes: 3 additions & 0 deletions factory/facFactorize.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -138,3 +139,5 @@ ratFactorize (const CanonicalForm& G, ///<[in] a multivariate poly

#endif

#endif

3 changes: 3 additions & 0 deletions factory/facFqFactorize.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -741,6 +742,8 @@ evaluateAtEval (const CanonicalForm& F, ///<[in] some poly
int l ///<[in] level to start at
);

#endif

#endif
/* FAC_FQ_FACTORIZE_H */

6 changes: 6 additions & 0 deletions factory/facSparseHensel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -392,3 +396,5 @@ sparseHeuristic (const CanonicalForm& A, const CFList& biFactors,

return result;
}

#endif
4 changes: 4 additions & 0 deletions factory/facSparseHensel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -525,3 +527,5 @@ sparseHeuristic (const CanonicalForm& A, ///<[in] polynomial to be factored
);

#endif

#endif

0 comments on commit c9a4693

Please sign in to comment.