ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::rng Class Reference

Random number generator. More...

#include <rng.hpp>

Collaboration diagram for gsl::rng:
Collaboration graph

Public Types

typedef gsl_rng_type const * type
 Define gsl::rng::static type. More...
 

Public Member Functions

 rng ()
 The default constructor is only really useful for assigning to. More...
 
 rng (gsl_rng_type const *T)
 C++ version of gsl_rng_alloc(). More...
 
 rng (gsl_rng *v)
 Could construct from a gsl_rng. More...
 
 rng (rng const &v)
 The copy constructor. More...
 
rngoperator= (rng const &v)
 The assignment operator. More...
 
 ~rng ()
 The destructor only deletes the pointers if count reaches zero. More...
 
 rng (rng &&v)
 Move constructor. More...
 
rngoperator= (rng &&v)
 Move operator. More...
 
bool operator== (rng const &v) const
 Two rng are identically equal if their elements are identical. More...
 
bool operator!= (rng const &v) const
 Two rng are different equal if their elements are not identical. More...
 
bool operator< (rng const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator> (rng const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator<= (rng const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator>= (rng const &v) const
 A container needs to define an ordering for sorting. More...
 
bool empty () const
 Find if the rng is empty. More...
 
void swap (rng &v)
 Swap two rng. More...
 
gsl_rng * get () const
 Get the gsl_rng. More...
 
bool unique () const
 Find if this is the only object sharing the gsl_rng. More...
 
size_t use_count () const
 Find how many rng objects share this pointer. More...
 
 operator bool () const
 Allow conversion to bool. More...
 
int memcpy (rng const &src)
 C++ version of gsl_rng_memcpy(). More...
 
rng clone () const
 C++ version of gsl_rng_clone(). More...
 
void set (unsigned long int seed) const
 C++ version of gsl_rng_set(). More...
 
unsigned long int max () const
 C++ version of gsl_rng_max(). More...
 
unsigned long int min () const
 C++ version of gsl_rng_min(). More...
 
char const * name () const
 C++ version of gsl_rng_name(). More...
 
int fread (FILE *stream)
 C++ version of gsl_rng_fread(). More...
 
int fwrite (FILE *stream) const
 C++ version of gsl_rng_fwrite(). More...
 
size_t size () const
 C++ version of gsl_rng_size(). More...
 
void * state () const
 C++ version of gsl_rng_state(). More...
 
void print_state () const
 C++ version of gsl_rng_print_state(). More...
 
unsigned long int get_value () const
 C++ version of gsl_rng_get(). More...
 
double uniform () const
 C++ version of gsl_rng_uniform(). More...
 
double uniform_pos () const
 C++ version of gsl_rng_uniform_pos(). More...
 
unsigned long int uniform_int (unsigned long int n) const
 C++ version of gsl_rng_uniform_int(). More...
 

Static Public Member Functions

static type const borosh13 ()
 Random number static type. More...
 
static type const coveyou ()
 Random number static type. More...
 
static type const cmrg ()
 Random number static type. More...
 
static type const fishman18 ()
 Random number static type. More...
 
static type const fishman20 ()
 Random number static type. More...
 
static type const fishman2x ()
 Random number static type. More...
 
static type const gfsr4 ()
 Random number static type. More...
 
static type const knuthran ()
 Random number static type. More...
 
static type const knuthran2 ()
 Random number static type. More...
 
static type const knuthran2002 ()
 Random number static type. More...
 
static type const lecuyer21 ()
 Random number static type. More...
 
static type const minstd ()
 Random number static type. More...
 
static type const mrg ()
 Random number static type. More...
 
static type const mt19937 ()
 Random number static type. More...
 
static type const mt19937_1999 ()
 Random number static type. More...
 
static type const mt19937_1998 ()
 Random number static type. More...
 
static type const r250 ()
 Random number static type. More...
 
static type const ran0 ()
 Random number static type. More...
 
static type const ran1 ()
 Random number static type. More...
 
static type const ran2 ()
 Random number static type. More...
 
static type const ran3 ()
 Random number static type. More...
 
static type const rand ()
 Random number static type. More...
 
static type const rand48 ()
 Random number static type. More...
 
static type const random128_bsd ()
 Random number static type. More...
 
static type const random128_glibc2 ()
 Random number static type. More...
 
static type const random128_libc5 ()
 Random number static type. More...
 
static type const random256_bsd ()
 Random number static type. More...
 
static type const random256_glibc2 ()
 Random number static type. More...
 
static type const random256_libc5 ()
 Random number static type. More...
 
static type const random32_bsd ()
 Random number static type. More...
 
static type const random32_glibc2 ()
 Random number static type. More...
 
static type const random32_libc5 ()
 Random number static type. More...
 
static type const random64_bsd ()
 Random number static type. More...
 
static type const random64_glibc2 ()
 Random number static type. More...
 
static type const random64_libc5 ()
 Random number static type. More...
 
static type const random8_bsd ()
 Random number static type. More...
 
static type const random8_glibc2 ()
 Random number static type. More...
 
static type const random8_libc5 ()
 Random number static type. More...
 
static type const random_bsd ()
 Random number static type. More...
 
static type const random_glibc2 ()
 Random number static type. More...
 
static type const random_libc5 ()
 Random number static type. More...
 
static type const randu ()
 Random number static type. More...
 
static type const ranf ()
 Random number static type. More...
 
static type const ranlux ()
 Random number static type. More...
 
static type const ranlux389 ()
 Random number static type. More...
 
static type const ranlxd1 ()
 Random number static type. More...
 
static type const ranlxd2 ()
 Random number static type. More...
 
static type const ranlxs0 ()
 Random number static type. More...
 
static type const ranlxs1 ()
 Random number static type. More...
 
static type const ranlxs2 ()
 Random number static type. More...
 
static type const ranmar ()
 Random number static type. More...
 
static type const slatec ()
 Random number static type. More...
 
static type const taus ()
 Random number static type. More...
 
static type const taus2 ()
 Random number static type. More...
 
static type const taus113 ()
 Random number static type. More...
 
static type const transputer ()
 Random number static type. More...
 
static type const tt800 ()
 Random number static type. More...
 
static type const uni ()
 Random number static type. More...
 
static type const uni32 ()
 Random number static type. More...
 
static type const vax ()
 Random number static type. More...
 
static type const waterman14 ()
 Random number static type. More...
 
static type const zuf ()
 Random number static type. More...
 
static type const Default ()
 Random number static type. More...
 
static typetypes_setup ()
 C++ version of gsl_rng_types_setup(). More...
 
static type env_setup ()
 C++ version of gsl_rng_env_setup(). More...
 

Private Attributes

gsl_rng * ccgsl_pointer
 The shared pointer. More...
 
size_t * count
 The shared reference count. More...
 

Detailed Description

Random number generator.

Definition at line 31 of file rng.hpp.

Member Typedef Documentation

◆ type

typedef gsl_rng_type const* gsl::rng::type

Define gsl::rng::static type.

Definition at line 36 of file rng.hpp.

Constructor & Destructor Documentation

◆ rng() [1/5]

gsl::rng::rng ( )
inline

The default constructor is only really useful for assigning to.

Definition at line 356 of file rng.hpp.

References ccgsl_pointer, and count.

Referenced by clone(), and operator=().

◆ rng() [2/5]

gsl::rng::rng ( gsl_rng_type const *  T)
inlineexplicit

C++ version of gsl_rng_alloc().

Parameters
TA random number generator type.

Definition at line 365 of file rng.hpp.

References ccgsl_pointer, and count.

◆ rng() [3/5]

gsl::rng::rng ( gsl_rng *  v)
inlineexplicit

Could construct from a gsl_rng.

This is not usually a good idea. In this case you should not use gsl_rng() to deallocate the memory.

Parameters
vThe rng

Definition at line 380 of file rng.hpp.

References ccgsl_pointer, and count.

◆ rng() [4/5]

gsl::rng::rng ( rng const &  v)
inline

The copy constructor.

This creates a new reference to the rng.

Parameters
vThe rng to copy.

Definition at line 391 of file rng.hpp.

References ccgsl_pointer, and count.

◆ ~rng()

gsl::rng::~rng ( )
inline

The destructor only deletes the pointers if count reaches zero.

Definition at line 410 of file rng.hpp.

References ccgsl_pointer, and count.

◆ rng() [5/5]

gsl::rng::rng ( rng &&  v)
inline

Move constructor.

Parameters
vThe rng to move.

Definition at line 423 of file rng.hpp.

References count.

Member Function Documentation

◆ borosh13()

static type const gsl::rng::borosh13 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 41 of file rng.hpp.

◆ clone()

rng gsl::rng::clone ( ) const
inline

C++ version of gsl_rng_clone().

Returns
A cloned copy of this

Definition at line 562 of file rng.hpp.

References get(), and rng().

◆ cmrg()

static type const gsl::rng::cmrg ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 51 of file rng.hpp.

◆ coveyou()

static type const gsl::rng::coveyou ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 46 of file rng.hpp.

◆ Default()

static type const gsl::rng::Default ( )
inlinestatic

Random number static type.

This must be Default because default is reserved.

Returns
the named random number type

Definition at line 351 of file rng.hpp.

◆ empty()

bool gsl::rng::empty ( ) const
inline

Find if the rng is empty.

Returns
true if has size zero; otherwise false

Definition at line 499 of file rng.hpp.

References ccgsl_pointer.

◆ env_setup()

static type gsl::rng::env_setup ( )
inlinestatic

C++ version of gsl_rng_env_setup().

Returns
The default type for a rng

Definition at line 614 of file rng.hpp.

◆ fishman18()

static type const gsl::rng::fishman18 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 56 of file rng.hpp.

◆ fishman20()

static type const gsl::rng::fishman20 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 61 of file rng.hpp.

◆ fishman2x()

static type const gsl::rng::fishman2x ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 66 of file rng.hpp.

◆ fread()

int gsl::rng::fread ( FILE *  stream)
inline

C++ version of gsl_rng_fread().

Parameters
streamA C file stream
Returns
Error code on failure

Definition at line 589 of file rng.hpp.

References get().

◆ fwrite()

int gsl::rng::fwrite ( FILE *  stream) const
inline

C++ version of gsl_rng_fwrite().

Parameters
streamA C file stream
Returns
Error code on failure

Definition at line 595 of file rng.hpp.

References get().

◆ get()

gsl_rng * gsl::rng::get ( ) const
inline

Get the gsl_rng.

Returns
the gsl_rng

Definition at line 525 of file rng.hpp.

References ccgsl_pointer.

Referenced by gsl::ran::bernoulli(), gsl::ran::beta(), gsl::ran::binomial(), gsl::ran::binomial_knuth(), gsl::ran::binomial_tpe(), gsl::ran::cauchy(), gsl::ran::chisq(), gsl::ran::choose(), clone(), gsl::ran::dir_nd(), gsl::ran::dirichlet(), gsl::ran::discrete(), gsl::ran::erlang(), gsl::ran::exponential(), gsl::ran::exppow(), gsl::ran::fdist(), gsl::ran::flat(), fread(), fwrite(), gsl::ran::gamma(), gsl::ran::gamma_int(), gsl::ran::gamma_knuth(), gsl::ran::gamma_mt(), gsl::ran::gaussian(), gsl::ran::gaussian_ratio_method(), gsl::ran::gaussian_tail(), gsl::ran::gaussian_ziggurat(), gsl::ran::geometric(), get_value(), gsl::ran::gumbel1(), gsl::ran::gumbel2(), gsl::ran::hypergeometric(), gsl::monte::vegas::integrate(), gsl::monte::miser::integrate(), gsl::monte::plain::integrate(), gsl::ran::landau(), gsl::ran::laplace(), gsl::ran::levy(), gsl::ran::levy_skew(), gsl::ran::logarithmic(), gsl::ran::logistic(), gsl::ran::lognormal(), max(), memcpy(), min(), gsl::ran::multinomial(), name(), gsl::ran::negative_binomial(), gsl::ran::pareto(), gsl::ran::pascal(), gsl::ran::poisson(), gsl::ran::poisson_array(), print_state(), gsl::ran::rayleigh(), gsl::ran::rayleigh_tail(), gsl::ran::sample(), set(), gsl::ran::shuffle(), size(), state(), gsl::ran::tdist(), gsl::ran::ugaussian(), gsl::ran::ugaussian_ratio_method(), gsl::ran::ugaussian_tail(), uniform(), uniform_int(), uniform_pos(), and gsl::ran::weibull().

◆ get_value()

unsigned long int gsl::rng::get_value ( ) const
inline

C++ version of gsl_rng_get().

Returns
The integer value of this

Definition at line 619 of file rng.hpp.

References get().

◆ gfsr4()

static type const gsl::rng::gfsr4 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 71 of file rng.hpp.

◆ knuthran()

static type const gsl::rng::knuthran ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 76 of file rng.hpp.

◆ knuthran2()

static type const gsl::rng::knuthran2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 81 of file rng.hpp.

◆ knuthran2002()

static type const gsl::rng::knuthran2002 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 86 of file rng.hpp.

◆ lecuyer21()

static type const gsl::rng::lecuyer21 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 91 of file rng.hpp.

◆ max()

unsigned long int gsl::rng::max ( ) const
inline

C++ version of gsl_rng_max().

The random variate can take a number up to and including max.

Returns
The maximum integer value for this

Definition at line 573 of file rng.hpp.

References get().

◆ memcpy()

int gsl::rng::memcpy ( rng const &  src)
inline

C++ version of gsl_rng_memcpy().

Parameters
srcSource rng
Returns
Error code on failure

Definition at line 557 of file rng.hpp.

References get().

◆ min()

unsigned long int gsl::rng::min ( ) const
inline

C++ version of gsl_rng_min().

Returns
The maximum integer value for this

Definition at line 578 of file rng.hpp.

References get().

◆ minstd()

static type const gsl::rng::minstd ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 96 of file rng.hpp.

◆ mrg()

static type const gsl::rng::mrg ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 101 of file rng.hpp.

◆ mt19937()

static type const gsl::rng::mt19937 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 106 of file rng.hpp.

◆ mt19937_1998()

static type const gsl::rng::mt19937_1998 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 116 of file rng.hpp.

◆ mt19937_1999()

static type const gsl::rng::mt19937_1999 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 111 of file rng.hpp.

◆ name()

char const * gsl::rng::name ( ) const
inline

C++ version of gsl_rng_name().

Returns
The name of this

Definition at line 583 of file rng.hpp.

References get().

◆ operator bool()

gsl::rng::operator bool ( ) const
inlineexplicit

Allow conversion to bool.

Returns
true or false according as this contains a pointer to a gsl_rng

Definition at line 545 of file rng.hpp.

References ccgsl_pointer.

◆ operator!=()

bool gsl::rng::operator!= ( rng const &  v) const
inline

Two rng are different equal if their elements are not identical.

Parameters
vThe rng to be compared with this
Returns
false or true according as this and v have identical elements or not

Definition at line 452 of file rng.hpp.

References operator==().

◆ operator<()

bool gsl::rng::operator< ( rng const &  v) const
inline

A container needs to define an ordering for sorting.

This uses standard lexicographical ordering and so is not useful, for eaxmple, for checking, that a rng is nonnegative.

Parameters
vThe rng to be compared with this
Returns
false or true according as this is less than v lexicographically

Definition at line 464 of file rng.hpp.

References ccgsl_pointer.

◆ operator<=()

bool gsl::rng::operator<= ( rng const &  v) const
inline

A container needs to define an ordering for sorting.

This uses standard lexicographical ordering and so is not useful, for example, for checking, that a rng is nonnegative.

Parameters
vThe rng to be compared with this
Returns
false or true according as this is less than or equal to v lexicographically

Definition at line 484 of file rng.hpp.

References ccgsl_pointer.

◆ operator=() [1/2]

rng & gsl::rng::operator= ( rng &&  v)
inline

Move operator.

Parameters
vThe rng to move.
Returns
A reference to this.

Definition at line 432 of file rng.hpp.

References rng().

◆ operator=() [2/2]

rng & gsl::rng::operator= ( rng const &  v)
inline

The assignment operator.

This copies elementwise.

Parameters
vThe rng to copy

Definition at line 398 of file rng.hpp.

References ccgsl_pointer, and count.

◆ operator==()

bool gsl::rng::operator== ( rng const &  v) const
inline

Two rng are identically equal if their elements are identical.

Parameters
vThe rng to be compared with this
Returns
true or false according as this and v have identical elements or not

Definition at line 444 of file rng.hpp.

References ccgsl_pointer.

Referenced by operator!=().

◆ operator>()

bool gsl::rng::operator> ( rng const &  v) const
inline

A container needs to define an ordering for sorting.

This uses standard lexicographical ordering and so is not useful, for example, for checking, that a rng is nonnegative.

Parameters
vThe rng to be compared with this
Returns
false or true according as this is greater than v lexicographically

Definition at line 474 of file rng.hpp.

References ccgsl_pointer.

◆ operator>=()

bool gsl::rng::operator>= ( rng const &  v) const
inline

A container needs to define an ordering for sorting.

This uses standard lexicographical ordering and so is not useful, for eaxmple, for checking, that a rng is nonnegative.

Parameters
vThe rng to be compared with this
Returns
false or true according as this is no less than v lexicographically

Definition at line 494 of file rng.hpp.

References ccgsl_pointer.

◆ print_state()

void gsl::rng::print_state ( ) const
inline

C++ version of gsl_rng_print_state().

Definition at line 609 of file rng.hpp.

References get().

◆ r250()

static type const gsl::rng::r250 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 121 of file rng.hpp.

◆ ran0()

static type const gsl::rng::ran0 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 126 of file rng.hpp.

◆ ran1()

static type const gsl::rng::ran1 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 131 of file rng.hpp.

◆ ran2()

static type const gsl::rng::ran2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 136 of file rng.hpp.

◆ ran3()

static type const gsl::rng::ran3 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 141 of file rng.hpp.

◆ rand()

static type const gsl::rng::rand ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 146 of file rng.hpp.

◆ rand48()

static type const gsl::rng::rand48 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 151 of file rng.hpp.

◆ random128_bsd()

static type const gsl::rng::random128_bsd ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 156 of file rng.hpp.

◆ random128_glibc2()

static type const gsl::rng::random128_glibc2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 161 of file rng.hpp.

◆ random128_libc5()

static type const gsl::rng::random128_libc5 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 166 of file rng.hpp.

◆ random256_bsd()

static type const gsl::rng::random256_bsd ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 171 of file rng.hpp.

◆ random256_glibc2()

static type const gsl::rng::random256_glibc2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 176 of file rng.hpp.

◆ random256_libc5()

static type const gsl::rng::random256_libc5 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 181 of file rng.hpp.

◆ random32_bsd()

static type const gsl::rng::random32_bsd ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 186 of file rng.hpp.

◆ random32_glibc2()

static type const gsl::rng::random32_glibc2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 191 of file rng.hpp.

◆ random32_libc5()

static type const gsl::rng::random32_libc5 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 196 of file rng.hpp.

◆ random64_bsd()

static type const gsl::rng::random64_bsd ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 201 of file rng.hpp.

◆ random64_glibc2()

static type const gsl::rng::random64_glibc2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 206 of file rng.hpp.

◆ random64_libc5()

static type const gsl::rng::random64_libc5 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 211 of file rng.hpp.

◆ random8_bsd()

static type const gsl::rng::random8_bsd ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 216 of file rng.hpp.

◆ random8_glibc2()

static type const gsl::rng::random8_glibc2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 221 of file rng.hpp.

◆ random8_libc5()

static type const gsl::rng::random8_libc5 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 226 of file rng.hpp.

◆ random_bsd()

static type const gsl::rng::random_bsd ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 231 of file rng.hpp.

◆ random_glibc2()

static type const gsl::rng::random_glibc2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 236 of file rng.hpp.

◆ random_libc5()

static type const gsl::rng::random_libc5 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 241 of file rng.hpp.

◆ randu()

static type const gsl::rng::randu ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 246 of file rng.hpp.

◆ ranf()

static type const gsl::rng::ranf ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 251 of file rng.hpp.

◆ ranlux()

static type const gsl::rng::ranlux ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 256 of file rng.hpp.

◆ ranlux389()

static type const gsl::rng::ranlux389 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 261 of file rng.hpp.

◆ ranlxd1()

static type const gsl::rng::ranlxd1 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 266 of file rng.hpp.

◆ ranlxd2()

static type const gsl::rng::ranlxd2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 271 of file rng.hpp.

◆ ranlxs0()

static type const gsl::rng::ranlxs0 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 276 of file rng.hpp.

◆ ranlxs1()

static type const gsl::rng::ranlxs1 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 281 of file rng.hpp.

◆ ranlxs2()

static type const gsl::rng::ranlxs2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 286 of file rng.hpp.

◆ ranmar()

static type const gsl::rng::ranmar ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 291 of file rng.hpp.

◆ set()

void gsl::rng::set ( unsigned long int  seed) const
inline

C++ version of gsl_rng_set().

Parameters
seedA seed for this

Definition at line 567 of file rng.hpp.

References get().

◆ size()

size_t gsl::rng::size ( ) const
inline

C++ version of gsl_rng_size().

Returns
The size of the random number generator

Definition at line 600 of file rng.hpp.

References get().

◆ slatec()

static type const gsl::rng::slatec ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 296 of file rng.hpp.

◆ state()

void * gsl::rng::state ( ) const
inline

C++ version of gsl_rng_state().

Returns
The state of the random number generator

Definition at line 605 of file rng.hpp.

References get().

◆ swap()

void gsl::rng::swap ( rng v)
inline

Swap two rng.

This works even if the rng have different sizes because it swaps pointers.

Parameters
vThe rng to swap with this.

Definition at line 506 of file rng.hpp.

References ccgsl_pointer, and count.

◆ taus()

static type const gsl::rng::taus ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 301 of file rng.hpp.

◆ taus113()

static type const gsl::rng::taus113 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 311 of file rng.hpp.

◆ taus2()

static type const gsl::rng::taus2 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 306 of file rng.hpp.

◆ transputer()

static type const gsl::rng::transputer ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 316 of file rng.hpp.

◆ tt800()

static type const gsl::rng::tt800 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 321 of file rng.hpp.

◆ types_setup()

static type * gsl::rng::types_setup ( )
inlinestatic

C++ version of gsl_rng_types_setup().

Returns
Array of available types

Definition at line 551 of file rng.hpp.

◆ uni()

static type const gsl::rng::uni ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 326 of file rng.hpp.

◆ uni32()

static type const gsl::rng::uni32 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 331 of file rng.hpp.

◆ uniform()

double gsl::rng::uniform ( ) const
inline

C++ version of gsl_rng_uniform().

Returns
A uniform random number in [0,1)

Definition at line 624 of file rng.hpp.

References get().

Referenced by gsl::siman< XP >::solve(), and gsl::siman< XP >::solve_many().

◆ uniform_int()

unsigned long int gsl::rng::uniform_int ( unsigned long int  n) const
inline

C++ version of gsl_rng_uniform_int().

Parameters
nA positive integer
Returns
A uniform integer in 0, ..., n - 1

Definition at line 635 of file rng.hpp.

References get(), and gsl::rstat::n().

◆ uniform_pos()

double gsl::rng::uniform_pos ( ) const
inline

C++ version of gsl_rng_uniform_pos().

Returns
A uniform random number in (0,1)

Definition at line 629 of file rng.hpp.

References get().

◆ unique()

bool gsl::rng::unique ( ) const
inline

Find if this is the only object sharing the gsl_rng.

Returns
true or falses according as this is the only rng object sharing the gsl_rng

Definition at line 531 of file rng.hpp.

References count.

◆ use_count()

size_t gsl::rng::use_count ( ) const
inline

Find how many rng objects share this pointer.

Returns
the number of rng objects that share this pointer

Definition at line 536 of file rng.hpp.

References count.

◆ vax()

static type const gsl::rng::vax ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 336 of file rng.hpp.

◆ waterman14()

static type const gsl::rng::waterman14 ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 341 of file rng.hpp.

◆ zuf()

static type const gsl::rng::zuf ( )
inlinestatic

Random number static type.

Returns
the named random number type

Definition at line 346 of file rng.hpp.

Member Data Documentation

◆ ccgsl_pointer

gsl_rng* gsl::rng::ccgsl_pointer
private

The shared pointer.

Definition at line 514 of file rng.hpp.

Referenced by empty(), get(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), rng(), swap(), and ~rng().

◆ count

size_t* gsl::rng::count
private

The shared reference count.

Definition at line 518 of file rng.hpp.

Referenced by operator=(), rng(), swap(), unique(), use_count(), and ~rng().


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