From 04389bc7cb36d40a32062811433bbff976d7793f Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 27 Feb 2007 07:49:41 +0000 Subject: [PATCH] Superfluous. --- ...ll_furthest_neighbors_2_example_nohead.cpp | 32 ------------- .../Matrix_search/extremal_polygon_2.cpp | 42 ----------------- .../rectangular_p_center_2_example_nohead.cpp | 38 --------------- .../sorted_matrix_search_example_nohead.cpp | 46 ------------------- 4 files changed, 158 deletions(-) delete mode 100644 Matrix_search/examples/Matrix_search/all_furthest_neighbors_2_example_nohead.cpp delete mode 100644 Matrix_search/examples/Matrix_search/extremal_polygon_2.cpp delete mode 100644 Matrix_search/examples/Matrix_search/rectangular_p_center_2_example_nohead.cpp delete mode 100644 Matrix_search/examples/Matrix_search/sorted_matrix_search_example_nohead.cpp diff --git a/Matrix_search/examples/Matrix_search/all_furthest_neighbors_2_example_nohead.cpp b/Matrix_search/examples/Matrix_search/all_furthest_neighbors_2_example_nohead.cpp deleted file mode 100644 index 2476c82d4ec..00000000000 --- a/Matrix_search/examples/Matrix_search/all_furthest_neighbors_2_example_nohead.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -typedef double FT; - -struct Kernel : public CGAL::Cartesian {}; - -typedef Kernel::Point_2 Point; -typedef std::vector Index_cont; -typedef CGAL::Polygon_2 Polygon_2; -typedef CGAL::Random_points_in_square_2 Generator; -typedef CGAL::Ostream_iterator Oiterator; - -int main() -{ - // generate random convex polygon: - Polygon_2 p; - CGAL::random_convex_set_2(10, std::back_inserter(p), Generator(1)); - - // compute all furthest neighbors: - CGAL::all_furthest_neighbors_2(p.vertices_begin(), p.vertices_end(), - Oiterator(std::cout)); - std::cout << std::endl; - - return 0; -} diff --git a/Matrix_search/examples/Matrix_search/extremal_polygon_2.cpp b/Matrix_search/examples/Matrix_search/extremal_polygon_2.cpp deleted file mode 100644 index 6050e0ed273..00000000000 --- a/Matrix_search/examples/Matrix_search/extremal_polygon_2.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// file: examples/Matrix_search/extremal_polygon_2_example.C - -#include -#include -#include -#include -#include -#include -#include - -typedef double FT; - -struct Kernel : public CGAL::Cartesian {}; - -typedef Kernel::Point_2 Point; -typedef std::vector Index_cont; -typedef CGAL::Polygon_2 Polygon_2; -typedef CGAL::Random_points_in_square_2 Generator; - -int main() { - - int n = 10; - int k = 5; - - // generate random convex polygon: - Polygon_2 p; - CGAL::random_convex_set_2(n, std::back_inserter(p), Generator(1)); - std::cout << "Generated Polygon:\n" << p << std::endl; - - // compute maximum area incribed k-gon of p: - Polygon_2 k_gon; - CGAL::maximum_area_inscribed_k_gon_2( - p.vertices_begin(), p.vertices_end(), k, std::back_inserter(k_gon)); - std::cout << "Maximum area " << k << "-gon:\n" - << k_gon << std::endl; - - return 0; -} -// ---------------------------------------------------------------------------- -// ** EOF -// ---------------------------------------------------------------------------- - diff --git a/Matrix_search/examples/Matrix_search/rectangular_p_center_2_example_nohead.cpp b/Matrix_search/examples/Matrix_search/rectangular_p_center_2_example_nohead.cpp deleted file mode 100644 index 6cf41da4829..00000000000 --- a/Matrix_search/examples/Matrix_search/rectangular_p_center_2_example_nohead.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -typedef double FT; - -struct Kernel : public CGAL::Cartesian {}; - -typedef Kernel::Point_2 Point; -typedef std::vector Cont; -typedef CGAL::Random_points_in_square_2 Generator; -typedef CGAL::Ostream_iterator OIterator; - -int main() -{ - int n = 10; - int p = 2; - OIterator cout_ip(std::cout); - CGAL::set_pretty_mode(std::cout); - - Cont points; - CGAL::copy_n(Generator(1), n, std::back_inserter(points)); - std::cout << "Generated Point Set:\n"; - std::copy(points.begin(), points.end(), cout_ip); - - FT p_radius; - std::cout << "\n\n" << p << "-centers:\n"; - CGAL::rectangular_p_center_2( - points.begin(), points.end(), cout_ip, p_radius, 3); - std::cout << "\n\n" << p << "-radius = " << p_radius << std::endl; - - return 0; -} diff --git a/Matrix_search/examples/Matrix_search/sorted_matrix_search_example_nohead.cpp b/Matrix_search/examples/Matrix_search/sorted_matrix_search_example_nohead.cpp deleted file mode 100644 index 8514f571434..00000000000 --- a/Matrix_search/examples/Matrix_search/sorted_matrix_search_example_nohead.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -typedef int Value; -typedef std::vector Vector; -typedef Vector::iterator Value_iterator; -typedef std::vector Vector_cont; -typedef CGAL::Cartesian_matrix, - Value_iterator, - Value_iterator> Matrix; - -int main() -{ - // set of vectors the matrices are build from: - Vector_cont vectors; - - // generate a random vector and sort it: - Vector a; - const int n = 5; - for (int i = 0; i < n; ++i) - a.push_back(CGAL::default_random(100)); - std::sort(a.begin(), a.end()); - std::cout << "a = ( "; - std::copy(a.begin(), a.end(), std::ostream_iterator(std::cout," ")); - std::cout << ")\n"; - - // build a Cartesian matrix from a: - Matrix M(a.begin(), a.end(), a.begin(), a.end()); - - // search for an upper bound for max(a): - Value bound = a[n-1]; - Value upper_bound = - CGAL::sorted_matrix_search( - &M, &M + 1, - CGAL::sorted_matrix_search_traits_adaptor( - CGAL::bind_2(std::greater_equal(), bound), M)); - std::cout << "Upper bound for " << bound << " is " - << upper_bound << "." << std::endl; - - return 0; -}