Crate weighted_list

Crate weighted_list 

Source
Expand description

A list implementation for weighted randomisation.

See WeightedList for more.

Macros§

wit
Construct a WeightedItem from a `(weight, value)`` pair.
wlist
Construct a WeightedList from the provided `(weight, value)`` pairs.

Structs§

WeightedItem
An item in a WeightedList, with a value of type V and a weight of numerical type W.
WeightedList
A homogeneous list of weighted items with values of type V and weights of numerical type W.