Class binned_powerlaw_distribution
Defined in File binned_powerlaw_distribution.hpp
Inheritance Relationships
Base Type
public rcppsw::math::powerlaw_distribution
(Class powerlaw_distribution)
Class Documentation
-
class binned_powerlaw_distribution : public rcppsw::math::powerlaw_distribution
A power law distribution (duh) of x^pwr where x is in [lb, ub], where the outputs are rounded to the nearest power of pwr. For example, instead of sampling and getting 3.78, with pwr=2 you would get 4.
Public Functions
-
inline binned_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.
-
inline binned_powerlaw_distribution(size_t lb, size_t ub, size_t pwr)