|
Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
|
Namespaces | |
| namespace | detail |
Functions | |
| std::mt19937 | make_engine (std::uint64_t stream_id=0) |
| Create a deterministic RNG engine for a specific stream. | |
| std::mt19937 | make_thread_engine (std::uint64_t stream_id=0) |
| Create a deterministic RNG engine for the current thread (OpenMP if available) | |
| std::mt19937 | 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) | |
| bool | set_global_seed (std::uint32_t s) |
| Set the global seed used by all library RNG components. | |
| std::uint32_t | get_global_seed () |
| Get the current global seed. | |
| bool | is_global_seed_initialized () |
| Check whether the global seed has been explicitly initialized. | |
| std::uint32_t mc::rng::get_global_seed | ( | ) |
Get the current global seed.
Thread-safe.
Definition at line 32 of file rng_global.cpp.
| bool mc::rng::is_global_seed_initialized | ( | ) |
Check whether the global seed has been explicitly initialized.
Definition at line 36 of file rng_global.cpp.
| std::mt19937 mc::rng::make_engine | ( | std::uint64_t | stream_id = 0 | ) |
Create a deterministic RNG engine for a specific stream.
| stream_id | Unique identifier for this RNG stream (default: 0) |
Definition at line 70 of file rng_factory.cpp.
| 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)
| base_seed | If provided, used instead of global seed; otherwise global seed is used |
| stream_id | Unique identifier for this RNG stream |
This avoids the anti-pattern "seed==0 means fallback", since 0 is a valid seed.
Definition at line 88 of file rng_factory.cpp.
| 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)
| stream_id | Additional stream identifier (default: 0) |
If OpenMP is not enabled, falls back to thread_id = 0.
Definition at line 76 of file rng_factory.cpp.
| bool mc::rng::set_global_seed | ( | std::uint32_t | s | ) |
Set the global seed used by all library RNG components.
This function can be called ONLY ONCE.
| s | The seed value to use. |
Thread-safe. If the seed has already been set, the call has no effect.
Definition at line 16 of file rng_global.cpp.