Class prob_dens_mdim_bound_gaussian (o2scl)¶
-
template<class vec_t = boost::numeric::ublas::vector<double>, class mat_t = boost::numeric::ublas::matrix<double>>
class prob_dens_mdim_bound_gaussian : public o2scl::prob_dens_mdim_gaussian<boost::numeric::ublas::vector<double>, boost::numeric::ublas::matrix<double>>¶ Gaussian distribution bounded by a hypercube.
Note
This class naively resamples the Gaussian until a sample is within bounds. This is a temporary hack and can be very slow depending on the size of the volume excluded.
Warning
The PDF is not yet properly normalized.
Public Functions
-
inline prob_dens_mdim_bound_gaussian()¶
Create an empty distribution.
-
inline prob_dens_mdim_bound_gaussian(size_t p_ndim, vec_t &p_peak, mat_t &covar, vec_t &p_low, vec_t &p_high)¶
Create a distribution with the specified peak, covariance matrix, lower limits, and upper limits.
-
inline void set(size_t p_ndim, vec_t &p_peak, mat_t &covar, vec_t &p_low, vec_t &p_high)¶
Set the peak, covariance matrix, lower limits, and upper limits.
Note
This function is called in constructors and thus should not be virtual.
-
inline virtual double pdf(const vec_t &x) const¶
Compute the probability density function (arbitrary normalization)
Public Members
-
size_t samp_max¶
Maximum number of samples (default \( 10^5 \))
-
inline prob_dens_mdim_bound_gaussian()¶