Random number generators and related functions for various distributions. More...
#include <cmath>
#include <cstdlib>
#include <limits>
#include <random>
#include <vector>
Go to the source code of this file.
Namespaces | |
rng | |
Functions related to random number generators for various distributions. | |
Functions | |
double | rng::powerlaw_rand (std::vector< double > ¶m, std::mt19937 &_engine) |
Generates a random real number following a power-law distribution of the form ![]() ![]() | |
double | rng::powerlaw_m1 (std::vector< double > ¶m) |
Returns the first moment of a power-law distribution of the form ![]() ![]() | |
double | rng::powerlaw_hardcutoff_rand (std::vector< double > ¶m, std::mt19937 &_engine) |
Generates a random real number following a power-law distribution of the form ![]() ![]() | |
double | rng::powerlaw_hardcutoff_m1 (std::vector< double > ¶m) |
Returns the first moment of a power-law distribution of the form ![]() ![]() | |
double | rng::exponential_rand (std::vector< double > ¶m, std::mt19937 &_engine) |
Generates a random real number following an exponential distribution of the form ![]() ![]() | |
double | rng::exponential_m1 (double param) |
Returns the first moment of an exponential distribution of the form ![]() ![]() | |
double | rng::gamma_rand (std::vector< double > ¶m, std::mt19937 &_engine) |
Generates a random real number following a gamma distribution of the form ![]() ![]() | |
double | rng::gamma_m1 (std::vector< double > param) |
Returns the first moment of a gamma distribution of the form ![]() ![]() | |
Random number generators and related functions for various distributions.