#13821: Change sage.combinat.combinat.combinations() to use Combinations
-----------------------------------------+----------------------------------
       Reporter:  ppurka                 |         Owner:  sage-combinat
           Type:  enhancement            |        Status:  needs_review 
       Priority:  major                  |     Milestone:  sage-5.6     
      Component:  combinatorics          |    Resolution:               
       Keywords:                         |   Work issues:               
Report Upstream:  N/A                    |     Reviewers:               
        Authors:  Punarbasu Purkayastha  |     Merged in:               
   Dependencies:                         |      Stopgaps:               
-----------------------------------------+----------------------------------
Changes (by ppurka):

  * status:  needs_info => needs_review


Old description:

> As I mentioned a long time ago in #5288, the `combinations()` method is
> not ideal for working with Sage objects. This warning is also present in
> the documentation of this command. There is a much better command
> `Combinations`. The `combinations` command should be made to return a
> list by calling `Combinations` instead.
>
> The result of this change in the code will be that
> 1. It will also speed up the function considerably, partly because it
> won't depend on string parsing from GAP.
> 2. It will be able to handle Sage objects much better.
>
> Similarly, `combinations_iterator` should directly return a
> `Combinations` object, instead of duplicating stuff.
>
> The attached patch performs this change.
> ----
> Apply [attachment:trac_13821-change_combinations.patch] to devel/sage.

New description:

 As I mentioned a long time ago in #5288, the `combinations()` method is
 not ideal for working with Sage objects. This warning is also present in
 the documentation of this command. There is a much better command
 `Combinations`. The `combinations` command should be made to return a list
 by calling `Combinations` instead.

 The result of this change in the code will be that
 1. It will also speed up the function considerably, partly because it
 won't depend on string parsing from GAP.
 2. It will be able to handle Sage objects much better.

 Similarly, `combinations_iterator` should directly return a `Combinations`
 object, instead of duplicating stuff.

 The attached patch performs this change.
 ----
 Apply to devel/sage in this order:
 1. [attachment:trac_13821-change_combinations.patch]
 2. [attachment:trac_13821-replace_combinations.patch]

--

Comment:

 Ok. I have put deprecation in the functions and done a bunch of cleanups.
 There is a second patch which replaces all the calls to `combinations*`
 with `Combinations`, that i could find with `search_src()`.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13821#comment:5>
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