m4ri_sys/
mzp.rs

1/// Corresponds to the mzp.h file.
2///
3/// Some functions are missing
4use libc;
5
6use crate::misc::Rci;
7use crate::mzd::Mzd;
8
9#[repr(C)]
10pub struct Mzp {
11    private: [u8; 0],
12}
13
14extern "C" {
15    /// Construct an identity permutation
16    ///
17    /// length: the length of the permutation
18    pub fn mzp_init(length: Rci) -> *mut Mzp;
19
20    /// Free an Mzp
21    pub fn mzp_free(p: *mut Mzp);
22
23    /// Create a window into the permutation
24    ///
25    /// Use mzp_free_window to free the window
26    pub fn mzp_init_window(p: *mut Mzp, begin: Rci, end: Rci);
27
28    /// Free a permutation window created with Mzp_init_window
29    pub fn Mzp_free_window(condemned: *mut Mzp);
30
31    /// Copy permutation Q to P
32    /// Target may be null
33    pub fn mzp_copy(p: *mut Mzp, q: *const Mzp) -> *mut Mzp;
34
35    /// Set the permutation to the identity permutation
36    pub fn mzp_set_ui(p: *mut Mzp, value: libc::c_uint);
37
38    /// Apply the permutation P to A from the left
39    pub fn mzd_apply_p_left(a: *mut Mzd, p: *const Mzp);
40
41    /// Apply the permutation P to A from the left, but transpose P
42    pub fn mzd_apply_p_left_trans(a: *mut Mzd, p: *const Mzp);
43
44    /// Apply the permutation P to A from the right
45    pub fn mzd_apply_p_right(a: *mut Mzd, p: *const Mzp);
46
47    /// Apply the permutation P to A from the right, but transpose P
48    pub fn mzd_apply_p_right_trans(a: *mut Mzd, p: *const Mzp);
49
50    /// Print the mzp
51    pub fn mzp_print(p: *const Mzp);
52
53// FIXME add missing components
54}