Changes between Version 17 and Version 18 of Ticket #13072


Ignore:
Timestamp:
08/31/12 00:38:54 (8 years ago)
Author:
andrew.mathas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13072 – Description

    v17 v18  
    4444    1. A=sage.combinat.partition.number_of_partitions() is marked for deprecation in favour of B=sage.combinat.partitions.number_of_partitions(), which is what function A() calls most of the time. As agreed above, number_of_partitions() will stay in the global name space, but this made the deprecation somewhat fiddly as I did not want to deprecate number_of_partitions() for "normal use" because from the user perspective this function will not change. Instead, I have deprecated the individual options of number_of_partitions() so deprecation warnings are only generated when A() does NOT call B(). In the global namespace, number_of_partitions still points to A(). When the functions which are marked for deprecation below are removed, number_of_partitions() should be changed to point to B() and A() should be changed into a deprecated_function_alias to B(). See the patch for more details.
    4545
    46     2. For use in Partitions().random_element() the function number_of_partitions() was cached. This cached function was almost never used so, assuming that caching this function is a good idea, I decided to cache sage.combinat.partitions.number_of_partitions() always. Please let me know if this is a bad idea. ''In fact, this leads to a dramatic speed-up. See the timings below''.
     46    2. For use in Partitions().random_element() the function number_of_partitions() was cached. This cached function was almost never used so, assuming that caching this function is a good idea, I decided to cache sage.combinat.partitions.number_of_partitions() always. Please let me know if this is a bad idea. ''In fact, this leads to a dramatic speed-up. See the timings below'' --- although, this should be looked at again when Fredrik Johansson's patch #13199, which uses FLINT to implement a faster version of number_of_partitions, is merged into sage.
    4747
    4848    3. The two functions
     
    5656        * partitions_restricted
    5757        * number_of_partitions_restricted
    58     RestrictedPartitions was also slated for removal but it was decided not to deprecate this class until Partitions() is able to process the appropriate combinations of keyword agruments. See #12278 for more details.
    5958
    60     5. The following functions now give deprecation warnings and are marked for removal from the global name space:
     59    5. For the reasons given in #5478, RestrictedPartitions was also slated for removal but it was decided not to deprecate this class until Partitions() is able to process the appropriate combinations of keyword arguments. See #12278 and the comment by John Palmieri below for more details. Nicolas has suggested that one way of addressing this may be to refactor the partitions code so that it uses Florent's enumerated sets factories #10194.
     60
     61    6. The following functions now give deprecation warnings and they are marked for removal from the global name space:
    6162        * partitions_set
    6263        * number_of_partitions_set