Back to home page

EIC code displayed by LXR

 
 

    


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

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 FMPZ_TYPES_H
0013 #define FMPZ_TYPES_H
0014 
0015 #include "flint.h"
0016 
0017 #ifdef __cplusplus
0018 extern "C" {
0019 #endif
0020 
0021 typedef struct
0022 {
0023     int alloc;
0024     int size;
0025     nn_ptr ptr;
0026 } zz_struct;
0027 
0028 typedef zz_struct * zz_ptr;
0029 typedef const zz_struct * zz_srcptr;
0030 #define FMPZ_TO_ZZ(x) ((zz_ptr) ((ulong) (x) << 2))
0031 
0032 typedef struct
0033 {
0034     int sign;
0035     fmpz * p;
0036     ulong * exp;
0037     slong alloc;
0038     slong num;
0039 }
0040 fmpz_factor_struct;
0041 
0042 typedef fmpz_factor_struct fmpz_factor_t[1];
0043 
0044 typedef struct
0045 {
0046    nn_ptr dinv;
0047    slong n;
0048    flint_bitcnt_t norm;
0049 } fmpz_preinvn_struct;
0050 
0051 typedef fmpz_preinvn_struct fmpz_preinvn_t[1];
0052 
0053 typedef struct
0054 {
0055     fmpz * entries;
0056     slong alloc;
0057     slong length;
0058 }
0059 fmpz_vec_struct;
0060  
0061 typedef fmpz_vec_struct fmpz_vec_t[1];
0062 
0063 typedef struct
0064 {
0065     fmpz * coeffs;
0066     slong alloc;
0067     slong length;
0068 }
0069 fmpz_poly_struct;
0070 
0071 typedef fmpz_poly_struct fmpz_poly_t[1];
0072 
0073 typedef struct
0074 {
0075     fmpz c;
0076     fmpz_poly_struct *p;
0077     slong *exp;
0078     slong num;
0079     slong alloc;
0080 }
0081 fmpz_poly_factor_struct;
0082 
0083 typedef fmpz_poly_factor_struct fmpz_poly_factor_t[1];
0084 
0085 typedef struct
0086 {
0087     fmpz * entries;
0088     slong r;
0089     slong c;
0090     slong stride;
0091 }
0092 fmpz_mat_struct;
0093 
0094 typedef fmpz_mat_struct fmpz_mat_t[1];
0095 
0096 typedef struct
0097 {
0098     fmpz_poly_struct * entries;
0099     slong r;
0100     slong c;
0101     slong stride;
0102 }
0103 fmpz_poly_mat_struct;
0104 
0105 typedef fmpz_poly_mat_struct fmpz_poly_mat_t[1];
0106 
0107 typedef struct
0108 {
0109    fmpz * coeffs; /* alloc fmpzs */
0110    ulong * exps;
0111    slong alloc;
0112    slong length;
0113    flint_bitcnt_t bits;     /* number of bits per exponent */
0114 }
0115 fmpz_mpoly_struct;
0116 
0117 typedef fmpz_mpoly_struct fmpz_mpoly_t[1];
0118 
0119 typedef struct
0120 {
0121     fmpz_t constant;
0122     fmpz_t constant_den;        /* should be one after normal operations */
0123     fmpz_mpoly_struct * poly;
0124     fmpz * exp;
0125     slong num;
0126     slong alloc;
0127 }
0128 fmpz_mpoly_factor_struct;
0129 
0130 typedef fmpz_mpoly_factor_struct fmpz_mpoly_factor_t[1];
0131 
0132 typedef struct
0133 {
0134     fmpz_poly_struct *num;
0135     fmpz_poly_struct *den;
0136 }
0137 fmpz_poly_q_struct;
0138 
0139 typedef fmpz_poly_q_struct fmpz_poly_q_t[1];
0140 
0141 typedef struct
0142 {
0143     fmpz_mpoly_struct num;
0144     fmpz_mpoly_struct den;
0145 }
0146 fmpz_mpoly_q_struct;
0147 
0148 typedef fmpz_mpoly_q_struct fmpz_mpoly_q_t[1];
0149 
0150 typedef struct
0151 {
0152     fmpz a;
0153     fmpz b;
0154 }
0155 fmpzi_struct;
0156 
0157 typedef fmpzi_struct fmpzi_t[1];
0158 
0159 #ifdef __cplusplus
0160 }
0161 #endif
0162 
0163 #endif /* FMPZ_TYPES_H */