|
votca 2026-dev
|
Random numbers for kinetic Monte Carlo: one independent stream per (seed, stream) pair. std::seed_seq and mt19937_64 are fully specified by the standard and the uniform numbers are built from the raw bits, so a stream is identical with every standard library (unlike std::uniform_real_distribution / std::normal_distribution). More...
#include <kmcrandom.h>
Public Member Functions | |
| KMCRandom (std::uint64_t seed, std::uint64_t stream) | |
| double | Uniform () |
| uniform in (0,1] | |
| double | Exponential (double rate) |
| Exp(rate), i.e. -ln(u)/rate. | |
| Index | Integer (Index n) |
| uniform integer in [0, n) | |
| double | Normal () |
| standard normal (Box-Muller) | |
Private Attributes | |
| std::mt19937_64 | engine_ |
Random numbers for kinetic Monte Carlo: one independent stream per (seed, stream) pair. std::seed_seq and mt19937_64 are fully specified by the standard and the uniform numbers are built from the raw bits, so a stream is identical with every standard library (unlike std::uniform_real_distribution / std::normal_distribution).
Definition at line 42 of file kmcrandom.h.
| votca::xtp::KMCRandom::KMCRandom | ( | std::uint64_t | seed, |
| std::uint64_t | stream ) |
Definition at line 39 of file kmcengine.cc.
|
inline |
Exp(rate), i.e. -ln(u)/rate.
Definition at line 50 of file kmcrandom.h.
uniform integer in [0, n)
Definition at line 47 of file kmcengine.cc.
| double votca::xtp::KMCRandom::Normal | ( | ) |
standard normal (Box-Muller)
Definition at line 61 of file kmcengine.cc.
|
inline |
uniform in (0,1]
Definition at line 46 of file kmcrandom.h.
|
private |
Definition at line 57 of file kmcrandom.h.