#include <random.hpp>
|
| std::string | generate_random_string (const size_t length) |
| | Generates alphanumeric random string.
|
| template<typename T = int> |
| int | get_random_int (T min, T max) |
| | Generates a random integer between min and max.
|
| template<typename T = int> |
| std::chrono::milliseconds | get_random_interval_ms (T min_ms, T max_ms) |
| | Generates a random interval between min_ms and max_ms with the granularity of one ms.
|
Definition at line 34 of file random.hpp.
◆ generate_random_string()
| std::string rav::Random::generate_random_string |
( |
const size_t | length | ) |
|
|
inline |
Generates alphanumeric random string.
- Parameters
-
| length | The length of the string to generate. |
- Returns
- The pseudo randomly generated string
Definition at line 41 of file random.hpp.
◆ get_random_int()
template<typename T = int>
| int rav::Random::get_random_int |
( |
T | min, |
|
|
T | max ) |
|
inline |
Generates a random integer between min and max.
- Template Parameters
-
| T | The type of the integer. |
- Parameters
-
| min | The minimum value. |
| max | The maximum value. |
- Returns
- The pseudo randomly generated integer.
Definition at line 60 of file random.hpp.
◆ get_random_interval_ms()
template<typename T = int>
| std::chrono::milliseconds rav::Random::get_random_interval_ms |
( |
T | min_ms, |
|
|
T | max_ms ) |
|
inline |
Generates a random interval between min_ms and max_ms with the granularity of one ms.
- Template Parameters
-
| T | The type of the uniform_int_distribution IntType. |
- Parameters
-
| min_ms | The minimum value in milliseconds. |
| max_ms | The maximum value in milliseconds. |
- Returns
- The pseudo randomly generated interval.
Definition at line 73 of file random.hpp.
The documentation for this class was generated from the following file: