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 with . More... | |
| double | rng::powerlaw_m1 (std::vector< double > ¶m) |
Returns the first moment of a power-law distribution of the form with . More... | |
| 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 with (i.e., hard cut-off). More... | |
| double | rng::powerlaw_hardcutoff_m1 (std::vector< double > ¶m) |
Returns the first moment of a power-law distribution of the form with (i.e., hard cut-off). More... | |
| double | rng::exponential_rand (std::vector< double > ¶m, std::mt19937 &_engine) |
Generates a random real number following an exponential distribution of the form with . More... | |
| double | rng::exponential_m1 (double param) |
Returns the first moment of an exponential distribution of the form with . More... | |
| double | rng::gamma_rand (std::vector< double > ¶m, std::mt19937 &_engine) |
Generates a random real number following a gamma distribution of the form with . More... | |
| double | rng::gamma_m1 (std::vector< double > param) |
Returns the first moment of a gamma distribution of the form with . More... | |
Random number generators and related functions for various distributions.
1.8.6