2D PDF derived from histogram for sampling.
More...
#include <GSLHistogram.h>
2D PDF derived from histogram for sampling.
Definition at line 285 of file GSLHistogram.h.
◆ gsl_histogram2d_pdf()
| gsl_histogram2d_pdf::gsl_histogram2d_pdf |
( |
| ) |
|
|
inline |
◆ init()
Initialize a PDF from a 2D histogram.
- Parameters
-
| h | Input: histogram providing bin weights. |
Definition at line 291 of file GSLHistogram.h.
References gsl_histogram2d::bin(), cumsum_, gsl_histogram2d::nx(), nx_, gsl_histogram2d::ny(), ny_, pdf_, gsl_histogram2d::xrange(), xrange_, gsl_histogram2d::yrange(), and yrange_.
Referenced by gsl_histogram2d_pdf_init().
◆ sample()
| void gsl_histogram2d_pdf::sample |
( |
double |
u, |
|
|
double |
v, |
|
|
double * |
x, |
|
|
double * |
y |
|
) |
| |
|
inline |
Sample \((x,y)\) given two uniform variates.
- Parameters
-
| u | Input: uniform variate in \([0,1]\) for x-bin selection. |
| v | Input: uniform variate in \([0,1]\) for y position within the x-bin. |
| x | Output: sampled x value. |
| y | Output: sampled y value. |
Definition at line 324 of file GSLHistogram.h.
References cumsum_, nx_, ny_, xrange_, and yrange_.
◆ cumsum_
| std::vector<double> gsl_histogram2d_pdf::cumsum_ |
|
private |
◆ nx_
| size_t gsl_histogram2d_pdf::nx_ |
|
private |
◆ ny_
| size_t gsl_histogram2d_pdf::ny_ |
|
private |
◆ pdf_
| std::vector<double> gsl_histogram2d_pdf::pdf_ |
|
private |
◆ xrange_
| std::vector<double> gsl_histogram2d_pdf::xrange_ |
|
private |
◆ yrange_
| std::vector<double> gsl_histogram2d_pdf::yrange_ |
|
private |
The documentation for this class was generated from the following file: