Support a mask2k file to prioritize sections VERSION 2 #10
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 is a minor rewrite of @octylFractal's #3.
The most significant change is to the algorithm which decides which pixel to draw from a list of buckets. Where octyl's method groups pixels into buckets, selects a bucket using a weighted random, and then selects a pixel from that bucket at a uniform random, the revised algorithm creates a virtual pool of 150 pixels pulled from the highest priority buckets, and then selects evenly from that pool.
This strategy further reduces the chance of a collision and also provides a single number that can be used to balance strength of prioritization against collision resistance.
This also patches most of the nits that were brought up in the original pull request.
I've done my best to review the code on my own, and am running + observing it in testing, but code review is still strongly requested, if possible.
Thanks for any feedback <3