As noted in the original PR and here, we're not entirely happy with the path/name of weighted index distributions:
use rand::distributions::weighted::WeightedIndex;
// or:
use rand::distributions::weighted::alias_method::WeightedIndex;
These paths are long, slightly repetitive ("weighted"), and one of the paths includes the algorithm name which we usually avoid. Also, Index is potentially unnecessary (this is designed for indexing weighted arrays, but is essentially just a biased finite integer distribution).
This needs review before 0.7.
As noted in the original PR and here, we're not entirely happy with the path/name of weighted index distributions:
These paths are long, slightly repetitive ("weighted"), and one of the paths includes the algorithm name which we usually avoid. Also,
Indexis potentially unnecessary (this is designed for indexing weighted arrays, but is essentially just a biased finite integer distribution).This needs review before 0.7.