53 #define TEST_ONE_MAX 50 65 else if (p == 5 || p == 7)
100 ASSERT (!primFail,
"failure in integer factorizer");
104 BuildIrred (NTLIrredpoly, d*3);
111 BuildIrred (NTLIrredpoly, d*2);
118 else if ((p == 3 && d < 4) || ((p == 5 || p == 7) && d < 3))
125 bool primFail=
false;
128 ASSERT (!primFail,
"failure in integer factorizer");
130 BuildIrred (NTLIrredpoly, d*2);
139 F=
mapUp (F, v, v2, primElem, imPrimElem, source, dest);
140 G=
mapUp (G, v, v2, primElem, imPrimElem, source, dest);
141 lcf=
mapUp (lcf, v, v2, primElem, imPrimElem, source, dest);
142 lcg=
mapUp (lcg, v, v2, primElem, imPrimElem, source, dest);
149 if ((!algExtension && p > 0) || p == 0)
239 result +=
power( x, i.
exp() ) * (c - q);
int status int void size_t count
Conversion to and from NTL.
void prune1(const Variable &alpha)
some useful template functions.
template CanonicalForm tmax(const CanonicalForm &, const CanonicalForm &)
CanonicalForm primitiveElement(const Variable &alpha, Variable &beta, bool &fail)
determine a primitive element of , is a primitive element of a field which is isomorphic to ...
factory's class for variables
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
generate random evaluation points
class to generate random evaluation points
CanonicalForm convertNTLzzpX2CF(const zz_pX &poly, const Variable &x)
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
This file implements functions to map between extensions of finite fields.
Variable rootOf(const CanonicalForm &, char name='@')
returns a symbolic root of polynomial with name name Use it to define algebraic variables ...
bool gcd_test_one(const CanonicalForm &f, const CanonicalForm &g, bool swap, int &d)
Coprimality Check. f and g are assumed to have the same level. If swap is true, the main variables of...
static CanonicalForm mapUp(const Variable &alpha, const Variable &beta)
and is a primitive element, returns the image of
Operations in GF, where GF is a finite field of size less than 2^16 represented by a root of Conway p...
Interface to generate InternalCF's over various domains from intrinsic types or mpz_t's.
Iterators for CanonicalForm's.
static CFRandom * generate()
class to iterate through CanonicalForm's
const Variable & v
< [in] a sqrfree bivariate poly
CanonicalForm balance_p(const CanonicalForm &f, const CanonicalForm &q, const CanonicalForm &qh)
same as balance_p ( const CanonicalForm & f, const CanonicalForm & q ) but qh= q/2 is provided...
generate random elements in F_p(alpha)
int ipower(int b, int m)
int ipower ( int b, int m )
CF_NO_INLINE int hasTerms() const
check if iterator has reached < the end of CanonicalForm
CanonicalForm GFMapUp(const CanonicalForm &F, int k)
maps a polynomial over to a polynomial over , d needs to be a multiple of k
#define GaloisFieldDomain
virtual class for random element generation
#define ASSERT(expression, message)
CanonicalForm mapPrimElem(const CanonicalForm &primElem, const Variable &alpha, const Variable &beta)
compute the image of a primitive element of in . We assume .
CF_NO_INLINE int exp() const
get the current exponent