|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Quasi random sequences. More...
#include <qrng.hpp>

Public Types | |
| typedef gsl_qrng_type | type |
| Convenient typedef. More... | |
Public Member Functions | |
| qrng () | |
| The default constructor is only really useful for assigning to. More... | |
| qrng (type const *T, unsigned int const dimension) | |
| The default constructor creates a new qrng with n elements. More... | |
| qrng (gsl_qrng *v) | |
| Could construct from a gsl_qrng. More... | |
| qrng (qrng const &v) | |
| The copy constructor. More... | |
| qrng & | operator= (qrng const &v) |
| The assignment operator. More... | |
| ~qrng () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| qrng (qrng &&v) | |
| Move constructor. More... | |
| qrng & | operator= (qrng &&v) |
| Move operator. More... | |
| bool | operator== (qrng const &v) const |
| Two qrng are identically equal if their elements are identical. More... | |
| bool | operator!= (qrng const &v) const |
| Two qrng are different if their elements are not identical. More... | |
| bool | operator< (qrng const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (qrng const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (qrng const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (qrng const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the qrng is empty. More... | |
| void | swap (qrng &v) |
| Swap two qrng objects. More... | |
| gsl_qrng * | get () const |
| Get the gsl_qrng. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_qrng. More... | |
| size_t | use_count () const |
| Find how many qrng objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| int | memcpy (qrng const &src) |
| C++ version of gsl_qrng_memcpy(). More... | |
| qrng | clone () const |
| C++ version of gsl_qrng_clone(). More... | |
| void | init () |
| C++ version of gsl_qrng_init(). More... | |
| char const * | name () const |
| C++ version of gsl_qrng_name(). More... | |
| size_t | size () const |
| C++ version of gsl_qrng_size(). More... | |
| void * | state () const |
| C++ version of gsl_qrng_state(). More... | |
| template<typename X > | |
| int | get (X &x) const |
| C++ version of gsl_qrng_get(). More... | |
Static Public Member Functions | |
| static type const * | niederreiter_2 () |
| Quasi random number sequence static type. More... | |
| static type const * | sobol () |
| Quasi random number sequence static type. More... | |
| static type const * | halton () |
| Quasi random number sequence static type. More... | |
| static type const * | reversehalton () |
| Quasi random number sequence static type. More... | |
Private Attributes | |
| gsl_qrng * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
| typedef gsl_qrng_type gsl::qrng::type |
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 40 of file qrng.hpp.
References ccgsl_pointer, and count.
Referenced by clone(), and operator=().
|
inlineexplicit |
The default constructor creates a new qrng with n elements.
| T | the type |
| dimension | the dimension of the space |
Definition at line 51 of file qrng.hpp.
References ccgsl_pointer, and count.
|
inlineexplicit |
Could construct from a gsl_qrng.
This is not usually a good idea. In this case we should not use gsl_qrng_free() to deallocate the memory.
| v | The qrng |
Definition at line 67 of file qrng.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
| v | The qrng to copy. |
Definition at line 78 of file qrng.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 97 of file qrng.hpp.
References ccgsl_pointer, and count.
|
inline |
|
inline |
|
inline |
Find if the qrng is empty.
true if has size zero; otherwise false Definition at line 186 of file qrng.hpp.
References ccgsl_pointer.
|
inline |
|
inline |
C++ version of gsl_qrng_get().
This version works with gsl::vector and std::vector<double> arrays
| x | An array of size dimension to hold as return value the next point |
Definition at line 285 of file qrng.hpp.
References get(), and gsl::exception::GSL_EBADLEN.
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_qrng. Definition at line 232 of file qrng.hpp.
References ccgsl_pointer.
|
inline |
Two qrng are different if their elements are not identical.
| v | The qrng to be compared with this |
false or true according as this and v have identical elements or not Definition at line 139 of file qrng.hpp.
References 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 qrng is nonnegative.
| v | The qrng to be compared with this |
false or true according as this is less than v lexicographically Definition at line 151 of file qrng.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 qrng is nonnegative.
| v | The qrng to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 171 of file qrng.hpp.
References ccgsl_pointer.
The assignment operator.
This copies elementwise.
| v | The qrng to copy |
Definition at line 85 of file qrng.hpp.
References ccgsl_pointer, and count.
|
inline |
Two qrng are identically equal if their elements are identical.
| v | The qrng to be compared with this |
true or false according as this and v have identical elements or not Definition at line 131 of file qrng.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 qrng is nonnegative.
| v | The qrng to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 161 of file qrng.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 qrng is nonnegative.
| v | The qrng to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 181 of file qrng.hpp.
References ccgsl_pointer.
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
Swap two qrng objects.
This works even if the qrng have different sizes because it swaps pointers.
| v | The qrng to swap with this. |
Definition at line 193 of file qrng.hpp.
References ccgsl_pointer, and count.
|
inline |
|
inline |
|
private |
The shared pointer.
Definition at line 201 of file qrng.hpp.
Referenced by empty(), get(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), qrng(), swap(), and ~qrng().
|
private |
The shared reference count.
Definition at line 205 of file qrng.hpp.
Referenced by operator=(), qrng(), swap(), unique(), use_count(), and ~qrng().