From 0971a25b032e107c839a030449a7989cae851831 Mon Sep 17 00:00:00 2001 From: Iordan Iordanov Date: Thu, 27 Dec 2018 08:54:27 +0100 Subject: [PATCH] deleted unused benchmark files --- .../test_euclidean_triangulation.cpp | 81 -------------- .../test_euclidean_triangulation_dynamic.cpp | 88 --------------- .../test_hyperbolic_triangulation.cpp | 81 -------------- .../test_hyperbolic_triangulation_dynamic.cpp | 100 ------------------ 4 files changed, 350 deletions(-) delete mode 100644 Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_euclidean_triangulation.cpp delete mode 100644 Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_euclidean_triangulation_dynamic.cpp delete mode 100644 Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_hyperbolic_triangulation.cpp delete mode 100644 Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_hyperbolic_triangulation_dynamic.cpp diff --git a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_euclidean_triangulation.cpp b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_euclidean_triangulation.cpp deleted file mode 100644 index 48e554f7f67..00000000000 --- a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_euclidean_triangulation.cpp +++ /dev/null @@ -1,81 +0,0 @@ -#include - -#include -#include - -#include - -#include - -typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef K::Point_2 Point_2; -typedef K::FT FT; - -typedef CGAL::Delaunay_triangulation_2 Dt; - -int main(int argc, char** argv) -{ - FT r = 1; - FT eps = 0; - for(int k = 0; k < 2; k++) - { - if(k == 0) - eps = 1e-3; - else if(k == 1) - eps = 1e-7; - - int trials_nb = 10; - int start_nb = 10000; - - std::cout << std::endl << eps << std::endl << std::endl; - - for(int nb=start_nb, k=0; k<4; nb=nb*10, ++k) - { - std::vector< std::vector > pts(trials_nb); - for(int i=0; i 1 && argv[1][0] == 'e') - Random_points_in_disc_2(pts[i], nb, i, eps); - else - Hyperbolic_random_points_in_disc_2(pts[i], nb, i, eps); - } - - double average_time = 0; - double average_nb = 0; - double average_nb_of_edges = 0; - for(int trials = 0; trials < trials_nb; trials++) - { - Dt dt = Dt(); - - CGAL::Timer timer; - timer.start(); - - dt.insert(pts[trials].begin(), pts[trials].end()); - timer.stop(); - - average_time += timer.time(); - timer.reset(); - - average_nb += dt.number_of_vertices(); - - average_nb_of_edges = 0; - for(Dt::Finite_edges_iterator eit = dt.finite_edges_begin(); eit != dt.finite_edges_end(); ++eit) - average_nb_of_edges++; - } - - average_time = average_time / trials_nb; - average_nb = average_nb / trials_nb; - //average_nb_of_edges = average_nb_of_edges/10; - - std::cout << "R^2" << std::endl; - std::cout << "Radius: " << r << std::endl; - std::cout << "Eps: " << eps << std::endl; - std::cout << "Number of points: " << average_nb << std::endl; - std::cout << "Time: " << average_time << std::endl; - std::cout << "number of edges " << average_nb_of_edges << std::endl; - std::cout << std::endl; - } - } - - return 0; -} diff --git a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_euclidean_triangulation_dynamic.cpp b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_euclidean_triangulation_dynamic.cpp deleted file mode 100644 index 66ab5b2e19c..00000000000 --- a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_euclidean_triangulation_dynamic.cpp +++ /dev/null @@ -1,88 +0,0 @@ -#include - -// CGAL headers -#include -#include - -// to compare with hyperbolic traits -// #include - -#include - -#include - -typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef K::FT FT; -typedef K::Point_2 Point_2; - -typedef CGAL::Delaunay_triangulation_2 Dt; - -//typedef CGAL::Hyperbolic_triangulation_traits_2 Gt; -//typedef CGAL::Delaunay_triangulation_2 Dt2; - -int main(int argc, char *argv[]) -{ - FT r = 1; - FT eps = 0; - for(int k=0; k<2; ++k) - { - if(k == 0) - eps = 1e-3; - else if(k == 1) - eps = 1e-7; - - int trials_nb = 10; - int start_nb = 10000; - - std::cout << std::endl << eps << std::endl << std::endl; - - for(int nb = start_nb, k = 0; k < 4; nb = nb*10, ++k) - { - std::vector > pts(trials_nb); - for(int i=0; i 1 && argv[1][0] == 'e') - Random_points_in_disc_2(pts[i], nb, i, eps); - else - Hyperbolic_random_points_in_disc_2(pts[i], nb, i, eps); - } - - double average_time = 0; - double average_nb = 0; - for(int trials = 0; trials < trials_nb; trials++) - { - Dt dt = Dt(); - //Dt2 dt = Dt2(); - - CGAL::Timer timer; - timer.start(); - - spatial_sort (pts[trials].begin(), pts[trials].end(), K()); - Dt::Face_handle f; - //Dt2::Face_handle f; - - for(int i=0; iface(); - - timer.stop(); - - average_time += timer.time(); - timer.reset(); - - average_nb += dt.number_of_vertices(); - } - - average_time = average_time / trials_nb; - average_nb = average_nb / trials_nb; - - std::cout << "R^2" << std::endl; - std::cout << "Radius: " << r << std::endl; - std::cout << "Eps: " << eps << std::endl; - std::cout << "Number of points: " << average_nb << std::endl; - std::cout << "Time: " << average_time << std::endl; - std::cout << std::endl; - } - } - - return 0; -} diff --git a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_hyperbolic_triangulation.cpp b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_hyperbolic_triangulation.cpp deleted file mode 100644 index bee7a90c972..00000000000 --- a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/test_hyperbolic_triangulation.cpp +++ /dev/null @@ -1,81 +0,0 @@ -#include - -#include -#include -#include - -#include - -typedef CGAL::Exact_circular_kernel_2 K; -typedef K::FT FT; -typedef K::Point_2 Point_2; - -typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2 Gt; -typedef CGAL::Hyperbolic_Delaunay_triangulation_2 HDt; - -int main(int argc, char *argv[]) -{ - FT eps = 0; - for(int k=0; k<2; ++k) - { - if(k == 0) - eps = 1e-3; - else if(k == 1) - eps = 1e-7; - - int trials_nb = 10; - int start_nb = 10000; - - std::cout << std::endl << eps << std::endl << std::endl; - - for(int nb=start_nb, k=0; k<4; nb=nb*10, ++k) - { - std::vector > pts(trials_nb); - for(int i=0; i 1 && argv[1][0] == 'e') - Random_points_in_disc_2(pts[i], nb, i, eps); - else - Hyperbolic_random_points_in_disc_2(pts[i], nb, i, eps); - } - - double average_time = 0; - double average_nb = 0; - double average_nb_of_edges = 0; - - for(int trials=0; trials - -#include -#include -#include - -#include - -#include - -typedef CGAL::Exact_circular_kernel_2 K; -typedef K::FT FT; -typedef K::Point_2 Point_2; - -typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2 Gt; -typedef CGAL::Hyperbolic_Delaunay_triangulation_2 HDt; -typedef HDt::Vertex_handle Vertex_handle; -typedef HDt::Face_handle Face_handle; - -int main(int argc, char *argv[]) -{ - FT eps = 0; - for(int k=0; k<2; ++k) - { - if(k == 0) - eps = 1e-3; - else if(k == 1) - eps = 1e-7; - - int trials_nb = 10; - int start_nb = 10000; - - std::cout << std::endl << eps << std::endl << std::endl; - - for(int nb=start_nb, k=0; k<4; nb=nb*10, ++k) - { - std::vector > pts(trials_nb); - for(int i=0; i 1 && argv[1][0] == 'e') - Random_points_in_disc_2(pts[i], nb, i, eps); - else - Hyperbolic_random_points_in_disc_2(pts[i], nb, i, eps); - } - - double average_time = 0; - double average_nb = 0; - for(int trials = 0; trials < trials_nb; trials++) - { - HDt hdt; - - CGAL::Timer timer; - - // Hyperbolic - - timer.reset(); - timer.start(); - - spatial_sort (pts[trials].begin(), pts[trials].end(), K()); - HDt::Face_handle f; - - for(int i=0; iface(); - - timer.stop(); - - //std::cout << "Time for H^2 " << timer.time() << std::endl; - //std::cout << "points nb for H^2 " << hdt.number_of_vertices() << std::endl; - - // Euclidean -/* - timer.reset(); - timer.start(); - - Dt::Face_handle f2; - for(int i=0; iface(); - - timer.stop(); - std::cout << std::endl << "Time for E^2 " << timer.time() << std::endl; - std::cout << "points nb for E^2 " << dt.number_of_vertices() << std::endl; -*/ - - average_time += timer.time(); - timer.reset(); - - average_nb += hdt.number_of_vertices(); - } - - average_time = average_time / trials_nb; - average_nb = average_nb / trials_nb; - - std::cout << "Eps: " << eps << std::endl; - std::cout << "Number of points: " << average_nb << std::endl; - std::cout << "Time: " << average_time << std::endl; - std::cout << std::endl; - } - } - - return 0; -}