A generic interface for selecting random elements from a collection, supporting both uniform and weighted selection.
Represents an object that has an associated weight used for weighted random selection.
A type alias for a function that computes the weight of an object for weighted random selection.