File tree Expand file tree Collapse file tree 6 files changed +13
-19
lines changed Expand file tree Collapse file tree 6 files changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -30,5 +30,5 @@ Upstream Contact
30
30
- Author: John Cremona
31
31
32
32
- Website:
33
- http ://homepages.warwick.ac.uk/staff/J.E.Cremona /mwrank/index.html
33
+ https ://johncremona.github.io /mwrank/index.html
34
34
- Repository: https://github.com/JohnCremona/eclib
Original file line number Diff line number Diff line change 1
1
tarball =eclib-VERSION.tar.bz2
2
- sha1 =3028ac95e1b76699f5f9e871ac706cda363ab842
3
- sha256 =32d116a3e359b0de4f6486c2bb6188bb8b553c8b833f618cc2596484e8b6145a
4
- upstream_url =https://github.com/JohnCremona/eclib/releases/download/vVERSION /eclib-VERSION.tar.bz2
2
+ sha1 =ec8dd87df46ac5a54b548354681085d1da6e7e13
3
+ sha256 =9f8c2b32e24a4f20d7cc2d336ea30c8ea03b5b0953c2d32adda0c496e7616899
4
+ upstream_url =https://github.com/JohnCremona/eclib/releases/download/VERSION /eclib-VERSION.tar.bz2
Original file line number Diff line number Diff line change 1
- 20231212
1
+ 20250122
Original file line number Diff line number Diff line change 1
1
SAGE_SPKG_CONFIGURE([ eclib] , [
2
2
SAGE_SPKG_DEPCHECK([ ntl pari flint] , [
3
3
dnl use existing eclib only if the version reported by pkg-config is recent enough
4
- m4_pushdef ( [ SAGE_ECLIB_VER] ,[ "20231212 "] )
4
+ m4_pushdef ( [ SAGE_ECLIB_VER] ,[ "20241112 "] )
5
5
PKG_CHECK_MODULES([ ECLIB] , [ eclib >= SAGE_ECLIB_VER] , [
6
6
AC_CACHE_CHECK ( [ for mwrank version == SAGE_ECLIB_VER] , [ ac_cv_path_MWRANK] , [
7
7
AC_PATH_PROGS_FEATURE_CHECK ( [ MWRANK] , [ mwrank] , [
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ cdef extern from "eclib/matrix.h":
55
55
cdef cppclass mat:
56
56
mat()
57
57
mat(mat m)
58
- scalar* get_entries()
59
58
scalar sub(long , long )
60
59
long nrows()
61
60
long ncols()
@@ -67,7 +66,6 @@ cdef extern from "eclib/smatrix.h":
67
66
cdef cppclass smat:
68
67
smat()
69
68
smat(smat m)
70
- scalar* get_entries()
71
69
scalar sub(long , long )
72
70
long nrows()
73
71
long ncols()
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse
11
11
from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense
12
12
from sage.rings.integer cimport Integer
13
13
14
-
15
14
cdef class Matrix:
16
15
"""
17
16
A Cremona Matrix.
@@ -212,30 +211,27 @@ cdef class Matrix:
212
211
<class 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'>
213
212
"""
214
213
cdef long n = self .nrows()
215
- cdef long i, j, k
216
- cdef scalar* v = < scalar* > self .M.get_entries() # coercion needed to deal with const
214
+ cdef long i, j
217
215
218
216
cdef Matrix_integer_dense Td
219
217
cdef Matrix_integer_sparse Ts
220
218
221
219
# Ugly code...
222
220
if sparse:
223
221
Ts = MatrixSpace(ZZ, n, sparse = sparse).zero_matrix().__copy__()
224
- k = 0
225
222
for i from 0 <= i < n:
226
223
for j from 0 <= j < n:
227
- if v[k]:
228
- Ts.set_unsafe(i, j, Integer(v[k]))
229
- k += 1
224
+ Mij = Integer( self .M.sub(i + 1 ,j + 1 ))
225
+ if Mij:
226
+ Ts.set_unsafe(i, j, Mij)
230
227
return Ts
231
228
else :
232
229
Td = MatrixSpace(ZZ, n, sparse = sparse).zero_matrix().__copy__()
233
- k = 0
234
230
for i from 0 <= i < n:
235
231
for j from 0 <= j < n:
236
- if v[k]:
237
- Td.set_unsafe(i, j, Integer(v[k]))
238
- k += 1
232
+ Mij = Integer( self .M.sub(i + 1 ,j + 1 ))
233
+ if Mij:
234
+ Td.set_unsafe(i, j, Mij)
239
235
return Td
240
236
241
237
You can’t perform that action at this time.
0 commit comments