It took too much time for the testsuite in Debug mode

This commit is contained in:
Clement Jamin 2017-06-20 11:20:07 +02:00
parent a8d785e771
commit 6e609f9ca5
1 changed files with 4 additions and 12 deletions

View File

@ -9,7 +9,7 @@
#include <iterator> #include <iterator>
#include <vector> #include <vector>
const int D = 10; const int D = 4;
typedef CGAL::Epick_d< CGAL::Dimension_tag<D> > K; typedef CGAL::Epick_d< CGAL::Dimension_tag<D> > K;
typedef CGAL::Delaunay_triangulation<K> T; typedef CGAL::Delaunay_triangulation<K> T;
// The triangulation uses the default instanciation of the // The triangulation uses the default instanciation of the
@ -17,12 +17,10 @@ typedef CGAL::Delaunay_triangulation<K> T;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int N = 100; // number of points int N = 200; // number of points
if (argc > 1) if (argc > 1)
N = atoi(argv[1]); N = atoi(argv[1]);
CGAL::Timer cost; // timer
// Generate N random points // Generate N random points
typedef CGAL::Random_points_in_cube_d<T::Point> Random_points_iterator; typedef CGAL::Random_points_in_cube_d<T::Point> Random_points_iterator;
Random_points_iterator rand_it(D, 1.0, CGAL::get_default_random()); Random_points_iterator rand_it(D, 1.0, CGAL::get_default_random());
@ -34,10 +32,7 @@ int main(int argc, char **argv)
// insert the points in the triangulation, only if they are outside the // insert the points in the triangulation, only if they are outside the
// convex hull // convex hull
std::cout << " Convex hull of "<<N<<" points in dim " << D << std::flush; std::cout << "Convex hull of " << N << " points in dim " << D << "...\n";
cost.reset();
cost.start();
// Spatial sort points to speed-up localization // Spatial sort points to speed-up localization
CGAL::spatial_sort(points.begin(), points.end(), t.geom_traits()); CGAL::spatial_sort(points.begin(), points.end(), t.geom_traits());
@ -62,9 +57,6 @@ int main(int argc, char **argv)
} }
} }
std::cout << " done in " << cost.time() << " seconds.\n"; std::cout << c << " points were actually inserted.\n";
std::cout << c << " points where actually inserted.\n";
CGAL_assertion( t.is_valid() );
return 0; return 0;
} }