|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
2D histograms. More...
#include <histogram2d.hpp>

Classes | |
| class | |
| Empirical probability density functions. More... | |
Public Member Functions | |
| histogram2d () | |
| The default constructor is only really useful for assigning to. More... | |
| histogram2d (size_t const nx, size_t const ny) | |
| The default constructor creates a new histogram2d with n elements. More... | |
| histogram2d (gsl_histogram2d *v) | |
| Could construct from a gsl_histogram2d. More... | |
| histogram2d (histogram2d const &v) | |
| The copy constructor. More... | |
| histogram2d & | operator= (histogram2d const &v) |
| The assignment operator. More... | |
| ~histogram2d () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| histogram2d (histogram2d &&v) | |
| Move constructor. More... | |
| histogram2d & | operator= (histogram2d &&v) |
| Move operator. More... | |
| bool | operator== (histogram2d const &v) const |
| Two histogram2d are identically equal if their elements are identical. More... | |
| bool | operator!= (histogram2d const &v) const |
| Two histogram2d are different if their elements are not identical. More... | |
| bool | operator< (histogram2d const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (histogram2d const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (histogram2d const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (histogram2d const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the histogram2d is empty. More... | |
| void | swap (histogram2d &v) |
| Swap two histogram2d objects. More... | |
| gsl_histogram2d * | get () const |
| Get the gsl_histogram2d. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_histogram2d. More... | |
| size_t | use_count () const |
| Find how many histogram2d objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| int | increment (double x, double y) |
| C++ version of gsl_histogram2d_increment(). More... | |
| int | accumulate (double x, double y, double weight) |
| C++ version of gsl_histogram2d_accumulate(). More... | |
| int | find (double const x, double const y, size_t &i, size_t &j) const |
| C++ version of gsl_histogram2d_find(). More... | |
| double | get (size_t const i, size_t const j) const |
| C++ version of gsl_histogram2d_get(). More... | |
| int | get_xrange (size_t const i, double &xlower, double &xupper) const |
| C++ version of gsl_histogram2d_get_xrange(). More... | |
| int | get_yrange (size_t const j, double &ylower, double &yupper) const |
| C++ version of gsl_histogram2d_get_yrange(). More... | |
| double | xmax () const |
| C++ version of gsl_histogram2d_xmax(). More... | |
| double | xmin () const |
| C++ version of gsl_histogram2d_xmin(). More... | |
| size_t | nx () const |
| C++ version of gsl_histogram2d_nx(). More... | |
| double | ymax () const |
| C++ version of gsl_histogram2d_ymax(). More... | |
| double | ymin () const |
| C++ version of gsl_histogram2d_ymin(). More... | |
| size_t | ny () const |
| C++ version of gsl_histogram2d_ny(). More... | |
| void | reset () |
| C++ version of gsl_histogram2d_reset(). More... | |
| int | set_ranges_uniform (double xmin, double xmax, double ymin, double ymax) |
| C++ version of gsl_histogram2d_set_ranges_uniform(). More... | |
| int | set_ranges (double const xrange[], size_t xsize, double const yrange[], size_t ysize) |
| C++ version of gsl_histogram2d_set_ranges(). More... | |
| template<typename XRANGE , typename YRANGE > | |
| int | set_ranges (XRANGE const &xrange, YRANGE const &yrange) |
| C++ version of gsl_histogram2d_set_ranges(). More... | |
| int | memcpy (histogram2d const &source) |
| C++ version of gsl_histogram2d_memcpy(). More... | |
| histogram2d | clone () const |
| C++ version of gsl_histogram2d_clone(). More... | |
| double | max_val () const |
| C++ version of gsl_histogram2d_max_val(). More... | |
| void | max_bin (size_t &i, size_t &j) const |
| C++ version of gsl_histogram2d_max_bin(). More... | |
| double | min_val () const |
| C++ version of gsl_histogram2d_min_val(). More... | |
| void | min_bin (size_t &i, size_t &j) const |
| C++ version of gsl_histogram2d_min_bin(). More... | |
| double | xmean () const |
| C++ version of gsl_histogram2d_xmean(). More... | |
| double | ymean () const |
| C++ version of gsl_histogram2d_ymean(). More... | |
| double | xsigma () const |
| C++ version of gsl_histogram2d_xsigma(). More... | |
| double | ysigma () const |
| C++ version of gsl_histogram2d_ysigma(). More... | |
| double | cov () const |
| C++ version of gsl_histogram2d_cov(). More... | |
| double | sum () const |
| C++ version of gsl_histogram2d_sum(). More... | |
| bool | equal_bins_p (histogram2d const &h2) const |
| C++ version of gsl_histogram2d_equal_bins_p(). More... | |
| int | add (histogram2d const &h2) |
| C++ version of gsl_histogram2d_add(). More... | |
| int | sub (histogram2d const &h2) |
| C++ version of gsl_histogram2d_sub(). More... | |
| int | mul (histogram2d const &h2) |
| C++ version of gsl_histogram2d_mul(). More... | |
| int | div (histogram2d const &h2) |
| C++ version of gsl_histogram2d_div(). More... | |
| int | scale (double scale) |
| C++ version of gsl_histogram2d_scale(). More... | |
| int | shift (double shift) |
| C++ version of gsl_histogram2d_shift(). More... | |
| int | fwrite (FILE *stream) const |
| C++ version of gsl_histogram2d_fwrite(). More... | |
| int | fread (FILE *stream) |
| C++ version of gsl_histogram2d_fread(). More... | |
| int | fprintf (FILE *stream, char const *range_format, char const *bin_format) const |
| C++ version of gsl_histogram2d_fprintf(). More... | |
| int | fscanf (FILE *stream) |
| C++ version of gsl_histogram2d_fscanf(). More... | |
Static Public Member Functions | |
| static histogram2d | calloc (size_t const nx, size_t const ny) |
| C++ version of gsl_histogram2d_calloc(). More... | |
Private Attributes | |
| gsl_histogram2d * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
2D histograms.
Definition at line 31 of file histogram2d.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 36 of file histogram2d.hpp.
References ccgsl_pointer, and count.
Referenced by calloc(), clone(), and operator=().
|
inlineexplicit |
The default constructor creates a new histogram2d with n elements.
| nx | The number of bin slices in x direction |
| ny | The number of bin slices in y direction |
Definition at line 47 of file histogram2d.hpp.
References ccgsl_pointer, count, nx(), and ny().
|
inlineexplicit |
Could construct from a gsl_histogram2d.
This is not usually a good idea. In this case we should not use gsl_histogram2d_free() to deallocate the memory.
| v | The histogram2d |
Definition at line 63 of file histogram2d.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
| v | The histogram2d to copy. |
Definition at line 74 of file histogram2d.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 93 of file histogram2d.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The histogram2d to move. |
Definition at line 105 of file histogram2d.hpp.
References count.
|
inline |
C++ version of gsl_histogram2d_accumulate().
| x | The x value |
| y | The y value |
| weight | The weight given to (x,y) |
Definition at line 271 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_add().
| h2 | Another histogram |
Definition at line 553 of file histogram2d.hpp.
References get().
|
inlinestatic |
C++ version of gsl_histogram2d_calloc().
| nx | Number of bin slices in x direction |
| ny | Number of bin slices in y direction |
Definition at line 236 of file histogram2d.hpp.
References histogram2d(), nx(), and ny().
|
inline |
C++ version of gsl_histogram2d_clone().
Definition at line 459 of file histogram2d.hpp.
References get(), and histogram2d().
|
inline |
C++ version of gsl_histogram2d_cov().
Definition at line 531 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_div().
| h2 | Another histogram |
Definition at line 574 of file histogram2d.hpp.
References get().
|
inline |
Find if the histogram2d is empty.
true if has size zero; otherwise false Definition at line 182 of file histogram2d.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_histogram2d_equal_bins_p().
| h2 | Another histogram |
this Definition at line 545 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_find().
| x | The x value |
| y | The y value |
| i | The index in the x direction (return value) |
| j | The index in the y direction (return value) |
Definition at line 294 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_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 611 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_fread().
| stream | An input stream |
Definition at line 602 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_fscanf().
| stream | An input stream |
Definition at line 619 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_fwrite().
| stream | An output stream |
Definition at line 595 of file histogram2d.hpp.
References get().
|
inline |
Get the gsl_histogram2d.
Definition at line 208 of file histogram2d.hpp.
References ccgsl_pointer.
Referenced by accumulate(), add(), clone(), cov(), div(), equal_bins_p(), find(), fprintf(), fread(), fscanf(), fwrite(), get(), get_xrange(), get_yrange(), increment(), gsl::histogram2d::pdf::init(), max_bin(), max_val(), memcpy(), min_bin(), min_val(), mul(), nx(), ny(), reset(), scale(), set_ranges(), set_ranges_uniform(), shift(), sub(), sum(), xmax(), xmean(), xmin(), xsigma(), ymax(), ymean(), ymin(), and ysigma().
|
inline |
C++ version of gsl_histogram2d_get().
| i | The index in the x direction |
| j | The index in the y direction |
Definition at line 303 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_get_xrange().
| i | The index in the x direction |
| xlower | The lower bound |
| xupper | The upper bound |
Definition at line 324 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_get_yrange().
| j | The index in the y direction |
| ylower | The lower bound |
| yupper | The upper bound |
Definition at line 345 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_increment().
| x | The x value |
| y | The y value |
Definition at line 262 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_max_bin().
| i | The index in the x direction (return value) |
| j | The index in the y direction (return value) |
Definition at line 480 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_max_val().
Definition at line 465 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_memcpy().
| source | A histogram2d object |
Definition at line 452 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_min_bin().
| i | The index in the x direction (return value) |
| j | The index in the y direction (return value) |
Definition at line 501 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_min_val().
Definition at line 486 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_mul().
| h2 | Another histogram |
Definition at line 567 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_nx().
Definition at line 364 of file histogram2d.hpp.
References get().
Referenced by calloc(), histogram2d(), and gsl::histogram2d::pdf::pdf().
|
inline |
C++ version of gsl_histogram2d_ny().
Definition at line 382 of file histogram2d.hpp.
References get().
Referenced by calloc(), histogram2d(), and gsl::histogram2d::pdf::pdf().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_histogram2d. Definition at line 228 of file histogram2d.hpp.
References ccgsl_pointer.
|
inline |
Two histogram2d are different if their elements are not identical.
| v | The histogram2d to be compared with this |
false or true according as this and v have identical elements or not Definition at line 135 of file histogram2d.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 histogram2d is nonnegative.
| v | The histogram2d to be compared with this |
false or true according as this is less than v lexicographically Definition at line 147 of file histogram2d.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 histogram2d is nonnegative.
| v | The histogram2d to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 167 of file histogram2d.hpp.
References ccgsl_pointer.
|
inline |
Move operator.
| v | The histogram2d to move. |
Definition at line 114 of file histogram2d.hpp.
References histogram2d().
|
inline |
The assignment operator.
This copies elementwise.
| v | The histogram2d to copy |
Definition at line 81 of file histogram2d.hpp.
References ccgsl_pointer, and count.
|
inline |
Two histogram2d are identically equal if their elements are identical.
| v | The histogram2d to be compared with this |
true or false according as this and v have identical elements or not Definition at line 127 of file histogram2d.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 histogram2d is nonnegative.
| v | The histogram2d to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 157 of file histogram2d.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 histogram2d is nonnegative.
| v | The histogram2d to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 177 of file histogram2d.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_histogram2d_reset().
Definition at line 387 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_scale().
| scale | A constant |
Definition at line 581 of file histogram2d.hpp.
References get(), and scale().
Referenced by scale().
|
inline |
C++ version of gsl_histogram2d_set_ranges().
| xrange[] | The x ranges |
| xsize | The size of xrange |
| yrange[] | The y ranges |
| ysize | The size of yrange |
Definition at line 433 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_set_ranges().
This version works with std::vector<double> and gsl::vector
| xrange | The x ranges |
| yrange | The y ranges |
Definition at line 443 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_set_ranges_uniform().
| xmin | Lower bound of bottom x range |
| xmax | Upper bound of top x range |
| ymin | Lower bound of bottom y range |
| ymax | Upper bound of top y range |
Definition at line 422 of file histogram2d.hpp.
|
inline |
C++ version of gsl_histogram2d_shift().
| shift | A constant |
Definition at line 588 of file histogram2d.hpp.
References get(), and shift().
Referenced by shift().
|
inline |
C++ version of gsl_histogram2d_sub().
| h2 | Another histogram |
Definition at line 560 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_sum().
Definition at line 537 of file histogram2d.hpp.
References get().
|
inline |
Swap two histogram2d objects.
This works even if the histogram2d have different sizes because it swaps pointers.
| v | The histogram2d to swap with this. |
Definition at line 189 of file histogram2d.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_histogram2d.
true or falses according as this is the only histogram2d object sharing the gsl_histogram2d. Definition at line 214 of file histogram2d.hpp.
References count.
|
inline |
Find how many histogram2d objects share this pointer.
Definition at line 219 of file histogram2d.hpp.
References count.
|
inline |
C++ version of gsl_histogram2d_xmax().
Definition at line 352 of file histogram2d.hpp.
References get().
Referenced by set_ranges_uniform().
|
inline |
C++ version of gsl_histogram2d_xmean().
Definition at line 507 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_xmin().
Definition at line 358 of file histogram2d.hpp.
References get().
Referenced by set_ranges_uniform().
|
inline |
C++ version of gsl_histogram2d_xsigma().
Definition at line 519 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_ymax().
Definition at line 370 of file histogram2d.hpp.
References get().
Referenced by set_ranges_uniform().
|
inline |
C++ version of gsl_histogram2d_ymean().
Definition at line 513 of file histogram2d.hpp.
References get().
|
inline |
C++ version of gsl_histogram2d_ymin().
Definition at line 376 of file histogram2d.hpp.
References get().
Referenced by set_ranges_uniform().
|
inline |
C++ version of gsl_histogram2d_ysigma().
Definition at line 525 of file histogram2d.hpp.
References get().
|
private |
The shared pointer.
Definition at line 197 of file histogram2d.hpp.
Referenced by empty(), get(), histogram2d(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), swap(), and ~histogram2d().
|
private |
The shared reference count.
Definition at line 201 of file histogram2d.hpp.
Referenced by histogram2d(), operator=(), swap(), unique(), use_count(), and ~histogram2d().