Fermat
Public Methods | List of all members
cugar::Weyl_sampler Class Reference

Detailed description

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 ()
 

Constructor & Destructor Documentation

◆ Weyl_sampler() [1/2]

CUGAR_HOST_DEVICE CUGAR_FORCEINLINE cugar::Weyl_sampler::Weyl_sampler ( )
inline

empty constructor

◆ Weyl_sampler() [2/2]

CUGAR_HOST_DEVICE CUGAR_FORCEINLINE cugar::Weyl_sampler::Weyl_sampler ( unsigned int  instance,
unsigned int  seed = 1 
)
inline

constructor

Parameters
instanceinstance number
seedrandomization seed

Member Function Documentation

◆ next()

CUGAR_HOST_DEVICE CUGAR_FORCEINLINE float cugar::Weyl_sampler::next ( )
inline

return next sample (iterating over dimensions)

◆ sample()

CUGAR_HOST_DEVICE CUGAR_FORCEINLINE float cugar::Weyl_sampler::sample ( )
inline

return next sample (iterating over dimensions)


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