Class prob_dens_func (o2scl)

O2scl : Class List

class prob_dens_func

A one-dimensional probability density function.

This class is experimental.

Todo

Future: Give functions for mean, median, mode, variance, etc?

Subclassed by o2scl::prob_dens_frange, o2scl::prob_dens_gaussian, o2scl::prob_dens_positive

Public Functions

inline virtual ~prob_dens_func()
inline virtual double operator()() const

Sample from the specified density.

inline virtual double sample() const

Sample from the specified density.

inline virtual double pdf(double x) const

The normalized density.

inline virtual double log_pdf(double x) const

The log of the normalized density.

inline virtual double cdf(double x) const

The cumulative distribution function (from the lower tail)

inline virtual double invert_cdf(double cdf) const

The inverse cumulative distribution function.

inline virtual double entropy() const

Entropy of the distribution ( \( - \int f \ln f \) )