[f0ccd06] | 1 | // emacs edit mode for this file is -*- C++ -*- |
---|
[69806a] | 2 | #ifndef LIBPOLYS_POLYS_FLINTCONV_H |
---|
| 3 | #define LIBPOLYS_POLYS_FLINTCONV_H |
---|
[f0ccd06] | 4 | /**************************************** |
---|
| 5 | * Computer Algebra System SINGULAR * |
---|
| 6 | ****************************************/ |
---|
| 7 | /* |
---|
| 8 | * ABSTRACT: convert data between Singular and Flint |
---|
| 9 | */ |
---|
[69806a] | 10 | /** @file flintconv.h |
---|
| 11 | * |
---|
| 12 | * This file is work in progress and currently not part of the official Singular |
---|
| 13 | * |
---|
[09b001] | 14 | * @note the code is garded by the version test __FLINT_RELEASE >= 20503 (>=2.5.3) |
---|
[69806a] | 15 | * In its current form it will never become an official part. |
---|
| 16 | * (conversion routines may be moved to other files/directories, etc.) |
---|
| 17 | * |
---|
| 18 | * ABSTRACT: Conversion to/from FLINT, and access to some FLINT-routines |
---|
| 19 | * |
---|
| 20 | * REQUIREMENTS: |
---|
| 21 | * - agreement about the interface to LLL |
---|
| 22 | * - FLINT providing LLL |
---|
| 23 | * (none of the above is currently true, but all of them is required) |
---|
| 24 | * |
---|
| 25 | **/ |
---|
| 26 | |
---|
[f0ccd06] | 27 | #ifdef HAVE_FLINT |
---|
[c410e23] | 28 | #include <flint/flint.h> |
---|
[fb24e81] | 29 | |
---|
[aadd638] | 30 | #include "polys/matpol.h" |
---|
| 31 | #include "coeffs/bigintmat.h" |
---|
[c410e23] | 32 | #include <flint/fmpz.h> |
---|
| 33 | #include <flint/fmpq.h> |
---|
[9e2e97] | 34 | #include <flint/fmpq_mat.h> |
---|
[f0ccd06] | 35 | #include <flint/fmpz_poly.h> |
---|
[57bd83] | 36 | #include <flint/fmpq_poly.h> |
---|
[f0ccd06] | 37 | #include <flint/fmpz_poly_mat.h> |
---|
[fb0642] | 38 | #if __FLINT_RELEASE >= 20500 |
---|
[c410e23] | 39 | #include <flint/fmpz_lll.h> |
---|
[273a2f] | 40 | #include <flint/fq.h> |
---|
| 41 | #include <flint/fq_poly.h> |
---|
| 42 | #include <flint/fq_nmod.h> |
---|
| 43 | #include <flint/fq_nmod_poly.h> |
---|
| 44 | #include <flint/fq_nmod_mat.h> |
---|
[fb0642] | 45 | #endif |
---|
[c410e23] | 46 | |
---|
[f0ccd06] | 47 | int convFlintISingI (fmpz_t f); |
---|
| 48 | void convSingIFlintI(fmpz_t f, int p); |
---|
| 49 | void convFlintNSingN (mpz_t z, fmpz_t f); |
---|
| 50 | void convSingNFlintN(fmpz_t f, mpz_t z); |
---|
[837062d] | 51 | void convSingNFlintN(fmpz_t f, number n); |
---|
[d07021] | 52 | void convSingNFlintN_QQ(fmpq_t f, number n); |
---|
[e6ca692] | 53 | void convSingNFlintN(fmpq_t f, number n, const coeffs cf); |
---|
[dc89d7] | 54 | void convSingNFlintNN(fmpq_t re, fmpq_t im, number n, const coeffs cf); |
---|
[837062d] | 55 | number convFlintNSingN (fmpz_t f); |
---|
[e6ca692] | 56 | number convFlintNSingN (fmpq_t f, const coeffs cf); |
---|
[d5f8dba] | 57 | number convFlintNSingN (fmpz_t f, const coeffs cf); |
---|
[d07021] | 58 | number convFlintNSingN_QQ(fmpq_t f, const coeffs cf); |
---|
[57bd83] | 59 | void convSingPFlintP(fmpq_poly_t res, poly p, const ring r); |
---|
[dc89d7] | 60 | void convSingImPFlintP(fmpq_poly_t res, poly p, const ring r); |
---|
[57bd83] | 61 | poly convFlintPSingP(fmpq_poly_t f, const ring r); |
---|
[837062d] | 62 | |
---|
[d6cb88] | 63 | bigintmat* singflint_LLL(bigintmat* A, bigintmat* T); |
---|
| 64 | intvec* singflint_LLL(intvec* A, intvec* T); |
---|
[b88651] | 65 | void convSingMFlintNmod_mat(matrix m, nmod_mat_t M, const ring r); |
---|
| 66 | matrix convFlintNmod_matSingM(nmod_mat_t m, const ring r); |
---|
[273a2f] | 67 | |
---|
[9e2e97] | 68 | matrix singflint_rref(matrix m, const ring R); |
---|
[273a2f] | 69 | #if __FLINT_RELEASE >= 20500 |
---|
| 70 | void convSingPFlintnmod_poly_t(nmod_poly_t result, const poly p, const ring r); |
---|
| 71 | void convSingMFlintFq_nmod_mat(matrix m, fq_nmod_mat_t M, const fq_nmod_ctx_t fq_con, const ring r); |
---|
| 72 | poly convFlintFq_nmodSingP(const fq_nmod_t Fp, const fq_nmod_ctx_t ctx, const ring r); |
---|
| 73 | matrix convFlintFq_nmod_matSingM(fq_nmod_mat_t m, const fq_nmod_ctx_t fq_con, const ring r); |
---|
| 74 | #endif |
---|
[f0ccd06] | 75 | #endif |
---|
[75f460] | 76 | #endif |
---|
[c410e23] | 77 | // LIBPOLYS_POLYS_FLINTCONV_H |
---|