 |
My Project
debian-1:4.1.1-p2+ds-4build3
|
#include "config.h"
#include "canonicalform.h"
#include "cf_iter.h"
#include "cf_map.h"
#include "cf_util.h"
#include "cf_factory.h"
#include "facFqSquarefree.h"
#include "NTLconvert.h"
#include "FLINTconvert.h"
Go to the source code of this file.
|
static CanonicalForm | pthRoot (const CanonicalForm &F, int q) |
|
CanonicalForm | pthRoot (const CanonicalForm &F, const ZZ &q, const Variable &alpha) |
|
CanonicalForm | pthRoot (const CanonicalForm &F, const fmpz_t &q, const Variable &alpha) |
|
CanonicalForm | maxpthRoot (const CanonicalForm &F, int q, int &l) |
| p^l-th root extraction, where l is maximal More...
|
|
static CFFList | sqrfPosDer (const CanonicalForm &F, const Variable &x, CanonicalForm &c) |
|
CFFList | squarefreeFactorization (const CanonicalForm &F, const Variable &alpha) |
| squarefree factorization over a finite field return a list of squarefree factors with multiplicity More...
|
|
CanonicalForm | sqrfPart (const CanonicalForm &F, CanonicalForm &pthPower, const Variable &alpha) |
| squarefree part of F/g, where g is the product of those squarefree factors whose multiplicity is 0 mod p, if F a pth power pthPower= F. More...
|
|
This file provides functions for squarefrees factorizing over
,
or GF, as decribed in "Factoring
multivariate polynomials over a finite field" by L. Bernardin
- Author
- Martin Lee
Definition in file facFqSquarefree.cc.
◆ maxpthRoot()
p^l-th root extraction, where l is maximal
- Returns
- maxpthRoot returns a p^l-th root of F, where l is maximal
- See also
- pthRoot()
Definition at line 127 of file facFqSquarefree.cc.
130 bool derivZero=
true;
◆ pthRoot() [1/3]
Definition at line 84 of file facFqSquarefree.cc.
88 if (
A.inCoeffDomain())
90 nmod_poly_t FLINTmipo;
100 fq_nmod_init2 (FLINTA,
fq_con);
104 fmpz_init_set (qp, q);
105 fmpz_divexact_si (qp, qp,
p);
107 fq_nmod_pow (FLINTA, FLINTA, qp,
fq_con);
112 fq_nmod_clear (FLINTA,
fq_con);
◆ pthRoot() [2/3]
Definition at line 57 of file facFqSquarefree.cc.
61 if (
A.inCoeffDomain())
65 zz_pE::init (NTLMipo);
67 zz_pE NTLA2= to_zz_pE (NTLA);
◆ pthRoot() [3/3]
◆ sqrfPart()
squarefree part of F/g, where g is the product of those squarefree factors whose multiplicity is 0 mod p, if F a pth power pthPower= F.
- Returns
- sqrfPart returns 1, if F is a pthPower, else it returns the squarefree part of F/g, where g is the product of those squarefree factors whose multiplicity is 0 mod p
Definition at line 301 of file facFqSquarefree.cc.
317 for (;
i <=
A.level();
i++)
337 for (;
i <=
A.level();
i++)
◆ sqrfPosDer()
◆ squarefreeFactorization()
squarefree factorization over a finite field return a list of squarefree factors with multiplicity
Definition at line 181 of file facFqSquarefree.cc.
201 for (
int i=
l;
i > 0;
i--)
212 if (!
k.hasItem() && !
j.getItem().factor().inCoeffDomain())
tmp2.
append (
j.getItem());
215 for (;
k.hasItem();
k++)
217 if (
k.getItem().exp() ==
j.getItem().exp())
219 k.getItem()=
CFFactor (
k.getItem().factor()*
j.getItem().factor(),
224 if (
found ==
false && !
j.getItem().factor().inCoeffDomain())
231 bool degcheck=
false;;
232 for (
int i=
l;
i > 0;
i--)
240 #if defined(HAVE_NTL) || (HAVE_FLINT && __FLINT_RELEASE >= 20400)
244 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
248 fmpz_init_set_ui (qq,
p);
249 fmpz_pow_ui (qq, qq,
k);
253 #elif defined(HAVE_NTL)
270 tmp=
gcd (
i.getItem().factor(),
j.getItem().factor());
271 i.getItem()=
CFFactor (
i.getItem().factor()/tmp,
i.getItem().exp());
272 j.getItem()=
CFFactor (
j.getItem().factor()/tmp,
j.getItem().exp());
277 j.getItem().exp()*
p +
i.getItem().exp()));
283 if (!
i.getItem().factor().inCoeffDomain())
285 tmp=
M (
i.getItem().factor());
291 if (!
j.getItem().factor().inCoeffDomain())
293 tmp=
M (
j.getItem().factor());
static CanonicalForm pthRoot(const CanonicalForm &F, int q)
zz_pX convertFacCF2NTLzzpX(const CanonicalForm &f)
bool isZero(const CFArray &A)
checks if entries of A are zero
class to iterate through CanonicalForm's
CFFList squarefreeFactorization(const CanonicalForm &F, const Variable &alpha)
squarefree factorization over a finite field return a list of squarefree factors with multiplicity
nmod_poly_clear(FLINTmipo)
CanonicalForm convertFq_nmod_t2FacCF(const fq_nmod_t poly, const Variable &alpha)
conversion of a FLINT element of F_q to a CanonicalForm with alg. variable alpha
CanonicalForm convertNTLzzpE2CF(const zz_pE &coefficient, const Variable &x)
#define GaloisFieldDomain
convertFacCF2nmod_poly_t(FLINTmipo, M)
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
static CFFList sqrfPosDer(const CanonicalForm &F, const Variable &x, CanonicalForm &c)
fq_nmod_ctx_clear(fq_con)
int status int void * buf
nmod_poly_init(FLINTmipo, getCharacteristic())
CanonicalForm compress(const CanonicalForm &f, CFMap &m)
CanonicalForm compress ( const CanonicalForm & f, CFMap & m )
void convertFacCF2Fq_nmod_t(fq_nmod_t result, const CanonicalForm &f, const fq_nmod_ctx_t ctx)
conversion of a factory element of F_q to a FLINT fq_nmod_t, does not do any memory allocation for po...
int ipower(int b, int m)
int ipower ( int b, int m )
fq_nmod_ctx_init_modulus(fq_con, FLINTmipo, "Z")
factory's class for variables
const Variable & v
< [in] a sqrfree bivariate poly