Opened 10 years ago
Last modified 7 years ago
#13236 needs_work enhancement
Elements of a specific rank of a ranked poset
Reported by: | numata | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | combinatorics | Keywords: | poset, combinatorics, sd40 |
Cc: | sage-combinat | Merged in: | |
Authors: | NUMATA, Yasuhide | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
For a ranked poset P and its rank function r. Implement the following:
- method which returns iterator of elements p in P such that r(p)=k.
- method which returns the list of elements p in P such that r(p)=k.
(Temporary names of them are elements_of_the_rank_iterator and elements_of_the_rank)
Attachments (1)
Change History (10)
comment:1 Changed 10 years ago by
Changed 10 years ago by
comment:2 Changed 10 years ago by
- Description modified (diff)
- Status changed from new to needs_review
comment:3 Changed 10 years ago by
- Component changed from PLEASE CHANGE to combinatorics
comment:4 Changed 9 years ago by
You have "rertuns" in the doc strings (twice).
Examples should be preceded by "EXAMPLES::" (all caps) not "Examples::"
You introduce some lines which have only blank spaces in them. It is preferable not to do this --- a blank line should consist only of a return character. (There are places where this convention is not adhered to in current Sage code. Don't try to fix this in old code, as it is likely to lead to conflicts with other patches, but it's good practice to follow this convention when writing new code.)
At the moment, is_ranked is implemented by calling rank_function and checking whether the result in "None". In order to avoid calling this method twice, it would probably be better to define r as you do, then check whether or not it is None yourself.
comment:5 Changed 9 years ago by
- Status changed from needs_review to needs_work
comment:6 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:7 Changed 8 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:8 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:9 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
For whatever it's worth: you might want to use sage.misc.misc.fibers (in the Sage-Combinat queue), applied to the rank function, for a quick implementation.