|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Histogram probability (empirical) density functions. More...
#include <histogram.hpp>

Public Member Functions | |
| pdf () | |
| The default constructor is only really useful for assigning to. More... | |
| pdf (size_t const n) | |
| The default constructor creates a new pdf with n elements. More... | |
| pdf (gsl_histogram_pdf *v) | |
| Could construct from a gsl_histogram_pdf. More... | |
| pdf (pdf const &v) | |
| The copy constructor. More... | |
| pdf & | operator= (pdf const &v) |
| The assignment operator. More... | |
| ~pdf () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| pdf (pdf &&v) | |
| Move constructor. More... | |
| pdf & | operator= (pdf &&v) |
| Move operator. More... | |
| bool | operator== (pdf const &v) const |
| Two pdf are identically equal if their elements are identical. More... | |
| bool | operator!= (pdf const &v) const |
| Two pdf are different if their elements are not identical. More... | |
| bool | operator< (pdf const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (pdf const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (pdf const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (pdf const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the pdf is empty. More... | |
| void | swap (pdf &v) |
| Swap two pdf objects. More... | |
| gsl_histogram_pdf * | get () const |
| Get the gsl_histogram_pdf. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_histogram_pdf. More... | |
| size_t | use_count () const |
| Find how many pdf objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| int | init (histogram const &h) |
| C++ version of gsl_histogram_pdf_init(). More... | |
| double | sample (double r) |
| C++ version of gsl_histogram_pdf_sample(). More... | |
Private Attributes | |
| gsl_histogram_pdf * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Histogram probability (empirical) density functions.
Definition at line 519 of file histogram.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 524 of file histogram.hpp.
References ccgsl_pointer, and count.
Referenced by operator=().
|
inlineexplicit |
The default constructor creates a new pdf with n elements.
| n | The number of bins to approximate the pdf |
Definition at line 534 of file histogram.hpp.
References ccgsl_pointer, count, and gsl::rstat::n().
|
inlineexplicit |
Could construct from a gsl_histogram_pdf.
This is not usually a good idea. In this case we should not use gsl_histogram_pdf_free() to deallocate the memory.
| v | The pdf |
Definition at line 550 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
| v | The pdf to copy. |
Definition at line 561 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 582 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The pdf to move. |
Definition at line 594 of file histogram.hpp.
References count.
|
inline |
Find if the pdf is empty.
true if has size zero; otherwise false Definition at line 671 of file histogram.hpp.
References ccgsl_pointer.
|
inline |
Get the gsl_histogram_pdf.
Definition at line 697 of file histogram.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_histogram_pdf_init().
| h | A histogram |
Definition at line 724 of file histogram.hpp.
References gsl::histogram::get(), and get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_histogram_pdf. Definition at line 717 of file histogram.hpp.
References ccgsl_pointer.
|
inline |
Two pdf are different if their elements are not identical.
| v | The pdf to be compared with this |
false or true according as this and v have identical elements or not Definition at line 624 of file histogram.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 pdf is nonnegative.
| v | The pdf to be compared with this |
false or true according as this is less than v lexicographically Definition at line 636 of file histogram.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 pdf is nonnegative.
| v | The pdf to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 656 of file histogram.hpp.
References ccgsl_pointer.
Move operator.
| v | The pdf to move. |
Definition at line 603 of file histogram.hpp.
References pdf().
The assignment operator.
This copies elementwise.
| v | The pdf to copy |
Definition at line 568 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
Two pdf are identically equal if their elements are identical.
| v | The pdf to be compared with this |
true or false according as this and v have identical elements or not Definition at line 616 of file histogram.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 pdf is nonnegative.
| v | The pdf to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 646 of file histogram.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 pdf is nonnegative.
| v | The pdf to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 666 of file histogram.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_histogram_pdf_sample().
| r | A random number (between zero and 1) |
Definition at line 731 of file histogram.hpp.
References get().
|
inline |
Swap two pdf objects.
This works even if the pdf have different sizes because it swaps pointers.
| v | The pdf to swap with this. |
Definition at line 678 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_histogram_pdf.
true or falses according as this is the only pdf object sharing the gsl_histogram_pdf. Definition at line 703 of file histogram.hpp.
References count.
|
inline |
Find how many pdf objects share this pointer.
Definition at line 708 of file histogram.hpp.
References count.
|
private |
The shared pointer.
Definition at line 686 of file histogram.hpp.
Referenced by empty(), get(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), pdf(), swap(), and ~pdf().
|
private |
The shared reference count.
Definition at line 690 of file histogram.hpp.
Referenced by operator=(), pdf(), swap(), unique(), use_count(), and ~pdf().