KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
kjb::Gsl_Qrng_basic< KIND > Class Template Reference

Wrapper for one of GSL's quasi-random generators. More...

#include <gsl_qrng.h>

Public Member Functions

 Gsl_Qrng_basic (unsigned dimensions, const gsl_qrng_type *qtype, unsigned maxdim)
 ctor builds the quasi-random generator More...
 
 ~Gsl_Qrng_basic ()
 
void read (double *destination)
 The old-fashioned way to read a quasi-random sample. More...
 
Vector read ()
 Best way to read a single random sample of known dimensionality. More...
 
const char * name () const
 
unsigned get_dimensions () const
 
 Gsl_Qrng_basic (const Gsl_Qrng_basic< KIND > &that)
 copy ctor More...
 
void swap (Gsl_Qrng_basic< KIND > &that)
 swap two generators More...
 
Gsl_Qrng_basic< KIND > & operator= (const Gsl_Qrng_basic< KIND > &that)
 assignment operator More...
 

Detailed Description

template<unsigned KIND>
class kjb::Gsl_Qrng_basic< KIND >

Wrapper for one of GSL's quasi-random generators.

A quasi-random generator is deterministic, but it acts like a random number generator that gives you unnaturally "uniform" samples in D-dimensional space R(0,1)^D.

Warning
I recommend you use one of the type-specific classes instead of this basic one, such as Gsl_Qrng_Halton.

GSL is the GNU Scientific Library.

Constructor & Destructor Documentation

template<unsigned KIND>
kjb::Gsl_Qrng_basic< KIND >::Gsl_Qrng_basic ( unsigned  dimensions,
const gsl_qrng_type qtype,
unsigned  maxdim 
)
inline

ctor builds the quasi-random generator

Parameters
dimensionsNumber of dimensions the QRNG is asked to "sample"
Exceptions
KJB_errorif input is bad (dimensions is zero or too big) or cannot allocate memory.
template<unsigned KIND>
kjb::Gsl_Qrng_basic< KIND >::~Gsl_Qrng_basic ( )
inline
template<unsigned KIND>
kjb::Gsl_Qrng_basic< KIND >::Gsl_Qrng_basic ( const Gsl_Qrng_basic< KIND > &  that)
inline

copy ctor

Member Function Documentation

template<unsigned KIND>
unsigned kjb::Gsl_Qrng_basic< KIND >::get_dimensions ( ) const
inline
template<unsigned KIND>
const char* kjb::Gsl_Qrng_basic< KIND >::name ( ) const
inline
template<unsigned KIND>
Gsl_Qrng_basic< KIND >& kjb::Gsl_Qrng_basic< KIND >::operator= ( const Gsl_Qrng_basic< KIND > &  that)
inline

assignment operator

template<unsigned KIND>
void kjb::Gsl_Qrng_basic< KIND >::read ( double *  destination)
inline

The old-fashioned way to read a quasi-random sample.

Parameters
[in]destinationmust be an array of size at least that of the QRNG's dimensionality.
Exceptions
KJB_errorif something goes wrong
template<unsigned KIND>
Vector kjb::Gsl_Qrng_basic< KIND >::read ( )
inline

Best way to read a single random sample of known dimensionality.

template<unsigned KIND>
void kjb::Gsl_Qrng_basic< KIND >::swap ( Gsl_Qrng_basic< KIND > &  that)
inline

swap two generators


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