Opened 3 years ago

Closed 3 years ago

#27082 closed enhancement (fixed)

turn lrskew into an iterator

Reported by: chapoton Owned by:
Priority: major Milestone: sage-8.7
Component: combinatorics Keywords:
Cc: tscrim Merged in:
Authors: Frédéric Chapoton Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 3c5c89f (Commits, GitHub, GitLab) Commit: 3c5c89f30348cec6f4cb85e4f1f91f95fbeb6c25
Dependencies: Stopgaps:

Status badges

Description

as suggested in the code itself

Change History (8)

comment:1 Changed 3 years ago by chapoton

  • Branch set to u/chapoton/27082
  • Commit set to 5e9d9e52a7ce2aae4e47e937d9c447febbb7a408
  • Status changed from new to needs_review

New commits:

5e9d9e5turn lrskew into an iterator (as promised long ago)

comment:2 Changed 3 years ago by git

  • Commit changed from 5e9d9e52a7ce2aae4e47e937d9c447febbb7a408 to 4dd69b1d1f9ba2d0f977fe230f0303c064f0ff1e

Branch pushed to git repo; I updated commit sha1. New commits:

4dd69b1fixing the doc of lrskew, plus a few more changes in lrcalc

comment:3 Changed 3 years ago by git

  • Commit changed from 4dd69b1d1f9ba2d0f977fe230f0303c064f0ff1e to 09995adc8b8a3fd08280a3f1a8b9334af49eef7b

Branch pushed to git repo; I updated commit sha1. New commits:

09995addetail

comment:4 Changed 3 years ago by chapoton

  • Cc tscrim added

green bot, please review

comment:5 Changed 3 years ago by tscrim

A while-we-are-at-it thing, to improve the speed a bit: I would change

    r = skewtab_to_SkewTableau(st)
    if weight is None or r.weight() == _Partitions(weight):
        yield r
    while st_next(st):
        r = skewtab_to_SkewTableau(st)
        if weight is None or r.weight() == _Partitions(weight):
            yield skewtab_to_SkewTableau(st)

to

    if weight is None:
        yield skewtab_to_SkewTableau(st)
        while st_next(st):
        r = skewtab_to_SkewTableau(st)
        if weight is None or r.weight() == _Partitions(weight):
            yield skewtab_to_SkewTableau(st)
    else:
        wt = _Partitions(weight)
        r = skewtab_to_SkewTableau(st)
        if r.weight() == wt:
            yield r
        while st_next(st):
            r = skewtab_to_SkewTableau(st)
            if r.weight() == wt:
                yield r

LGTM otherwise.

comment:6 Changed 3 years ago by git

  • Commit changed from 09995adc8b8a3fd08280a3f1a8b9334af49eef7b to 3c5c89f30348cec6f4cb85e4f1f91f95fbeb6c25

Branch pushed to git repo; I updated commit sha1. New commits:

3c5c89freviewer suggestions

comment:7 Changed 3 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Thank you. LGTM.

comment:8 Changed 3 years ago by vbraun

  • Branch changed from u/chapoton/27082 to 3c5c89f30348cec6f4cb85e4f1f91f95fbeb6c25
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.