Fermat
Public Methods | Public Members | List of all members
cugar::LHSampler Struct Reference

Detailed description

Latin-Hypercube Sampler

#include <latin_hypercube.h>

Public Methods

 LHSampler (const uint32 seed=0)
 
template<typename T , uint32 DIM>
void sample (const uint32 n_samples, Vector< T, DIM > *samples)
 
template<bool SOA, typename T >
void sample (const uint32 n_samples, const uint32 n_dims, T *samples)
 

Public Members

Random m_random
 

Constructor & Destructor Documentation

◆ LHSampler()

cugar::LHSampler::LHSampler ( const uint32  seed = 0)
inline

constructor

Member Function Documentation

◆ sample() [1/2]

template<typename T , uint32 DIM>
void cugar::LHSampler::sample ( const uint32  n_samples,
Vector< T, DIM > *  samples 
)

get a set of stratified samples

◆ sample() [2/2]

template<bool SOA, typename T>
void cugar::LHSampler::sample ( const uint32  n_samples,
const uint32  n_dims,
T *  samples 
)

get a set of stratified d-dimensional samples the output vectors can be stored either in AOS or SOA layout, if the latter, the j-th coordinate of the i-th point is stored in samples[i + j * n_samples]


The documentation for this struct was generated from the following files: