|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Workspace for plain Monte Carlo integration. More...
#include <monte_plain.hpp>

Public Member Functions | |
| state () | |
| The default constructor is only really useful for assigning to. More... | |
| state (size_t const dim) | |
| The default constructor creates a new state with n elements. More... | |
| state (gsl_monte_plain_state *v) | |
| Could construct from a gsl_monte_plain_state. More... | |
| state (state const &v) | |
| The copy constructor. More... | |
| int | init () |
| Initialise. More... | |
| state & | operator= (state const &v) |
| The assignment operator. More... | |
| ~state () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| state (state &&v) | |
| Move constructor. More... | |
| state & | operator= (state &&v) |
| Move operator. More... | |
| bool | operator== (state const &v) const |
| Two state are identically equal if their elements are identical. More... | |
| bool | operator!= (state const &v) const |
| Two state are different if their elements are not identical. More... | |
| bool | operator< (state const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (state const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (state const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (state const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the state is empty. More... | |
| void | swap (state &v) |
| Swap two state objects. More... | |
| gsl_monte_plain_state * | get () const |
| Get the gsl_monte_plain_state. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_monte_plain_state. More... | |
| size_t | use_count () const |
| Find how many state objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
Private Attributes | |
| gsl_monte_plain_state * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Workspace for plain Monte Carlo integration.
Definition at line 38 of file monte_plain.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 43 of file monte_plain.hpp.
References ccgsl_pointer, and count.
Referenced by operator=().
|
inlineexplicit |
The default constructor creates a new state with n elements.
| dim | The number of function arguments |
Definition at line 53 of file monte_plain.hpp.
References ccgsl_pointer, and count.
|
inlineexplicit |
Could construct from a gsl_monte_plain_state.
This is not usually a good idea. In this case we should not use gsl_monte_plain_free() to deallocate the memory.
| v | The state |
Definition at line 69 of file monte_plain.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
| v | The state to copy. |
Definition at line 80 of file monte_plain.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 104 of file monte_plain.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The state to move. |
Definition at line 116 of file monte_plain.hpp.
References count.
|
inline |
Find if the state is empty.
true if has size zero; otherwise false Definition at line 193 of file monte_plain.hpp.
References ccgsl_pointer.
|
inline |
Get the gsl_monte_plain_state.
Definition at line 219 of file monte_plain.hpp.
References ccgsl_pointer.
Referenced by gsl::monte::plain::init(), and gsl::monte::plain::integrate().
|
inline |
Initialise.
This allows this state to be reused.
Definition at line 86 of file monte_plain.hpp.
References ccgsl_pointer.
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_monte_plain_state. Definition at line 239 of file monte_plain.hpp.
References ccgsl_pointer.
|
inline |
Two state are different if their elements are not identical.
| v | The state to be compared with this |
false or true according as this and v have identical elements or not Definition at line 146 of file monte_plain.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 state is nonnegative.
| v | The state to be compared with this |
false or true according as this is less than v lexicographically Definition at line 158 of file monte_plain.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 state is nonnegative.
| v | The state to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 178 of file monte_plain.hpp.
References ccgsl_pointer.
Move operator.
| v | The state to move. |
Definition at line 125 of file monte_plain.hpp.
References state().
The assignment operator.
This copies elementwise.
| v | The state to copy |
Definition at line 92 of file monte_plain.hpp.
References ccgsl_pointer, and count.
|
inline |
Two state are identically equal if their elements are identical.
| v | The state to be compared with this |
true or false according as this and v have identical elements or not Definition at line 138 of file monte_plain.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 state is nonnegative.
| v | The state to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 168 of file monte_plain.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 state is nonnegative.
| v | The state to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 188 of file monte_plain.hpp.
References ccgsl_pointer.
|
inline |
Swap two state objects.
This works even if the state have different sizes because it swaps pointers.
| v | The state to swap with this. |
Definition at line 200 of file monte_plain.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_monte_plain_state.
true or falses according as this is the only state object sharing the gsl_monte_plain_state. Definition at line 225 of file monte_plain.hpp.
References count.
|
inline |
Find how many state objects share this pointer.
Definition at line 230 of file monte_plain.hpp.
References count.
|
private |
The shared pointer.
Definition at line 208 of file monte_plain.hpp.
Referenced by empty(), get(), init(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), state(), swap(), and ~state().
|
private |
The shared reference count.
Definition at line 212 of file monte_plain.hpp.
Referenced by operator=(), state(), swap(), unique(), use_count(), and ~state().