-
-
Notifications
You must be signed in to change notification settings - Fork 649
add add_entry and anti_restrict methods to SkewTableau #39918
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/sage/combinat/tableau.py:3193
- The new condition in add_entry adds a constraint that may unintentionally block valid cells in edge cases. Please verify that this additional check correctly handles all tableau shapes and add a comment explaining its intent.
if c == len(tab_r) and (r == 0 or len(tab_r) < len(tab[r-1])):
if r == len(tab) and c == 0: | ||
tab.append([m]) | ||
else: | ||
raise IndexError('%s is not an addable cell of the tableau' % ((r, c),)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe check here for bottom left cell None
(per our in-person conversation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ended up being not too bad to implement in full generality (instead of raising a NotImplementedError like we previously discussed).
…ing new skewtableau
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jmcdonough98 as long as your tests pass locally, you can set to positive review |
@trevorkarn all tests pass on my machine, but github is not letting me change PR labels. I think I don't have permission. |
merge conflict, please fix |
Thanks @vbraun. @jmcdonough98 Do you need help with this? |
sagemathgh-39918: add add_entry and anti_restrict methods to SkewTableau <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> `add_entry` and `anti_restrict` are already existing methods in `Tableau`, but they also make sense for `SkewTableau`. This PR ports these methods to `SkewTableau`, and adds a simple check to `add_entry` to avoid trying to construct a new tableau when the given cell is too large. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies None <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39918 Reported by: Joe McDonough Reviewer(s): Copilot, Joe McDonough, trevorkarn
sagemathgh-39918: add add_entry and anti_restrict methods to SkewTableau <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> `add_entry` and `anti_restrict` are already existing methods in `Tableau`, but they also make sense for `SkewTableau`. This PR ports these methods to `SkewTableau`, and adds a simple check to `add_entry` to avoid trying to construct a new tableau when the given cell is too large. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies None <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39918 Reported by: Joe McDonough Reviewer(s): Copilot, Joe McDonough, trevorkarn
sagemathgh-39918: add add_entry and anti_restrict methods to SkewTableau <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> `add_entry` and `anti_restrict` are already existing methods in `Tableau`, but they also make sense for `SkewTableau`. This PR ports these methods to `SkewTableau`, and adds a simple check to `add_entry` to avoid trying to construct a new tableau when the given cell is too large. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies None <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39918 Reported by: Joe McDonough Reviewer(s): Copilot, Joe McDonough, trevorkarn
add_entry
andanti_restrict
are already existing methods inTableau
, but they also make sense forSkewTableau
.This PR ports these methods to
SkewTableau
, and adds a simple check toadd_entry
to avoid trying to construct a new tableau when the given cell is too large.📝 Checklist
⌛ Dependencies
None