19 using container_t = std::vector<element_t>;
25 auto generator = crd::random_generator<element_t>(1, 20);
35 stream <<
"Random numbers : " << v <<
nl;
40 <<
" random numbers are generated" <<
flush;
43template<
typename ContainerType,
typename StopwatchType>
45 const ContainerType& container,
46 const StopwatchType& sw)
48 stream << index <<
"- Minimum: " << container.front()
49 <<
", Maximum: " << container.back()
50 <<
", Elapsed: " << sw.elapsed_time() <<
nl;
61 using container_t = std::vector<element_t>;
67 auto generator = crd::random_generator<element_t>(1, 100);
72 size_t size = 1'000'000;
73 size_t test_count = 5;
82 stream <<
"========== Serial Sort ==========" <<
nL;
83 for(
size_t i = 0; i < test_count; ++i)
85 auto sorted_container = v;
87 std::sort(sorted_container.begin(), sorted_container.end());
void examples_for_random_stopwatch()
void print_constainer(size_t index, const ContainerType &container, const StopwatchType &sw)
void examples_for_serial_sort()
tpf::chrono_random::stop_watch stop_watch
void random_fill(Type(&container)[N], RandomGeneratorType const &random_generator)
Implements random number generator and stop watch.
ContainerType< EleType > sort(ContainerType< EleType, Types... > container, sort_order order=sort_order::ascending, sort_method method=sort_method::size)
Stream output operators << are implemented.