8namespace Brush {
namespace Util{
53 std::random_device
rd;
58 std::seed_seq seq{
seed};
60 std::vector<std::uint32_t>
seeds(
rg.size());
63 for (
size_t i = 0;
i <
rg.size(); ++
i) {
76 std::uniform_real_distribution<float>
dist(min, max);
82 std::uniform_real_distribution<float>
dist(min, max);
105 }
while (
rsq >= 1.0 ||
rsq == 0.0);
123 vector<size_t>
idx(
n);
124 std::iota(
idx.begin(),
idx.end(), 0);
void bind_engine(py::module &m, string name)
Defines a multi-core random number generator and its operators.
void shuffle(RandomAccessIterator first, RandomAccessIterator last)
float rnd_flt(float min=0.0, float max=1.0)
vector< size_t > shuffled_index(size_t n)
returns a shuffled index vector of length n
void set_seed(unsigned int seed)
vector< std::mt19937 > rg
float rnd_dbl(float min=0.0, float max=1.0)
int rnd_int(int lowerLimit, int upperLimit)
#define omp_get_max_threads()
#define omp_get_thread_num()
< nsga2 selection operator for getting the front