deleted unused benchmark files

This commit is contained in:
Iordan Iordanov 2018-12-27 08:54:27 +01:00
parent 89a8ee1003
commit 0971a25b03
4 changed files with 0 additions and 350 deletions

View File

@ -1,81 +0,0 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Hyperbolic_random_points_in_disc_2.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Timer.h>
#include <iostream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point_2;
typedef K::FT FT;
typedef CGAL::Delaunay_triangulation_2<K> 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<Point_2> > pts(trials_nb);
for(int i=0; i<trials_nb; ++i)
{
if(argc > 1 && argv[1][0] == 'e')
Random_points_in_disc_2<K>(pts[i], nb, i, eps);
else
Hyperbolic_random_points_in_disc_2<K>(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;
}

View File

@ -1,88 +0,0 @@
#include <CGAL/Hyperbolic_random_points_in_disc_2.h>
// CGAL headers
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
// to compare with hyperbolic traits
// #include <CGAL/Hyperbolic_triangulation_traits_2.h>
#include <CGAL/Timer.h>
#include <iostream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::FT FT;
typedef K::Point_2 Point_2;
typedef CGAL::Delaunay_triangulation_2<K> Dt;
//typedef CGAL::Hyperbolic_triangulation_traits_2<K> Gt;
//typedef CGAL::Delaunay_triangulation_2<Gt> 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<std::vector<Point_2> > pts(trials_nb);
for(int i=0; i<trials_nb; ++i)
{
if(argc > 1 && argv[1][0] == 'e')
Random_points_in_disc_2<K>(pts[i], nb, i, eps);
else
Hyperbolic_random_points_in_disc_2<K>(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; i<nb; ++i)
f = dt.insert(pts[trials][i], f)->face();
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;
}

View File

@ -1,81 +0,0 @@
#include <CGAL/Exact_circular_kernel_2.h>
#include <CGAL/Hyperbolic_random_points_in_disc_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Timer.h>
typedef CGAL::Exact_circular_kernel_2 K;
typedef K::FT FT;
typedef K::Point_2 Point_2;
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<K> Gt;
typedef CGAL::Hyperbolic_Delaunay_triangulation_2<Gt> 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<std::vector<Point_2> > pts(trials_nb);
for(int i=0; i<trials_nb; ++i)
{
if(argc > 1 && argv[1][0] == 'e')
Random_points_in_disc_2<K>(pts[i], nb, i, eps);
else
Hyperbolic_random_points_in_disc_2<K>(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)
{
HDt hdt;
CGAL::Timer timer;
timer.start();
hdt.insert(pts[trials].begin(), pts[trials].end());
timer.stop();
average_time += timer.time();
timer.reset();
average_nb += hdt.number_of_vertices();
average_nb_of_edges = 0;
for(HDt::Hyperbolic_edges_iterator eit = hdt.hyperbolic_edges_begin();
eit != hdt.hyperbolic_edges_end(); ++eit)
{
++average_nb_of_edges;
}
}
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 << "number of edges " << average_nb_of_edges << std::endl;
std::cout << std::endl;
}
}
return 0;
}

View File

@ -1,100 +0,0 @@
#include <CGAL/Exact_circular_kernel_2.h>
#include <CGAL/Hyperbolic_random_points_in_disc_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Timer.h>
#include <iostream>
typedef CGAL::Exact_circular_kernel_2 K;
typedef K::FT FT;
typedef K::Point_2 Point_2;
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<K> Gt;
typedef CGAL::Hyperbolic_Delaunay_triangulation_2<Gt> 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<std::vector<Point_2> > pts(trials_nb);
for(int i=0; i<trials_nb; ++i) {
if(argc > 1 && argv[1][0] == 'e')
Random_points_in_disc_2<K>(pts[i], nb, i, eps);
else
Hyperbolic_random_points_in_disc_2<K>(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; i<nb; ++i)
f = hdt.insert(pts[trials][i], f)->face();
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; i<nb; ++i)
f2 = dt.insert(pts[trials][i], f2)->face();
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;
}