raiigraph
C++ RAII for igraph data structures
|
Control the igraph RNG via RAII. More...
#include <RNGScope.hpp>
Public Member Functions | |
RNGScope (igraph_uint_t seed) | |
RNGScope (igraph_uint_t seed, const igraph_rng_type_t *type) | |
RNGScope (const igraph_rng_type_t *type) | |
RNGScope () | |
Control the igraph RNG via RAII.
When an instance of this class is created, it will replace the global default igraph RNG with its own. When it is destroyed, it will restore the default to the RNG that was present before its construction.
|
inline |
Sets PCG32 as the default RNG with the specified seed
.
seed | Seed for the RNG. |
|
inline |
Sets the specified RNG type as the default with the specified seed
.
seed | Seed for the RNG. |
type | Pointer to the RNG type. |
|
inline |
Sets the specified RNG type as the default with its default seed.
type | Pointer to the RNG type. |
|
inline |
Sets PCG32 as the default with its default seed.