Fermat
Public Methods | Public Members | List of all members
cugar::CP_rotator< Generator, Iterator > Struct Template Reference

Detailed description

template<typename Generator, typename Iterator = const float*>
struct cugar::CP_rotator< Generator, Iterator >

Wrapper class to rotate the samples coming from a generator with a set of Cranley-Patterson rotations.

Given a point-set P = {p_i}_{ i = 1,...,n } in[0, 1]^d, a CP rotation is the application of a constant shift s to all points, modulo 1: CP(P, s) = { p_i + s | mod 1 }.

R.Cranley and T.Patterson.Randomization of number theoretic methods for multiple integration.SIAM Journal on Numerical Analysis, 13 : 904–914, 1976. 3

#include <cp_rotations.h>

Public Methods

CUGAR_HOST_DEVICE CP_rotator (Generator &gen, Iterator rot, uint32 size, uint32 dim=0)
 
CUGAR_HOST_DEVICE float next ()
 
CUGAR_HOST_DEVICE float density (const float x) const
 

Public Members

Generator & m_gen
 
Iterator m_rot
 
uint32 m_size
 
uint32 m_dim
 

Constructor & Destructor Documentation

◆ CP_rotator()

template<typename Generator , typename Iterator = const float*>
CUGAR_HOST_DEVICE cugar::CP_rotator< Generator, Iterator >::CP_rotator ( Generator &  gen,
Iterator  rot,
uint32  size,
uint32  dim = 0 
)
inline

constructor

Parameters
gengenerator
rotsequence of rotations
sizenumber of rotations
diminitial dimension

Member Function Documentation

◆ density()

template<typename Generator , typename Iterator = const float*>
CUGAR_HOST_DEVICE float cugar::CP_rotator< Generator, Iterator >::density ( const float  x) const
inline

probability density function

Parameters
xsample location

◆ next()

template<typename Generator , typename Iterator = const float*>
CUGAR_HOST_DEVICE float cugar::CP_rotator< Generator, Iterator >::next ( )
inline

get the next sample


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