Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
expand Matrix_complex_ball_dense
Browse files Browse the repository at this point in the history
still to do: LU() (more cumbersome to override)
  • Loading branch information
mezzarobba authored and videlec committed Apr 7, 2018
1 parent bf9cefd commit e6542d6
Show file tree
Hide file tree
Showing 3 changed files with 409 additions and 16 deletions.
52 changes: 38 additions & 14 deletions src/sage/libs/arb/acb_mat.pxd
Original file line number Diff line number Diff line change
@@ -1,24 +1,48 @@
from sage.libs.arb.types cimport acb_t, acb_mat_t
from sage.libs.arb.types cimport acb_t, acb_mat_t, acb_poly_t

cdef extern from "acb_mat.h":
unsigned int acb_mat_nrows(acb_mat_t mat)
unsigned int acb_mat_ncols(acb_mat_t mat)
acb_t acb_mat_entry(acb_mat_t mat, unsigned long i, unsigned long j)

void acb_mat_init(acb_mat_t mat, long r, long c)
void acb_mat_clear(acb_mat_t mat)

long acb_mat_allocated_bytes(const acb_mat_t x)
void acb_mat_set(acb_mat_t dest, const acb_mat_t src)

void acb_mat_printd(const acb_mat_t mat, long digits)
bint acb_mat_equal(const acb_mat_t mat1, const acb_mat_t mat2)
bint acb_mat_overlaps(const acb_mat_t mat1, const acb_mat_t mat2)
bint acb_mat_contains(const acb_mat_t mat1, const acb_mat_t mat2)
bint acb_mat_eq(const acb_mat_t mat1, const acb_mat_t mat2)
bint acb_mat_ne(const acb_mat_t mat1, const acb_mat_t mat2)
bint acb_mat_is_real(const acb_mat_t mat)
bint acb_mat_is_empty(const acb_mat_t mat)
bint acb_mat_is_square(const acb_mat_t mat)
void acb_mat_zero(acb_mat_t mat)
void acb_mat_one(acb_mat_t mat)

void acb_mat_add(acb_mat_t res, const acb_mat_t mat1,
const acb_mat_t mat2, long prec)
void acb_mat_sub(acb_mat_t res, const acb_mat_t mat1,
const acb_mat_t mat2, long prec);
void acb_mat_mul(acb_mat_t res, const acb_mat_t mat1,
const acb_mat_t mat2, long prec);

void acb_mat_scalar_addmul_acb(acb_mat_t B, const acb_mat_t A,
const acb_t c, long prec)
void acb_mat_transpose(acb_mat_t dest, const acb_mat_t src)
void acb_mat_frobenius_norm(acb_t res, const acb_mat_t A, long prec)
void acb_mat_neg(acb_mat_t dest, const acb_mat_t src)
void acb_mat_add(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, long prec)
void acb_mat_sub(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, long prec)
void acb_mat_mul(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, long prec)
void acb_mat_mul_classical(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, long prec)
void acb_mat_mul_threaded(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, long prec)
void acb_mat_mul_entrywise(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, long prec)
void acb_mat_sqr(acb_mat_t res, const acb_mat_t mat, long prec)
void acb_mat_pow_ui(acb_mat_t res, const acb_mat_t mat, unsigned long exp, long prec)
void acb_mat_scalar_mul_2exp_si(acb_mat_t B, const acb_mat_t A, long c)
void acb_mat_scalar_addmul_si(acb_mat_t B, const acb_mat_t A, long c, long prec)
void acb_mat_scalar_addmul_acb(acb_mat_t B, const acb_mat_t A, const acb_t c, long prec)
void acb_mat_scalar_mul_si(acb_mat_t B, const acb_mat_t A, long c, long prec)
void acb_mat_scalar_mul_acb(acb_mat_t B, const acb_mat_t A, const acb_t c, long prec)
void acb_mat_scalar_div_si(acb_mat_t B, const acb_mat_t A, long c, long prec)
void acb_mat_scalar_div_acb(acb_mat_t B, const acb_mat_t A, const acb_t c, long prec)
bint acb_mat_lu(long * perm, acb_mat_t LU, const acb_mat_t A, long prec)
void acb_mat_solve_lu_precomp(acb_mat_t X, const long * perm, const acb_mat_t LU, const acb_mat_t B, long prec)
bint acb_mat_solve(acb_mat_t X, const acb_mat_t A, const acb_mat_t B, long prec)
bint acb_mat_inv(acb_mat_t X, const acb_mat_t A, long prec)
void acb_mat_det(acb_t det, const acb_mat_t A, long prec)
void acb_mat_charpoly(acb_poly_t cp, const acb_mat_t mat, long prec)
void acb_mat_exp_taylor_sum(acb_mat_t S, const acb_mat_t A, long N, long prec)
void acb_mat_exp(acb_mat_t B, const acb_mat_t A, long prec)
void acb_mat_trace(acb_t trace, const acb_mat_t mat, long prec)
2 changes: 2 additions & 0 deletions src/sage/matrix/matrix_complex_ball_dense.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ cdef Matrix_generic_dense acb_mat_to_matrix(

cdef class Matrix_complex_ball_dense(Matrix_dense):
cdef acb_mat_t value
cdef Matrix_complex_ball_dense _new(self, Py_ssize_t nrows, Py_ssize_t ncols)
cpdef _pow_int(self, n)

0 comments on commit e6542d6

Please sign in to comment.