From 25bd09dc6e2782eb57a670e272eff8ea2e89c366 Mon Sep 17 00:00:00 2001 From: Hans Tangelder Date: Tue, 10 Dec 2002 10:32:39 +0000 Subject: [PATCH] *** empty log message *** --- .../examples/Spatial_searching/Example7.C | 9 ++++----- .../examples/Spatial_searching/Example8.C | 8 ++++---- .../examples/Spatial_searching/Example9.C | 19 ++++++++++--------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Packages/Spatial_searching/examples/Spatial_searching/Example7.C b/Packages/Spatial_searching/examples/Spatial_searching/Example7.C index 94a62c75541..b08e8efc101 100755 --- a/Packages/Spatial_searching/examples/Spatial_searching/Example7.C +++ b/Packages/Spatial_searching/examples/Spatial_searching/Example7.C @@ -4,7 +4,6 @@ // both generated with Random_points_in_cube_3 // comparing ASPAS to brute force method - // #include #include @@ -119,9 +118,9 @@ operator==(const Point& p, const Point& q) -// typedef CGAL::Kernel_traits::Kernel K; -// typedef K::FT NT; -typedef double NT; +typedef CGAL::Kernel_traits::Kernel K; +typedef K::FT NT; +// typedef double NT; causes IRIS compiler problem ?? typedef CGAL::Plane_separator Separator; typedef CGAL::Kd_tree_traits_point Traits; @@ -129,7 +128,7 @@ typedef CGAL::Creator_uniform_3 Creator; typedef CGAL::Nearest_neighbour_L2_standard_search Nearest_neighbours_type; -// typedef std::vector Vector; causes IRIS compiler problem +// typedef std::vector Vector; causes IRIS compiler problem ?? typedef std::vector Vector; NT The_squared_distance(const Point& P, const Point& Q) { diff --git a/Packages/Spatial_searching/examples/Spatial_searching/Example8.C b/Packages/Spatial_searching/examples/Spatial_searching/Example8.C index 34c3802c4ce..9c51498bad2 100755 --- a/Packages/Spatial_searching/examples/Spatial_searching/Example8.C +++ b/Packages/Spatial_searching/examples/Spatial_searching/Example8.C @@ -120,9 +120,9 @@ operator==(const Point& p, const Point& q) -// typedef CGAL::Kernel_traits::Kernel K; -// typedef K::FT NT; -typedef double NT; +typedef CGAL::Kernel_traits::Kernel K; +typedef K::FT NT; +// typedef double NT; causes IRIS compiler problem ?? typedef CGAL::Plane_separator Separator; typedef CGAL::Kd_tree_traits_point Traits; @@ -131,7 +131,7 @@ typedef CGAL::Weighted_Minkowski_distance Distance_traits; typedef CGAL::Nearest_neighbour_L2_standard_search_Minkowski_norm Nearest_neighbours_type; -// typedef std::vector Vector; causes IRIS compiler problem +// typedef std::vector Vector; causes IRIS compiler problem ?? typedef std::vector Vector; NT The_squared_distance(const Point& P, const Point& Q) { diff --git a/Packages/Spatial_searching/examples/Spatial_searching/Example9.C b/Packages/Spatial_searching/examples/Spatial_searching/Example9.C index c357a9e85a2..f2a3448a560 100755 --- a/Packages/Spatial_searching/examples/Spatial_searching/Example9.C +++ b/Packages/Spatial_searching/examples/Spatial_searching/Example9.C @@ -184,9 +184,9 @@ return sqrt(d); }; // end of class -// typedef CGAL::Kernel_traits::Kernel K; -// typedef K::FT NT; -typedef double NT; +typedef CGAL::Kernel_traits::Kernel K; +typedef K::FT NT; +// typedef double NT; causes IRIS compiler problem ?? typedef CGAL::Plane_separator Separator; typedef CGAL::Kd_tree_traits_point Traits; @@ -194,7 +194,7 @@ typedef CGAL::Creator_uniform_3 Creator; typedef CGAL::Nearest_neighbour_L2_standard_search_Minkowski_norm Nearest_neighbours_type; -// typedef std::vector Vector; causes IRIS compiler problem +// typedef std::vector Vector; causes IRIS compiler problem ?? typedef std::vector Vector; NT The_squared_distance(const Point& P, const Point& Q) { @@ -213,10 +213,9 @@ NT The_squared_distance(const Point& P, const Point& Q) { int bucket_size=1; NT eps=0.0; - std::vector my_weights(dim); - my_weights[0]=1.0; my_weights[1]=1.0; my_weights[2]=1.0; + - const int data_point_number= 10000; + const int data_point_number= 1000000; const int query_point_number= 10000; std::cout << " bucket_size=" @@ -241,7 +240,7 @@ NT The_squared_distance(const Point& P, const Point& Q) { Vector query_points; - query_points.reserve(10000); + query_points.reserve(query_point_number); // Create 10000 query points within the same cube. CGAL::copy_n( g, query_point_number, std::back_inserter(query_points)); @@ -283,7 +282,7 @@ NT The_squared_distance(const Point& P, const Point& Q) { << query_point_number << " queries in time " << t.time() << " seconds using ASPAS" << std::endl; - + /* // brute force approach // copy data points from list to vector @@ -330,12 +329,14 @@ NT The_squared_distance(const Point& P, const Point& Q) { }; }; std::cout << "all results are fine" << std::endl; + */ return 0; }; int main() { test_benchmark_nearest_neighbour_L2(); + /* double dummy; std::cout << "Enter input to stop: \n" ;