This repository was archived by the owner on Nov 21, 2025. It is now read-only.
Open
Conversation
this prevents crashes when using a non-existing file name
There is no value in a column which has more items then ordered. Limit count per length to order number. This might also not be very helpful, but more then a useless column, especially when low order counts are used. Also use integer as data type to make clear we deal with counts.
Also when generating columns do not exceed the order count as such columns bring no value. Use the double bounded type with a lower bount of 0 and upper bound of order count.
In practice column counts with a fractal part are not very useful. Use the MIP solver to solve forr integer column counts.
The last generated column has been computed but then ignored. Since we seem to be a bit low on columns in practice anyway make use of this last column as well.
The best_patterns is only an array of arrays and hence does not need that much memory. Overestimate the size by assuming we have no duplicate columns and allocate memory only once. This makes the code more readable and probably faster too (since reallocating takes time too).
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes issue #1 as well as some other issues I came across.