// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of an example program for CGAL. This example // program may be used, distributed and modified without limitation. // /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* * example2.C - bench mark * Simple example the CGAL KD-tree module. * * Written by Sariel Har-Peled * Iddo Hanniel \*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ #include #include #include #include #include #include #include #include #include #include typedef CGAL::Cartesian K; typedef K::Point_3 Point; typedef CGAL::Kdtree_interface_3d kd_interface; typedef CGAL::Kdtree_d kd_tree; typedef kd_tree::Box box; typedef std::list points_list; int main() { CGAL::Kdtree_d tree(3); CGAL::Timer t; const int dim=3; // const int data_point_number=1000000; const int data_point_number=10000; typedef std::list point_list; point_list data_points,res; // get data points // add random points of dimension dim to data_points CGAL::Random Rnd; // std::cout << "started tstrandom()" << std::endl; for (int i1=0; i1