118 template <std::
integral I>
-
+
+
-
+
123 throw std::invalid_argument(
"Minimum value must be smaller than maximum value.");
-
126 std::uniform_int_distribution<I> distribution(min, max);
+
-
128 return distribution(pseudoRandomGenerator);
+
+
146 template <std::
integral I>
-
+
+
-
149 return Number::integer<I>(
static_cast<I
>(0), max);
+
+
171 template <std::
integral I, IntegerDistribution D>
-
172 static I
integer(D distribution, I min, I max)
+
+
174 if constexpr (std::is_same_v<D, std::uniform_int_distribution<I>>)
-
176 return Number::integer<I>(min, max);
+
-
+
181 throw std::invalid_argument(
"Minimum value must be smaller than maximum value.");
-
184 return std::clamp(distribution(pseudoRandomGenerator), min, max);
+
+
207 template <std::
integral I, IntegerDistribution D>
-
+
+
-
210 return Number::integer<I>(distribution,
static_cast<I
>(0), max);
+
+
225 template <std::
integral I, IntegerDistribution D>
-
+
+
-
228 return distribution(pseudoRandomGenerator);
+
+
246 template <std::
floating_po
int F>
-
+
+
-
+
251 throw std::invalid_argument(
"Minimum value must be smaller than maximum value.");
-
254 std::uniform_real_distribution<F> distribution(min, max);
+
-
256 return distribution(pseudoRandomGenerator);
+
+
280 template <std::
floating_po
int F, DecimalDistribution D>
-
281 static F
decimal(D distribution, F min, F max)
+
+
283 if constexpr (std::is_same_v<D, std::uniform_real_distribution<F>>)
-
285 return Number::decimal<F>(min, max);
+
-
+
290 throw std::invalid_argument(
"Minimum value must be smaller than maximum value.");
-
293 return std::clamp(distribution(pseudoRandomGenerator), min, max);
+
+
312 template <std::
floating_po
int F>
-
+
+
-
315 return decimal<F>(
static_cast<F
>(0.), max);
+
+
337 template <std::
floating_po
int F, DecimalDistribution D>
-
+
+
-
340 return Number::decimal<F>(distribution,
static_cast<F
>(0.), max);
+
+
356 template <std::
floating_po
int F, DecimalDistribution D>
-
+
+
-
359 return distribution(pseudoRandomGenerator);
+
+
-
375 static std::string
hex(std::optional<int> min = std::nullopt, std::optional<int> max = std::nullopt);
+
375 static std::string
hex(std::optional<int>
min = std::nullopt, std::optional<int>
max = std::nullopt);
378 static std::random_device randomDevice;
379 static std::mt19937 pseudoRandomGenerator;
380 static std::string convertToHex(
int number);
+
static I integer(D distribution)
Generates a random integer, unbounded, with a given distribution.
Definition Number.h:226
diff --git a/Person_8h_source.html b/Person_8h_source.html
index d6ec526b1..ff599500c 100644
--- a/Person_8h_source.html
+++ b/Person_8h_source.html
@@ -3,7 +3,7 @@