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

Detailed description

template<typename Generator, typename Distribution>
struct cugar::Transform_generator< Generator, Distribution >

Wrapper class to transform a random number generator with a given distribution

#include <distributions.h>

Public Methods

CUGAR_HOST_DEVICE Transform_generator (Generator &gen, const Distribution &dist)
 
CUGAR_HOST_DEVICE float next () const
 
CUGAR_HOST_DEVICE float density (const float x) const
 

Public Members

Generator & m_gen
 
Distribution m_dist
 

Constructor & Destructor Documentation

◆ Transform_generator()

template<typename Generator , typename Distribution >
CUGAR_HOST_DEVICE cugar::Transform_generator< Generator, Distribution >::Transform_generator ( Generator &  gen,
const Distribution &  dist 
)
inline

constructor

Parameters
gengenerator to wrap
disttransforming distribution

Member Function Documentation

◆ density()

template<typename Generator , typename Distribution >
CUGAR_HOST_DEVICE float cugar::Transform_generator< Generator, Distribution >::density ( const float  x) const
inline

probability density function

Parameters
xsample location

◆ next()

template<typename Generator , typename Distribution >
CUGAR_HOST_DEVICE float cugar::Transform_generator< Generator, Distribution >::next ( ) const
inline

return the next number in the sequence


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