#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 {'newvalue': u'Punarbasu Purkayastha', 'oldvalue': ''}):

  * status:  new => needs_review
  * author:  => Punarbasu Purkayastha


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.
> 3. If and when #10534 is merged, the function will automatically gain at
> least 10x speed.
>
> Similarly, `combinations_iterator` should directly return a
> `Combinations` object, instead of duplicating stuff.

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 [attachment:trac_13821-change_combinations.patch] to devel/sage.

--

Comment:

 The attached patch implements this change.

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