|
AntHocNet 2.0.0
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
|
SplitMix64: tiny, portable, and bit-identical on every platform (integer arithmetic only; the double is an exact 53-bit scaling). More...
#include <ahn_web/sim.h>
Public Member Functions | |
| SplitMix64 (std::uint64_t seed) | |
A stream starting from seed (every seed is valid). | |
| std::uint64_t | next () |
| Next raw 64-bit value. | |
| double | uniform () |
| Uniform double in [0, 1), from the top 53 bits. | |
| double | uniform (double lo, double hi) |
| Uniform double in [lo, hi). | |
| int | uniformInt (int n) |
| Uniform integer in [0, n); 0 when n <= 0. | |
SplitMix64: tiny, portable, and bit-identical on every platform (integer arithmetic only; the double is an exact 53-bit scaling).
|
inlineexplicit |
| std::uint64_t ahn_web::SplitMix64::next | ( | ) |
Next raw 64-bit value.
| double ahn_web::SplitMix64::uniform | ( | ) |
Uniform double in [0, 1), from the top 53 bits.
Referenced by ahn_web::Node::uniform().
|
inline |
| int ahn_web::SplitMix64::uniformInt | ( | int | n | ) |
Uniform integer in [0, n); 0 when n <= 0.
Referenced by ahn_web::Node::uniformInt().