#17191: Poset: change rank dict to rank array
-------------------------+-------------------------------------------------
Reporter: | Owner:
jmantysalo | Status: positive_review
Type: | Milestone: sage-6.4
enhancement | Resolution:
Priority: minor | Merged in:
Component: | Reviewers: Jori Mäntysalo
combinatorics | Work issues:
Keywords: | Commit:
Authors: | 45fc474b60ea8de4d76f4aa98c64b9b2765743fe
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/17191 |
Dependencies: |
-------------------------+-------------------------------------------------
Changes (by jmantysalo):
* status: needs_review => positive_review
* milestone: sage-wishlist => sage-6.4
Comment:
Replying to [comment:4 ncohen]:
> > {{{
> > return [rank_fcn[i] for i in range(self.order())]
> > }}}
> >
> > seems strange --- isn't that just same as `return rank_fcn` or `return
copy(rank_fcn)`? Or maybe I didn't understand this.
>
> Because `rank_fcn` is a dictionary, not a list, and because it should be
a dictionary in this function (because of lines like 'if x in rank_fcn').
Ah, true. This could also start with `rank_fcn=[None]*self.order()`
instead of `rank_fcn={}`, but the current code seems to be cleaner.
I think this is ready for production, so I also changed milestone with
status.
--
Ticket URL: <http://trac.sagemath.org/ticket/17191#comment:7>
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.