Closed vbraun closed 13 years ago
Volker,
Unfortunate - but at least it is fixed now. Passes tests in the obvious places, I'll run long tests overnight.
Comments, in decreasing order of merit.
Tests would benefit from a mention of the Trac ticket being fixed.
Do you want to document the transformation
keyword in the docstring?
Internal logic of the echelon form code is a mystery to me, as is the code for creating/copying matrices. Since we are both in the neighborhood, is there a faster method for copying a matrix than the following?
for c from 0 <= c < self.ncols():
for r from 0 <= r < self.nrows():
self.set_unsafe(r, c, d.get_unsafe(r,c))
I don't know, just seems inefficient to go entry-by-entry. Not critical, just a thought. Long weekend here in the US, but I'll stick with this.
Rob
Reviewer: Rob Beezer
It seems like hermite_form()
is supposed to be an alias for echelon_form()
. But sparse matrices don't have a hermite_form()
method? I'll update the patch to fix that and also your points 1 & 2.
Updated patch
Attachment: trac_11558_echelon_form_with_transformation.patch.gz
I've added more documentation. Some matrix backends don't support echelon_form(transformation=True)
, so eventually we should compute the transformation matrix from the pivots if necessary. I'll leave that for later :-)
Applies, builds, passes obvious tests on 4.7.1.alpha3. And looks good.
I'll run full tests overnight and then flip this to positive review.
Rob
Passes all long tests on 4.7.1.alpha3, so positive review. Thanks for cleaning this up.
Description changed:
---
+++
@@ -20,3 +20,6 @@
TypeError: Cannot convert tuple to sage.matrix.matrix2.Matrix
+ +Appy: +1. [attachment: trac_11558_echelon_form_with_transformation.patch]
Description changed:
---
+++
@@ -22,4 +22,4 @@
Appy: -1. [attachment: trac_11558_echelon_form_with_transformation.patch] +1. attachment: trac_11558_echelon_form_with_transformation.patch
Merged: sage-4.7.2.alpha1
Appy:
Component: linear algebra
Author: Volker Braun
Reviewer: Rob Beezer
Merged: sage-4.7.2.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/11558