 |
My Project
debian-1:4.1.1-p2+ds-4
|
Go to the source code of this file.
|
CanonicalForm | mulNTL (const CanonicalForm &F, const CanonicalForm &G, const modpk &b=modpk()) |
| multiplication of univariate polys using FLINT/NTL over F_p, F_q, Z/p^k, Z/p^k[t]/(f), Z, Q, Q(a), if we are in GF factory's default multiplication is used. If b!= 0 and getCharacteristic() == 0 the input will be considered as elements over Z/p^k or Z/p^k[t]/(f). More...
|
|
CanonicalForm | modNTL (const CanonicalForm &F, const CanonicalForm &G, const modpk &b=modpk()) |
| mod of univariate polys using FLINT/NTL over F_p, F_q, Z/p^k, Z/p^k[t]/(f), Z, Q, Q(a), if we are in GF factory's default multiplication is used. If b!= 0 and getCharacteristic() == 0 the input will be considered as elements over Z/p^k or Z/p^k[t]/(f); in this case invertiblity of Lc(G) is not checked More...
|
|
CanonicalForm | divNTL (const CanonicalForm &F, const CanonicalForm &G, const modpk &b=modpk()) |
| division of univariate polys using FLINT/NTL over F_p, F_q, Z/p^k, Z/p^k[t]/(f), Z, Q, Q(a), if we are in GF factory's default multiplication is used. If b!= 0 and getCharacteristic() == 0 the input will be considered as elements over Z/p^k or Z/p^k[t]/(f); in this case invertiblity of Lc(G) is not checked More...
|
|
void | divrem2 (const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R, const CanonicalForm &M) |
| division with remainder of F by G wrt Variable (1) modulo M. Uses an algorithm based on Burnikel, Ziegler "Fast recursive division". More...
|
|
void | divrem (const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R, const CFList &MOD) |
| division with remainder of F by G wrt Variable (1) modulo MOD. Uses an algorithm based on Burnikel, Ziegler "Fast recursive division". More...
|
|
void | newtonDivrem (const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R, const CanonicalForm &M) |
| division with remainder of F by G wrt Variable (1) modulo M using Newton inversion More...
|
|
CanonicalForm | newtonDiv (const CanonicalForm &F, const CanonicalForm &G, const CanonicalForm &M) |
| division of F by G wrt Variable (1) modulo M using Newton inversion More...
|
|
bool | uniFdivides (const CanonicalForm &A, const CanonicalForm &B) |
| divisibility test for univariate polys More...
|
|
CanonicalForm | mulMod2 (const CanonicalForm &A, const CanonicalForm &B, const CanonicalForm &M) |
| Karatsuba style modular multiplication for bivariate polynomials. More...
|
|
CanonicalForm | mulMod (const CanonicalForm &A, const CanonicalForm &B, const CFList &MOD) |
| Karatsuba style modular multiplication for multivariate polynomials. More...
|
|
CanonicalForm | mod (const CanonicalForm &F, const CFList &M) |
| reduce F modulo elements in M. More...
|
|
CanonicalForm | prodMod (const CFList &L, const CanonicalForm &M) |
| product of all elements in L modulo M via divide-and-conquer. More...
|
|
CanonicalForm | prodMod (const CFList &L, const CFList &M) |
| product of all elements in L modulo M via divide-and-conquer. More...
|
|
void | newtonDivrem (const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R) |
| division with remainder of univariate polynomials over Q and Q(a) using Newton inversion, satisfying F=G*Q+R, deg(R) < deg(G) More...
|
|
This file defines functions for fast multiplication and division with remainder
- Author
- Martin Lee
Definition in file facMul.h.
◆ divNTL()
division of univariate polys using FLINT/NTL over F_p, F_q, Z/p^k, Z/p^k[t]/(f), Z, Q, Q(a), if we are in GF factory's default multiplication is used. If b!= 0 and getCharacteristic() == 0 the input will be considered as elements over Z/p^k or Z/p^k[t]/(f); in this case invertiblity of Lc(G) is not checked
- Returns
- divNTL returns F/G
- Parameters
-
[in] | F | a univariate poly |
[in] | G | a univariate poly |
[in] | b | coeff bound |
Definition at line 850 of file facMul.cc.
867 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
869 fmpz_mod_poly_t FLINTmipo;
878 fq_ctx_init_modulus (
fq_con, FLINTmipo,
"Z");
883 fq_inv (FLINTG, FLINTG,
fq_con);
884 fq_mul (FLINTF, FLINTF, FLINTG,
fq_con);
889 fmpz_mod_poly_clear (FLINTmipo);
890 fq_clear (FLINTF,
fq_con);
891 fq_clear (FLINTG,
fq_con);
897 ZZ_pE::init (NTLmipo);
901 div (
result, to_ZZ_pE (NTLf), to_ZZ_pE (NTLg));
913 if (!
G.inBaseDomain())
917 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
919 fmpz_mod_poly_t FLINTmipo;
929 fq_ctx_init_modulus (
fq_con, FLINTmipo,
"Z");
934 fq_inv (FLINTG, FLINTG,
fq_con);
935 fq_poly_scalar_mul_fq (FLINTF, FLINTF, FLINTG,
fq_con);
941 fmpz_mod_poly_clear (FLINTmipo);
942 fq_poly_clear (FLINTF,
fq_con);
943 fq_clear (FLINTG,
fq_con);
949 ZZ_pE::init (NTLmipo);
952 div (NTLf, NTLf, to_ZZ_pE (NTLg));
973 fmpz_mod_poly_t FLINTF, FLINTG;
976 fmpz_mod_poly_divrem (FLINTF, FLINTG, FLINTF, FLINTG);
978 fmpz_mod_poly_clear (FLINTG);
979 fmpz_mod_poly_clear (FLINTF);
980 fmpz_clear (FLINTpk);
990 ZZ_pX NTLf= to_ZZ_pX (ZZf);
991 ZZ_pX NTLg= to_ZZ_pX (ZZg);
992 div (NTLf, NTLf, NTLg);
1002 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
1004 fmpz_mod_poly_t FLINTmipo;
1006 fq_poly_t FLINTF, FLINTG;
1013 fq_ctx_init_modulus (
fq_con, FLINTmipo,
"Z");
1018 fq_poly_divrem (FLINTF, FLINTG, FLINTF, FLINTG,
fq_con);
1023 fmpz_clear (FLINTp);
1024 fmpz_mod_poly_clear (FLINTmipo);
1026 fq_poly_clear (FLINTF,
fq_con);
1027 fq_poly_clear (FLINTG,
fq_con);
1032 ZZ_pE::init (NTLmipo);
1035 div (NTLf, NTLf, NTLg);
1050 ASSERT (F.
level() ==
G.level(),
"expected polys of same level");
1060 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
1061 nmod_poly_t FLINTmipo;
1069 fq_nmod_poly_t FLINTF, FLINTG;
1073 fq_nmod_poly_divrem (FLINTF, FLINTG, FLINTF, FLINTG,
fq_con);
1083 zz_pE::init (NTLMipo);
1086 div (NTLF, NTLF, NTLG);
1093 nmod_poly_t FLINTF, FLINTG;
1096 nmod_poly_div (FLINTF, FLINTF, FLINTG);
1103 div (NTLF, NTLF, NTLG);
◆ divrem()
division with remainder of F by G wrt Variable (1) modulo MOD. Uses an algorithm based on Burnikel, Ziegler "Fast recursive division".
- See also
- divrem2()
- Parameters
-
[in] | F | multivariate, compressed polynomial |
[in] | G | multivariate, compressed polynomial |
[in,out] | Q | dividend |
[in,out] | R | remainder, degree (R, 1) < degree (G, 1) |
[in] | MOD | only contains powers of Variables of level higher than 1 |
Definition at line 3583 of file facMul.cc.
3610 H=
i.getItem()*xToDegB;
3618 H=
R*xToDegB +
i.getItem();
◆ divrem2()
division with remainder of F by G wrt Variable (1) modulo M. Uses an algorithm based on Burnikel, Ziegler "Fast recursive division".
- Returns
- Q returns the dividend, R returns the remainder.
- See also
- divrem()
- Parameters
-
[in] | F | bivariate, compressed polynomial |
[in] | G | bivariate, compressed polynomial |
[in,out] | Q | dividend |
[in,out] | R | remainder, degree (R, 1) < degree (G, 1) |
[in] | M | power of Variable (2) |
Definition at line 3516 of file facMul.cc.
3566 H=
i.getItem()*xToDegB;
3576 H=
R*xToDegB +
i.getItem();
◆ mod()
reduce F modulo elements in M.
- Returns
- mod returns F modulo M
- Parameters
-
[in] | F | compressed polynomial |
[in] | M | list containing only univariate polynomials |
Definition at line 2939 of file facMul.cc.
◆ modNTL()
mod of univariate polys using FLINT/NTL over F_p, F_q, Z/p^k, Z/p^k[t]/(f), Z, Q, Q(a), if we are in GF factory's default multiplication is used. If b!= 0 and getCharacteristic() == 0 the input will be considered as elements over Z/p^k or Z/p^k[t]/(f); in this case invertiblity of Lc(G) is not checked
- Returns
- modNTL returns F mod G
- Parameters
-
[in] | F | a univariate poly |
[in] | G | a univariate poly |
[in] | b | coeff bound |
Definition at line 676 of file facMul.cc.
710 fmpz_mod_poly_t FLINTF, FLINTG;
713 fmpz_mod_poly_divrem (FLINTG, FLINTF, FLINTF, FLINTG);
715 fmpz_mod_poly_clear (FLINTG);
716 fmpz_mod_poly_clear (FLINTF);
717 fmpz_clear (FLINTpk);
727 ZZ_pX NTLf= to_ZZ_pX (ZZf);
728 ZZ_pX NTLg= to_ZZ_pX (ZZg);
729 rem (NTLf, NTLf, NTLg);
739 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
741 fmpz_mod_poly_t FLINTmipo;
743 fq_poly_t FLINTF, FLINTG;
751 fq_ctx_init_modulus (
fq_con, FLINTmipo,
"Z");
756 fq_poly_rem (FLINTF, FLINTF, FLINTG,
fq_con);
762 fmpz_mod_poly_clear (FLINTmipo);
763 fq_poly_clear (FLINTF,
fq_con);
764 fq_poly_clear (FLINTG,
fq_con);
771 ZZ_pE::init (NTLmipo);
774 rem (NTLf, NTLf, NTLg);
789 ASSERT (F.
level() ==
G.level(),
"expected polys of same level");
799 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
800 nmod_poly_t FLINTmipo;
808 fq_nmod_poly_t FLINTF, FLINTG;
812 fq_nmod_poly_rem (FLINTF, FLINTF, FLINTG,
fq_con);
822 zz_pE::init (NTLMipo);
825 rem (NTLF, NTLF, NTLG);
832 nmod_poly_t FLINTF, FLINTG;
835 nmod_poly_divrem (FLINTG, FLINTF, FLINTF, FLINTG);
842 rem (NTLF, NTLF, NTLG);
◆ mulMod()
Karatsuba style modular multiplication for multivariate polynomials.
- Returns
- mulMod2 returns A * B mod MOD.
- Parameters
-
[in] | A | multivariate, compressed polynomial |
[in] | B | multivariate, compressed polynomial |
[in] | MOD | only contains powers of Variables of level higher than 1 |
Definition at line 2947 of file facMul.cc.
2961 if (
G.inCoeffDomain())
2964 int sizeF=
size (F);
2965 int sizeG=
size (
G);
2967 if (sizeF / MOD.
length() < 100 || sizeG / MOD.
length() < 100)
2970 return mod (
G*F, MOD);
2972 return mod (F*
G, MOD);
2979 if ((degF <= 1 && F.
level() <=
M.level()) &&
2980 (degG <= 1 &&
G.level() <=
M.level()))
2984 if (degF == 1 && degG == 1)
2995 return H11*
y*
y + (H01 - H00 - H11)*
y + H00;
3007 else if (degF == 1 && degG == 0)
3009 else if (degF == 0 && degG == 1)
3015 if (degF >=
m || degG >=
m)
3029 return F0G0 + MLo*(F0G1 + F1G0);
3033 m= (
tmax(degF, degG)+1)/2;
3042 return H11*yToM*yToM + (H01 - H11 - H00)*yToM + H00;
3044 DEBOUTLN (cerr,
"fatal end in mulMod");
◆ mulMod2()
Karatsuba style modular multiplication for bivariate polynomials.
- Returns
- mulMod2 returns A * B mod M.
- Parameters
-
[in] | A | bivariate, compressed polynomial |
[in] | B | bivariate, compressed polynomial |
[in] | M | power of Variable (2) |
Definition at line 2853 of file facMul.cc.
2859 ASSERT (
M.isUnivariate(),
"M must be univariate");
2863 if (F.inCoeffDomain())
2865 if (
G.inCoeffDomain())
2872 if ((degF < 1 && degG < 1) && (F.isUnivariate() &&
G.isUnivariate()) &&
2873 (F.level() ==
G.level()))
2878 else if (degF <= 1 && degG <= 1)
2884 int sizeF=
size (F);
2885 int sizeG=
size (
G);
2887 int fallBackToNaive= 50;
2888 if (sizeF < fallBackToNaive || sizeG < fallBackToNaive)
2891 return mod (
G*F,
M);
2893 return mod (F*
G,
M);
2902 (((degF-degG) < 50 && degF > degG) || ((degG-degF) < 50 && degF <= degG)))
2906 if (degF >=
m || degG >=
m)
2917 return F0G0 + MLo*(F0G1 + F1G0);
2930 return H11*yToM*yToM + (H01 - H11 - H00)*yToM + H00;
2932 DEBOUTLN (cerr,
"fatal end in mulMod2");
◆ mulNTL()
multiplication of univariate polys using FLINT/NTL over F_p, F_q, Z/p^k, Z/p^k[t]/(f), Z, Q, Q(a), if we are in GF factory's default multiplication is used. If b!= 0 and getCharacteristic() == 0 the input will be considered as elements over Z/p^k or Z/p^k[t]/(f).
- Returns
- mulNTL returns F*G
- Parameters
-
[in] | F | a univariate poly |
[in] | G | a univariate poly |
[in] | b | coeff bound |
Definition at line 407 of file facMul.cc.
426 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
428 fmpz_mod_poly_t FLINTmipo;
430 fq_poly_t FLINTF, FLINTG;
438 fq_ctx_init_modulus (
fq_con, FLINTmipo,
"Z");
443 fq_poly_mul (FLINTF, FLINTF, FLINTG,
fq_con);
449 fmpz_mod_poly_clear (FLINTmipo);
450 fq_poly_clear (FLINTF,
fq_con);
451 fq_poly_clear (FLINTG,
fq_con);
457 ZZ_pE::init (NTLmipo);
460 mul (NTLf, NTLf, NTLg);
480 fmpz_mod_poly_t FLINTF, FLINTG;
483 fmpz_mod_poly_mul (FLINTF, FLINTF, FLINTG);
485 fmpz_mod_poly_clear (FLINTG);
486 fmpz_mod_poly_clear (FLINTF);
487 fmpz_clear (FLINTpk);
497 ZZ_pX NTLf= to_ZZ_pX (ZZf);
498 ZZ_pX NTLg= to_ZZ_pX (ZZg);
499 mul (NTLf, NTLf, NTLg);
511 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
513 fmpz_mod_poly_t FLINTmipo;
521 fq_ctx_init_modulus (
fq_con, FLINTmipo,
"Z");
532 fq_poly_scalar_mul_fq (FLINTG, FLINTG, FLINTF,
fq_con);
535 fmpz_poly_clear (FLINTF);
536 fq_poly_clear (FLINTG,
fq_con);
546 fq_poly_scalar_mul_fq (FLINTF, FLINTF, FLINTG,
fq_con);
549 fmpz_poly_clear (FLINTG);
550 fq_poly_clear (FLINTF,
fq_con);
559 fq_mul (FLINTF, FLINTF, FLINTG,
fq_con);
562 fq_clear (FLINTF,
fq_con);
563 fq_clear (FLINTG,
fq_con);
567 fmpz_mod_poly_clear (FLINTmipo);
574 ZZ_pE::init (NTLmipo);
580 mul (NTLg, to_ZZ_pE (NTLf), NTLg);
587 mul (NTLf, NTLf, to_ZZ_pE (NTLg));
595 mul (
result, to_ZZ_pE (NTLg), to_ZZ_pE (NTLf));
608 ASSERT (F.
level() ==
G.level(),
"expected polys of same level");
625 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
626 nmod_poly_t FLINTmipo;
634 fq_nmod_poly_t FLINTF, FLINTG;
638 fq_nmod_poly_mul (FLINTF, FLINTF, FLINTG,
fq_con);
648 zz_pE::init (NTLMipo);
651 mul (NTLF, NTLF, NTLG);
658 nmod_poly_t FLINTF, FLINTG;
661 nmod_poly_mul (FLINTF, FLINTF, FLINTG);
668 mul (NTLF, NTLF, NTLG);
◆ newtonDiv()
division of F by G wrt Variable (1) modulo M using Newton inversion
- Returns
- newtonDiv returns the dividend
- See also
- divrem2(), newtonDivrem()
- Parameters
-
[in] | F | bivariate, compressed polynomial |
[in] | G | bivariate, compressed polynomial which is monic in Variable (1) |
[in] | M | power of Variable (2) |
Definition at line 3180 of file facMul.cc.
3216 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
3217 nmod_poly_t FLINTmipo;
3226 fq_nmod_poly_t FLINTA, FLINTB;
3230 fq_nmod_poly_divrem (FLINTA, FLINTB, FLINTA, FLINTB,
fq_con);
3239 bool zz_pEbak= zz_pE::initialized();
3247 div (NTLA, NTLA, NTLB);
◆ newtonDivrem() [1/2]
division with remainder of univariate polynomials over Q and Q(a) using Newton inversion, satisfying F=G*Q+R, deg(R) < deg(G)
- Parameters
-
[in] | F | univariate poly |
[in] | G | univariate poly |
[in,out] | Q | quotient |
[in,out] | R | remainder |
Definition at line 342 of file facMul.cc.
345 ASSERT (F.
level() ==
G.level(),
"F and G have different level");
◆ newtonDivrem() [2/2]
division with remainder of F by G wrt Variable (1) modulo M using Newton inversion
- Returns
- Q returns the dividend, R returns the remainder.
- See also
- divrem2(), newtonDiv()
- Parameters
-
[in] | F | bivariate, compressed polynomial |
[in] | G | bivariate, compressed polynomial which is monic in Variable (1) |
[in,out] | Q | dividend |
[in,out] | R | remainder, degree (R, 1) < degree (G, 1) |
[in] | M | power of Variable (2) |
Definition at line 3259 of file facMul.cc.
3299 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
3300 nmod_poly_t FLINTmipo;
3308 fq_nmod_poly_t FLINTA, FLINTB;
3312 fq_nmod_poly_divrem (FLINTA, FLINTB, FLINTA, FLINTB,
fq_con);
3327 DivRem (NTLQ, NTLR, NTLA, NTLB);
◆ prodMod() [1/2]
product of all elements in L modulo M via divide-and-conquer.
- Returns
- prodMod returns product of all elements in L modulo M.
- Parameters
-
[in] | L | contains only bivariate, compressed polynomials |
[in] | M | power of Variable (2) |
Definition at line 3047 of file facMul.cc.
3064 for (
int j= 1;
j <=
l;
j++,
i++)
◆ prodMod() [2/2]
product of all elements in L modulo M via divide-and-conquer.
- Returns
- prodMod returns product of all elements in L modulo M.
- Parameters
-
[in] | L | contains multivariate, compressed polynomials |
[in] | M | contains only powers of Variables |
Definition at line 3074 of file facMul.cc.
3078 else if (L.
length() == 1)
3080 else if (L.
length() == 2)
3088 for (
int j= 1;
j <=
l;
j++,
i++)
◆ uniFdivides()
divisibility test for univariate polys
- Returns
- uniFdivides returns true if A divides B
- Parameters
-
[in] | A | univariate poly |
[in] | B | univariate poly |
Definition at line 3626 of file facMul.cc.
3637 if (
A.inCoeffDomain())
3652 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
3653 nmod_poly_t FLINTmipo;
3661 fq_nmod_poly_t FLINTA, FLINTB;
3664 int result= fq_nmod_poly_divides (FLINTA, FLINTB, FLINTA,
fq_con);
3672 zz_pE::init (NTLMipo);
3675 return divide (NTLB, NTLA);
3679 nmod_poly_t FLINTA, FLINTB;
3682 nmod_poly_divrem (FLINTB, FLINTA, FLINTB, FLINTA);
3683 bool result= nmod_poly_is_zero (FLINTA);
3690 return divide (NTLB, NTLA);
3700 fmpq_poly_t FLINTA,FLINTB;
3703 fmpq_poly_rem (FLINTA, FLINTB, FLINTA);
3704 bool result= fmpq_poly_is_zero (FLINTA);
3705 fmpq_poly_clear (FLINTA);
3706 fmpq_poly_clear (FLINTB);
CanonicalForm prodMod(const CFList &L, const CanonicalForm &M)
product of all elements in L modulo M via divide-and-conquer.
CanonicalForm convertnmod_poly_t2FacCF(const nmod_poly_t poly, const Variable &x)
conversion of a FLINT poly over Z/p to CanonicalForm
static const int SW_RATIONAL
set to 1 for computations over Q
zz_pX convertFacCF2NTLzzpX(const CanonicalForm &f)
class to iterate through CanonicalForm's
#define DEBOUTLN(stream, objects)
const CanonicalForm int const CFList const Variable & y
ZZ_pEX convertFacCF2NTLZZ_pEX(const CanonicalForm &f, const ZZ_pX &mipo)
CanonicalForm in Z_p(a)[X] to NTL ZZ_pEX.
nmod_poly_clear(FLINTmipo)
void convertCF2Fmpz(fmpz_t result, const CanonicalForm &f)
conversion of a factory integer to fmpz_t
CanonicalForm convertNTLZZ_pEX2CF(const ZZ_pEX &f, const Variable &x, const Variable &alpha)
void convertFacCF2Fq_t(fq_t result, const CanonicalForm &f, const fq_ctx_t ctx)
conversion of a factory element of F_q (for non-word size p) to a FLINT fq_t
void divrem(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R, const CFList &MOD)
division with remainder of F by G wrt Variable (1) modulo MOD. Uses an algorithm based on Burnikel,...
CanonicalForm convertNTLZZpX2CF(const ZZ_pX &poly, const Variable &x)
NAME: convertNTLZZpX2CF.
CanonicalForm mulFLINTQ(const CanonicalForm &F, const CanonicalForm &G)
const signed long ceil(const ampf< Precision > &x)
CanonicalForm modFLINTQ(const CanonicalForm &F, const CanonicalForm &G)
void convertFacCF2Fq_nmod_poly_t(fq_nmod_poly_t result, const CanonicalForm &f, const fq_nmod_ctx_t ctx)
conversion of a factory univariate poly over F_q to a FLINT fq_nmod_poly_t
#define GaloisFieldDomain
CanonicalForm convertFq_nmod_poly_t2FacCF(const fq_nmod_poly_t p, const Variable &x, const Variable &alpha, const fq_nmod_ctx_t ctx)
conversion of a FLINT poly over Fq to a CanonicalForm with alg. variable alpha and polynomial variabl...
convertFacCF2nmod_poly_t(FLINTmipo, M)
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
zz_pEX convertFacCF2NTLzz_pEX(const CanonicalForm &f, const zz_pX &mipo)
CanonicalForm mulNTL(const CanonicalForm &F, const CanonicalForm &G, const modpk &b)
multiplication of univariate polys using FLINT/NTL over F_p, F_q, Z/p^k, Z/p^k[t]/(f),...
#define ASSERT(expression, message)
fq_nmod_ctx_clear(fq_con)
template List< Variable > Difference(const List< Variable > &, const List< Variable > &)
int status int void * buf
nmod_poly_init(FLINTmipo, getCharacteristic())
CanonicalForm convertNTLzz_pEX2CF(const zz_pEX &f, const Variable &x, const Variable &alpha)
CanonicalForm mulMod2FLINTQa(const CanonicalForm &F, const CanonicalForm &G, const CanonicalForm &M)
CanonicalForm mulFLINTQTrunc(const CanonicalForm &F, const CanonicalForm &G, int m)
ZZ_pX convertFacCF2NTLZZpX(const CanonicalForm &f)
NAME: convertFacCF2NTLZZpX.
ZZX convertFacCF2NTLZZX(const CanonicalForm &f)
CanonicalForm mulMod2(const CanonicalForm &A, const CanonicalForm &B, const CanonicalForm &M)
Karatsuba style modular multiplication for bivariate polynomials.
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
void newtonDivrem(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R)
division with remainder of univariate polynomials over Q and Q(a) using Newton inversion,...
CanonicalForm mulFLINTQa(const CanonicalForm &F, const CanonicalForm &G, const Variable &alpha)
fq_nmod_ctx_init_modulus(fq_con, FLINTmipo, "Z")
void divrem2(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R, const CanonicalForm &M)
division with remainder of F by G wrt Variable (1) modulo M. Uses an algorithm based on Burnikel,...
template CanonicalForm tmax(const CanonicalForm &, const CanonicalForm &)
void convertFacCF2Fmpq_poly_t(fmpq_poly_t result, const CanonicalForm &f)
conversion of a factory univariate polynomials over Q to fmpq_poly_t
static CFList split(const CanonicalForm &F, const int m, const Variable &x)
void convertFacCF2Fmpz_mod_poly_t(fmpz_mod_poly_t result, const CanonicalForm &f, const fmpz_t p)
conversion of a factory univariate poly over Z to a FLINT poly over Z/p (for non word size p)
CanonicalForm mulMod(const CanonicalForm &A, const CanonicalForm &B, const CFList &MOD)
Karatsuba style modular multiplication for multivariate polynomials.
void newtonDiv(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q)
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
CanonicalForm divide(const CanonicalForm &ff, const CanonicalForm &f, const CFList &as)
factory's class for variables
CanonicalForm mulMod2NTLFq(const CanonicalForm &F, const CanonicalForm &G, const CanonicalForm &M)
CanonicalForm divFLINTQ(const CanonicalForm &F, const CanonicalForm &G)
CanonicalForm mod(const CanonicalForm &F, const CFList &M)
reduce F modulo elements in M.
static void divrem21(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R, const CFList &M)
CanonicalForm reverse(const CanonicalForm &F, int d)
CanonicalForm convertFq_poly_t2FacCF(const fq_poly_t p, const Variable &x, const Variable &alpha, const fq_ctx_t ctx)
conversion of a FLINT poly over Fq (for non-word size p) to a CanonicalForm with alg....
CanonicalForm convertNTLZZX2CF(const ZZX &polynom, const Variable &x)
const Variable & v
< [in] a sqrfree bivariate poly
CanonicalForm uniReverse(const CanonicalForm &F, int d, const Variable &x)
CanonicalForm convertFq_t2FacCF(const fq_t poly, const Variable &alpha)
conversion of a FLINT element of F_q with non-word size p to a CanonicalForm with alg....
CanonicalForm newtonInverse(const CanonicalForm &F, const int n, const Variable &x)
void convertFacCF2Fq_poly_t(fq_poly_t result, const CanonicalForm &f, const fq_ctx_t ctx)
conversion of a factory univariate poly over F_q (for non-word size p) to a FLINT fq_poly_t
fq_nmod_poly_clear(prod, fq_con)
bool getReduce(const Variable &alpha)
void convertFacCF2Fmpz_poly_t(fmpz_poly_t result, const CanonicalForm &f)
conversion of a factory univariate polynomial over Z to a fmpz_poly_t
ZZ convertFacCF2NTLZZ(const CanonicalForm &f)
NAME: convertFacCF2NTLZZX.
void rem(unsigned long *a, unsigned long *q, unsigned long p, int °a, int degq)
CanonicalForm convertNTLzzpX2CF(const zz_pX &poly, const Variable &x)
CanonicalForm convertFmpz_mod_poly_t2FacCF(const fmpz_mod_poly_t poly, const Variable &x, const modpk &b)
conversion of a FLINT poly over Z/p (for non word size p) to a CanonicalForm over Z