Skip to main content

flint_sys/
bool_mat.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3use libc::*;
4use crate::deps::*;
5use crate::flint::*;
6use crate::fmpz_types::*;
7
8
9#[repr(C)]
10pub struct bool_mat_struct {
11    pub entries: *mut libc::c_int,
12    pub r: slong,
13    pub c: slong,
14    pub rows: *mut *mut libc::c_int,
15}
16#[allow(clippy::unnecessary_operation, clippy::identity_op)]
17const _: () = {
18    ["Size of bool_mat_struct"][::std::mem::size_of::<bool_mat_struct>() - 32usize];
19    ["Alignment of bool_mat_struct"][::std::mem::align_of::<bool_mat_struct>() - 8usize];
20    ["Offset of field: bool_mat_struct::entries"]
21        [::std::mem::offset_of!(bool_mat_struct, entries) - 0usize];
22    ["Offset of field: bool_mat_struct::r"][::std::mem::offset_of!(bool_mat_struct, r) - 8usize];
23    ["Offset of field: bool_mat_struct::c"][::std::mem::offset_of!(bool_mat_struct, c) - 16usize];
24    ["Offset of field: bool_mat_struct::rows"]
25        [::std::mem::offset_of!(bool_mat_struct, rows) - 24usize];
26};
27impl Default for bool_mat_struct {
28    fn default() -> Self {
29        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
30        unsafe {
31            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
32            s.assume_init()
33        }
34    }
35}
36pub type bool_mat_t = [bool_mat_struct; 1usize];
37extern "C" {
38    #[link_name = "bool_mat_get_entry__extern"]
39    pub fn bool_mat_get_entry(mat: *const bool_mat_struct, i: slong, j: slong) -> libc::c_int;
40    #[link_name = "bool_mat_set_entry__extern"]
41    pub fn bool_mat_set_entry(mat: *mut bool_mat_struct, i: slong, j: slong, value: libc::c_int);
42    pub fn bool_mat_init(mat: *mut bool_mat_struct, r: slong, c: slong);
43    pub fn bool_mat_clear(mat: *mut bool_mat_struct);
44    #[link_name = "bool_mat_swap__extern"]
45    pub fn bool_mat_swap(mat1: *mut bool_mat_struct, mat2: *mut bool_mat_struct);
46    pub fn bool_mat_set(dest: *mut bool_mat_struct, src: *const bool_mat_struct);
47    pub fn bool_mat_randtest(mat: *mut bool_mat_struct, state: *mut flint_rand_struct);
48    pub fn bool_mat_randtest_diagonal(mat: *mut bool_mat_struct, state: *mut flint_rand_struct);
49    pub fn bool_mat_randtest_nilpotent(mat: *mut bool_mat_struct, state: *mut flint_rand_struct);
50    pub fn bool_mat_fprint(file: *mut FILE, mat: *const bool_mat_struct);
51    pub fn bool_mat_print(mat: *const bool_mat_struct);
52    pub fn bool_mat_equal(
53        mat1: *const bool_mat_struct,
54        mat2: *const bool_mat_struct,
55    ) -> libc::c_int;
56    pub fn bool_mat_any(mat: *const bool_mat_struct) -> libc::c_int;
57    pub fn bool_mat_all(mat: *const bool_mat_struct) -> libc::c_int;
58    pub fn bool_mat_is_diagonal(mat: *const bool_mat_struct) -> libc::c_int;
59    pub fn bool_mat_is_lower_triangular(mat: *const bool_mat_struct) -> libc::c_int;
60    pub fn bool_mat_is_transitive(mat: *const bool_mat_struct) -> libc::c_int;
61    pub fn bool_mat_is_nilpotent(mat: *const bool_mat_struct) -> libc::c_int;
62    #[link_name = "bool_mat_is_empty__extern"]
63    pub fn bool_mat_is_empty(mat: *const bool_mat_struct) -> libc::c_int;
64    #[link_name = "bool_mat_is_square__extern"]
65    pub fn bool_mat_is_square(mat: *const bool_mat_struct) -> libc::c_int;
66    pub fn bool_mat_zero(mat: *mut bool_mat_struct);
67    pub fn bool_mat_one(mat: *mut bool_mat_struct);
68    pub fn bool_mat_directed_path(mat: *mut bool_mat_struct);
69    pub fn bool_mat_directed_cycle(mat: *mut bool_mat_struct);
70    pub fn bool_mat_transpose(mat1: *mut bool_mat_struct, mat2: *const bool_mat_struct);
71    pub fn bool_mat_complement(mat1: *mut bool_mat_struct, mat2: *const bool_mat_struct);
72    pub fn bool_mat_add(
73        res: *mut bool_mat_struct,
74        mat1: *const bool_mat_struct,
75        mat2: *const bool_mat_struct,
76    );
77    pub fn bool_mat_mul(
78        res: *mut bool_mat_struct,
79        mat1: *const bool_mat_struct,
80        mat2: *const bool_mat_struct,
81    );
82    pub fn bool_mat_mul_entrywise(
83        res: *mut bool_mat_struct,
84        mat1: *const bool_mat_struct,
85        mat2: *const bool_mat_struct,
86    );
87    pub fn bool_mat_pow_ui(B: *mut bool_mat_struct, A: *const bool_mat_struct, exp: ulong);
88    #[link_name = "bool_mat_sqr__extern"]
89    pub fn bool_mat_sqr(B: *mut bool_mat_struct, A: *const bool_mat_struct);
90    pub fn bool_mat_trace(mat: *const bool_mat_struct) -> libc::c_int;
91    pub fn bool_mat_nilpotency_degree(mat: *const bool_mat_struct) -> slong;
92    pub fn bool_mat_transitive_closure(dest: *mut bool_mat_struct, src: *const bool_mat_struct);
93    pub fn bool_mat_get_strongly_connected_components(
94        partition: *mut slong,
95        A: *const bool_mat_struct,
96    ) -> slong;
97    pub fn bool_mat_all_pairs_longest_walk(
98        B: *mut fmpz_mat_struct,
99        A: *const bool_mat_struct,
100    ) -> slong;
101}