|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Histograms. More...
#include <histogram.hpp>

Classes | |
| class | |
| Histogram probability (empirical) density functions. More... | |
Public Member Functions | |
| histogram () | |
| The default constructor is only really useful for assigning to. More... | |
| histogram (size_t const n) | |
| The default constructor creates a new histogram with n elements. More... | |
| histogram (gsl_histogram *v) | |
| Could construct from a gsl_histogram. More... | |
| histogram (histogram const &v) | |
| The copy constructor. More... | |
| histogram & | operator= (histogram const &v) |
| The assignment operator. More... | |
| ~histogram () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| histogram (histogram &&v) | |
| Move constructor. More... | |
| histogram & | operator= (histogram &&v) |
| Move operator. More... | |
| bool | operator== (histogram const &v) const |
| Two histogram are identically equal if their elements are identical. More... | |
| bool | operator!= (histogram const &v) const |
| Two histogram are different if their elements are not identical. More... | |
| bool | operator< (histogram const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (histogram const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (histogram const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (histogram const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the histogram is empty. More... | |
| void | swap (histogram &v) |
| Swap two histogram objects. More... | |
| gsl_histogram * | get () const |
| Get the gsl_histogram. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_histogram. More... | |
| size_t | use_count () const |
| Find how many histogram objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| int | increment (double x) |
| C++ version of gsl_histogram_increment(). More... | |
| int | accumulate (double x, double weight) |
| C++ version of gsl_histogram_accumulate(). More... | |
| int | find (double const x, size_t &i) const |
| C++ version of gsl_histogram_find(). More... | |
| double | get (size_t i) const |
| C++ version of gsl_histogram_get(). More... | |
| double | operator[] (size_t i) const |
| C++ version of gsl_histogram_get(). More... | |
| int | get_range (size_t i, double *lower, double *upper) const |
| C++ version of gsl_histogram_get_range(). More... | |
| int | get_range (size_t i, double &lower, double &upper) const |
| C++ version of gsl_histogram_get_range(). More... | |
| double | max () const |
| C++ version of gsl_histogram_max(). More... | |
| double | min () const |
| C++ version of gsl_histogram_min(). More... | |
| size_t | bins () const |
| C++ version of gsl_histogram_bins(). More... | |
| void | reset () |
| C++ version of gsl_histogram_reset(). More... | |
| template<typename RANGE > | |
| int | set_ranges (RANGE const &range) |
| C++ version of gsl_histogram_set_ranges(). More... | |
| int | set_ranges_uniform (double xmin, double xmax) |
| C++ version of gsl_histogram_set_ranges_uniform(). More... | |
| int | memcpy (histogram const &source) |
| C++ version of gsl_histogram_memcpy(). More... | |
| histogram | clone () const |
| C++ version of gsl_histogram_clone(). More... | |
| double | max_val () const |
| C++ version of gsl_histogram_max_val(). More... | |
| size_t | max_bin () const |
| C++ version of gsl_histogram_max_bin(). More... | |
| double | min_val () const |
| C++ version of gsl_histogram_min_val(). More... | |
| size_t | min_bin () const |
| C++ version of gsl_histogram_min_bin(). More... | |
| bool | equal_bins_p (histogram const &h2) const |
| C++ version of gsl_histogram_equal_bins_p(). More... | |
| int | add (histogram const &h2) |
| C++ version of gsl_histogram_add(). More... | |
| int | sub (histogram const &h2) |
| C++ version of gsl_histogram_sub(). More... | |
| int | mul (histogram const &h2) |
| C++ version of gsl_histogram_mul(). More... | |
| int | div (histogram const &h2) |
| C++ version of gsl_histogram_div(). More... | |
| int | scale (double const scale) |
| C++ version of gsl_histogram_scale(). More... | |
| int | shift (double const shift) |
| C++ version of gsl_histogram_shift(). More... | |
| double | sigma () const |
| C++ version of gsl_histogram_sigma(). More... | |
| double | mean () const |
| C++ version of gsl_histogram_mean(). More... | |
| double | sum () const |
| C++ version of gsl_histogram_sum(). More... | |
| int | fwrite (FILE *stream) const |
| C++ version of gsl_histogram_fwrite(). More... | |
| int | fread (FILE *stream) |
| C++ version of gsl_histogram_fread(). More... | |
| int | fprintf (FILE *stream, char const *range_format, char const *bin_format) const |
| C++ version of gsl_histogram_fprintf(). More... | |
| int | fscanf (FILE *stream) |
| C++ version of gsl_histogram_fscanf(). More... | |
Private Attributes | |
| gsl_histogram * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Histograms.
Definition at line 31 of file histogram.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 36 of file histogram.hpp.
References ccgsl_pointer, and count.
Referenced by clone(), and operator=().
|
inlineexplicit |
The default constructor creates a new histogram with n elements.
| n | number of bins |
Definition at line 46 of file histogram.hpp.
References ccgsl_pointer, count, and gsl::rstat::n().
|
inlineexplicit |
Could construct from a gsl_histogram.
This is not usually a good idea. In this case we should not use gsl_histogram_free() to deallocate the memory.
| v | The histogram |
Definition at line 62 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
| v | The histogram to copy. |
Definition at line 73 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 92 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The histogram to move. |
Definition at line 104 of file histogram.hpp.
References count.
|
inline |
C++ version of gsl_histogram_accumulate().
| x | A real value |
| weight | The weight to give to x |
Definition at line 261 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_add().
| h2 | A histogram |
Definition at line 429 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_bins().
Definition at line 332 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_clone().
Definition at line 389 of file histogram.hpp.
References get(), and histogram().
|
inline |
C++ version of gsl_histogram_div().
| h2 | A histogram |
Definition at line 450 of file histogram.hpp.
References get().
|
inline |
Find if the histogram is empty.
true if has size zero; otherwise false Definition at line 181 of file histogram.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_histogram_equal_bins_p().
| h2 | A histogram |
this and h2 do or do not have identical ranges Definition at line 421 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_find().
| x | A real value |
| i | The index of the bin containing x (return value) |
Definition at line 280 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_fprintf().
| stream | An output stream |
| range_format | One of the g, e or f formats |
| bin_format | One of the g, e or f formats |
Definition at line 505 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_fread().
| stream | An input stream |
Definition at line 496 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_fscanf().
| stream | An inoutput stream |
Definition at line 513 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_fwrite().
| stream | An output stream |
Definition at line 489 of file histogram.hpp.
References get().
|
inline |
Get the gsl_histogram.
Definition at line 207 of file histogram.hpp.
References ccgsl_pointer.
Referenced by accumulate(), add(), bins(), clone(), div(), equal_bins_p(), find(), fprintf(), fread(), fscanf(), fwrite(), get_range(), increment(), gsl::histogram::pdf::init(), max(), max_bin(), max_val(), mean(), memcpy(), min(), min_bin(), min_val(), mul(), operator[](), reset(), scale(), set_ranges(), set_ranges_uniform(), shift(), sigma(), sub(), and sum().
|
inline |
C++ version of gsl_histogram_get().
| i | An index |
Definition at line 288 of file histogram.hpp.
References get().
Referenced by get().
|
inline |
C++ version of gsl_histogram_get_range().
| i | An index |
| lower | The lower bound of the bin (return value) |
| upper | The upper bound of the bin (return value) |
Definition at line 313 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_get_range().
| i | An index |
| lower | The lower bound of the bin (return value) |
| upper | The upper bound of the bin (return value) |
Definition at line 304 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_increment().
| x | A real value |
Definition at line 253 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_max().
Definition at line 320 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_max_bin().
Definition at line 401 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_max_val().
Definition at line 395 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_mean().
Definition at line 476 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_memcpy().
| source | A histogram |
Definition at line 383 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_min().
Definition at line 326 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_min_bin().
Definition at line 413 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_min_val().
Definition at line 407 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_mul().
| h2 | A histogram |
Definition at line 443 of file histogram.hpp.
References get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_histogram. Definition at line 227 of file histogram.hpp.
References ccgsl_pointer.
|
inline |
Two histogram are different if their elements are not identical.
| v | The histogram to be compared with this |
false or true according as this and v have identical elements or not Definition at line 134 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 histogram is nonnegative.
| v | The histogram to be compared with this |
false or true according as this is less than v lexicographically Definition at line 146 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 histogram is nonnegative.
| v | The histogram to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 166 of file histogram.hpp.
References ccgsl_pointer.
Move operator.
| v | The histogram to move. |
Definition at line 113 of file histogram.hpp.
References histogram().
The assignment operator.
This copies elementwise.
| v | The histogram to copy |
Definition at line 80 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
Two histogram are identically equal if their elements are identical.
| v | The histogram to be compared with this |
true or false according as this and v have identical elements or not Definition at line 126 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 histogram is nonnegative.
| v | The histogram to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 156 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 histogram is nonnegative.
| v | The histogram to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 176 of file histogram.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_histogram_get().
| i | An index |
Definition at line 295 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_reset().
Definition at line 337 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_scale().
| scale | A constant |
Definition at line 457 of file histogram.hpp.
References get(), and scale().
Referenced by scale().
|
inline |
C++ version of gsl_histogram_set_ranges().
This version works with std::vector<double> and gsl::vector
| range[] | A set of range bounds |
Definition at line 366 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_set_ranges_uniform().
| xmin | The new minimum lower bound |
| xmax | The new maximum upper bound |
Definition at line 375 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_shift().
| shift | A constant |
Definition at line 464 of file histogram.hpp.
References get(), and shift().
Referenced by shift().
|
inline |
C++ version of gsl_histogram_sigma().
Definition at line 470 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_sub().
| h2 | A histogram |
Definition at line 436 of file histogram.hpp.
References get().
|
inline |
C++ version of gsl_histogram_sum().
Definition at line 482 of file histogram.hpp.
References get().
|
inline |
Swap two histogram objects.
This works even if the histogram have different sizes because it swaps pointers.
| v | The histogram to swap with this. |
Definition at line 188 of file histogram.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_histogram.
true or falses according as this is the only histogram object sharing the gsl_histogram. Definition at line 213 of file histogram.hpp.
References count.
|
inline |
Find how many histogram objects share this pointer.
Definition at line 218 of file histogram.hpp.
References count.
|
private |
The shared pointer.
Definition at line 196 of file histogram.hpp.
Referenced by empty(), get(), histogram(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), swap(), and ~histogram().
|
private |
The shared reference count.
Definition at line 200 of file histogram.hpp.
Referenced by histogram(), operator=(), swap(), unique(), use_count(), and ~histogram().