modular gcd over F_p[x]/(M) for not necessarily irreducible M. If a zero divisor is encountered fail is set to true.
394 result=
reduce (result, M);
413 result=
reduce (result, M);
452 Variable
v= M.
mvar();
459 zz_pE::init (NTLMipo);
475 tryEuclid(f,g,M,result,fail);
480 result= NN (
reduce (result, M));
500 tryEuclid(
cf,
cg,M,c,fail);
505 f.tryDiv (
cf, M, fail);
509 g.tryDiv (
cg, M, fail);
513 if(f.inCoeffDomain())
521 if(g.inCoeffDomain())
529 int *L =
new int[mv+1];
530 int *
N =
new int[mv+1];
531 for(
int i=2;
i<=mv;
i++)
550 for(
int i=2; i<=mv; i++)
554 int *dg_im = new
int[mv+1];
555 for(
int i=2; i<=mv; i++)
561 Variable
x= Variable (1);
563 for(FFGenerator gen = FFGenerator(); gen.hasItems(); gen.
next())
566 gamma_image =
reduce(gamma(alpha,
x),M);
572 "time
for recursive calls in alg
gcd mod p: ")
575 g_image =
reduce(g_image, M);
576 if(g_image.inCoeffDomain())
584 for(
int i=2; i<=mv; i++)
586 dg_im =
leadDeg(g_image, dg_im);
594 g_image *= gamma_image;
595 g_image=
reduce (g_image, M);
606 if((
firstLC(gnew) == gamma) || (gnew == gm))
614 g_image.tryDiv (
cf, M, fail);
627 result = NN(
reduce (c*g_image, M));
629 "time for successful termination test in alg gcd mod p: ")
646 for(
int i=2; i<=mv; i++)
TIMING_END_AND_PRINT(fac_alg_resultant, "time to compute resultant0: ")
for(int i=0;i<=n;i++) degsf[i]
ideal interpolation(const std::vector< ideal > &L, intvec *v)
TIMING_START(fac_alg_resultant)
factory's class for variables
generate all elements in F_p starting from 0
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 bool topLevel
void tryInvert(const CanonicalForm &F, const CanonicalForm &M, CanonicalForm &inv, bool &fail)
bool isLess(int *a, int *b, int lower, int upper)
const CanonicalForm CFMap CFMap & N
zz_pEX convertFacCF2NTLzz_pEX(const CanonicalForm &f, const zz_pX &mipo)
CanonicalForm firstLC(const CanonicalForm &f)
static CanonicalForm tryvcontent(const CanonicalForm &f, const Variable &x, const CanonicalForm &M, bool &fail)
CanonicalForm convertNTLzz_pEX2CF(const zz_pEX &f, const Variable &x, const Variable &alpha)
bool isEqual(int *a, int *b, int lower, int upper)
const Variable & v
< [in] a sqrfree bivariate poly
static CanonicalForm tryNewtonInterp(const CanonicalForm &alpha, const CanonicalForm &u, const CanonicalForm &newtonPoly, const CanonicalForm &oldInterPoly, const Variable &x, const CanonicalForm &M, bool &fail)
void tryNTLGCD(zz_pEX &x, const zz_pEX &a, const zz_pEX &b, bool &fail)
compute the GCD x of a and b, fail is set to true if a zero divisor is encountered ...
zz_pX convertFacCF2NTLzzpX(const CanonicalForm &f)
void tryBrownGCD(const CanonicalForm &F, const CanonicalForm &G, const CanonicalForm &M, CanonicalForm &result, bool &fail, bool topLevel)
modular gcd over F_p[x]/(M) for not necessarily irreducible M. If a zero divisor is encountered fail ...
int * leadDeg(const CanonicalForm &f, int *degs)
bool tryFdivides(const CanonicalForm &f, const CanonicalForm &g, const CanonicalForm &M, bool &fail)
same as fdivides but handles zero divisors in Z_p[t]/(f)[x1,...,xn] for reducible f ...