LLVM: llvm::ReservoirSampler< T, GenT > Class Template Reference (original) (raw)

Randomly selects an item by sampling into a set with an unknown number of elements, which may each be weighted to be more likely choices. More...

#include "[llvm/FuzzMutate/Random.h](Random%5F8h%5Fsource.html)"

Public Member Functions
ReservoirSampler (GenT &RandGen)
uint64_t totalWeight () const
bool isEmpty () const
const T & getSelection () const
operator bool () const
const T & operator* () const
template
ReservoirSampler & sample (RangeT &&Items)
Sample each item in Items with unit weight.
ReservoirSampler & sample (const T &Item, uint64_t Weight)
Sample a single item with the given weight.

template<typename T, typename GenT>
class llvm::ReservoirSampler< T, GenT >

Randomly selects an item by sampling into a set with an unknown number of elements, which may each be weighted to be more likely choices.

Definition at line 33 of file Random.h.

template<typename T, typename GenT>

getSelection()

template<typename T, typename GenT>

isEmpty()

template<typename T, typename GenT>

operator bool()

template<typename T, typename GenT>

operator*()

template<typename T, typename GenT>

sample() [1/2]

template<typename T, typename GenT>

sample() [2/2]

template<typename T, typename GenT>

template

totalWeight()

template<typename T, typename GenT>


The documentation for this class was generated from the following file: