You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that integer_partitions is still implemented, but now just collects partitions(n::Int). However, this implementation now returns the partitions in reverse order as before, so this would be a breaking change! Probably best to just remove integer_partitions
Also, partitions(0) now correctly returns the set containing the empty set and is the same as what's returned by integer_partitions(0), which was not the case before.
@mschauer sorry this was lost in my github notifications. To answer your question, I don't know how to make it non-breaking. Not sure why integer_partitions was ever implemented in the first place, let alone to have a completely different behaviour than partitions(n::Int) (referring to the reversed order, not the iterator vs array).
So, seems to me this should be a breaking change to remove the integer_partitions. I am not familiar with the preferred procedure for this, but we could give it a deprecation notice and also have it call collect(reverse(partitions(n::Int))) in the back-end?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This would close #79 #80 and #81.
Solution is due to @simonschoelly.
Note that
integer_partitionsis still implemented, but now justcollectspartitions(n::Int). However, this implementation now returns the partitions in reverse order as before, so this would be a breaking change! Probably best to just removeinteger_partitionsAlso,
partitions(0)now correctly returns the set containing the empty set and is the same as what's returned byinteger_partitions(0), which was not the case before.