use crate::deps::*;
use crate::ca_types::*;
use crate::fexpr::*;
use crate::flint::*;
use crate::fmpq_types::*;
use crate::fmpz_types::*;
use crate::gr_types::*;
extern "C" {
#[link_name = "ca_mat_entry_ptr__extern"]
pub fn ca_mat_entry_ptr(mat: *mut ca_mat_struct, i: slong, j: slong) -> ca_ptr;
pub fn ca_mat_init(mat: *mut ca_mat_struct, r: slong, c: slong, ctx: *mut ca_ctx_struct);
pub fn ca_mat_clear(mat: *mut ca_mat_struct, ctx: *mut ca_ctx_struct);
#[link_name = "ca_mat_swap__extern"]
pub fn ca_mat_swap(mat1: *mut ca_mat_struct, mat2: *mut ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_window_init(
window: *mut ca_mat_struct,
mat: *const ca_mat_struct,
r1: slong,
c1: slong,
r2: slong,
c2: slong,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_window_clear__extern"]
pub fn ca_mat_window_clear(UNUSED_window: *mut ca_mat_struct, UNUSED_ctx: *mut ca_ctx_struct);
#[link_name = "ca_mat_is_empty__extern"]
pub fn ca_mat_is_empty(mat: *const ca_mat_struct) -> libc::c_int;
#[link_name = "ca_mat_is_square__extern"]
pub fn ca_mat_is_square(mat: *const ca_mat_struct) -> libc::c_int;
pub fn ca_mat_set(dest: *mut ca_mat_struct, src: *const ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_set_fmpz_mat(
dest: *mut ca_mat_struct,
src: *const fmpz_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_set_fmpq_mat(
dest: *mut ca_mat_struct,
src: *const fmpq_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_set_ca(y: *mut ca_mat_struct, x: *const ca_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_get_fexpr(
res: *mut fexpr_struct,
A: *const ca_mat_struct,
flags: ulong,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_transfer(
res: *mut ca_mat_struct,
res_ctx: *mut ca_ctx_struct,
src: *const ca_mat_struct,
src_ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_randtest(
mat: *mut ca_mat_struct,
state: *mut flint_rand_struct,
len: slong,
bits: slong,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_randtest_rational(
mat: *mut ca_mat_struct,
state: *mut flint_rand_struct,
bits: slong,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_randops(
mat: *mut ca_mat_struct,
state: *mut flint_rand_struct,
count: slong,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_print(mat: *const ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_printn(mat: *const ca_mat_struct, digits: slong, ctx: *mut ca_ctx_struct);
pub fn ca_mat_zero(mat: *mut ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_one(mat: *mut ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_ones(mat: *mut ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_pascal(mat: *mut ca_mat_struct, triangular: libc::c_int, ctx: *mut ca_ctx_struct);
pub fn ca_mat_stirling(mat: *mut ca_mat_struct, kind: libc::c_int, ctx: *mut ca_ctx_struct);
pub fn ca_mat_hilbert(mat: *mut ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_dft(res: *mut ca_mat_struct, type_: libc::c_int, ctx: *mut ca_ctx_struct);
pub fn ca_mat_check_equal(
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_check_is_zero(A: *const ca_mat_struct, ctx: *mut ca_ctx_struct) -> truth_t;
pub fn ca_mat_check_is_one(A: *const ca_mat_struct, ctx: *mut ca_ctx_struct) -> truth_t;
pub fn ca_mat_transpose(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_conj(B: *mut ca_mat_struct, A: *const ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_conj_transpose(
mat1: *mut ca_mat_struct,
mat2: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_add_ca(
y: *mut ca_mat_struct,
a: *const ca_mat_struct,
x: *const ca_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_sub_ca(
y: *mut ca_mat_struct,
a: *const ca_mat_struct,
x: *const ca_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_addmul_ca(
y: *mut ca_mat_struct,
a: *const ca_mat_struct,
x: *const ca_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_submul_ca(
y: *mut ca_mat_struct,
a: *const ca_mat_struct,
x: *const ca_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_neg(dest: *mut ca_mat_struct, src: *const ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_add(
res: *mut ca_mat_struct,
mat1: *const ca_mat_struct,
mat2: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_sub(
res: *mut ca_mat_struct,
mat1: *const ca_mat_struct,
mat2: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_mul(
C: *mut ca_mat_struct,
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_mul_classical(
C: *mut ca_mat_struct,
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_mul_same_nf(
C: *mut ca_mat_struct,
A: *const ca_mat_struct,
B: *const ca_mat_struct,
K: *mut ca_field_struct,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_mul_si__extern"]
pub fn ca_mat_mul_si(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
c: slong,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_mul_fmpz__extern"]
pub fn ca_mat_mul_fmpz(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
c: *const fmpz,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_mul_fmpq__extern"]
pub fn ca_mat_mul_fmpq(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
c: *const fmpq,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_mul_ca__extern"]
pub fn ca_mat_mul_ca(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
c: *const ca_struct,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_div_si__extern"]
pub fn ca_mat_div_si(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
c: slong,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_div_fmpz__extern"]
pub fn ca_mat_div_fmpz(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
c: *const fmpz,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_div_fmpq__extern"]
pub fn ca_mat_div_fmpq(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
c: *const fmpq,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_div_ca__extern"]
pub fn ca_mat_div_ca(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
c: *const ca_struct,
ctx: *mut ca_ctx_struct,
);
#[link_name = "ca_mat_sqr__extern"]
pub fn ca_mat_sqr(res: *mut ca_mat_struct, A: *const ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_pow_ui_binexp(
B: *mut ca_mat_struct,
A: *const ca_mat_struct,
exp: ulong,
ctx: *mut ca_ctx_struct,
);
pub fn _ca_mat_ca_poly_evaluate(
y: *mut ca_mat_struct,
poly: ca_srcptr,
len: slong,
x: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_ca_poly_evaluate(
res: *mut ca_mat_struct,
f: *const ca_poly_struct,
a: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_trace(trace: *mut ca_struct, mat: *const ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_find_pivot(
pivot_row: *mut slong,
mat: *mut ca_mat_struct,
start_row: slong,
end_row: slong,
column: slong,
ctx: *mut ca_ctx_struct,
) -> truth_t;
#[link_name = "_ca_mat_swap_rows__extern"]
pub fn _ca_mat_swap_rows(mat: *mut ca_mat_struct, perm: *mut slong, r: slong, s: slong);
pub fn ca_mat_lu_classical(
rank: *mut slong,
P: *mut slong,
LU: *mut ca_mat_struct,
A: *const ca_mat_struct,
rank_check: libc::c_int,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_lu_recursive(
rank: *mut slong,
P: *mut slong,
LU: *mut ca_mat_struct,
A: *const ca_mat_struct,
rank_check: libc::c_int,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_lu(
rank: *mut slong,
P: *mut slong,
LU: *mut ca_mat_struct,
A: *const ca_mat_struct,
rank_check: libc::c_int,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_fflu(
rank: *mut slong,
P: *mut slong,
LU: *mut ca_mat_struct,
den: *mut ca_struct,
A: *const ca_mat_struct,
rank_check: libc::c_int,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_rref_fflu(
rank: *mut slong,
R: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_rref_lu(
rank: *mut slong,
R: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_rref(
rank: *mut slong,
R: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_nonsingular_lu(
P: *mut slong,
LU: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_nonsingular_fflu(
P: *mut slong,
LU: *mut ca_mat_struct,
den: *mut ca_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_nonsingular_solve_adjugate(
X: *mut ca_mat_struct,
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_nonsingular_solve_fflu(
X: *mut ca_mat_struct,
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_nonsingular_solve_lu(
X: *mut ca_mat_struct,
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_nonsingular_solve(
X: *mut ca_mat_struct,
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_inv(
X: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_solve_tril_classical(
X: *mut ca_mat_struct,
L: *const ca_mat_struct,
B: *const ca_mat_struct,
unit: libc::c_int,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_solve_tril_recursive(
X: *mut ca_mat_struct,
L: *const ca_mat_struct,
B: *const ca_mat_struct,
unit: libc::c_int,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_solve_tril(
X: *mut ca_mat_struct,
L: *const ca_mat_struct,
B: *const ca_mat_struct,
unit: libc::c_int,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_solve_triu_classical(
X: *mut ca_mat_struct,
U: *const ca_mat_struct,
B: *const ca_mat_struct,
unit: libc::c_int,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_solve_triu_recursive(
X: *mut ca_mat_struct,
U: *const ca_mat_struct,
B: *const ca_mat_struct,
unit: libc::c_int,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_solve_triu(
X: *mut ca_mat_struct,
U: *const ca_mat_struct,
B: *const ca_mat_struct,
unit: libc::c_int,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_solve_lu_precomp(
X: *mut ca_mat_struct,
perm: *const slong,
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_solve_fflu_precomp(
X: *mut ca_mat_struct,
perm: *const slong,
A: *const ca_mat_struct,
den: *const ca_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_rank(
rank: *mut slong,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_right_kernel(
X: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_det_berkowitz(
det: *mut ca_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_det_lu(
det: *mut ca_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_det_bareiss(
det: *mut ca_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_det_cofactor(
det: *mut ca_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_det(det: *mut ca_struct, A: *const ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_adjugate_cofactor(
adj: *mut ca_mat_struct,
det: *mut ca_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_adjugate_charpoly(
adj: *mut ca_mat_struct,
det: *mut ca_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_adjugate(
adj: *mut ca_mat_struct,
det: *mut ca_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn _ca_mat_charpoly_berkowitz(
cp: ca_ptr,
mat: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_charpoly_berkowitz(
cp: *mut ca_poly_struct,
mat: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn _ca_mat_charpoly_danilevsky(
p: ca_ptr,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_charpoly_danilevsky(
cp: *mut ca_poly_struct,
mat: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn _ca_mat_charpoly(cp: ca_ptr, mat: *const ca_mat_struct, ctx: *mut ca_ctx_struct);
pub fn ca_mat_charpoly(
cp: *mut ca_poly_struct,
mat: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_companion(
A: *mut ca_mat_struct,
poly: *const ca_poly_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_eigenvalues(
lambda: *mut ca_vec_struct,
exp: *mut ulong,
mat: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_diagonalization(
D: *mut ca_mat_struct,
P: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn ca_mat_set_jordan_blocks(
mat: *mut ca_mat_struct,
lambda: *const ca_vec_struct,
num_blocks: slong,
block_lambda: *mut slong,
block_size: *mut slong,
ctx: *mut ca_ctx_struct,
);
pub fn ca_mat_jordan_blocks(
lambda: *mut ca_vec_struct,
num_blocks: *mut slong,
block_lambda: *mut slong,
block_size: *mut slong,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_jordan_transformation(
mat: *mut ca_mat_struct,
lambda: *const ca_vec_struct,
num_blocks: slong,
block_lambda: *mut slong,
block_size: *mut slong,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_jordan_form(
J: *mut ca_mat_struct,
P: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_exp(
res: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> libc::c_int;
pub fn ca_mat_log(
res: *mut ca_mat_struct,
A: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> truth_t;
pub fn _ca_mat_same_field(A: *const ca_mat_struct, ctx: *mut ca_ctx_struct) -> ca_field_ptr;
pub fn _ca_mat_same_field2(
A: *const ca_mat_struct,
B: *const ca_mat_struct,
ctx: *mut ca_ctx_struct,
) -> ca_field_ptr;
}