Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
Namespaces | Functions
rng_factory.hpp File Reference

Factory for creating deterministic, independent RNG engines. More...

#include <random>
#include <cstdint>
#include <optional>
Include dependency graph for rng_factory.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mc
 
namespace  mc::rng
 

Functions

std::mt19937 mc::rng::make_engine (std::uint64_t stream_id=0)
 Create a deterministic RNG engine for a specific stream.
 
std::mt19937 mc::rng::make_thread_engine (std::uint64_t stream_id=0)
 Create a deterministic RNG engine for the current thread (OpenMP if available)
 
std::mt19937 mc::rng::make_engine_with_seed (std::optional< std::uint32_t > base_seed, std::uint64_t stream_id)
 Create a deterministic RNG engine with explicit seed override (optional)
 

Detailed Description

Factory for creating deterministic, independent RNG engines.

Date
2026-01-21

Provides functions to create std::mt19937 engines that are:

Uses splitmix64-style mixing for robust seed mixing, avoiding correlations.

Definition in file rng_factory.hpp.