antic_sys/
nf.rs

1use derivative::Derivative;
2
3use flint_sys::deps::*;
4use flint_sys::flint::*;
5use flint_sys::fmpq_poly::{fmpq_poly_powers_precomp_t, fmpq_poly_struct, fmpq_poly_t};
6use flint_sys::fmpz::fmpz_preinvn_t;
7use flint_sys::fmpz_poly::fmpz_poly_powers_precomp_t;
8
9use libc::c_long;
10
11extern "C" {
12    pub fn antic_test_multiplier() -> c_long;
13}
14#[repr(C)]
15#[derive(Copy, Clone, Derivative)]
16#[derivative(Debug)]
17pub struct nf_struct {
18    pub pol: fmpq_poly_t,
19    #[derivative(Debug="ignore")]
20    pub pinv: nf_struct__bindgen_ty_1,
21    #[derivative(Debug="ignore")]
22    pub powers: nf_struct__bindgen_ty_2,
23    pub traces: fmpq_poly_t,
24    pub flag: mp_limb_t,
25}
26
27#[repr(C)]
28#[derive(Copy, Clone)]
29pub union nf_struct__bindgen_ty_1 {
30    pub qq: fmpz_preinvn_t,
31}
32
33#[repr(C)]
34#[derive(Copy, Clone)]
35pub union nf_struct__bindgen_ty_2 {
36    pub qq: fmpq_poly_powers_precomp_t,
37    pub zz: fmpz_poly_powers_precomp_t,
38}
39
40pub type nf_t = [nf_struct; 1usize];
41
42extern "C" {
43    pub fn nf_init(nf: *mut nf_struct, pol: *const fmpq_poly_struct);
44}
45extern "C" {
46    pub fn nf_init_randtest(
47        nf: *mut nf_struct,
48        state: *const flint_rand_s,
49        len: mp_limb_signed_t,
50        bits_in: mp_bitcnt_t,
51    );
52}
53extern "C" {
54    pub fn nf_clear(nf: *mut nf_struct);
55}
56extern "C" {
57    pub fn nf_print(nf: *const nf_struct);
58}