5 #ifndef ROCKY_ZAGROS_INIT_STRATEGY
6 #define ROCKY_ZAGROS_INIT_STRATEGY
7 #include <rocky/zagros/strategies/strategy.h>
16 template<
typename T_e,
int T_dim>
23 template<
typename T_e,
int T_dim>
29 T_e rand_uniform(T_e lb, T_e ub){
30 std::uniform_real_distribution<T_e> dist(lb, ub);
31 return dist(rocky::utils::random::prng());
35 this->problem_ = problem;
36 this->container_ = container;
39 tbb::parallel_for(0, this->container_->n_particles(), [&](
auto p){
40 for(int d=0; d<T_dim; ++d)
41 this->container_->particle(p)[d] = rand_uniform(this->problem_->lower_bound(p), this->problem_->upper_bound(p));