Class powerlaw_distribution

Inheritance Relationships

Derived Type

Class Documentation

class powerlaw_distribution

Represents a power law distribution (duh) of x^pwr where x is in [lb, ub]. Constructed from a uniform distribution on [0, 1].

Subclassed by rcppsw::math::binned_powerlaw_distribution

Public Functions

inline powerlaw_distribution(size_t lb, size_t ub, size_t pwr)

Initialize distribution.

Parameters:
  • lb – Lower bound for distribution. Assumed to be a multiple of pwr.

  • ub – Upper bound for distribution. Assumed to be a multiple of pwr.

  • pwr – Power for distribution.

virtual ~powerlaw_distribution(void) = default
inline size_t lb(void) const
inline double operator()(rng *rng)
inline size_t pwr(void) const
inline size_t ub(void) const