45 if (!
i.getItem().inCoeffDomain())
54 i.getItem()=
N (
i.getItem());
60 i.getItem()=
CFFactor (
N (
i.getItem().factor()),
i.getItem().exp());
66 i.getItem()=
CFAFactor (
N (
i.getItem().factor()),
i.getItem().minpoly(),
88 i.getItem()=
N (
i.getItem());
105 i.getItem()=
N (
i.getItem());
113 if (F.
isOne())
return false;
209 int k=
info.getGFDegree();
226 int k=
info.getGFDegree();
270 int k=
info.getGFDegree();
302 lcinv= 1/
Lc (
i.getItem().factor());
312 int r= elements.
size();
331 if (
index[0] == r -
s + 1)
337 while (
found ==
false)
345 while (
s -
i - 1 +
k <
s)
351 for (
int j= 0;
j <
s;
j++)
358 for (
int j= 0;
j <
s;
j++)
369 array[
j]=
i.getItem();
488 if (
i.coeff().inCoeffDomain())
492 for (
ii=
i.coeff();
ii.hasTerms();
ii++)
572 if (
i.coeff().inCoeffDomain())
576 for (
ii=
i.coeff();
ii.hasTerms();
ii++)
644 if (!
iter.hasTerms())
654 for (
int l= 0;
l < d;
l++)
667 ASSERT (
G.isUnivariate() ||
G.inCoeffDomain(),
"univariate input expected");
709 ASSERT (
G.isUnivariate() ||
G.inCoeffDomain(),
"univariate input expected");
858 int* point=
new int [2];
859 for (
int i= 0;
i < n;
i++)
1024 int* point=
new int [2];
1025 for (
int i= 0;
i < n;
i++)
1112 for (
int i=
indf - 1;
i >= 0;
i--)
1180 for (
int i=
indf - 1;
i >= 0;
i--)
1190 for (
int i=
indg - 1;
i >= 0;
i--)
1241 for (
int i=
indf - 1;
i >= 0;
i--)
1256 ASSERT (L.
length() > 1,
"expected a list of at least two elements");
1265 for (;
i.hasItem();
i++)
1290 C +=
i.coeff()*
power (
f.mvar(),
i.exp()/ d);
This file provides a class to store information about finite fields and extensions thereof.
This file defines functions for conversion to FLINT (www.flintlib.org) and back.
CanonicalForm convertNTLzzpX2CF(const zz_pX &poly, const Variable &x)
zz_pX convertFacCF2NTLzzpX(const CanonicalForm &f)
const CanonicalForm CFMap CFMap & N
bool isInPolygon(int **points, int sizePoints, int *point)
check if point is inside a polygon described by points
int polygon(int **points, int sizePoints)
compute a polygon
This file provides functions to compute the Newton polygon of a bivariate polynomial.
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
declarations of higher level algorithms.
#define ASSERT(expression, message)
#define GaloisFieldDomain
Interface to generate InternalCF's over various domains from intrinsic types or mpz_t's.
Iterators for CanonicalForm's.
static CanonicalForm bound(const CFMatrix &M)
int findItem(const CFList &list, const CanonicalForm &item)
helper function
CanonicalForm GFMapDown(const CanonicalForm &F, int k)
maps a polynomial over to a polynomial over , d needs to be a multiple of k
This file implements functions to map between extensions of finite fields.
int ipower(int b, int m)
int ipower ( int b, int m )
class to iterate through CanonicalForm's
ExtensionInfo contains information about extension.
virtual class for internal CanonicalForm's
factory's class for variables
const CanonicalForm int const CFList & evaluation
const CanonicalForm int s
const CanonicalForm int const CFList const Variable & y
CFFList append(const CFFList &Inputlist, const CFFactor &TheFactor)
const Variable & v
< [in] a sqrfree bivariate poly
static bool GFInExtensionHelper(const CanonicalForm &F, const int number)
int subsetDegree(const CFList &S)
compute the sum of degrees in Variable(1) of elements in S
CFArray logarithmicDerivative(const CanonicalForm &F, const CanonicalForm &G, int l, CanonicalForm &Q)
compute the coefficients of the logarithmic derivative of G mod Variable (2)^l over Fq
int * computeBounds(const CanonicalForm &F, int &n, bool &isIrreducible)
compute bounds for logarithmic derivative as described in K. Belabas, M. van Hoeij,...
void appendTestMapDown(CFList &factors, const CanonicalForm &f, const ExtensionInfo &info, CFList &source, CFList &dest)
test if g is in a subfield of the current field, if so map it down and append it to factors
void appendSwapDecompress(CFList &factors1, const CFList &factors2, const CFList &factors3, const bool swap1, const bool swap2, const CFMap &N)
first swap Variables in factors1 if necessary, then append factors2 and factors3 on factors1 and fina...
CanonicalForm mapDown(const CanonicalForm &F, const ExtensionInfo &info, CFList &source, CFList &dest)
map a poly into a subfield of the current field, no testing is performed!
void normalize(CFList &factors)
normalize factors, i.e. make factors monic
void indexUpdate(int index[], const int &subsetSize, const int &setSize, bool &noSubset)
update index
void appendMapDown(CFList &factors, const CanonicalForm &g, const ExtensionInfo &info, CFList &source, CFList &dest)
map g down into a subfield of the current field and append it to factors
CanonicalForm reverseSubst(const CanonicalForm &F, const int d, const Variable &x)
reverse a substitution x^d->x
void subst(const CanonicalForm &F, CanonicalForm &A, const int d, const Variable &x)
substitute x^d by x in F
CFArray getCoeffs(const CanonicalForm &F, const int k)
extract coefficients of for where is a variable of level 1
CFArray copy(const CFList &list)
write elements of list into an array
int recSubstituteCheck(const CanonicalForm &F, const int d)
void swapDecompress(CFList &factors, const bool swap, const CFMap &N)
swap Variables in factors, then decompress factors
CFList subset(int index[], const int &s, const CFArray &elements, bool &noSubset)
extract a subset given by index of size s from elements, if there is no subset we have not yet consid...
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)
static bool FqInExtensionHelper(const CanonicalForm &F, const CanonicalForm &gamma, const CanonicalForm &delta, CFList &source, CFList &dest)
void writeInMatrix(CFMatrix &M, const CFArray &A, const int column, const int startIndex)
write A into M starting at row startIndex
int substituteCheck(const CanonicalForm &F, const Variable &x)
check if a substitution x^n->x is possible
int * computeBoundsWrtDiffMainvar(const CanonicalForm &F, int &n, bool &isIrreducible)
as above just wrt to the other variable
void decompress(CFList &factors, const CFMap &N)
decompress a list of polys factors using the map N
This file provides utility functions for bivariate factorization.
convertFacCF2nmod_poly_t(FLINTmipo, M)
nmod_poly_clear(FLINTmipo)
This file defines functions for Hensel lifting.
CanonicalForm mulMod2(const CanonicalForm &A, const CanonicalForm &B, const CanonicalForm &M)
Karatsuba style modular multiplication for bivariate polynomials.
void newtonDiv(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q)
This file defines functions for fast multiplication and division with remainder.
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
some useful template functions.
bool isIrreducible(const CanonicalForm &f)
bool isIrreducible ( const CanonicalForm & f )
operations on immediates, that is elements of F_p, GF, Z, Q that fit into intrinsic int,...
static long imm2int(const InternalCF *const imm)
STATIC_VAR int * multiplicity
gmp_float exp(const gmp_float &a)
static int index(p_Length length, p_Ord ord)
int status int void * buf
#define TIMING_DEFINE_PRINT(t)
#define TIMING_END_AND_PRINT(t, msg)