47 for (
size_t i = 0; i < n; ++i)
55 constexpr size_t num_exp = 6;
56 constexpr size_t num_test = 12;
57 size_t sample_size = 128;
66 for (
size_t i = 0; i < num_exp; ++i)
68 cout <<
"Testing sample size: " << sample_size << endl;
72 bf[i] = gw[i] = qh[i] = 0.0;
74 for (
size_t j = 0; j < num_test; ++j)
92 sample_size = sample_size << 1;
95 cout <<
"Sample size\tQuick hull\tGift wrapping\tBrute force\n"
96 <<
"===========\t===========\t=============\t==========\n";
98 for (
size_t i = 0; i < num_exp; ++i)
99 cout << sz[i] <<
'\t' << qh[i]/num_test <<
'\t' << gw[i]/num_test
100 <<
'\t' << bf[i]/num_test << endl;
The random number generators of Aleph: the one that gives the numbers of the gsl_rng_mt19937 of GSL,...
High-resolution timer and benchmarking utilities.
Brute force convex hull algorithm.
Doubly-linked list (defined in tpl_dynList.H).
T & append(const T &item)
Gift wrapping (Jarvis march) convex hull algorithm.
A random number generator with the sequences of GSL's gsl_rng_mt19937.
Class Now is a practical class for timing based in a high resolution clock.
TimePointType start()
Sets internally the current time point.
double elapsed()
Calculates the time that has elapsed since the last time start(), elapsed() or delta() was called.
Represents a point with rectangular coordinates in a 2D plane.
QuickHull convex hull algorithm.
Computational geometry algorithms.
Points generate_points(size_t n, Gsl_Compatible_Rng &rng)