Sampler Quad Optimized LDS OBCI24
A base 3 Sobol’-based sampler that provides optimized table for quadruplet of consecutive dimensions. Samples are scrambled using Owen scrambling at depth log(N). This sampler only works if N is a power of 3.
Files
src/samplers/QuadOptimizedLDS.cpp
include/utk/samplers/QuadOptimizedLDS.hpp
Usage
Sobol sampler
Usage: ./QuadOptimizedLDS [OPTIONS]
Options:
-h,--help Print this help message and exit
-n UINT REQUIRED Number of points
-d UINT REQUIRED Dimensions
-s,--seed UINT Seed (unspecified means 'random')
--table TEXT Init file (Joe&Kuo format). If not specified the [VO24] table is used
#include <utk/utils/PointsetIO.hpp>
#include <utk/utils/Pointset.hpp>
#include <utk/samplers/SamplerQuadOptimized.hpp>
int main()
{
utk::Pointset<double> pts;
// If needed, can add template to use 64bits integers
utk::QuadOptimized sobol(2 /* dimension */);
sobol.setRandomSeed(args->seed);
// Check for no errors
if (sobol.generateSamples(pts, 1024 /* Number of points */))
{
write_text_pointset("sobol2d.dat", pts);
}
}
import pyutk
# Only 32 bits integers supported
sobol = pyutk.QuadOptimizedLDS(d=2)
samples = sobol.sample(2187) # This is a numpy array !
Results
License
See Licence.md file.