48 static typename std::enable_if<std::is_integral<T>::value, T>::type
gen(T n) {
49 std::uniform_int_distribution<qbpp::vindex_t> dist(0, n - 1);
56 val = (val << 64) +
gen();
57 }
while (val < (n << 32));
62 std::uniform_real_distribution<double> dist(0.0, 1.0);
73 std::vector<uint32_t>
perm;
79 std::iota(
perm.begin(),
perm.end(), 0);
86 uint32_t current =
index;
94 if (file) pclose(file);
RandomGenerator & operator=(const RandomGenerator &)=delete
static std::mt19937_64 & get_mt()
static void set_seed(uint32_t seed=1)
RandomGenerator(const RandomGenerator &)=delete
static RandomGenerator & get_instance()
static double gen_double()
static std::enable_if< std::is_integral< T >::value, T >::type gen(T n)
static qbpp::cpp_int gen(const qbpp::cpp_int &n)
std::vector< uint32_t > perm
RandomPermutation(uint32_t size)
Generates a QUBO Expression for the Graph Coloring Problem using QUBO++ library.
boost::multiprecision::cpp_int cpp_int
QUBO++, a C++ library for generating expressions for binary and spin variables.
void operator()(FILE *file) const