-
Notifications
You must be signed in to change notification settings - Fork 309
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
combinations: count
and size_hint
#729
Merged
phimuemue
merged 14 commits into
rust-itertools:master
from
Philippe-Cholet:count_combinations
Aug 18, 2023
Merged
combinations: count
and size_hint
#729
phimuemue
merged 14 commits into
rust-itertools:master
from
Philippe-Cholet:count_combinations
Aug 18, 2023
Commits on Aug 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 80a22ac - Browse repository at this point
Copy the full SHA 80a22acView commit details -
See the end of this: https://en.wikipedia.org/wiki/Binomial_coefficient#In_programming_languages
Configuration menu - View commit details
-
Copy full SHA for d9f20e9 - Browse repository at this point
Copy the full SHA d9f20e9View commit details -
Remaining combinations for an unknown
n
Because we give combinations in the lexicographic order, we can use the indices to count the remaining combinations to come. We are gonna heavily test it thought.
Configuration menu - View commit details
-
Copy full SHA for bd0b080 - Browse repository at this point
Copy the full SHA bd0b080View commit details -
The whole point of the lazy buffer is to not fill the pool all at once but in some cases we want to, and then it's better than do it with `while lazy_buffer.get_next() {}` that would be weird.
Configuration menu - View commit details
-
Copy full SHA for 76efb25 - Browse repository at this point
Copy the full SHA 76efb25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85c7980 - Browse repository at this point
Copy the full SHA 85c7980View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed998ba - Browse repository at this point
Copy the full SHA ed998baView commit details -
Remove
LazyBuffer::fill
, count instead`pool.it.count()` consumes `pool` before we call `remaining_for` so it can not be a method and therefore becomes a free function.
Configuration menu - View commit details
-
Copy full SHA for 2ab0ff1 - Browse repository at this point
Copy the full SHA 2ab0ff1View commit details
Commits on Aug 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1f48da7 - Browse repository at this point
Copy the full SHA 1f48da7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95c3e27 - Browse repository at this point
Copy the full SHA 95c3e27View commit details -
Configuration menu - View commit details
-
Copy full SHA for da190e3 - Browse repository at this point
Copy the full SHA da190e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for baf6708 - Browse repository at this point
Copy the full SHA baf6708View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8d4d61 - Browse repository at this point
Copy the full SHA d8d4d61View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfb2ec9 - Browse repository at this point
Copy the full SHA cfb2ec9View commit details -
Only test for `n <= 500` but only a few values of the last row do not already have overflow on a 64 bits computer. NOTE: Not faster with an array updated in-place.
Configuration menu - View commit details
-
Copy full SHA for 65e08d4 - Browse repository at this point
Copy the full SHA 65e08d4View commit details
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.