#16896: rework of row_reduced_form/weak_popov_form calling convention
-------------------------------------+-------------------------------------
       Reporter:  ketzu              |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.7
      Component:  linear algebra     |   Resolution:
       Keywords:  polynomial matrix  |    Merged in:
        Authors:  David Mödinger,    |    Reviewers:
  Johan S. R. Nielsen                |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  67c5636f25e30655a6cc5084f6e426fb181049ce
  u/jsrn/rework_of_row_reduced_form_weak_popov_form_calling_convention|     
Stopgaps:
   Dependencies:  #16888             |
-------------------------------------+-------------------------------------
Changes (by jsrn):

 * status:  needs_work => needs_review


Old description:

> The calling convention of `row_reduced_form` and `weak_popov_form` is
> bizarre and should be fixed.
>
>   1. It takes a parameter `ascend` but this is ignored. It's original
> purpose was something like sorting the rows, but this is not part of weak
> Popov form or row reduced, and shouldn't pollute this method.
>
>   2. It returns a 3-tuple `(W,U,d)`. Usually, `W` is the only object of
> interest (the row reduced form), while `U` is a transformation matrix
> which can sometimes be useful. `d` can be computed directly from `W` and
> shouldn't be returned at all.
>
>   3. When the input is a matrix over a polynomial ring, it returns the
> output as over the fraction field, though the output always *lie* in the
> polynomial ring.
>
> I've added optional parameters `transformation = False` for returning
> `U`. To enable printing a deprecation warning for at least a year while
> supporting the old call style, I've added optional parameter `old_call =
> True`. Set this to `False` to get the future call style and disable
> deprecation warning. In one year, we'll change the default behaviour but
> retain `old_call` as an acceptable argument, but print a deprecation
> warning if one sets it. In two years, we can finally remove `old_call`
> and have the clean calling convention. <sigh>...

New description:

 The calling convention of `row_reduced_form` and `weak_popov_form` is
 bizarre and should be fixed.

   1. It takes a parameter `ascend` but this is ignored. It's original
 purpose was something like sorting the rows, but this is not part of weak
 Popov form or row reduced, and shouldn't pollute this method.

   2. It returns a 3-tuple `(W,U,d)`. Usually, `W` is the only object of
 interest (the row reduced form), while `U` is a transformation matrix
 which can sometimes be useful. `d` can be computed directly from `W` and
 shouldn't be returned at all.

   3. When the input is a matrix over a polynomial ring, it returns the
 output as over the fraction field, though the output always *lie* in the
 polynomial ring. This is senseless and confusing.

 I've added optional parameters `transformation = False` for returning `U`.
 To enable printing a deprecation warning for at least a year while
 supporting the old call style, I've added optional parameter `old_call =
 True`. Set this to `False` to get the future call style and disable
 deprecation warning. In one year, we'll change the default behaviour but
 retain `old_call` as an acceptable argument, but print a deprecation
 warning if one sets it. In two years, we can finally remove `old_call` and
 have the clean calling convention. <sigh>...

--

Comment:

 Done!

--
Ticket URL: <http://trac.sagemath.org/ticket/16896#comment:20>
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 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to