Stores samples (images or pixel instances), if max size is reached, a sample replaces another chosen at random. More...
#include <random_tree.h>
Public Member Functions | |
ReservoirSampler (size_t samples) | |
create a ReservoirSampler object with the given reservoir size | |
void | sample (Sampler &sampler, const T &sample) |
add the given sample to the reservoir or replace another if max size was reached | |
const std::vector< T > & | getReservoir () const |
Stores samples (images or pixel instances), if max size is reached, a sample replaces another chosen at random.
Definition at line 1042 of file random_tree.h.
|
inline |
Definition at line 1086 of file random_tree.h.