|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Random number generator. More...
#include <rng.hpp>

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... | |
| rng & | operator= (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... | |
| rng & | operator= (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 type * | types_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... | |
| typedef gsl_rng_type const* gsl::rng::type |
|
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=().
|
inlineexplicit |
C++ version of gsl_rng_alloc().
| T | A random number generator type. |
Definition at line 365 of file rng.hpp.
References ccgsl_pointer, and count.
|
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.
| v | The rng |
Definition at line 380 of file rng.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the rng.
| v | The rng to copy. |
Definition at line 391 of file rng.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 410 of file rng.hpp.
References ccgsl_pointer, and count.
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
Find if the rng is empty.
true if has size zero; otherwise false Definition at line 499 of file rng.hpp.
References ccgsl_pointer.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
Get 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().
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_rng Definition at line 545 of file rng.hpp.
References ccgsl_pointer.
|
inline |
Two rng are different equal if their elements are not identical.
| v | The rng to be compared with this |
false or true according as this and v have identical elements or not Definition at line 452 of file rng.hpp.
References operator==().
|
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.
| v | The rng to be compared with this |
false or true according as this is less than v lexicographically Definition at line 464 of file rng.hpp.
References ccgsl_pointer.
|
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.
| v | The rng to be compared with this |
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.
The assignment operator.
This copies elementwise.
| v | The rng to copy |
Definition at line 398 of file rng.hpp.
References ccgsl_pointer, and count.
|
inline |
Two rng are identically equal if their elements are identical.
| v | The rng to be compared with this |
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!=().
|
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.
| v | The rng to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 474 of file rng.hpp.
References ccgsl_pointer.
|
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.
| v | The rng to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 494 of file rng.hpp.
References ccgsl_pointer.
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
Swap two rng.
This works even if the rng have different sizes because it swaps pointers.
| v | The rng to swap with this. |
Definition at line 506 of file rng.hpp.
References ccgsl_pointer, and count.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
C++ version of gsl_rng_uniform().
Definition at line 624 of file rng.hpp.
References get().
Referenced by gsl::siman< XP >::solve(), and gsl::siman< XP >::solve_many().
|
inline |
C++ version of gsl_rng_uniform_int().
| n | A positive integer |
Definition at line 635 of file rng.hpp.
References get(), and gsl::rstat::n().
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
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().
|
private |
The shared reference count.
Definition at line 518 of file rng.hpp.
Referenced by operator=(), rng(), swap(), unique(), use_count(), and ~rng().