Skip to content

Commit

Permalink
chg: use Flint factorization over finite fields instead of NTL
Browse files Browse the repository at this point in the history
  • Loading branch information
mmklee authored and hannes14 committed Apr 3, 2012
1 parent 088b572 commit 1fbccb8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion factory/cf_factor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1fbccb8

Please sign in to comment.