Fermat
|
Weyl equidistributed sequence sampler class
Weyl's equidistribution theorem says that the sequence of all multiples of an irrational number r is equidistributed modulo 1. This sampler uses such a generator for each dimension of a multi-dimensional sequence, where r is varied for each dimension.
#include <weyl.h>
Public Methods | |
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE | Weyl_sampler () |
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE | Weyl_sampler (unsigned int instance, unsigned int seed=1) |
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE float | sample () |
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE float | next () |
|
inline |
empty constructor
|
inline |
constructor
instance | instance number |
seed | randomization seed |
|
inline |
return next sample (iterating over dimensions)
|
inline |
return next sample (iterating over dimensions)