-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
bug in Partitions #6538
Comments
comment:2
Fixed by making changes to IntergerListLex and not increasing algorithm's complexity. Fixed some other bugs in IntegerListLex and Partitions when bad input is given. Note: most of the work on this patch was done during Sage Days 38. |
Changed keywords from partitions to partitions, days38 |
Author: Travis Scrimshaw |
comment:3
The code you've written looks good. I think you should also add a few doctests in EXAMPLES or TESTS where appropriate to demonstrate that the issue in this ticket it resolved. |
Work Issues: add doctests |
Reviewer: Benjamin Jones |
comment:4
Doctests have been added. Thanks for reviewing. |
Changed work issues from add doctests to none |
comment:5
Changes look good and thanks for adding the doctests. You done some nice code cleanup too, which is great. Positive review pending |
Dependencies: #12925 |
comment:7
It fails a doctest:
It also fails a test added by #12925:
|
comment:10
Replying to @jdemeyer:
Have you read the text just above that doctest? It is precisely documenting this bug. So, I am glad that you fixed that bug, but this ticket #6538 is responsible for updating the tutorial accordingly. Please merge back #12925! It's been delayed long enough. |
comment:11
Replying to @nthiery:
Tutorial updated accordingly. |
comment:12
Thanks! I am fine with this change. Still, I am pretty sure that the underlying engine is still broken; if you can come up with an example illustrating that, please add it there! Thanks, |
comment:13
Nicolas: it's not clear whether your comment should be interpreted as positive_review or needs_work? Could you change the ticket status to either of these two? |
comment:14
Replying to @jdemeyer:
Sorry if I was unclear. Travis: I leave that decision to you. If you have an example, please add it. Otherwise you can put a positive review under hand. Cheers, |
comment:15
I can't find an example right now. I've tried with max_slope, min_slope, inner, outer, max_length, min_length, and multiple combinations of them and could not get any wrong results. |
Attachment: trac_6538-partitions_max_slope-ts.patch.gz Rebased to sage-5.3.beta1 |
Merged: sage-5.3.beta2 |
comment:17
If you're still looking for something that gives the wrong answer, use
Another ticket? Edit: I guess this is #12278.) |
comment:18
Replying to @jhpalmieri:
Yup: I copy pasted this example as a comment in #12278! However, I was looking for an example giving wrong results while only using the IntegerListsLex engine (i.e. without parts_in). Thanks though :-) |
Looks like there is a bug in Partitions. Partitions(n, max_slope=-1) should give the partitions of n with distinct parts, right?
But if you add the "length" keyword, it doesn't work anymore, at least not completely:
Depends on #12925
CC: @sagetrac-brunellus
Component: combinatorics
Keywords: partitions, days38
Author: Travis Scrimshaw
Reviewer: Benjamin Jones
Merged: sage-5.3.beta2
Issue created by migration from https://trac.sagemath.org/ticket/6538
The text was updated successfully, but these errors were encountered: