votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::ModelRandom Class Reference

Platform independent random numbers for the stochastic models: mt19937_64 with self-written transforms (the std:: distributions differ between standard libraries). More...

#include <stochasticnetwork.h>

Public Member Functions

 ModelRandom (std::uint64_t seed, std::uint64_t stream)
 independent streams for the same seed (points, energies, pairs)
double Uniform ()
 in (0,1]
double Normal ()
Index Poisson (double mean)
 Poisson distributed count.
Index Integer (Index n)
 integer in [0, n)

Private Attributes

std::mt19937_64 engine_
bool has_spare_ = false
double spare_ = 0.0

Detailed Description

Platform independent random numbers for the stochastic models: mt19937_64 with self-written transforms (the std:: distributions differ between standard libraries).

Definition at line 51 of file stochasticnetwork.h.

Constructor & Destructor Documentation

◆ ModelRandom()

votca::xtp::ModelRandom::ModelRandom ( std::uint64_t seed,
std::uint64_t stream )

independent streams for the same seed (points, energies, pairs)

Definition at line 45 of file stochasticnetwork.cc.

Member Function Documentation

◆ Integer()

Index votca::xtp::ModelRandom::Integer ( Index n)

integer in [0, n)

Definition at line 84 of file stochasticnetwork.cc.

◆ Normal()

double votca::xtp::ModelRandom::Normal ( )

Definition at line 53 of file stochasticnetwork.cc.

◆ Poisson()

Index votca::xtp::ModelRandom::Poisson ( double mean)

Poisson distributed count.

Definition at line 65 of file stochasticnetwork.cc.

◆ Uniform()

double votca::xtp::ModelRandom::Uniform ( )
inline

in (0,1]

Definition at line 56 of file stochasticnetwork.h.

Member Data Documentation

◆ engine_

std::mt19937_64 votca::xtp::ModelRandom::engine_
private

Definition at line 66 of file stochasticnetwork.h.

◆ has_spare_

bool votca::xtp::ModelRandom::has_spare_ = false
private

Definition at line 67 of file stochasticnetwork.h.

◆ spare_

double votca::xtp::ModelRandom::spare_ = 0.0
private

Definition at line 68 of file stochasticnetwork.h.


The documentation for this class was generated from the following files: