diff --git a/Partition_2/doc/Partition_2/CGAL/partition_is_valid_2.h b/Partition_2/doc/Partition_2/CGAL/partition_is_valid_2.h index 22419d85ae5..bac23840b1c 100644 --- a/Partition_2/doc/Partition_2/CGAL/partition_is_valid_2.h +++ b/Partition_2/doc/Partition_2/CGAL/partition_is_valid_2.h @@ -35,7 +35,7 @@ with the representation type determined by `std::iterator_traits: \sa `CGAL::greene_approx_convex_partition_2()` \sa `CGAL::optimal_convex_partition_2()` \sa `CGAL::partition_is_valid_2()` -\sa `CGAL::Is_convex_2()` +\sa `CGAL::Is_convex_2` \cgalHeading{Implementation} @@ -99,7 +99,7 @@ with the representation type determined by `std::iterator_traits: \sa `CGAL::optimal_convex_partition_2()` \sa `CGAL::Partition_is_valid_traits_2` \sa `CGAL::y_monotone_partition_2()` -\sa `CGAL::Is_convex_2()` +\sa `CGAL::Is_convex_2` \cgalHeading{Implementation} diff --git a/Partition_2/examples/Partition_2/approx_convex_partition_2.cpp b/Partition_2/examples/Partition_2/approx_convex_partition_2.cpp index c5b0401c22a..e1148e59037 100644 --- a/Partition_2/examples/Partition_2/approx_convex_partition_2.cpp +++ b/Partition_2/examples/Partition_2/approx_convex_partition_2.cpp @@ -1,8 +1,6 @@ #include #include #include -#include -#include #include #include @@ -11,10 +9,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Partition_traits_2 Traits; typedef Traits::Point_2 Point_2; typedef Traits::Polygon_2 Polygon_2; -typedef Polygon_2::Vertex_iterator Vertex_iterator; typedef std::list Polygon_list; -typedef CGAL::Creator_uniform_2 Creator; -typedef CGAL::Random_points_in_square_2 Point_generator; void make_polygon(Polygon_2& polygon) { @@ -40,19 +35,14 @@ int main() Polygon_2 polygon; Polygon_list partition_polys; -/* - CGAL::random_polygon_2(50, std::back_inserter(polygon), - Point_generator(100)); -*/ make_polygon(polygon); - Traits traits; + CGAL::approx_convex_partition_2(polygon.vertices_begin(), polygon.vertices_end(), - std::back_inserter(partition_polys), traits); + std::back_inserter(partition_polys)); assert(CGAL::convex_partition_is_valid_2(polygon.vertices_begin(), polygon.vertices_end(), partition_polys.begin(), - partition_polys.end(), - traits)); + partition_polys.end())); return 0; } diff --git a/Partition_2/examples/Partition_2/greene_approx_convex_partition_2.cpp b/Partition_2/examples/Partition_2/greene_approx_convex_partition_2.cpp index 4b58cfb3fd3..1a07512462b 100644 --- a/Partition_2/examples/Partition_2/greene_approx_convex_partition_2.cpp +++ b/Partition_2/examples/Partition_2/greene_approx_convex_partition_2.cpp @@ -1,8 +1,6 @@ #include #include #include -#include -#include #include #include @@ -10,10 +8,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Partition_traits_2 Traits; typedef Traits::Point_2 Point_2; typedef Traits::Polygon_2 Polygon_2; -typedef Polygon_2::Vertex_iterator Vertex_iterator; typedef std::list Polygon_list; -typedef CGAL::Creator_uniform_2 Creator; -typedef CGAL::Random_points_in_square_2< Point_2, Creator > Point_generator; void make_polygon(Polygon_2& polygon) { @@ -38,21 +33,14 @@ int main() { Polygon_2 polygon; Polygon_list partition_polys; - Traits partition_traits; -/* - CGAL::random_polygon_2(50, std::back_inserter(polygon), - Point_generator(100)); -*/ make_polygon(polygon); CGAL::greene_approx_convex_partition_2(polygon.vertices_begin(), polygon.vertices_end(), - std::back_inserter(partition_polys), - partition_traits); + std::back_inserter(partition_polys)); assert(CGAL::convex_partition_is_valid_2(polygon.vertices_begin(), polygon.vertices_end(), partition_polys.begin(), - partition_polys.end(), - partition_traits)); + partition_polys.end())); return 0; } diff --git a/Partition_2/examples/Partition_2/optimal_convex_partition_2.cpp b/Partition_2/examples/Partition_2/optimal_convex_partition_2.cpp index 2877e64e05c..1a4d63c68bd 100644 --- a/Partition_2/examples/Partition_2/optimal_convex_partition_2.cpp +++ b/Partition_2/examples/Partition_2/optimal_convex_partition_2.cpp @@ -1,25 +1,15 @@ #include #include -#include -#include #include -#include -#include #include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Partition_traits_2 Traits; -typedef CGAL::Is_convex_2 Is_convex_2; typedef Traits::Polygon_2 Polygon_2; typedef Traits::Point_2 Point_2; -typedef Polygon_2::Vertex_const_iterator Vertex_iterator; typedef std::list Polygon_list; -typedef CGAL::Partition_is_valid_traits_2 - Validity_traits; -typedef CGAL::Creator_uniform_2 Creator; -typedef CGAL::Random_points_in_square_2 Point_generator; void make_polygon(Polygon_2& polygon) { @@ -43,22 +33,16 @@ int main() { Polygon_2 polygon; Polygon_list partition_polys; - Traits partition_traits; - Validity_traits validity_traits(partition_traits); - -/* - CGAL::random_polygon_2(50, std::back_inserter(polygon), - Point_generator(100)); -*/ + make_polygon(polygon); CGAL::optimal_convex_partition_2(polygon.vertices_begin(), polygon.vertices_end(), - std::back_inserter(partition_polys), - partition_traits); + std::back_inserter(partition_polys)); + assert(CGAL::partition_is_valid_2(polygon.vertices_begin(), polygon.vertices_end(), partition_polys.begin(), - partition_polys.end(), - validity_traits)); + partition_polys.end())); + return 0; } diff --git a/Partition_2/examples/Partition_2/y_monotone_partition_2.cpp b/Partition_2/examples/Partition_2/y_monotone_partition_2.cpp index c6fcd97a472..5384989c2fd 100644 --- a/Partition_2/examples/Partition_2/y_monotone_partition_2.cpp +++ b/Partition_2/examples/Partition_2/y_monotone_partition_2.cpp @@ -1,8 +1,6 @@ #include #include #include -#include -#include #include #include @@ -12,8 +10,6 @@ typedef CGAL::Partition_traits_2 Traits; typedef Traits::Point_2 Point_2; typedef Traits::Polygon_2 Polygon_2; typedef std::list Polygon_list; -typedef CGAL::Creator_uniform_2 Creator; -typedef CGAL::Random_points_in_square_2 Point_generator; void make_polygon(Polygon_2& polygon) { @@ -39,10 +35,6 @@ int main( ) Polygon_2 polygon; Polygon_list partition_polys; -/* - CGAL::random_polygon_2(50, std::back_inserter(polygon), - Point_generator(100)); -*/ make_polygon(polygon); CGAL::y_monotone_partition_2(polygon.vertices_begin(), polygon.vertices_end(), diff --git a/Partition_2/examples/Partition_2/y_monotone_partition_indices_2.cpp b/Partition_2/examples/Partition_2/y_monotone_partition_indices_2.cpp index 19000dc7221..a4cbdf580a1 100644 --- a/Partition_2/examples/Partition_2/y_monotone_partition_indices_2.cpp +++ b/Partition_2/examples/Partition_2/y_monotone_partition_indices_2.cpp @@ -42,8 +42,8 @@ int main( ) Polygon_list partition_polys; - CGAL::y_monotone_partition_2(polygon.begin(), - polygon.end(), + CGAL::y_monotone_partition_2(polygon.vertices_begin(), + polygon.vertices_end(), std::back_inserter(partition_polys), traits); diff --git a/Partition_2/test/Partition_2/approx_convex_partition_2_test_C.cpp b/Partition_2/test/Partition_2/approx_convex_partition_2_test_C.cpp index 08c57d67600..60d005777e9 100644 --- a/Partition_2/test/Partition_2/approx_convex_partition_2_test_C.cpp +++ b/Partition_2/test/Partition_2/approx_convex_partition_2_test_C.cpp @@ -28,14 +28,14 @@ // implementation: Testing of convex partitioning functions // ============================================================================ -#include +#include #include #include #include #include typedef double NT; -typedef CGAL::Cartesian K; +typedef CGAL::Simple_cartesian K; typedef K::Point_2 Point_2; typedef std::list Container; typedef CGAL::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/approx_convex_partition_2_test_H.cpp b/Partition_2/test/Partition_2/approx_convex_partition_2_test_H.cpp index 1d74394f71e..a99c0778f86 100644 --- a/Partition_2/test/Partition_2/approx_convex_partition_2_test_H.cpp +++ b/Partition_2/test/Partition_2/approx_convex_partition_2_test_H.cpp @@ -26,14 +26,14 @@ // implementation: Testing of convex partitioning functions // ============================================================================ -#include +#include #include #include #include #include typedef double NT; -typedef CGAL::Homogeneous K; +typedef CGAL::Simple_homogeneous K; typedef K::Point_2 Point_2; typedef std::list Container; typedef CGAL::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_C.cpp b/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_C.cpp index 60a36c7c172..e022424c4b9 100644 --- a/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_C.cpp +++ b/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_C.cpp @@ -26,13 +26,13 @@ // implementation: Testing of convex partitioning functions // ============================================================================ -#include +#include #include #include #include #include -typedef CGAL::Cartesian K; +typedef CGAL::Simple_cartesian K; typedef K::Point_2 Point_2; typedef std::list Container; typedef CGAL::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_H.cpp b/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_H.cpp index a4c2ede5901..d354b997a82 100644 --- a/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_H.cpp +++ b/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_H.cpp @@ -26,13 +26,13 @@ // implementation: Testing of convex partitioning functions // ============================================================================ -#include +#include #include #include #include #include -typedef CGAL::Homogeneous K; +typedef CGAL::Simple_homogeneous K; typedef K::Point_2 Point_2; typedef std::list Container; typedef CGAL::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/is_y_monotone_2_test.cpp b/Partition_2/test/Partition_2/is_y_monotone_2_test.cpp index ca31d871099..f745c961b18 100644 --- a/Partition_2/test/Partition_2/is_y_monotone_2_test.cpp +++ b/Partition_2/test/Partition_2/is_y_monotone_2_test.cpp @@ -26,20 +26,20 @@ // implementation: testing of is_y_monotone_2 function // ============================================================================ -#include -#include +#include +#include #include #include #include #include #include -typedef CGAL::Cartesian CR; +typedef CGAL::Simple_cartesian CR; typedef CR::Point_2 CPoint_2; typedef std::list CContainer; typedef CGAL::Polygon_2 CPolygon_2; -typedef CGAL::Homogeneous HR; +typedef CGAL::Simple_homogeneous HR; typedef HR::Point_2 HPoint_2; typedef std::vector HContainer; typedef CGAL::Polygon_2 HPolygon_2; diff --git a/Partition_2/test/Partition_2/kernel_def.h b/Partition_2/test/Partition_2/kernel_def.h index e06415631cd..be07d4b18de 100644 --- a/Partition_2/test/Partition_2/kernel_def.h +++ b/Partition_2/test/Partition_2/kernel_def.h @@ -3,12 +3,12 @@ #if TESTR==1 typedef double NT; - typedef CGAL::Cartesian K; + typedef CGAL::Simple_cartesian K; #endif #if TESTR==2 typedef double NT; - typedef CGAL::Homogeneous K; + typedef CGAL::Simple_homogeneous K; #endif diff --git a/Partition_2/test/Partition_2/kernel_include.h b/Partition_2/test/Partition_2/kernel_include.h index 743250cda21..72f2e998f5f 100644 --- a/Partition_2/test/Partition_2/kernel_include.h +++ b/Partition_2/test/Partition_2/kernel_include.h @@ -1,7 +1,7 @@ #if TESTR == 1 -#include +#include #endif #if TESTR == 2 -#include +#include #endif diff --git a/Partition_2/test/Partition_2/optimal_convex_partition_2_test_C.cpp b/Partition_2/test/Partition_2/optimal_convex_partition_2_test_C.cpp index 70aa4923fec..ef1c6769ce8 100644 --- a/Partition_2/test/Partition_2/optimal_convex_partition_2_test_C.cpp +++ b/Partition_2/test/Partition_2/optimal_convex_partition_2_test_C.cpp @@ -26,13 +26,13 @@ // implementation: Testing of convex partitioning functions // ============================================================================ -#include +#include #include #include #include #include -typedef CGAL::Cartesian K; +typedef CGAL::Simple_cartesian K; typedef K::Point_2 Point_2; typedef std::list Container; typedef CGAL::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/optimal_convex_partition_2_test_H.cpp b/Partition_2/test/Partition_2/optimal_convex_partition_2_test_H.cpp index 88c44a3220f..cde71db7a20 100644 --- a/Partition_2/test/Partition_2/optimal_convex_partition_2_test_H.cpp +++ b/Partition_2/test/Partition_2/optimal_convex_partition_2_test_H.cpp @@ -26,13 +26,13 @@ // implementation: Testing of convex partitioning functions // ============================================================================ -#include +#include #include #include #include #include -typedef CGAL::Homogeneous K; +typedef CGAL::Simple_homogeneous K; typedef K::Point_2 Point_2; typedef std::list Container; typedef CGAL::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/partition_2_defaults_test_C.cpp b/Partition_2/test/Partition_2/partition_2_defaults_test_C.cpp index a686229697f..f8cc41a9471 100644 --- a/Partition_2/test/Partition_2/partition_2_defaults_test_C.cpp +++ b/Partition_2/test/Partition_2/partition_2_defaults_test_C.cpp @@ -26,13 +26,13 @@ // implementation: testing of use of default traits classes for partitioning // ============================================================================ -#include +#include #include #include #include #include -typedef CGAL::Cartesian K; +typedef CGAL::Simple_cartesian K; typedef CGAL::Partition_traits_2 Traits; typedef Traits::Point_2 Point_2; typedef Traits::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/partition_2_defaults_test_H.cpp b/Partition_2/test/Partition_2/partition_2_defaults_test_H.cpp index c4e43ab982e..72213391e1d 100644 --- a/Partition_2/test/Partition_2/partition_2_defaults_test_H.cpp +++ b/Partition_2/test/Partition_2/partition_2_defaults_test_H.cpp @@ -26,13 +26,13 @@ // implementation: testing of use of default traits classes for partitioning // ============================================================================ -#include +#include #include #include #include #include -typedef CGAL::Homogeneous K; +typedef CGAL::Simple_homogeneous K; typedef CGAL::Partition_traits_2 Traits; typedef Traits::Point_2 Point_2; typedef Traits::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/y_monotone_partition_2_test_C.cpp b/Partition_2/test/Partition_2/y_monotone_partition_2_test_C.cpp index f23090de67a..306bde31052 100644 --- a/Partition_2/test/Partition_2/y_monotone_partition_2_test_C.cpp +++ b/Partition_2/test/Partition_2/y_monotone_partition_2_test_C.cpp @@ -26,13 +26,13 @@ // implementation: Testing of y-monotone partitioning function // ============================================================================ -#include +#include #include #include #include #include -typedef CGAL::Cartesian K; +typedef CGAL::Simple_cartesian K; typedef K::Point_2 Point_2; typedef std::list Container; typedef CGAL::Polygon_2 Polygon_2; diff --git a/Partition_2/test/Partition_2/y_monotone_partition_2_test_H.cpp b/Partition_2/test/Partition_2/y_monotone_partition_2_test_H.cpp index 835c3a9fa1f..42da2db7451 100644 --- a/Partition_2/test/Partition_2/y_monotone_partition_2_test_H.cpp +++ b/Partition_2/test/Partition_2/y_monotone_partition_2_test_H.cpp @@ -26,13 +26,13 @@ // implementation: Testing of y-monotone partitioning function // ============================================================================ -#include +#include #include #include #include #include -typedef CGAL::Homogeneous K; +typedef CGAL::Simple_homogeneous K; typedef K::Point_2 Point_2; typedef std::list Container; typedef CGAL::Polygon_2 Polygon_2;