id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
14138,some cleanup in sage.combinat.combinat,Nathann Cohen,Sage Combinat CC user,"Because I hate that :
{{{
sage: MultichooseNK(5,3)
Combinatorial Class -- REDEFINE ME!
sage: Partitions(5, min_part=0)
/home/ncohen/.Sage/local/lib/python2.7/site-packages/sage/combinat/partition.py:3764: RuntimeWarning: Currently, setting min_part=0 produces Partition objects which violate internal assumptions. Calling methods on these objects may produce errors or WRONG results!
warn(""Currently, setting min_part=0 produces Partition objects which violate internal assumptions. Calling methods on these objects may produce errors or WRONG results!"", RuntimeWarning)
Partitions of the integer 5 satisfying constraints min_part=0
sage: Compositions(5, min_part=0)
/home/ncohen/.Sage/local/lib/python2.7/site-packages/sage/combinat/composition.py:975: RuntimeWarning: Currently, setting min_part=0 produces Composition objects which violate internal assumptions. Calling methods on these objects may produce errors or WRONG results!
warn(""Currently, setting min_part=0 produces Composition objects which violate internal assumptions. Calling methods on these objects may produce errors or WRONG results!"", RuntimeWarning)
Compositions of the integer 5 satisfying constraints min_part=0
}}}
From the help of unordered_tuples (in the global namespace):
Warning: Wraps GAP - hence mset must be a list of objects that have string
representations that can be interpreted by the GAP interpreter.
If mset consists of at all complicated Sage objects, this
function does *not* do what you expect. A proper function should
be written! (TODO!)
From the help of permutations_iterator (in the global namespace, with no depracation warning):
Do not use this function. It will be deprecated in future version
of Sage and eventually removed. Use Permutations instead;
help of number_of_permutations (same as above).
What this ticket does :
* It adds a deprecation warning when `min_part = 0`, in the hope that the feature will be made unavailable as soon as possible, and because Nicolas told me that I should deprecate it first (turns out that there has been a warning since 2009 already).
* It calls the proper Sage object to compute things that use to be done with GAP
* Some documentation improvements.
* This ticket *does nothing* about `MultichooseNK(5,3)` because I refuse to touch anything that uses things like CombinatorialClass.
* This ticket does *not* remove all the functions `number_of_*` that are imported in the global namespace by a `from sage.combinat.combinat import *` because they are almost all deprecated anyway and will be removed, even if we have to wait for one more year.
Nathann
Apply:
* [attachment:trac_14138.patch]
* [attachment:trac_14138-doctests.patch]",defect,closed,major,sage-5.8,combinatorics,fixed,,Nicolas M. Thiéry fhivert Florent Hivert Punarbasu Purkayastha Travis Scrimshaw,sage-5.8.beta1,Nathann Cohen,"Punarbasu Purkayastha, Nicolas M. Thiéry",N/A,,,,,