Skip to content

Commit 877d4af

Browse files
ClementPernettornaria
authored andcommitted
fix with LinBox new API
1 parent 4ce44e1 commit 877d4af

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/sage/libs/linbox/conversion.pxd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,8 @@ cdef inline Vector_integer_dense new_sage_vector_integer_dense(P, DenseVector_in
177177
- v -- linbox vector
178178
"""
179179
cdef Vector_integer_dense res = P()
180-
cdef cppvector[Integer] * vec = &v.refRep()
181180
cdef size_t i
182181
for i in range(<size_t> res._degree):
183-
mpz_set(res._entries[i], vec[0][i].get_mpz_const())
182+
mpz_set(res._entries[i], v.getEntry(i).get_mpz_const())
184183

185184
return res

src/sage/libs/linbox/linbox.pxd

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
3232
ctypedef Modular_double Field
3333
ctypedef double Element
3434
DenseMatrix_Modular_double(Field F, size_t m, size_t n)
35-
DenseMatrix_Modular_double(Field F, Element*, size_t m, size_t n)
35+
DenseMatrix_Modular_double(Field F, size_t m, size_t n, Element*)
3636
void setEntry(size_t i, size_t j, Element& a)
3737
Element &getEntry(size_t i, size_t j)
3838

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

@@ -101,7 +101,6 @@ cdef extern from "linbox/vector/vector.h":
101101
DenseVector_integer (Field &F)
102102
DenseVector_integer (Field &F, long& m)
103103
DenseVector_integer (Field &F, cppvector[Integer]&)
104-
cppvector[Element]& refRep()
105104
size_t size()
106105
void resize(size_t)
107106
void resize(size_t n, const Element&)

0 commit comments

Comments
 (0)