Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:15:12

0001 /*
0002     Copyright (C) 2023 Albin Ahlbäck
0003 
0004     This file is part of FLINT.
0005 
0006     FLINT is free software: you can redistribute it and/or modify it under
0007     the terms of the GNU Lesser General Public License (LGPL) as published
0008     by the Free Software Foundation; either version 3 of the License, or
0009     (at your option) any later version.  See <https://www.gnu.org/licenses/>.
0010 */
0011 
0012 #ifndef FMPQ_TYPES_H
0013 #define FMPQ_TYPES_H
0014 
0015 #include "fmpz_types.h"
0016 
0017 #ifdef __cplusplus
0018 extern "C" {
0019 #endif
0020 
0021 typedef struct
0022 {
0023     fmpq * entries;
0024     slong r;
0025     slong c;
0026     slong stride;
0027 }
0028 fmpq_mat_struct;
0029 
0030 typedef fmpq_mat_struct fmpq_mat_t[1];
0031 
0032 typedef struct
0033 {
0034     fmpz * coeffs;
0035     slong alloc;
0036     slong length;
0037     fmpz_t den;
0038 }
0039 fmpq_poly_struct;
0040 
0041 typedef fmpq_poly_struct fmpq_poly_t[1];
0042 
0043 /*
0044     A polynomial f is represented as
0045         content * zpoly,
0046     where zpoly should have positive leading coefficient and trivial content.
0047     If f is zero, then the representation should have
0048         content = 0 and zpoly = 0
0049 */
0050 
0051 typedef struct
0052 {                       /* non zero case:                   |  zero case: */
0053     fmpq_t content;     /* positive or negative content     |  zero       */
0054     fmpz_mpoly_t zpoly; /* contentless poly, lc is positive |  zero       */
0055 }
0056 fmpq_mpoly_struct;
0057 
0058 typedef fmpq_mpoly_struct fmpq_mpoly_t[1];
0059 
0060 typedef struct
0061 {
0062     fmpq_t constant;
0063     fmpq_mpoly_struct * poly;
0064     fmpz * exp;
0065     slong num;
0066     slong alloc;
0067 }
0068 fmpq_mpoly_factor_struct;
0069 
0070 typedef fmpq_mpoly_factor_struct fmpq_mpoly_factor_t[1];
0071 
0072 #ifdef __cplusplus
0073 }
0074 #endif
0075 
0076 #endif /* FMPQ_TYPES_H */