On 9 April 2015 at 09:51, Vincent Delecroix <[email protected]> wrote: > Sorry to insist. I really do not like the keyword algorithm here. The fact > that the output is a unimodular matrix has nothing to do with the algorithm > used to generate it!
Agreed. In fact the code runs a function called random_unimodular_matrix() which in turn calls random_ecehlonizable_matrix(). I'm not at all sure of the name of the latter! And random_unimodular_matrix's docstring does explicitly say "determinant 1", though this is hidden from the calual use being an internal function. John > > On the ambiguity for unimodular, I agree and it fits with the wikipedia > definition: square integer matrix with det +1 or -1. > > Vincent > > > On 09/04/15 10:44, John Cremona wrote: >> >> I suggest that to start with we just correct the documentation, since >> there will be code out there which relies on the det being +1. (Of >> course I agree with you on the standard meaning of "unimodular".) >> >> John >> >> On 9 April 2015 at 07:10, Jori Mantysalo <[email protected]> wrote: >>> >>> Matrix.random(ZZ, ..., algorithm='unimodular') works just as the >>> documentation says: generates a matrix with determinant +1. On the other >>> hand, unimodularity on ZZ is normally defined as having determinant +1 or >>> -1. >>> >>> Should we 1) leave this as it is, 2) correct the code or 3) add some kind >>> of >>> warning to documentation? >>> >>> (Also I guess there is faster ways to generate random unimodular matrix >>> than >>> current implementation. For example by making upper and lower triangular >>> matrices with +/- 1 on diagonal and multiplying them; but of course it is >>> not enought because then every matrix will have +1 or -1 as an element, >>> so >>> they are not that random.) >>> >>> -- >>> Jori Mäntysalo >> >> > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
