mirror of https://github.com/CGAL/cgal
cleanup
This commit is contained in:
parent
146dfce5fe
commit
c2fcd257c7
|
|
@ -35,7 +35,7 @@ with the representation type determined by `std::iterator_traits<InputIterator>:
|
|||
\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<InputIterator>:
|
|||
\sa `CGAL::optimal_convex_partition_2()`
|
||||
\sa `CGAL::Partition_is_valid_traits_2<Traits, PolygonIsValid>`
|
||||
\sa `CGAL::y_monotone_partition_2()`
|
||||
\sa `CGAL::Is_convex_2()`
|
||||
\sa `CGAL::Is_convex_2`
|
||||
|
||||
\cgalHeading{Implementation}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Partition_traits_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/random_polygon_2.h>
|
||||
#include <cassert>
|
||||
#include <list>
|
||||
|
||||
|
|
@ -11,10 +9,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
|||
typedef CGAL::Partition_traits_2<K> Traits;
|
||||
typedef Traits::Point_2 Point_2;
|
||||
typedef Traits::Polygon_2 Polygon_2;
|
||||
typedef Polygon_2::Vertex_iterator Vertex_iterator;
|
||||
typedef std::list<Polygon_2> Polygon_list;
|
||||
typedef CGAL::Creator_uniform_2<int, Point_2> Creator;
|
||||
typedef CGAL::Random_points_in_square_2<Point_2, Creator> 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Partition_traits_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/random_polygon_2.h>
|
||||
#include <cassert>
|
||||
#include <list>
|
||||
|
||||
|
|
@ -10,10 +8,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
|||
typedef CGAL::Partition_traits_2<K> Traits;
|
||||
typedef Traits::Point_2 Point_2;
|
||||
typedef Traits::Polygon_2 Polygon_2;
|
||||
typedef Polygon_2::Vertex_iterator Vertex_iterator;
|
||||
typedef std::list<Polygon_2> Polygon_list;
|
||||
typedef CGAL::Creator_uniform_2<int, Point_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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,15 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Partition_traits_2.h>
|
||||
#include <CGAL/Partition_is_valid_traits_2.h>
|
||||
#include <CGAL/polygon_function_objects.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/random_polygon_2.h>
|
||||
#include <cassert>
|
||||
#include <list>
|
||||
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
typedef CGAL::Partition_traits_2<K> Traits;
|
||||
typedef CGAL::Is_convex_2<Traits> 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_2> Polygon_list;
|
||||
typedef CGAL::Partition_is_valid_traits_2<Traits, Is_convex_2>
|
||||
Validity_traits;
|
||||
typedef CGAL::Creator_uniform_2<int, Point_2> Creator;
|
||||
typedef CGAL::Random_points_in_square_2<Point_2, Creator> 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Partition_traits_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/random_polygon_2.h>
|
||||
#include <cassert>
|
||||
#include <list>
|
||||
|
||||
|
|
@ -12,8 +10,6 @@ typedef CGAL::Partition_traits_2<K> Traits;
|
|||
typedef Traits::Point_2 Point_2;
|
||||
typedef Traits::Polygon_2 Polygon_2;
|
||||
typedef std::list<Polygon_2> Polygon_list;
|
||||
typedef CGAL::Creator_uniform_2<int, Point_2> Creator;
|
||||
typedef CGAL::Random_points_in_square_2<Point_2, Creator> 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(),
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@
|
|||
// implementation: Testing of convex partitioning functions
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef double NT;
|
||||
typedef CGAL::Cartesian<NT> K;
|
||||
typedef CGAL::Simple_cartesian<NT> K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::list<Point_2> Container;
|
||||
typedef CGAL::Polygon_2<K, Container> Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@
|
|||
// implementation: Testing of convex partitioning functions
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Simple_homogeneous.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef double NT;
|
||||
typedef CGAL::Homogeneous<NT> K;
|
||||
typedef CGAL::Simple_homogeneous<NT> K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::list<Point_2> Container;
|
||||
typedef CGAL::Polygon_2<K, Container> Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
// implementation: Testing of convex partitioning functions
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Cartesian<double> K;
|
||||
typedef CGAL::Simple_cartesian<double> K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::list<Point_2> Container;
|
||||
typedef CGAL::Polygon_2<K, Container> Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
// implementation: Testing of convex partitioning functions
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Simple_homogeneous.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Homogeneous<double> K;
|
||||
typedef CGAL::Simple_homogeneous<double> K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::list<Point_2> Container;
|
||||
typedef CGAL::Polygon_2<K, Container> Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,20 +26,20 @@
|
|||
// implementation: testing of is_y_monotone_2 function
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Simple_homogeneous.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/is_y_monotone_2.h>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Cartesian<double> CR;
|
||||
typedef CGAL::Simple_cartesian<double> CR;
|
||||
typedef CR::Point_2 CPoint_2;
|
||||
typedef std::list<CPoint_2> CContainer;
|
||||
typedef CGAL::Polygon_2<CR, CContainer> CPolygon_2;
|
||||
|
||||
typedef CGAL::Homogeneous<double> HR;
|
||||
typedef CGAL::Simple_homogeneous<double> HR;
|
||||
typedef HR::Point_2 HPoint_2;
|
||||
typedef std::vector<HPoint_2> HContainer;
|
||||
typedef CGAL::Polygon_2<HR, HContainer> HPolygon_2;
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
#if TESTR==1
|
||||
typedef double NT;
|
||||
typedef CGAL::Cartesian<NT> K;
|
||||
typedef CGAL::Simple_cartesian<NT> K;
|
||||
#endif
|
||||
|
||||
#if TESTR==2
|
||||
typedef double NT;
|
||||
typedef CGAL::Homogeneous<NT> K;
|
||||
typedef CGAL::Simple_homogeneous<NT> K;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#if TESTR == 1
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#endif
|
||||
#if TESTR == 2
|
||||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/simple_homogeneous.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
// implementation: Testing of convex partitioning functions
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Cartesian<double> K;
|
||||
typedef CGAL::Simple_cartesian<double> K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::list<Point_2> Container;
|
||||
typedef CGAL::Polygon_2<K, Container> Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
// implementation: Testing of convex partitioning functions
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Simple_homogeneous.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Homogeneous<double> K;
|
||||
typedef CGAL::Simple_homogeneous<double> K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::list<Point_2> Container;
|
||||
typedef CGAL::Polygon_2<K, Container> Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
// implementation: testing of use of default traits classes for partitioning
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Partition_traits_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Cartesian<double> K;
|
||||
typedef CGAL::Simple_cartesian<double> K;
|
||||
typedef CGAL::Partition_traits_2<K> Traits;
|
||||
typedef Traits::Point_2 Point_2;
|
||||
typedef Traits::Polygon_2 Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
// implementation: testing of use of default traits classes for partitioning
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Simple_homogeneous.h>
|
||||
#include <CGAL/Partition_traits_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Homogeneous<double> K;
|
||||
typedef CGAL::Simple_homogeneous<double> K;
|
||||
typedef CGAL::Partition_traits_2<K> Traits;
|
||||
typedef Traits::Point_2 Point_2;
|
||||
typedef Traits::Polygon_2 Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
// implementation: Testing of y-monotone partitioning function
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Cartesian<double> K;
|
||||
typedef CGAL::Simple_cartesian<double> K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::list<Point_2> Container;
|
||||
typedef CGAL::Polygon_2<K, Container> Polygon_2;
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
// implementation: Testing of y-monotone partitioning function
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Simple_homogeneous.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/partition_2.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
typedef CGAL::Homogeneous<double> K;
|
||||
typedef CGAL::Simple_homogeneous<double> K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::list<Point_2> Container;
|
||||
typedef CGAL::Polygon_2<K, Container> Polygon_2;
|
||||
|
|
|
|||
Loading…
Reference in New Issue