Make Make ZipfDistribution generic over T and impl Distribution<T>#6
Make Make ZipfDistribution generic over T and impl Distribution<T>#6vtta wants to merge 2 commits intojonhoo:mainfrom
ZipfDistribution generic over T and impl Distribution<T>#6Conversation
Codecov ReportBase: 89.04% // Head: 56.94% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #6 +/- ##
===========================================
- Coverage 89.04% 56.94% -32.10%
===========================================
Files 1 1
Lines 73 72 -1
===========================================
- Hits 65 41 -24
- Misses 8 31 +23
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Thank you for taking the time to write up a PR! I'd actually prefer to do this without bringing in Separately, I actually don't know if this algorithm is actually reasonable to use for generating non-integers. I forget what the original paper stipulated, but I think it was just intended for integer values. Worth double-checking. Also, using this to generate, say, |
Previously
ZipfDistributiononly generate values ofusize. This patch introduce a generic type parameterTto allowZipfDistributiongenerating any primitive type value.This patch makes this crate more helpful.