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

Commit

Permalink
Fix fmpz_mat_t declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
jdemeyer committed Oct 3, 2014
1 parent 5b77c78 commit 7843e3f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
7 changes: 6 additions & 1 deletion src/sage/libs/flint/fmpz_mat.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ include "sage/libs/flint/fmpz.pxi"
include "sage/libs/flint/fmpz_poly.pxi"

cdef extern from "flint/fmpz_mat.h":
ctypedef void* fmpz_mat_t
ctypedef struct fmpz_mat_struct:
pass
ctypedef fmpz_mat_struct fmpz_mat_t[1]

void fmpz_mat_init(fmpz_mat_t mat, unsigned long rows, unsigned long cols)
void fmpz_mat_init_set(fmpz_mat_t mat, const fmpz_mat_t src)
void fmpz_mat_set(fmpz_mat_t result, fmpz_mat_t mat)
void fmpz_mat_clear(fmpz_mat_t mat)
int fmpz_mat_print_pretty(const fmpz_mat_t mat)
fmpz_t fmpz_mat_entry(fmpz_mat_t mat, long i, long j)
long fmpz_mat_nrows(fmpz_mat_t mat)
long fmpz_mat_ncols(fmpz_mat_t mat)
void fmpz_mat_one(fmpz_mat_t mat)
void fmpz_mat_zero(fmpz_mat_t mat)
void fmpz_mat_neg(fmpz_mat_t f, fmpz_mat_t g)
Expand Down
9 changes: 0 additions & 9 deletions src/sage/libs/fplll/fplll.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,3 @@ include "fplll.pxi"
cdef class FP_LLL:
cdef object fp_map
cdef ZZ_mat[mpz_t] *_lattice

cdef extern from "flint/fmpz.h":
ctypedef void* fmpz_t
void fmpz_get_mpz(mpz_t x, const fmpz_t f)
void fmpz_set_mpz(fmpz_t f, const mpz_t val)

cdef extern from "flint/fmpz_mat.h":
ctypedef void* fmpz_mat_t
fmpz_t fmpz_mat_entry(fmpz_mat_t mat ,long i ,long j)
8 changes: 4 additions & 4 deletions src/sage/matrix/matrix_integer_dense.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3440,10 +3440,10 @@ cdef class Matrix_integer_dense(matrix_dense.Matrix_dense): # dense or sparse
80. The check that the determinant of a squared matrix is a
square is a sanity check that the result is probably correct::
sage: for s in [1..80]: # long time (6s on sage.math, 2013)
... M = random_matrix(ZZ, s)
... d = (M*M).determinant()
... assert d.is_square()
sage: for s in [1..80]: # long time
....: M = random_matrix(ZZ, s)
....: d = (M*M).determinant()
....: assert d.is_square()
"""
d = self.fetch('det')
if d is not None:
Expand Down

0 comments on commit 7843e3f

Please sign in to comment.