#6484: sage.combinat.ranker improvements
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:  nthiery
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorics      |   Resolution:
       Keywords:  rank, unrank       |    Merged in:
        Authors:  nthiery            |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/nthiery/sage_combinat_ranker_improvements|  
32d5cea664e153895d663b5913e45d03b8c0a305
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Old description:

> sage.combinat.ranker needs improvements:
>  -  With:
>     {{{
>     sage: f = sage.combinat.ranker.rank_from_list([...])
>     }}}
>
>     f uses ``list.index``, and is therefore `O(n)`. This should be made
> `O(1)` with a hash table.
>
> Further potential improvement (for a later ticket?):
>
> - make the rank / unrank objects produced by this library picklable.

New description:

 sage.combinat.ranker needs improvements:
  -  With:
     {{{
     sage: f = sage.combinat.ranker.rank_from_list([...])
     }}}

     f uses `list.index`, and is therefore `O(n)`. This should be made
 `O(1)` with a hash table.

 Further potential improvement (for a later ticket?):

 - make the rank / unrank objects produced by this library picklable.

--

Comment (by nthiery):

 Should we worry about backward compatibility and revert to l.index if any
 of the object is not hashable?

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

Reply via email to