void uniform_random(TContainer& container, const typename TContainer::value_type min, const typename TContainer::value_type max) { using uniform_distribution = typename uniform_distribution_helper<typename TContainer::value_type>::type; std::cout << typeid(uniform_distribution).name() << '\n'; std::random_device rd; std::mt19937 gen(rd()); // Below line does not work with integers container uniform_distribution distribution(min, max); auto lambda_norm_dist = [&](){ return distribution(gen); }; std::generate(container.begin(), container.end(), lambda_norm_dist); }
typename TContainer::value_type JoinStrings(TContainer const & container, TDelimiter const & delimiter) { return JoinStrings(container.begin(), container.end(), delimiter); }
void fill(TContainer& container) { rrange_insert<TContainer, typename TContainer::iterator> insert_range(container, container.begin()); while (range_.ok() && range_.take2(insert_range)); }
void sort(TContainer & source, const TCmp & cmp) { std::sort(source.begin(), source.end(), cmp); }