[][src]Module rand::distributions::weighted::alias_method

This module contains an implementation of alias method for sampling random indices with probabilities proportional to a collection of weights.

Structs

WeightedIndex

A distribution using weighted sampling to pick a discretely selected item.

Traits

Weight

Trait that must be implemented for weights, that are used with WeightedIndex. Currently no guarantees on the correctness of WeightedIndex are given for custom implementations of this trait.