![]() |
My Project
|
This file defines functions for conversion to FLINT (www.flintlib.org) and back. More...
#include "canonicalform.h"
#include "fac_util.h"
#include <flint/fmpz.h>
#include <flint/fmpq.h>
#include <flint/fmpz_poly.h>
#include <flint/fmpz_mod_poly.h>
#include <flint/fmpq_poly.h>
#include <flint/nmod_poly.h>
#include <flint/nmod_mat.h>
#include <flint/fmpz_mat.h>
#include <flint/fq.h>
#include <flint/fq_poly.h>
#include <flint/fq_nmod.h>
#include <flint/fq_nmod_poly.h>
#include <flint/fq_nmod_mat.h>
#include "factory/cf_gmp.h"
Go to the source code of this file.
Functions | |
void | convertCF2Fmpz (fmpz_t result, const CanonicalForm &f) |
conversion of a factory integer to fmpz_t | |
void | convertCF2initFmpz (fmpz_t result, const CanonicalForm &f) |
conversion of a factory integer to fmpz_t(init.) | |
void | convertFacCF2Fmpz_poly_t (fmpz_poly_t result, const CanonicalForm &f) |
conversion of a factory univariate polynomial over Z to a fmpz_poly_t | |
CanonicalForm | convertFmpz2CF (const fmpz_t coefficient) |
conversion of a FLINT integer to CanonicalForm | |
CanonicalForm | convertFmpz_poly_t2FacCF (const fmpz_poly_t poly, const Variable &x) |
conversion of a FLINT poly over Z to CanonicalForm | |
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 | |
CanonicalForm | convertnmod_poly_t2FacCF (const nmod_poly_t poly, const Variable &x) |
conversion of a FLINT poly over Z/p to CanonicalForm | |
void | convertCF2Fmpq (fmpq_t result, const CanonicalForm &f) |
conversion of a factory rationals to fmpq_t | |
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 | |
CanonicalForm | convertFmpq_poly_t2FacCF (const fmpq_poly_t p, const Variable &x) |
conversion of a FLINT poly over Q 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 | |
CFFList | convertFLINTfmpz_poly_factor2FacCFFList (const fmpz_poly_factor_t fac, const Variable &x) |
conversion of a FLINT factorization over Z to a CFFList | |
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 | 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 | |
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 | |
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. variable alpha | |
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 poly | |
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 | 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 | |
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 | 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. variable alpha and polynomial variable x | |
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 variable x | |
void | convertFacCFMatrix2Fmpz_mat_t (fmpz_mat_t M, const CFMatrix &m) |
conversion of a factory matrix over Z to a fmpz_mat_t | |
CFMatrix * | convertFmpz_mat_t2FacCFMatrix (const fmpz_mat_t m) |
conversion of a FLINT matrix over Z 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 | |
CFMatrix * | convertNmod_mat_t2FacCFMatrix (const nmod_mat_t m) |
conversion of a FLINT matrix over Z/p to a factory matrix | |
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 | 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 | |
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 | |
Variables | |
EXTERN_VAR flint_rand_t | FLINTrandom |
This file defines functions for conversion to FLINT (www.flintlib.org) and back.
Definition in file FLINTconvert.h.
void convertCF2Fmpq | ( | fmpq_t | result, |
const CanonicalForm & | f ) |
conversion of a factory rationals to fmpq_t
result | [in,out] an fmpq_t | |
[in] | f | a CanonicalForm wrapping a rational |
Definition at line 156 of file FLINTconvert.cc.
void convertCF2Fmpz | ( | fmpz_t | result, |
const CanonicalForm & | f ) |
conversion of a factory integer to fmpz_t
[out] | result | an fmpz_t |
[in] | f | a CanonicalForm wrapping an integer |
Definition at line 120 of file FLINTconvert.cc.
void convertCF2initFmpz | ( | fmpz_t | result, |
const CanonicalForm & | f ) |
conversion of a factory integer to fmpz_t(init.)
result | [in,out] an fmpz_t | |
[in] | f | a CanonicalForm wrapping an integer |
Definition at line 155 of file FLINTconvert.cc.
void convertFacCF2Fmpq_poly_t | ( | fmpq_poly_t | result, |
const CanonicalForm & | f ) |
conversion of a factory univariate polynomials over Q to fmpq_poly_t
result | [in,out] an fmpq_poly_t | |
[in] | f | univariate poly over Q |
Definition at line 320 of file FLINTconvert.cc.
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)
result | [in,out] fmpz_mod_poly_t | |
[in] | f | univariate poly over Z |
[in] | p | some integer p |
Definition at line 397 of file FLINTconvert.cc.
void convertFacCF2Fmpz_poly_t | ( | fmpz_poly_t | result, |
const CanonicalForm & | f ) |
conversion of a factory univariate polynomial over Z to a fmpz_poly_t
result | [in,out] an fmpz_poly_t | |
[in] | f | univariate poly over Z |
Definition at line 146 of file FLINTconvert.cc.
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
result | [in,out] fq_nmod_poly_t | |
[in] | f | univariate poly over Fq |
[in] | ctx | Fq context |
Definition at line 526 of file FLINTconvert.cc.
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 poly
result | [in,out] fq_nmod_t | |
[in] | f | element of Fq |
[in] | ctx | Fq context |
Definition at line 442 of file FLINTconvert.cc.
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
result | [in,out] fq_poly_t | |
[in] | f | univariate poly over Fq |
[in] | ctx | Fq context |
Definition at line 509 of file FLINTconvert.cc.
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
result | [in,out] fq_t | |
[in] | f | element of Fq |
[in] | ctx | Fq context |
Definition at line 485 of file FLINTconvert.cc.
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
result | [in, out] a nmod_poly_t | |
[in] | f | univariate poly over Z/p |
Definition at line 186 of file FLINTconvert.cc.
conversion of a factory matrix over Z to a fmpz_mat_t
M | [in,out] fmpz_mat_t | |
[in] | m | matrix over Z |
Definition at line 585 of file FLINTconvert.cc.
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
M | [in, out] fq_nmod_mat_t | |
[in] | fq_con | Fq context |
[in] | m | matrix over Fq |
Definition at line 646 of file FLINTconvert.cc.
conversion of a factory matrix over Z/p to a nmod_mat_t
M | [in,out] nmod_mat_t | |
[in] | m | matrix over Z/p |
Definition at line 612 of file FLINTconvert.cc.
CFFList convertFLINTfmpz_poly_factor2FacCFFList | ( | const fmpz_poly_factor_t | fac, |
const Variable & | x ) |
conversion of a FLINT factorization over Z to a CFFList
[in] | fac | a fmpz_poly_factor_t |
[in] | x | variable the result should have |
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
[in] | fac | fq_nmod_poly_factor_t |
[in] | x | polynomial variable |
[in] | alpha | algebraic variable |
[in] | fq_con | Fq context |
Definition at line 379 of file FLINTconvert.cc.
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
[in] | fac | a nmod_poly_factor_t |
[in] | leadingCoeff | leading coefficient |
[in] | x | variable the result should have |
Definition at line 337 of file FLINTconvert.cc.
CanonicalForm convertFmpq2CF | ( | const fmpq_t | q | ) |
conversion of a FLINT rational to CanonicalForm
Definition at line 260 of file FLINTconvert.cc.
CanonicalForm convertFmpq_poly_t2FacCF | ( | const fmpq_poly_t | p, |
const Variable & | x ) |
conversion of a FLINT poly over Q to CanonicalForm
[in] | p | an fmpq_poly_t |
[in] | x | variable the result should have |
Definition at line 294 of file FLINTconvert.cc.
CanonicalForm convertFmpz2CF | ( | const fmpz_t | coefficient | ) |
conversion of a FLINT integer to CanonicalForm
[in] | coefficient | a FLINT integer |
Definition at line 154 of file FLINTconvert.cc.
conversion of a FLINT matrix over Z to a factory matrix
[in] | m | fmpz_mat_t |
Definition at line 598 of file FLINTconvert.cc.
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
[in] | poly | fmpz_mod_poly_t |
[in] | x | variable the result should have |
[in] | b | coeff bound to map coeffs in (-p/2,p/2) |
Definition at line 419 of file FLINTconvert.cc.
CanonicalForm convertFmpz_poly_t2FacCF | ( | const fmpz_poly_t | poly, |
const Variable & | x ) |
conversion of a FLINT poly over Z to CanonicalForm
[in] | poly | an fmpz_poly_t |
[in] | x | variable the result should have |
Definition at line 172 of file FLINTconvert.cc.
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
[in] | m | fq_nmod_mat_t |
[in] | fq_con | Fq context |
[in] | alpha | algebraic variable |
Definition at line 661 of file FLINTconvert.cc.
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 variable x
[in] | p | fq_nmod_poly_t |
[in] | x | polynomial var. |
[in] | alpha | algebraic var. |
[in] | ctx | Fq context |
Definition at line 564 of file FLINTconvert.cc.
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
[in] | poly | fq_nmod_t |
[in] | alpha | algebraic variable |
[in] | ctx | context |
Definition at line 479 of file FLINTconvert.cc.
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. variable alpha and polynomial variable x
[in] | p | fq_poly_t |
[in] | x | polynomial variable |
[in] | alpha | algebraic variable |
[in] | ctx | Fq context |
Definition at line 543 of file FLINTconvert.cc.
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. variable alpha
[in] | poly | fq_t |
[in] | alpha | algebraic variable |
Definition at line 503 of file FLINTconvert.cc.
conversion of a FLINT matrix over Z/p to a factory matrix
[in] | m | nmod_mat_t |
Definition at line 630 of file FLINTconvert.cc.
CanonicalForm convertnmod_poly_t2FacCF | ( | const nmod_poly_t | poly, |
const Variable & | x ) |
conversion of a FLINT poly over Z/p to CanonicalForm
[in] | poly | a nmod_poly_t |
[in] | x | variable the result should have |
Definition at line 208 of file FLINTconvert.cc.
EXTERN_VAR flint_rand_t FLINTrandom |
Definition at line 57 of file FLINTconvert.h.