Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iteratorify some tableaux #3887

Merged
merged 4 commits into from
Jul 3, 2024
Merged

Conversation

joschmitt
Copy link
Member

Turn semistandard_tableaux(shape) and standard_tableaux into an actual iterator internally.
Also adds tests/fixes for different Integer types. ZZRingElem doesn't work in general because the entries are often used as indices.

The only function left, which still first fills an array internally and then iterates the entries, is semistandard_tableaux(shape, weight).
This function is unfortunately implemented recursively, so it would need to be reimplemented completely. There is no reference for the used algorithm given; I assume it was implemented by a Bachelor's student in JuLie originally. @ulthiel Is there a reference for this algorithm?

Copy link

codecov bot commented Jun 25, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 8 lines in your changes missing coverage. Please review.

Project coverage is 83.87%. Comparing base (5acca40) to head (d177f19).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3887   +/-   ##
=======================================
  Coverage   83.87%   83.87%           
=======================================
  Files         589      589           
  Lines       80864    80940   +76     
=======================================
+ Hits        67823    67892   +69     
- Misses      13041    13048    +7     
Files Coverage Δ
...rc/Combinatorics/EnumerativeCombinatorics/types.jl 100.00% <100.00%> (ø)
...Combinatorics/EnumerativeCombinatorics/tableaux.jl 96.31% <94.90%> (-1.03%) ⬇️

@JohnAAbbott
Copy link
Contributor

The doc for YTs mentions that the tableaux entries are "usually" (positive) integers in the range 1..n where n is the number of cells in the YT. This suggests two possible modifications to the UI:

  1. make the constructor for a YT accept only integers in the range 1..n; offer a boolean kwarg which allows positive entries from a wider range -- I have asked a few people, and no-one seemed ever to have seen non-positive entries in a YT
  2. insist that entries are of type Int: in ptic, disallow ZZRingElem; allowing Int8 or other "small machine integer types" seems to bring no benefit, now that iterator are genuine iterators (previously Int8 brought a minor advantage because less memory was needed for storing the full list)

What do you think about these suggestions?

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@joschmitt joschmitt merged commit 21e4cc7 into oscar-system:master Jul 3, 2024
29 checks passed
@joschmitt
Copy link
Member Author

I copied the open questions to #3850.

@joschmitt joschmitt deleted the js/iteratorify branch July 3, 2024 12:02
simonbrandhorst pushed a commit that referenced this pull request Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants