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
3030-  Author: John Cremona
31313232-  Website:
33-    http ://homepages.warwick.ac.uk/staff/J.E.Cremona /mwrank/index.html
33+    https ://johncremona.github.io /mwrank/index.html
3434-  Repository: https://github.com/JohnCremona/eclib
Original file line number Diff line number Diff line change 11tarball =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 11SAGE_SPKG_CONFIGURE([ eclib]  , [ 
22  SAGE_SPKG_DEPCHECK([ ntl pari flint]  , [  
33    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 "] )  
55    PKG_CHECK_MODULES([ ECLIB]  , [ eclib >= SAGE_ECLIB_VER]  , [  
66      AC_CACHE_CHECK ( [ for mwrank version == SAGE_ECLIB_VER]  , [ ac_cv_path_MWRANK]  , [  
77        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":
5555    cdef cppclass mat:
5656        mat()
5757        mat(mat m)
58-         scalar*  get_entries()
5958        scalar sub(long , long )
6059        long  nrows()
6160        long  ncols()
@@ -67,7 +66,6 @@ cdef extern from "eclib/smatrix.h":
6766    cdef cppclass smat:
6867        smat()
6968        smat(smat m)
70-         scalar*  get_entries()
7169        scalar sub(long , long )
7270        long  nrows()
7371        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
1111from  sage.matrix.matrix_integer_dense cimport Matrix_integer_dense
1212from  sage.rings.integer cimport Integer
1313
14- 
1514cdef class  Matrix:
1615    """ 
1716    A Cremona Matrix. 
@@ -212,30 +211,27 @@ cdef class Matrix:
212211            <class 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'> 
213212        """  
214213        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
217215
218216        cdef Matrix_integer_dense Td
219217        cdef Matrix_integer_sparse Ts
220218
221219        #  Ugly code...
222220        if  sparse:
223221            Ts =  MatrixSpace(ZZ, n, sparse = sparse).zero_matrix().__copy__()
224-             k =  0 
225222            for  i from  0  <=  i <  n:
226223                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) 
230227            return  Ts
231228        else :
232229            Td =  MatrixSpace(ZZ, n, sparse = sparse).zero_matrix().__copy__()
233-             k =  0 
234230            for  i from  0  <=  i <  n:
235231                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) 
239235            return  Td
240236
241237
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments