|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
真随机数生成器 更多...
#include <random.hpp>
静态 Public 成员函数 | |
| template<typename T> | |
| static T | next_int (T max) |
| 生成 [0, max) 范围内的随机整数 | |
| template<typename T> | |
| static T | next_int (T min, T max) |
| 生成 [min, max) 范围内的随机整数 | |
| template<typename T> | |
| static T | next_int () |
| 生成完整范围的随机整数 | |
| static uint64_t | next_uint64 (uint64_t max) |
| 生成 [0, max) 范围内的随机 64 位整数 | |
| static uint64_t | next_uint64 () |
| 生成完整范围的随机 64 位整数 | |
| template<typename T> | |
| static T | next_float () |
| 生成 [0, 1) 范围内的随机浮点数 | |
| template<typename T> | |
| static T | next_float (T min, T max) |
| 生成 [min, max) 范围内的随机浮点数 | |
| template<typename T> | |
| static T | next_float (T max) |
| 生成 [0, max) 范围内的随机浮点数 | |
| static bool | system_supported () |
| 检查系统是否支持真随机数生成 | |
|
inlinestatic |
生成 [0, 1) 范围内的随机浮点数
| T | 浮点类型 |
在文件 random.hpp 第 482 行定义.
引用了 is_floating_point_v , 以及 numeric_traits< T, Dummy >::max().
被这些函数引用 next_float() , 以及 next_float().
|
inlinestatic |
生成 [0, max) 范围内的随机浮点数
| T | 浮点类型 |
| max | 上限(不包含) |
在文件 random.hpp 第 512 行定义.
引用了 is_floating_point_v, max() , 以及 next_float().
|
inlinestatic |
生成 [min, max) 范围内的随机浮点数
| T | 浮点类型 |
| min | 下限(包含) |
| max | 上限(不包含) |
在文件 random.hpp 第 497 行定义.
引用了 is_floating_point_v, max(), min() , 以及 next_float().
|
inlinestatic |
|
inlinestatic |
生成 [0, max) 范围内的随机整数
| T | 整形类型 |
| max | 上限(不包含) |
在文件 random.hpp 第 412 行定义.
引用了 is_integral_v , 以及 max().
|
inlinestatic |
生成 [min, max) 范围内的随机整数
| T | 整形类型 |
| min | 下限(包含) |
| max | 上限(不包含) |
在文件 random.hpp 第 435 行定义.
引用了 max(), min() , 以及 next_int().
|
inlinestatic |
生成 [0, max) 范围内的随机 64 位整数
| max | 上限(不包含) |
在文件 random.hpp 第 458 行定义.
引用了 max().
|
static |
检查系统是否支持真随机数生成