raiigraph
C++ RAII for igraph data structures
Loading...
Searching...
No Matches
Public Member Functions | List of all members
raiigraph::RNGScope Class Reference

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RNGScope() [1/4]

raiigraph::RNGScope::RNGScope ( igraph_uint_t  seed)
inline

Sets PCG32 as the default RNG with the specified seed.

Parameters
seedSeed for the RNG.

◆ RNGScope() [2/4]

raiigraph::RNGScope::RNGScope ( igraph_uint_t  seed,
const igraph_rng_type_t *  type 
)
inline

Sets the specified RNG type as the default with the specified seed.

Parameters
seedSeed for the RNG.
typePointer to the RNG type.

◆ RNGScope() [3/4]

raiigraph::RNGScope::RNGScope ( const igraph_rng_type_t *  type)
inline

Sets the specified RNG type as the default with its default seed.

Parameters
typePointer to the RNG type.

◆ RNGScope() [4/4]

raiigraph::RNGScope::RNGScope ( )
inline

Sets PCG32 as the default with its default seed.


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