curfil  ..
 All Classes Functions Variables Typedefs Friends Groups Pages
Public Member Functions | List of all members
curfil::ReservoirSampler< T > Class Template Reference

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

Detailed Description

template<class T>
class curfil::ReservoirSampler< T >

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.

Member Function Documentation

template<class T >
const std::vector<T>& curfil::ReservoirSampler< T >::getReservoir ( ) const
inline
Returns
the reservoir of samples

Definition at line 1086 of file random_tree.h.


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