92 int si_factor_reminder=1;
99 bool fc_and_gc_Univariate=fc_isUnivariate && gc_isUnivariate;
123 else if (!fc_and_gc_Univariate)
187 while ( i.hasTerms() && ! result.
isOne() )
209 ASSERT( x.
level() > 0,
"cannot calculate content with respect to algebraic variable" );
232 ASSERT( x.
level() > 0,
"cannot calculate vcontent with respect to algebraic variable" );
348 return ( f /
gcd( f, g ) ) * g;
static CanonicalForm ezgcd(const CanonicalForm &FF, const CanonicalForm &GG, REvaluation &b, bool internal)
real implementation of EZGCD over Z
const CanonicalForm int const CFList const Variable & y
Conversion to and from NTL.
CanonicalForm pp(const CanonicalForm &f)
CanonicalForm pp ( const CanonicalForm & f )
functions to print debug output
static const int SW_USE_FF_MOD_GCD
set to 1 to use modular GCD over F_q
factory's class for variables
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
subresultant pseudo remainder sequence GCD over finite fields and Z
static const int SW_USE_EZGCD_P
set to 1 to use EZGCD over F_q
generate random evaluation points
CanonicalForm lcm(const CanonicalForm &f, const CanonicalForm &g)
CanonicalForm lcm ( const CanonicalForm & f, const CanonicalForm & g )
CanonicalForm modGCDGF(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &coF, CanonicalForm &coG, CFList &l, bool &topLevel)
GCD of F and G over GF, based on Alg. 7.2. as described in "Algorithms for Computer Algebra" by Gedde...
bool isPurePoly(const CanonicalForm &)
static CanonicalForm icontent(const CanonicalForm &f, const CanonicalForm &c)
static CanonicalForm icontent ( const CanonicalForm & f, const CanonicalForm & c ) ...
Extended Zassenhaus GCD over finite fields and Z.
Rational abs(const Rational &a)
CanonicalForm vcontent(const CanonicalForm &f, const Variable &x)
CanonicalForm vcontent ( const CanonicalForm & f, const Variable & x )
CanonicalForm subResGCD_p(const CanonicalForm &f, const CanonicalForm &g)
subresultant GCD over finite fields. In case things become too dense we switch to a modular algorithm...
void out_cf(const char *s1, const CanonicalForm &f, const char *s2)
cf_algorithm.cc - simple mathematical algorithms.
CanonicalForm modGCDFp(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &coF, CanonicalForm &coG, bool &topLevel, CFList &l)
CanonicalForm gcd_poly(const CanonicalForm &f, const CanonicalForm &g)
CanonicalForm gcd_poly ( const CanonicalForm & f, const CanonicalForm & g )
bool getReduce(const Variable &alpha)
static const int SW_RATIONAL
set to 1 for computations over Q
static CanonicalForm cf_content(const CanonicalForm &f, const CanonicalForm &g)
static CanonicalForm cf_content ( const CanonicalForm & f, const CanonicalForm & g ) ...
Iterators for CanonicalForm's.
static const int SW_USE_CHINREM_GCD
set to 1 to use modular gcd over Z
declarations of higher level algorithms.
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
CanonicalForm modGCDFq(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &coF, CanonicalForm &coG, Variable &alpha, CFList &l, bool &topLevel)
GCD of F and G over , l and topLevel are only used internally, output is monic based on Alg...
class to iterate through CanonicalForm's
CanonicalForm EZGCD_P(const CanonicalForm &FF, const CanonicalForm &GG)
Extended Zassenhaus GCD for finite fields. In case things become too dense we switch to a modular alg...
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
CanonicalForm modGCDZ(const CanonicalForm &FF, const CanonicalForm &GG)
modular GCD over Z
CF_NO_INLINE int hasTerms() const
check if iterator has reached < the end of CanonicalForm
CanonicalForm QGCD(const CanonicalForm &F, const CanonicalForm &G)
gcd over Q(a)
static const int SW_USE_QGCD
set to 1 to use Encarnacion GCD over Q(a)
static const int SW_USE_EZGCD
set to 1 to use EZGCD over Z
#define GaloisFieldDomain
CanonicalForm content(const CanonicalForm &f)
CanonicalForm content ( const CanonicalForm & f )
modular and sparse modular GCD algorithms over finite fields and Z.
#define ASSERT(expression, message)
CanonicalForm subResGCD_0(const CanonicalForm &f, const CanonicalForm &g)
subresultant GCD over Z.
CanonicalForm gcd(const CanonicalForm &f, const CanonicalForm &g)