29# include <gsl/gsl_rng.h>
42 for (
size_t i = 0; i < n; ++i)
52 size_t sample_size = 128;
62 for (
size_t i = 0; i <
num_exp; ++i)
64 cout <<
"Testing sample size: " << sample_size <<
endl;
68 bf[i] =
gw[i] =
qh[i] = 0.0;
70 for (
size_t j = 0; j <
num_test; ++j)
77 qh[i] +=
now.elapsed();
81 gw[i] +=
now.elapsed();
85 bf[i] +=
now.elapsed();
88 sample_size = sample_size << 1;
91 cout <<
"Sample size\tQuick hull\tGift wrapping\tBrute force\n"
92 <<
"===========\t===========\t=============\t==========\n";
94 for (
size_t i = 0; i <
num_exp; ++i)
High-resolution timer and benchmarking utilities.
Brute force convex hull algorithm.
Dynamic singly linked list with functional programming support.
T & append(const T &item)
Gift wrapping (Jarvis march) convex hull algorithm.
Class Now is a practical class for timing based in a high resolution clock.
TimePointType start()
Sets internally the current time point.
Represents a point with rectangular coordinates in a 2D plane.
QuickHull convex hull algorithm.
Computational geometry algorithms.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
Points generate_points(size_t n, gsl_rng *&rng)