Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*
0002     Copyright (C) 2024 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 N_POLY_TYPES_H
0013 #define N_POLY_TYPES_H
0014 
0015 #include "flint.h"
0016 
0017 #ifdef __cplusplus
0018 extern "C" {
0019 #endif
0020 
0021 /* arrays of ulong */
0022 typedef struct
0023 {
0024     ulong * coeffs;
0025     slong alloc;
0026     slong length;
0027 } n_poly_struct;
0028 
0029 typedef n_poly_struct n_poly_t[1];
0030 typedef n_poly_struct n_fq_poly_struct;
0031 typedef n_poly_t n_fq_poly_t;
0032 
0033 /* arrays of arrays of ulong */
0034 typedef struct
0035 {
0036     n_poly_struct * coeffs;
0037     slong alloc;
0038     slong length;
0039 } n_bpoly_struct;
0040 
0041 typedef n_bpoly_struct n_bpoly_t[1];
0042 typedef n_bpoly_struct n_fq_bpoly_struct;
0043 typedef n_bpoly_t n_fq_bpoly_t;
0044 
0045 /* arrays of arrays of arrays of ulong */
0046 typedef struct
0047 {
0048     n_bpoly_struct * coeffs;
0049     slong alloc;
0050     slong length;
0051 } n_tpoly_struct;
0052 
0053 typedef n_tpoly_struct n_tpoly_t[1];
0054 typedef n_tpoly_struct n_fq_tpoly_struct;
0055 typedef n_tpoly_t n_fq_tpoly_t;
0056 
0057 /* sparse arrays of ulong */
0058 typedef struct
0059 {
0060     ulong * exps;
0061     ulong * coeffs;
0062     slong length;
0063     slong alloc;
0064 } n_polyu_struct;
0065 
0066 typedef n_polyu_struct n_polyu_t[1];
0067 typedef n_polyu_struct n_fq_polyu_struct;
0068 typedef n_polyu_t n_fq_polyu_t;
0069 
0070 /*
0071     sparse arrays of arrays of ulong
0072     n_polyu1n => one exponent is in the exps[i]
0073     n_polyu2n => two exponents are packed into the exps[i]
0074     ...
0075 */
0076 typedef struct
0077 {
0078     n_poly_struct * coeffs;
0079     ulong * exps;
0080     slong length;
0081     slong alloc;
0082 } n_polyun_struct;
0083 
0084 typedef n_polyun_struct n_polyun_t[1];
0085 typedef n_polyun_struct n_fq_polyun_struct;
0086 typedef n_polyun_t n_fq_polyun_t;
0087 
0088 /* n_poly stack */
0089 typedef struct
0090 {
0091     n_poly_struct ** array;
0092     slong alloc;
0093     slong top;
0094 } n_poly_stack_struct;
0095 
0096 typedef n_poly_stack_struct n_poly_stack_t[1];
0097 
0098 /* n_bpoly stack */
0099 typedef struct
0100 {
0101     n_bpoly_struct ** array;
0102     slong alloc;
0103     slong top;
0104 } n_bpoly_stack_struct;
0105 
0106 typedef n_bpoly_stack_struct n_bpoly_stack_t[1];
0107 
0108 typedef struct {
0109     n_poly_stack_t poly_stack;
0110     n_bpoly_stack_t bpoly_stack;
0111 } n_poly_bpoly_stack_struct;
0112 
0113 typedef n_poly_bpoly_stack_struct n_poly_bpoly_stack_t[1];
0114 
0115 typedef struct {
0116     ulong * M;
0117     ulong * T;
0118     ulong * Q;
0119     ulong * array;
0120     slong alloc;
0121     slong d;
0122     slong radix;
0123     ulong w;
0124 } nmod_eval_interp_struct;
0125 
0126 typedef nmod_eval_interp_struct nmod_eval_interp_t[1];
0127 
0128 #ifdef __cplusplus
0129 }
0130 #endif
0131 
0132 #endif /* N_POLY_TYPES_H */