QUBO++ Library with QUBO Solver APIs
Author: Koji Nakano, License: Non-commercial research and evaluation purposes without any guarantees.
Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
qbpp::misc::RandomGenerator Class Reference

#include <qbpp_misc.hpp>

Static Public Member Functions

static void set_seed (uint32_t seed=1)
 
static void rd_seed ()
 
static uint64_t gen ()
 
template<typename T >
static std::enable_if< std::is_integral< T >::value, T >::type gen (T n)
 
static qbpp::cpp_int gen (const qbpp::cpp_int &n)
 
static double gen_double ()
 
static std::mt19937_64 & get_mt ()
 

Private Member Functions

 RandomGenerator ()
 
 RandomGenerator (const RandomGenerator &)=delete
 
RandomGeneratoroperator= (const RandomGenerator &)=delete
 

Static Private Member Functions

static RandomGeneratorget_instance ()
 

Private Attributes

std::mt19937_64 mt
 

Detailed Description

Definition at line 26 of file qbpp_misc.hpp.

Constructor & Destructor Documentation

◆ RandomGenerator() [1/2]

qbpp::misc::RandomGenerator::RandomGenerator ( )
inlineprivate

Definition at line 29 of file qbpp_misc.hpp.

◆ RandomGenerator() [2/2]

qbpp::misc::RandomGenerator::RandomGenerator ( const RandomGenerator )
privatedelete

Member Function Documentation

◆ operator=()

RandomGenerator& qbpp::misc::RandomGenerator::operator= ( const RandomGenerator )
privatedelete

◆ get_instance()

static RandomGenerator& qbpp::misc::RandomGenerator::get_instance ( )
inlinestaticprivate

Definition at line 35 of file qbpp_misc.hpp.

Here is the caller graph for this function:

◆ set_seed()

static void qbpp::misc::RandomGenerator::set_seed ( uint32_t  seed = 1)
inlinestatic

Definition at line 41 of file qbpp_misc.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rd_seed()

static void qbpp::misc::RandomGenerator::rd_seed ( )
inlinestatic

Definition at line 43 of file qbpp_misc.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen() [1/3]

static uint64_t qbpp::misc::RandomGenerator::gen ( )
inlinestatic

Definition at line 45 of file qbpp_misc.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen() [2/3]

template<typename T >
static std::enable_if<std::is_integral<T>::value, T>::type qbpp::misc::RandomGenerator::gen ( n)
inlinestatic

Definition at line 48 of file qbpp_misc.hpp.

Here is the call graph for this function:

◆ gen() [3/3]

static qbpp::cpp_int qbpp::misc::RandomGenerator::gen ( const qbpp::cpp_int n)
inlinestatic

Definition at line 53 of file qbpp_misc.hpp.

Here is the call graph for this function:

◆ gen_double()

static double qbpp::misc::RandomGenerator::gen_double ( )
inlinestatic

Definition at line 61 of file qbpp_misc.hpp.

Here is the call graph for this function:

◆ get_mt()

static std::mt19937_64& qbpp::misc::RandomGenerator::get_mt ( )
inlinestatic

Definition at line 66 of file qbpp_misc.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mt

std::mt19937_64 qbpp::misc::RandomGenerator::mt
private

Definition at line 27 of file qbpp_misc.hpp.


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