351{
353
355 return 0;
356
363
368
371
374
377
380
382
386
389
399 if (!
algExt && (
p < (1 << 28)))
400 {
401
402
408 for (
int i= 0;
i <
p;
i++)
409 (*gen).next();
410 }
412 {
415 }
416 else
417 {
420 {
425
426
428 {
438 ;
439 else
443 }
444 else
445 {
449 {
452 }
454 {
463 ;
464 else
468 }
469 }
471 }
474 for (
int i= 0;
i <
p;
i++)
475 (*gen).next();
476 }
480 do
481 {
483
485
487
490 else
492
495 {
497 break;
499 {
502 {
505 break;
506 }
508 break;
509 }
510 }
511
514 if ((*gen).hasItems())
515 (*gen).next();
516 else
518 } while (1);
519
520 delete gen;
521
523}
int myCompress(const CanonicalForm &F, const CanonicalForm &G, CFMap &M, CFMap &N, bool topLevel)
compressing two polynomials F and G, M is used for compressing, N to reverse the compression
const CanonicalForm CFMap CFMap & N
const CanonicalForm CFMap CFMap const Variable & x
CanonicalForm resultantFp(const CanonicalForm &A, const CanonicalForm &B, const Variable &x, bool prob)
modular resultant algorihtm over Fp
static CanonicalForm uniResultant(const CanonicalForm &F, const CanonicalForm &G)
static void evalPoint(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &FEval, CanonicalForm &GEval, CFGenerator &evalPoint)
const CanonicalForm CFMap & M
static CanonicalForm newtonInterp(const CanonicalForm &alpha, const CanonicalForm &u, const CanonicalForm &newtonPoly, const CanonicalForm &oldInterPoly, const Variable &x)
#define STICKYASSERT(expression, message)
#define ASSERT(expression, message)
CanonicalForm randomIrredpoly(int i, const Variable &x)
computes a random monic irreducible univariate polynomial in x over Fp of degree i via NTL/FLINT
static CanonicalForm bound(const CFMatrix &M)
CanonicalForm mapPrimElem(const CanonicalForm &primElem, const Variable &alpha, const Variable &beta)
compute the image of a primitive element of in . We assume .
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
static CanonicalForm mapDown(const CanonicalForm &F, const Variable &alpha, const CanonicalForm &G, CFList &source, CFList &dest)
the CanonicalForm G is the output of map_up, returns F considered as an element over ,...
static CanonicalForm mapUp(const Variable &alpha, const Variable &beta)
and is a primitive element, returns the image of
generate all elements in F_p(alpha) starting from 0
virtual class for generators
generate all elements in F_p starting from 0
factory's class for variables
const CanonicalForm int const CFList const Variable & y
const Variable & v
< [in] a sqrfree bivariate poly
bool isInExtension(const CanonicalForm &F, const CanonicalForm &gamma, const int k, const CanonicalForm &delta, CFList &source, CFList &dest)
tests if F is not contained in a subfield defined by gamma (Fq case) or k (GF case)
Variable FACTORY_PUBLIC rootOf(const CanonicalForm &, char name='@')
returns a symbolic root of polynomial with name name Use it to define algebraic variables
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
void FACTORY_PUBLIC prune(Variable &alpha)
template CanonicalForm tmax(const CanonicalForm &, const CanonicalForm &)
gmp_float log(const gmp_float &a)
const signed long ceil(const ampf< Precision > &x)
int status int void size_t count