So all the methods on Gen currently expose uniform distributions. However, log-normal (or other similar) distributions can be more representative of real-world data. In particular, it can be useful to generate data that has lots of smaller values and a few big ones, which log-normal distributions naturally are.
rand already has log-normal distributions implemented, so it should just be a matter of setting up a reasonable value based on size and calling it.
People can do this by hand already, I guess, but I think it would still be useful to have.
I doubt very much that I will ever have the bandwidth to design or review or maintain something like this. I'd recommend trying to figure out how to do this in a separate crate.
So all the methods on
Gen
currently expose uniform distributions. However, log-normal (or other similar) distributions can be more representative of real-world data. In particular, it can be useful to generate data that has lots of smaller values and a few big ones, which log-normal distributions naturally are.rand
already has log-normal distributions implemented, so it should just be a matter of setting up a reasonable value based onsize
and calling it.People can do this by hand already, I guess, but I think it would still be useful to have.