flint-sys 0.9.0

Bindings to the FLINT C library
Documentation
/* automatically generated by rust-bindgen 0.70.1 */

use libc::*;
use crate::deps::*;
use crate::flint::*;
use crate::fmpz_types::*;


#[repr(C)]
pub struct bool_mat_struct {
    pub entries: *mut libc::c_int,
    pub r: slong,
    pub c: slong,
    pub rows: *mut *mut libc::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of bool_mat_struct"][::std::mem::size_of::<bool_mat_struct>() - 32usize];
    ["Alignment of bool_mat_struct"][::std::mem::align_of::<bool_mat_struct>() - 8usize];
    ["Offset of field: bool_mat_struct::entries"]
        [::std::mem::offset_of!(bool_mat_struct, entries) - 0usize];
    ["Offset of field: bool_mat_struct::r"][::std::mem::offset_of!(bool_mat_struct, r) - 8usize];
    ["Offset of field: bool_mat_struct::c"][::std::mem::offset_of!(bool_mat_struct, c) - 16usize];
    ["Offset of field: bool_mat_struct::rows"]
        [::std::mem::offset_of!(bool_mat_struct, rows) - 24usize];
};
impl Default for bool_mat_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type bool_mat_t = [bool_mat_struct; 1usize];
extern "C" {
    #[link_name = "bool_mat_get_entry__extern"]
    pub fn bool_mat_get_entry(mat: *const bool_mat_struct, i: slong, j: slong) -> libc::c_int;
    #[link_name = "bool_mat_set_entry__extern"]
    pub fn bool_mat_set_entry(mat: *mut bool_mat_struct, i: slong, j: slong, value: libc::c_int);
    pub fn bool_mat_init(mat: *mut bool_mat_struct, r: slong, c: slong);
    pub fn bool_mat_clear(mat: *mut bool_mat_struct);
    #[link_name = "bool_mat_swap__extern"]
    pub fn bool_mat_swap(mat1: *mut bool_mat_struct, mat2: *mut bool_mat_struct);
    pub fn bool_mat_set(dest: *mut bool_mat_struct, src: *const bool_mat_struct);
    pub fn bool_mat_randtest(mat: *mut bool_mat_struct, state: *mut flint_rand_struct);
    pub fn bool_mat_randtest_diagonal(mat: *mut bool_mat_struct, state: *mut flint_rand_struct);
    pub fn bool_mat_randtest_nilpotent(mat: *mut bool_mat_struct, state: *mut flint_rand_struct);
    pub fn bool_mat_fprint(file: *mut FILE, mat: *const bool_mat_struct);
    pub fn bool_mat_print(mat: *const bool_mat_struct);
    pub fn bool_mat_equal(
        mat1: *const bool_mat_struct,
        mat2: *const bool_mat_struct,
    ) -> libc::c_int;
    pub fn bool_mat_any(mat: *const bool_mat_struct) -> libc::c_int;
    pub fn bool_mat_all(mat: *const bool_mat_struct) -> libc::c_int;
    pub fn bool_mat_is_diagonal(mat: *const bool_mat_struct) -> libc::c_int;
    pub fn bool_mat_is_lower_triangular(mat: *const bool_mat_struct) -> libc::c_int;
    pub fn bool_mat_is_transitive(mat: *const bool_mat_struct) -> libc::c_int;
    pub fn bool_mat_is_nilpotent(mat: *const bool_mat_struct) -> libc::c_int;
    #[link_name = "bool_mat_is_empty__extern"]
    pub fn bool_mat_is_empty(mat: *const bool_mat_struct) -> libc::c_int;
    #[link_name = "bool_mat_is_square__extern"]
    pub fn bool_mat_is_square(mat: *const bool_mat_struct) -> libc::c_int;
    pub fn bool_mat_zero(mat: *mut bool_mat_struct);
    pub fn bool_mat_one(mat: *mut bool_mat_struct);
    pub fn bool_mat_directed_path(mat: *mut bool_mat_struct);
    pub fn bool_mat_directed_cycle(mat: *mut bool_mat_struct);
    pub fn bool_mat_transpose(mat1: *mut bool_mat_struct, mat2: *const bool_mat_struct);
    pub fn bool_mat_complement(mat1: *mut bool_mat_struct, mat2: *const bool_mat_struct);
    pub fn bool_mat_add(
        res: *mut bool_mat_struct,
        mat1: *const bool_mat_struct,
        mat2: *const bool_mat_struct,
    );
    pub fn bool_mat_mul(
        res: *mut bool_mat_struct,
        mat1: *const bool_mat_struct,
        mat2: *const bool_mat_struct,
    );
    pub fn bool_mat_mul_entrywise(
        res: *mut bool_mat_struct,
        mat1: *const bool_mat_struct,
        mat2: *const bool_mat_struct,
    );
    pub fn bool_mat_pow_ui(B: *mut bool_mat_struct, A: *const bool_mat_struct, exp: ulong);
    #[link_name = "bool_mat_sqr__extern"]
    pub fn bool_mat_sqr(B: *mut bool_mat_struct, A: *const bool_mat_struct);
    pub fn bool_mat_trace(mat: *const bool_mat_struct) -> libc::c_int;
    pub fn bool_mat_nilpotency_degree(mat: *const bool_mat_struct) -> slong;
    pub fn bool_mat_transitive_closure(dest: *mut bool_mat_struct, src: *const bool_mat_struct);
    pub fn bool_mat_get_strongly_connected_components(
        partition: *mut slong,
        A: *const bool_mat_struct,
    ) -> slong;
    pub fn bool_mat_all_pairs_longest_walk(
        B: *mut fmpz_mat_struct,
        A: *const bool_mat_struct,
    ) -> slong;
}