14#ifndef FLINT_CONVERT_H
15#define FLINT_CONVERT_H
26#ifndef __GMP_BITS_PER_MP_LIMB
27#define __GMP_BITS_PER_MP_LIMB GMP_LIMB_BITS
29#include <flint/fmpz.h>
30#include <flint/fmpq.h>
31#include <flint/fmpz_poly.h>
32#include <flint/fmpz_mod_poly.h>
33#include <flint/fmpq_poly.h>
34#include <flint/nmod_poly.h>
35#include <flint/nmod_mat.h>
36#include <flint/fmpz_mat.h>
37#if ( __FLINT_RELEASE >= 20400)
39#include <flint/fq_poly.h>
40#include <flint/fq_nmod.h>
41#include <flint/fq_nmod_poly.h>
42#include <flint/fq_nmod_mat.h>
43#if ( __FLINT_RELEASE >= 20503)
44#include <flint/fmpq_mpoly.h>
46#if ( __FLINT_RELEASE >= 20700)
47#include <flint/fq_nmod_mpoly_factor.h>
135 const nmod_poly_factor_t fac,
136 const mp_limb_t leadingCoeff,
144 const fmpz_poly_factor_t fac,
150#if ( __FLINT_RELEASE >= 20700)
153convertFLINTFq_nmod_mpoly_factor2FacCFFList (
154 fq_nmod_mpoly_factor_t fac,
155 const fq_nmod_mpoly_ctx_t& ctx,
157 const fq_nmod_ctx_t& fq_ctx,
176 const fmpz_mod_poly_t poly,
183#if __FLINT_RELEASE >= 20400
189 const fq_nmod_ctx_t ctx
204 const fq_nmod_ctx_t ctx
207#if ( __FLINT_RELEASE >= 20700)
211convertFacCF2Fq_nmod_mpoly_t (fq_nmod_mpoly_t
result,
213 const fq_nmod_mpoly_ctx_t ctx,
215 const fq_nmod_ctx_t fq_ctx
239 const fq_nmod_ctx_t ctx
257 const fq_nmod_ctx_t ctx
279#if __FLINT_RELEASE >= 20400
283 const fq_nmod_ctx_t&
fq_con,
290 const fq_nmod_ctx_t
fq_con,
300 const fq_nmod_ctx_t
fq_con
305#if __FLINT_RELEASE >= 20503
310void convFactoryPFlintMP (
const CanonicalForm &
f, nmod_mpoly_t
res, nmod_mpoly_ctx_t ctx,
int N );
311void convFactoryPFlintMP (
const CanonicalForm &
f, fmpq_mpoly_t
res, fmpq_mpoly_ctx_t ctx,
int N );
312void convFactoryPFlintMP (
const CanonicalForm &
f, fmpz_mpoly_t
res, fmpz_mpoly_ctx_t ctx,
int N );
313CanonicalForm convFlintMPFactoryP(nmod_mpoly_t
f, nmod_mpoly_ctx_t ctx,
int N);
314CanonicalForm convFlintMPFactoryP(fmpq_mpoly_t
f, fmpq_mpoly_ctx_t ctx,
int N);
315CanonicalForm convFlintMPFactoryP(fmpz_mpoly_t
f, fmpz_mpoly_ctx_t ctx,
int N);
317#if __FLINT_RELEASE >= 20700
319convertFq_nmod_mpoly_t2FacCF (
const fq_nmod_mpoly_t poly,
320 const fq_nmod_mpoly_ctx_t& ctx,
322 const fq_nmod_ctx_t& fq_ctx,
void convertFacCFMatrix2Fmpz_mat_t(fmpz_mat_t M, const CFMatrix &m)
conversion of a factory matrix over Z to a fmpz_mat_t
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....
CFMatrix * convertFmpz_mat_t2FacCFMatrix(const fmpz_mat_t m)
conversion of a FLINT matrix over Z to a factory matrix
CanonicalForm convertFq_nmod_t2FacCF(const fq_nmod_t poly, const Variable &alpha, const fq_nmod_ctx_t ctx)
conversion of a FLINT element of F_q to a CanonicalForm with alg. 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
CFMatrix * convertNmod_mat_t2FacCFMatrix(const nmod_mat_t m)
conversion of a FLINT matrix over Z/p to a factory matrix
void convertFacCFMatrix2nmod_mat_t(nmod_mat_t M, const CFMatrix &m)
conversion of a factory matrix over Z/p to a nmod_mat_t
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...
CFFList convertFLINTfmpz_poly_factor2FacCFFList(const fmpz_poly_factor_t fac, const Variable &x)
conversion of a FLINT factorization over Z to a CFFList
CanonicalForm convertFmpz2CF(const fmpz_t coefficient)
conversion of a FLINT integer to CanonicalForm
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....
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...
CanonicalForm convertFmpq_poly_t2FacCF(const fmpq_poly_t p, const Variable &x)
conversion of a FLINT poly over Q to CanonicalForm
void convertFacCFMatrix2Fq_nmod_mat_t(fq_nmod_mat_t M, const fq_nmod_ctx_t fq_con, const CFMatrix &m)
conversion of a factory matrix over F_q to a fq_nmod_mat_t
EXTERN_VAR flint_rand_t FLINTrandom
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
void convertFacCF2nmod_poly_t(nmod_poly_t result, const CanonicalForm &f)
conversion of a factory univariate polynomials over Z/p (for word size p) to nmod_poly_t
CFFList convertFLINTFq_nmod_poly_factor2FacCFFList(const fq_nmod_poly_factor_t fac, const Variable &x, const Variable &alpha, const fq_nmod_ctx_t fq_con)
conversion of a FLINT factorization over Fq (for word size p) to a CFFList
void convertCF2Fmpz(fmpz_t result, const CanonicalForm &f)
conversion of a factory integer to fmpz_t
void convertCF2Fmpq(fmpq_t result, const CanonicalForm &f)
conversion of a factory rationals to fmpq_t
CanonicalForm convertnmod_poly_t2FacCF(const nmod_poly_t poly, const Variable &x)
conversion of a FLINT poly over Z/p to CanonicalForm
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)
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
CanonicalForm convertFmpz_poly_t2FacCF(const fmpz_poly_t poly, const Variable &x)
conversion of a FLINT poly over Z to CanonicalForm
CFFList convertFLINTnmod_poly_factor2FacCFFList(const nmod_poly_factor_t fac, const mp_limb_t leadingCoeff, const Variable &x)
conversion of a FLINT factorization over Z/p (for word size p) to a CFFList
CanonicalForm convertFmpq2CF(const fmpq_t q)
conversion of a FLINT rational to CanonicalForm
void convertFacCF2Fmpq_poly_t(fmpq_poly_t result, const CanonicalForm &f)
conversion of a factory univariate polynomials over Q to fmpq_poly_t
void convertFacCF2Fmpz_poly_t(fmpz_poly_t result, const CanonicalForm &f)
conversion of a factory univariate polynomial over Z to a fmpz_poly_t
void convertCF2initFmpz(fmpz_t result, const CanonicalForm &f)
conversion of a factory integer to fmpz_t(init.)
CFMatrix * convertFq_nmod_mat_t2FacCFMatrix(const fq_nmod_mat_t m, const fq_nmod_ctx_t &fq_con, const Variable &alpha)
conversion of a FLINT matrix over F_q to a factory matrix
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
const CanonicalForm CFMap CFMap & N
factory's class for variables
class to do operations mod p^k for int's p and k
operations mod p^k and some other useful functions for factorization