This can more easily embedded within any other type, than the WeightedChoice type.
https://github.com/mneumann/graph-annealing/blob/master/src/owned_weighted_choice.rs
Or, maybe better would be to add code to reuse some code of weighted_choice?