Class prob_dens_uniform (o2scl)¶
-
class
o2scl
::
prob_dens_uniform
: public o2scl::prob_dens_frange¶ A uniform one-dimensional probability density over a finite range.
A flat distribution given by \( P(x)=1/(b-a) \) for \( a<x<b \), where \( a \) is the lower limit and \( b \) is the upper limit.
This class is experimental.
Public Functions
-
prob_dens_uniform
()¶ Create a blank uniform distribution.
-
prob_dens_uniform
(double a, double b)¶ Create a uniform distribution from \( a<x<b \).
-
~prob_dens_uniform
()¶
-
prob_dens_uniform
(const prob_dens_uniform &pdg)¶ Copy constructor.
-
prob_dens_uniform &
operator=
(const prob_dens_uniform &pdg)¶ Copy constructor with operator=.
-
void
set_seed
(unsigned long int s)¶ Set the seed.
-
void
set_limits
(double a, double b)¶ Set the limits of the uniform distribution.
-
double
lower_limit
() const¶ Lower limit of the range.
-
double
upper_limit
() const¶ Uower limit of the range.
-
double
operator()
() const¶ Operator from the specified density.
-
double
pdf
(double x) const¶ The normalized density.
-
double
log_pdf
(double x) const¶ The log of the normalized density.
-
double
cdf
(double x) const¶ The cumulative distribution function (from the lower tail)
-
double
invert_cdf
(double in_cdf) const¶ The inverse cumulative distribution function.
-
double
entropy
() const¶ Entropy of the distribution ( \( - \int f \ln f \) )
-