#9475: update M4RI to newest upstream release
----------------------------------------------------------+-----------------
   Reporter:  malb                                        |       Owner:  tbd   
                                     
       Type:  enhancement                                 |      Status:  
positive_review                            
   Priority:  major                                       |   Milestone:  
sage-4.5.3                                 
  Component:  packages                                    |    Keywords:  M4RI, 
spkg-check                           
     Author:  Martin Albrecht, Leif Leonhardy             |    Upstream:  Not 
yet reported upstream; Will do shortly.
   Reviewer:  Leif Leonhardy, David Kirkby, Mariah Lenox  |      Merged:        
                                     
Work_issues:                                              |  
----------------------------------------------------------+-----------------

Comment(by leif):

 Replying to [comment:48 malb]:
 > The only change in the new version compared to the previous version of
  m4ri_new_version.v2.patch is that one mention of LQUP was replaced by PLS
 in a docstring. That's all, this is why I didn't reset the status.

 Not 100%:
 {{{
 #!patch
 --- m4ri_new_version.v2.patch.orig      2010-08-07 09:00:21.000000000
 +0200
 +++ m4ri_new_version.v2.patch   2010-08-12 20:50:56.000000000 +0200
 @@ -1,14 +1,14 @@
  # HG changeset patch
  # User Martin Albrecht <[email protected]>
  # Date 1277764034 -3600
 -# Node ID 3365789479e6d70cb1930b2e97c7874cbd3310db
 -# Parent  ba36200d8a2f844179785580245fd95aa6401a51
 +# Node ID 3b116dd35a84e0b6bd8ea12a732b8fa1fbda796f
 +# Parent  0bb69a98789215c64a81c4602f46a50c0aeca5f0
  #9475 Adapts Sage library interface to new M4RI API (libm4ri-20100701)

 -diff -r ba36200d8a2f -r 3365789479e6 module_list.py
 ---- a/module_list.py   Fri Jun 25 10:05:59 2010 +0100
 +diff -r 0bb69a987892 -r 3b116dd35a84 module_list.py
 +--- a/module_list.py   Tue Aug 10 13:46:10 2010 +0100
  +++ b/module_list.py   Mon Jun 28 23:27:14 2010 +0100
 -@@ -783,7 +783,7 @@
 +@@ -807,7 +807,7 @@
       Extension('sage.matrix.matrix_mod2_dense',
                 sources = ['sage/matrix/matrix_mod2_dense.pyx'],
                 libraries = ['gmp','m4ri', 'gd', 'png12', 'z'],
 @@ -17,7 +17,7 @@

       Extension('sage.matrix.matrix_modn_dense',
                 sources = ['sage/matrix/matrix_modn_dense.pyx'],
 -@@ -971,7 +971,7 @@
 +@@ -995,7 +995,7 @@
       Extension('sage.modules.vector_mod2_dense',
                 sources = ['sage/modules/vector_mod2_dense.pyx'],
                 libraries = ['gmp','m4ri', 'png12', 'gd'],
 @@ -26,8 +26,8 @@

       Extension('sage.modules.vector_rational_dense',
                 sources = ['sage/modules/vector_rational_dense.pyx'],
 -diff -r ba36200d8a2f -r 3365789479e6 sage/libs/m4ri.pxd
 ---- a/sage/libs/m4ri.pxd       Fri Jun 25 10:05:59 2010 +0100
 +diff -r 0bb69a987892 -r 3b116dd35a84 sage/libs/m4ri.pxd
 +--- a/sage/libs/m4ri.pxd       Tue Aug 10 13:46:10 2010 +0100
  +++ b/sage/libs/m4ri.pxd       Mon Jun 28 23:27:14 2010 +0100
  @@ -141,6 +141,9 @@
       # reduced row echelon form from upper triangular form
 @@ -60,8 +60,8 @@

       # reduced row echelon form using PLUQ factorization
       cdef long mzd_echelonize_pluq(mzd_t *A, int full)
 -diff -r ba36200d8a2f -r 3365789479e6 sage/matrix/matrix_mod2_dense.pyx
 ---- a/sage/matrix/matrix_mod2_dense.pyx        Fri Jun 25 10:05:59 2010
 +0100
 +diff -r 0bb69a987892 -r 3b116dd35a84 sage/matrix/matrix_mod2_dense.pyx
 +--- a/sage/matrix/matrix_mod2_dense.pyx        Tue Aug 10 13:46:10 2010
 +0100
  +++ b/sage/matrix/matrix_mod2_dense.pyx        Mon Jun 28 23:27:14 2010
 +0100
  @@ -1010,15 +1010,16 @@
       #    * Matrix windows -- only if you need strassen for that base
 @@ -116,7 +116,28 @@
                   k = 0

               _sig_on
 -@@ -1681,7 +1691,7 @@
 +@@ -1106,6 +1116,20 @@
 +             self.cache('rank', r)
 +             self.cache('pivots', self._pivots())
 +
 ++        elif algorithm == 'top':
 ++
 ++            self.check_mutability()
 ++            self.clear_cache()
 ++
 ++            _sig_on
 ++            mzd_top_echelonize_m4ri(self._entries, 0)
 ++            r = 0
 ++            _sig_off
 ++
 ++            self.cache('in_echelon_form',True)
 ++            self.cache('rank', r)
 ++            self.cache('pivots', self._pivots())
 ++
 +         elif algorithm == 'linbox':
 +
 +             #self._echelonize_linbox()
 +@@ -1681,7 +1705,7 @@
               sage: float(d)
               0.63184899999999999
               sage: A.density(approx=True)
 @@ -125,7 +146,7 @@
               sage: float(len(A.nonzero_positions())/1000^2)
               0.63184899999999999
           """
 -@@ -1691,7 +1701,7 @@
 +@@ -1691,18 +1715,18 @@
           else:
               return matrix_dense.Matrix_dense.density(self)

 @@ -134,7 +155,11 @@
           """
           Return the rank of this matrix.

 -@@ -1702,7 +1712,7 @@
 +-        On average 'lqup' should be faster than 'm4ri' and hence it is
 ++        On average 'pls' should be faster than 'm4ri' and hence it is
 +         the default choice. However, for small - i.e. quite few
 +         thousand rows & columns - and sparse matrices 'm4ri' might be
 +         a better choice.

           INPUT:

 @@ -143,7 +168,7 @@

           EXAMPLE::

 -@@ -1722,10 +1732,10 @@
 +@@ -1722,10 +1746,10 @@
           cdef mzd_t *A = mzd_copy(NULL, self._entries)
           cdef mzp_t *P, *Q

 @@ -156,7 +181,7 @@
               mzp_free(P)
               mzp_free(Q)
           elif algorithm == 'm4ri':
 -@@ -2060,9 +2070,9 @@
 +@@ -2060,9 +2084,9 @@
       mzp_free(q)
       return B,P,Q

 @@ -168,7 +193,7 @@

       INPUT:
           A -- matrix
 -@@ -2074,14 +2084,14 @@
 +@@ -2074,14 +2098,14 @@

       EXAMPLE::

 @@ -185,7 +210,7 @@
           sage: LU
           [1 0 0 1]
           [1 1 0 0]
 -@@ -2095,7 +2105,7 @@
 +@@ -2095,7 +2119,7 @@
           [0, 1, 2, 3]

           sage: A = random_matrix(GF(2),1000,1000)
 @@ -194,7 +219,7 @@
           True
       """
       cdef Matrix_mod2_dense B = A.__copy__()
 -@@ -2104,15 +2114,15 @@
 +@@ -2104,15 +2128,15 @@

       if algorithm == 'standard':
           _sig_on
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9475#comment:49>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to