Class which uses PENELOPE's RITA inversion sampling algorithm to sample from a continuous distribution.
More...
#include <probability_dist.h>
|
| ContinuousInversion (std::function< double(double, double)> &PDF, Eigen::VectorXd &energies, double x_min, double x_max, double err_thresh=1E-4) |
| Constructor for the ContinuousInversion class.
|
|
double | sample (double E) const |
| Returns a sample from the continuous distribution.
|
|
|
void | normalizePDF (double E) |
|
double | getXFromY (int energy_index, double y) const |
|
void | initializeCDFAndInterpolationParameters () |
|
Eigen::Array< double, Eigen::Dynamic, 2 > | calculateInterpolationParametersPerEnergy (double E, Eigen::Array< double, Eigen::Dynamic, 2 > CDF_RITA_PER_ENERGY) |
|
Eigen::Array< double, Eigen::Dynamic, 2 > | getMinimizedErrorCDFPerEnergy (double E, double err_thresh) |
|
Eigen::Array< double, Eigen::Dynamic, 2 > | generateCDFPerEnergy (double E, Eigen::VectorXd x_grid) |
|
double | getInterpErrorOverInterval (double E, IntervalData id) const |
|
double | getPDFFromCDFOverInterval (double E, double x, IntervalData id) const |
|
double | getEta (double x, IntervalData id) const |
|
Class which uses PENELOPE's RITA inversion sampling algorithm to sample from a continuous distribution.
Definition at line 112 of file probability_dist.h.
◆ ContinuousInversion()
ProbabilityDist::ContinuousInversion::ContinuousInversion |
( |
std::function< double(double, double)> & | PDF, |
|
|
Eigen::VectorXd & | energies, |
|
|
double | x_min, |
|
|
double | x_max, |
|
|
double | err_thresh = 1E-4 ) |
|
explicit |
Constructor for the ContinuousInversion class.
- Parameters
-
PDF | The probability density function to sample from. |
energies | The energies at which to generate the CDF. |
x_min | The minimum value of the distribution. |
x_max | The maximum value of the distribution. |
err_thresh | The maximum error allowed for the between the interpolated PDF and the actual PDF. |
◆ sample()
double ProbabilityDist::ContinuousInversion::sample |
( |
double | E | ) |
const |
Returns a sample from the continuous distribution.
- Parameters
-
E | The energy at which to sample from the distribution. |
- Returns
- A sample from the continuous distribution.
◆ CDF_
std::vector<Eigen::Array<double, Eigen::Dynamic, 2> > ProbabilityDist::ContinuousInversion::CDF_ |
|
private |
◆ energies_
Eigen::VectorXd ProbabilityDist::ContinuousInversion::energies_ |
|
private |
◆ err_thresh_
double ProbabilityDist::ContinuousInversion::err_thresh_ |
|
private |
◆ interp_parameters_
std::vector<Eigen::Array<double, Eigen::Dynamic, 2> > ProbabilityDist::ContinuousInversion::interp_parameters_ |
|
private |
◆ normalized_PDF_
std::function<double(double, double)> ProbabilityDist::ContinuousInversion::normalized_PDF_ |
|
private |
◆ PDF_
std::function<double(double, double)> ProbabilityDist::ContinuousInversion::PDF_ |
|
private |
◆ uniform_dist_
◆ x_max_
double ProbabilityDist::ContinuousInversion::x_max_ |
|
private |
◆ x_min_
double ProbabilityDist::ContinuousInversion::x_min_ |
|
private |
The documentation for this class was generated from the following file: