1- from flint.flintlib.types.flint cimport flint_bitcnt_t, fmpz_struct, slong, flint_rand_t, ulong
2- from flint.flintlib.types.fmpz cimport (
3- fmpz_t,
4- fmpz_struct,
5- fmpz_poly_t,
6- fmpz_poly_struct,
7- )
8- from flint.flintlib.functions.fmpz_mod cimport fmpz_mod_ctx_t
9- from flint.flintlib.functions.fmpz_mod_mat cimport fmpz_mod_mat_t
10- from flint.flintlib.functions.fmpz_mod_poly cimport fmpz_mod_poly_t, fmpz_mod_poly_struct
1+ from flint.flintlib.types.flint cimport flint_bitcnt_t, flint_rand_t, fmpz_struct, fmpz_t, slong, ulong
2+ from flint.flintlib.types.fmpz cimport fmpz_poly_t
3+ from flint.flintlib.types.fmpz_mod cimport fmpz_mod_ctx_t, fmpz_mod_mat_t, fmpz_mod_poly_t
4+ from flint.flintlib.types.fq cimport fq_ctx_t, fq_t
115
12- cdef extern from " flint/fq.h" :
13- # Type definitions **********************************************/
14- ctypedef fmpz_poly_t fq_t
15- ctypedef fmpz_poly_struct fq_struct
16-
17- ctypedef struct fq_ctx_struct:
18- fmpz_mod_ctx_t ctxp
19-
20- int sparse_modulus
21- int is_conway # whether field was initialized with the Flint Conway tables (assures primitivity)
22-
23- fmpz_struct * a
24- slong * j
25- slong len
6+ # unknown type
7+ # unknown type FILE
268
27- fmpz_mod_poly_t modulus
28- fmpz_mod_poly_t inv
299
30- char * var
31- ctypedef fq_ctx_struct fq_ctx_t[1 ]
32-
33- ctypedef struct fq_poly_struct:
34- fq_struct * coeffs
35- slong alloc
36- slong length
37- ctypedef fq_poly_struct fq_poly_t[1 ]
38-
39- ctypedef struct fq_mat_struct:
40- fq_struct * entries
41- slong r
42- slong s
43- fq_struct ** rows
44- ctypedef fq_mat_struct fq_mat_t[1 ]
45-
46- # Parsed from here **********************************************/
47- void fq_ctx_init(fq_ctx_t ctx, const fmpz_t p, slong d, const char * var)
48- int _fq_ctx_init_conway(fq_ctx_t ctx, const fmpz_t p, slong d, const char * var)
49- void fq_ctx_init_conway(fq_ctx_t ctx, const fmpz_t p, slong d, const char * var)
50- void fq_ctx_init_modulus(fq_ctx_t ctx, const fmpz_mod_poly_t modulus, const fmpz_mod_ctx_t ctxp, const char * var)
10+ cdef extern from " flint/fq.h" :
11+ void fq_ctx_init(fq_ctx_t ctx, const fmpz_t p, slong d, const char * var)
12+ int _fq_ctx_init_conway(fq_ctx_t ctx, const fmpz_t p, slong d, const char * var)
13+ void fq_ctx_init_conway(fq_ctx_t ctx, const fmpz_t p, slong d, const char * var)
14+ void fq_ctx_init_modulus(fq_ctx_t ctx, const fmpz_mod_poly_t modulus, const fmpz_mod_ctx_t ctxp, const char * var)
15+ void fq_ctx_init_randtest(fq_ctx_t ctx, flint_rand_t state, int type )
16+ void fq_ctx_init_randtest_reducible(fq_ctx_t ctx, flint_rand_t state, int type )
5117 void fq_ctx_clear(fq_ctx_t ctx)
52- const fmpz_mod_poly_struct* fq_ctx_modulus(const fq_ctx_t ctx)
53- long fq_ctx_degree(const fq_ctx_t ctx)
54- fmpz_struct * fq_ctx_prime(const fq_ctx_t ctx)
18+ # const fmpz_mod_poly_struct* fq_ctx_modulus(const fq_ctx_t ctx)
19+ slong fq_ctx_degree(const fq_ctx_t ctx)
20+ const fmpz_struct * fq_ctx_prime(const fq_ctx_t ctx)
5521 void fq_ctx_order(fmpz_t f, const fq_ctx_t ctx)
5622 # int fq_ctx_fprint(FILE * file, const fq_ctx_t ctx)
5723 void fq_ctx_print(const fq_ctx_t ctx)
58- void fq_ctx_randtest(fq_ctx_t ctx)
59- void fq_ctx_randtest_reducible(fq_ctx_t ctx)
6024 void fq_init(fq_t rop, const fq_ctx_t ctx)
6125 void fq_init2(fq_t rop, const fq_ctx_t ctx)
6226 void fq_clear(fq_t rop, const fq_ctx_t ctx)
63- void _fq_sparse_reduce(fmpz_struct * R, slong lenR, const fq_ctx_t ctx)
64- void _fq_dense_reduce(fmpz_struct * R, slong lenR, const fq_ctx_t ctx)
65- void _fq_reduce(fmpz_struct * r, slong lenR, const fq_ctx_t ctx)
27+ void _fq_sparse_reduce(fmpz_struct * R, slong lenR, const fq_ctx_t ctx)
28+ void _fq_dense_reduce(fmpz_struct * R, slong lenR, const fq_ctx_t ctx)
29+ void _fq_reduce(fmpz_struct * r, slong lenR, const fq_ctx_t ctx)
6630 void fq_reduce(fq_t rop, const fq_ctx_t ctx)
6731 void fq_add(fq_t rop, const fq_t op1, const fq_t op2, const fq_ctx_t ctx)
6832 void fq_sub(fq_t rop, const fq_t op1, const fq_t op2, const fq_ctx_t ctx)
@@ -74,18 +38,18 @@ cdef extern from "flint/fq.h":
7438 void fq_mul_ui(fq_t rop, const fq_t op, ulong x, const fq_ctx_t ctx)
7539 void fq_sqr(fq_t rop, const fq_t op, const fq_ctx_t ctx)
7640 void fq_div(fq_t rop, const fq_t op1, const fq_t op2, const fq_ctx_t ctx)
77- void _fq_inv(fmpz_struct * rop, const fmpz_struct * op, slong len , const fq_ctx_t ctx)
41+ void _fq_inv(fmpz_struct * rop, const fmpz_struct * op, slong len , const fq_ctx_t ctx)
7842 void fq_inv(fq_t rop, const fq_t op, const fq_ctx_t ctx)
7943 void fq_gcdinv(fq_t f, fq_t inv, const fq_t op, const fq_ctx_t ctx)
80- void _fq_pow(fmpz_struct * rop, const fmpz_struct * op, slong len , const fmpz_t e, const fq_ctx_t ctx)
44+ void _fq_pow(fmpz_struct * rop, const fmpz_struct * op, slong len , const fmpz_t e, const fq_ctx_t ctx)
8145 void fq_pow(fq_t rop, const fq_t op, const fmpz_t e, const fq_ctx_t ctx)
8246 void fq_pow_ui(fq_t rop, const fq_t op, const ulong e, const fq_ctx_t ctx)
8347 int fq_sqrt(fq_t rop, const fq_t op1, const fq_ctx_t ctx)
8448 void fq_pth_root(fq_t rop, const fq_t op1, const fq_ctx_t ctx)
8549 int fq_is_square(const fq_t op, const fq_ctx_t ctx)
86- # int fq_fprint_pretty(FILE *file, const fq_t op, const fq_ctx_t ctx)
50+ # int fq_fprint_pretty(FILE * file, const fq_t op, const fq_ctx_t ctx)
8751 int fq_print_pretty(const fq_t op, const fq_ctx_t ctx)
88- # void fq_fprint(FILE * file, const fq_t op, const fq_ctx_t ctx)
52+ # int fq_fprint(FILE * file, const fq_t op, const fq_ctx_t ctx)
8953 void fq_print(const fq_t op, const fq_ctx_t ctx)
9054 char * fq_get_str(const fq_t op, const fq_ctx_t ctx)
9155 char * fq_get_str_pretty(const fq_t op, const fq_ctx_t ctx)
@@ -114,13 +78,13 @@ cdef extern from "flint/fq.h":
11478 int fq_equal(const fq_t op1, const fq_t op2, const fq_ctx_t ctx)
11579 int fq_is_invertible(const fq_t op, const fq_ctx_t ctx)
11680 int fq_is_invertible_f(fq_t f, const fq_t op, const fq_ctx_t ctx)
117- void _fq_trace(fmpz_t rop, const fmpz_struct * op, slong len , const fq_ctx_t ctx)
81+ void _fq_trace(fmpz_t rop, const fmpz_struct * op, slong len , const fq_ctx_t ctx)
11882 void fq_trace(fmpz_t rop, const fq_t op, const fq_ctx_t ctx)
119- void _fq_norm(fmpz_t rop, const fmpz_struct * op, slong len , const fq_ctx_t ctx)
83+ void _fq_norm(fmpz_t rop, const fmpz_struct * op, slong len , const fq_ctx_t ctx)
12084 void fq_norm(fmpz_t rop, const fq_t op, const fq_ctx_t ctx)
121- void _fq_frobenius(fmpz_struct * rop, const fmpz_struct * op, slong len , slong e, const fq_ctx_t ctx)
85+ void _fq_frobenius(fmpz_struct * rop, const fmpz_struct * op, slong len , slong e, const fq_ctx_t ctx)
12286 void fq_frobenius(fq_t rop, const fq_t op, slong e, const fq_ctx_t ctx)
123- int fq_multiplicative_order(fmpz_t ord , const fq_t op, const fq_ctx_t ctx)
87+ int fq_multiplicative_order(fmpz_struct * ord , const fq_t op, const fq_ctx_t ctx)
12488 int fq_is_primitive(const fq_t op, const fq_ctx_t ctx)
12589 void fq_bit_pack(fmpz_t f, const fq_t op, flint_bitcnt_t bit_size, const fq_ctx_t ctx)
12690 void fq_bit_unpack(fq_t rop, const fmpz_t f, flint_bitcnt_t bit_size, const fq_ctx_t ctx)
0 commit comments