 |
My Project
UNKNOWN_GIT_VERSION
|
Go to the source code of this file.
|
class | modpk |
| class to do operations mod p^k for int's p and k More...
|
|
|
CanonicalForm | replaceLc (const CanonicalForm &f, const CanonicalForm &c) |
|
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 f and g are swapped with Variable(1). If the result is false, d is set to the degree of the gcd of f and g evaluated at a random point in K^n-1. This gcd is a gcd of univariate polynomials. More...
|
|
void | extgcd (const CanonicalForm &a, const CanonicalForm &b, CanonicalForm &S, CanonicalForm &T, const modpk &pk) |
|
operations mod p^k and some other useful functions for factorization
Definition in file fac_util.h.
◆ extgcd()
◆ gcd_test_one()
Coprimality Check. f and g are assumed to have the same level. If swap is true, the main variables of f and g are swapped with Variable(1). If the result is false, d is set to the degree of the gcd of f and g evaluated at a random point in K^n-1. This gcd is a gcd of univariate polynomials.
Definition at line 21 of file cfGcdUtil.cc.
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)
◆ replaceLc()
Definition at line 89 of file fac_util.cc.
91 if (
f.inCoeffDomain() )
generate random elements in F_p(alpha)
Variable rootOf(const CanonicalForm &, char name='@')
returns a symbolic root of polynomial with name name Use it to define algebraic variables
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
#define GaloisFieldDomain
static CanonicalForm mapUp(const Variable &alpha, const Variable &beta)
and is a primitive element, returns the image of
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
virtual class for random element generation
#define ASSERT(expression, message)
class to generate random evaluation points
int ipower(int b, int m)
int ipower ( int b, int m )
template CanonicalForm tmax(const CanonicalForm &, const CanonicalForm &)
factory's class for variables
CanonicalForm mapPrimElem(const CanonicalForm &primElem, const Variable &alpha, const Variable &beta)
compute the image of a primitive element of in . We assume .
static CFRandom * generate()
const Variable & v
< [in] a sqrfree bivariate poly
int status int void size_t count
CanonicalForm GFMapUp(const CanonicalForm &F, int k)
maps a polynomial over to a polynomial over , d needs to be a multiple of k
void prune1(const Variable &alpha)
CanonicalForm convertNTLzzpX2CF(const zz_pX &poly, const Variable &x)