|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Class for walker algorithm. More...
#include <randist.hpp>

Public Member Functions | |
| discrete_t () | |
| The default constructor is only really useful for assigning to. More... | |
| template<typename ARRAY > | |
| discrete_t (ARRAY const &P) | |
| The standard constructor creates a new discrete_t. More... | |
| discrete_t (gsl_ran_discrete_t *v) | |
| Could construct from a gsl_ran_discrete_t. More... | |
| discrete_t (discrete_t const &v) | |
| The copy constructor. More... | |
| discrete_t & | operator= (discrete_t const &v) |
| The assignment operator. More... | |
| ~discrete_t () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| bool | operator== (discrete_t const &v) const |
| Two discrete_t are identically equal if their elements are identical. More... | |
| bool | operator!= (discrete_t const &v) const |
| Two discrete_t are different equal if their elements are not identical. More... | |
| bool | operator< (discrete_t const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (discrete_t const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (discrete_t const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (discrete_t const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the discrete_t is empty. More... | |
| void | swap (discrete_t &v) |
| Swap two discrete_t. More... | |
| gsl_ran_discrete_t * | get () const |
| Get the gsl_ran_discrete_t. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_ran_discrete_t. More... | |
| size_t | use_count () const |
| Find how many discrete_t objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
Private Attributes | |
| gsl_ran_discrete_t * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Class for walker algorithm.
Definition at line 39 of file randist.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 44 of file randist.hpp.
References ccgsl_pointer, and count.
|
inlineexplicit |
The standard constructor creates a new discrete_t.
| P | An array of real values |
Definition at line 76 of file randist.hpp.
References ccgsl_pointer, count, and gsl::sf::ellint::P().
|
inlineexplicit |
Could construct from a gsl_ran_discrete_t.
This is not usually a good idea. In this case you should not use gsl_ran_discrete_free() to deallocate the memory.
| v | The workspace |
Definition at line 91 of file randist.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the discrete_t.
| v | The discrete_t to copy. |
Definition at line 102 of file randist.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 121 of file randist.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if the discrete_t is empty.
true if has size zero; otherwise false Definition at line 191 of file randist.hpp.
References ccgsl_pointer.
|
inline |
Get the gsl_ran_discrete_t.
Definition at line 216 of file randist.hpp.
References ccgsl_pointer.
Referenced by gsl::ran::discrete(), and gsl::ran::discrete_pdf().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_ran_discrete_t Definition at line 236 of file randist.hpp.
References ccgsl_pointer.
|
inline |
Two discrete_t are different equal if their elements are not identical.
| v | The discrete_t to be compared with this |
false or true according as this and v have identical elements or not Definition at line 144 of file randist.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 discrete_t is nonnegative.
| v | The discrete_t to be compared with this |
false or true according as this is less than v lexicographically Definition at line 156 of file randist.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 discrete_t is nonnegative.
| v | The discrete_t to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 176 of file randist.hpp.
References ccgsl_pointer.
|
inline |
The assignment operator.
This copies elementwise.
| v | The discrete_t to copy |
Definition at line 109 of file randist.hpp.
References ccgsl_pointer, and count.
|
inline |
Two discrete_t are identically equal if their elements are identical.
| v | The discrete_t to be compared with this |
true or false according as this and v have identical elements or not Definition at line 136 of file randist.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 discrete_t is nonnegative.
| v | The discrete_t to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 166 of file randist.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 discrete_t is nonnegative.
| v | The discrete_t to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 186 of file randist.hpp.
References ccgsl_pointer.
|
inline |
Swap two discrete_t.
This works even if the discrete_t have different sizes because it swaps pointers.
| v | The discrete_t to swap with this. |
Definition at line 198 of file randist.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_ran_discrete_t.
true or falses according as this is the only discrete_t object sharing the gsl_ran_discrete_t Definition at line 222 of file randist.hpp.
References count.
|
inline |
Find how many discrete_t objects share this pointer.
Definition at line 227 of file randist.hpp.
References count.
|
private |
The shared pointer.
Definition at line 205 of file randist.hpp.
Referenced by discrete_t(), empty(), get(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), swap(), and ~discrete_t().
|
private |
The shared reference count.
Definition at line 209 of file randist.hpp.
Referenced by discrete_t(), operator=(), swap(), unique(), use_count(), and ~discrete_t().