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

Commit

Permalink
fix with LinBox new API
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementPernet committed Dec 7, 2021
1 parent bd36004 commit 6eca64f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/sage/libs/linbox/conversion.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ cdef inline Vector_integer_dense new_sage_vector_integer_dense(P, DenseVector_in
- v -- linbox vector
"""
cdef Vector_integer_dense res = P()
cdef cppvector[Integer] * vec = &v.refRep()
cdef size_t i
for i in range(<size_t> res._degree):
mpz_set(res._entries[i], vec[0][i].get_mpz_const())
mpz_set(res._entries[i], v.getEntry(i).get_mpz_const())

return res
5 changes: 2 additions & 3 deletions src/sage/libs/linbox/linbox.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
ctypedef Modular_double Field
ctypedef double Element
DenseMatrix_Modular_double(Field F, size_t m, size_t n)
DenseMatrix_Modular_double(Field F, Element*, size_t m, size_t n)
DenseMatrix_Modular_double(Field F, size_t m, size_t n, Element*)
void setEntry(size_t i, size_t j, Element& a)
Element &getEntry(size_t i, size_t j)

Expand All @@ -42,7 +42,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
ctypedef Modular_float Field
ctypedef float Element
DenseMatrix_Modular_float(Field F, size_t m, size_t n)
DenseMatrix_Modular_float(Field F, Element*, size_t m, size_t n)
DenseMatrix_Modular_float(Field F, size_t m, size_t n, Element*)
void setEntry(size_t i, size_t j, Element& a)
Element &getEntry(size_t i, size_t j)

Expand Down Expand Up @@ -101,7 +101,6 @@ cdef extern from "linbox/vector/vector.h":
DenseVector_integer (Field &F)
DenseVector_integer (Field &F, long& m)
DenseVector_integer (Field &F, cppvector[Integer]&)
cppvector[Element]& refRep()
size_t size()
void resize(size_t)
void resize(size_t n, const Element&)
Expand Down

0 comments on commit 6eca64f

Please sign in to comment.