Remove README

This commit is contained in:
Andreas Fabri 2018-12-11 12:33:11 +01:00
parent 162d74baef
commit 3dff3df1a2
2 changed files with 30 additions and 11 deletions

View File

@ -5,6 +5,7 @@
#include <CGAL/point_generators_3.h>
#include <CGAL/Real_timer.h>
#include <CGAL/Triangulation_vertex_base_3.h>
#include <CGAL/bounding_box.h>
#include <iostream>
#include <fstream>
@ -13,23 +14,42 @@
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point;
const int NUM_INSERTED_POINTS = 10000;
const int NUM_INSERTED_POINTS = 1000000;
int main()
int main(int argc, char* argv[])
{
CGAL::Random_points_in_cube_3<Point> rnd(1.);
std::cerr << "Construction of a 3D Delaunay triangulation from a vector of "
<< NUM_INSERTED_POINTS << " random points in a cube" << std::endl;
std::vector<Point> V;
V.reserve(NUM_INSERTED_POINTS);
for (int i = 0; i != NUM_INSERTED_POINTS; ++i)
V.push_back(*rnd++);
if(argc == 1){
CGAL::Random_points_in_cube_3<Point> rnd(1.);
std::cerr << "Construction of a 3D Delaunay triangulation from a vector of "
<< NUM_INSERTED_POINTS << " random points in a cube" << std::endl;
V.reserve(NUM_INSERTED_POINTS);
for (int i = 0; i != NUM_INSERTED_POINTS; ++i)
V.push_back(*rnd++);
} else {
Point p;
std::ifstream in(argv[1]);
while(in >> p){
V.push_back(p);
}
}
// Sequential Delaunay T3
typedef CGAL::Delaunay_triangulation_3<K> SequentialTriangulation;
CGAL::Real_timer t;
t.start();
CGAL::spatial_sort(V.begin(), V.end());
t.stop();
std::cerr << "spatial sort " << t.time() << std::endl;
t.reset();
t.start();
SequentialTriangulation S(V.begin(), V.end());
t.stop();
@ -46,8 +66,7 @@ int main()
t.reset();
t.start();
// Construct the locking data-structure, using the bounding-box of the points
ParallelTriangulation::Lock_data_structure locking_ds(
CGAL::Bbox_3(-1., -1., -1., 1., 1., 1.), 50);
ParallelTriangulation::Lock_data_structure locking_ds(CGAL::bounding_box(V.begin(), V.end()).bbox(), 50);
// Construct the triangulation in parallel
ParallelTriangulation T(V.begin(), V.end(), &locking_ds);
t.stop();