includes: Added documentations for all remaining types and functions

This commit is contained in:
Nik
2023-03-28 15:28:44 +02:00
committed by GitHub
parent 5d72494019
commit b73b69a8cc
20 changed files with 381 additions and 42 deletions

View File

@@ -23,12 +23,11 @@ namespace std::random {
FisherF = 8,
StudentT = 9,
LogNormal = 10,
Discrete = 11,
Bernoulli = 12,
Binomial = 13,
NegativeBinomial = 14,
Geometric = 15,
Poisson = 16
Bernoulli = 11,
Binomial = 12,
NegativeBinomial = 13,
Geometric = 14,
Poisson = 15
};
/**
@@ -42,6 +41,25 @@ namespace std::random {
/**
Generates a random number using the given distribution with the given parameters.
The random number generator used internally is C++'s std::mt19937_64 Mersenne Twister implementation.
> **Distributions**
> - `Uniform(min, max) -> i128`
> - `Normal(mean, stddev) -> double`
> - `Exponential(lambda) -> double`
> - `Gamma(alpha, beta) -> double`
> - `Weibull(a, b) -> double`
> - `ExtremeValue(a, b) -> double`
> - `ChiSquared(n) -> double`
> - `Cauchy(a, b) -> double`
> - `FisherF(m, n) -> double`
> - `StudentT(n) -> double`
> - `LogNormal(m, s) -> double`
> - `Bernoulli(p) -> bool`
> - `Binomial(t, p) -> i128`
> - `NegativeBinomial(k, p) -> i128`
> - `Geometric(p) -> i128`
> - `Poisson(mean) -> i128`
@param distribution Distribution to use
@param param1 This parameter depends on the type of distribution used.
@param param2 This parameter depends on the type of distribution used.