diff --git a/Circular_kernel_2/examples/Circular_kernel_2/CMakeLists.txt b/Circular_kernel_2/examples/Circular_kernel_2/CMakeLists.txt index e3dbaa4fcef..fbb4186592c 100644 --- a/Circular_kernel_2/examples/Circular_kernel_2/CMakeLists.txt +++ b/Circular_kernel_2/examples/Circular_kernel_2/CMakeLists.txt @@ -12,12 +12,6 @@ if ( CGAL_FOUND ) include(${CGAL_USE_FILE}) include(CreateSingleSourceCGALProgram) - create_single_source_cgal_program( arrangement_random_circles.cpp ) - create_single_source_cgal_program( arrangement_random_circles_segments.cpp ) - create_single_source_cgal_program( Circular_kernel_arrangement.cpp ) - create_single_source_cgal_program( Circular_kernel_arrangement_Line_arc.cpp ) - create_single_source_cgal_program( Circular_kernel_arrangement_Line_Circular.cpp ) create_single_source_cgal_program( intersecting_arcs.cpp ) - create_single_source_cgal_program( Exact_circular_kernel.cpp ) endif() diff --git a/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement.cpp b/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement.cpp deleted file mode 100644 index 4550059ab21..00000000000 --- a/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -typedef CGAL::Quotient NT; -typedef CGAL::Cartesian Linear_k; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k; -typedef CGAL::Circular_kernel_2 Circular_k; - -typedef Circular_k::Circular_arc_2 Arc_2; -typedef std::vector ArcContainer; - -typedef CGAL::Arr_circular_arc_traits Traits; - -typedef CGAL::Arrangement_2 Arrangement; -typedef CGAL::Arr_naive_point_location Point_location; - -typedef Circular_k::Point_2 Point_2; -typedef Circular_k::Circle_2 Circle_2; -int main(){ - - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - int random_max = 128; - int random_min = -128; - ArcContainer ac; - int x; - int y; - for(int i = 0; i < 10; i++){ - x = theRandom.get_int(random_min,random_max); - y = theRandom.get_int(random_min,random_max); - ac.push_back( Circle_2( Point_2(x,y), x*x + y*y)); - } - - Arrangement arr; - Point_location _pl(arr); - for (ArcContainer::const_iterator it=ac.begin(); - it != ac.end(); ++it) { - //insert(arr,_pl, *it); - insert_curve(arr, *it, _pl); - }; - - return 0; -}; diff --git a/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement_Line_Circular.cpp b/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement_Line_Circular.cpp deleted file mode 100644 index 69a1144c61c..00000000000 --- a/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement_Line_Circular.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -typedef CGAL::Quotient NT; -typedef CGAL::Cartesian Linear_k; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k; -typedef CGAL::Circular_kernel_2 Circular_k; - -typedef Circular_k::Point_2 Point_2; -typedef Circular_k::Circle_2 Circle_2; -typedef Circular_k::Circular_arc_2 Circular_arc_2; -typedef Circular_k::Line_arc_2 Line_arc_2; - -typedef boost::variant< Circular_arc_2, Line_arc_2> Arc_2; -typedef std::vector< Arc_2> ArcContainer; - -typedef CGAL::Arr_circular_line_arc_traits Traits; - -typedef CGAL::Arrangement_2 Arrangement; -typedef CGAL::Arr_naive_point_location Point_location; - - -int main(){ - - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - int random_max = 128; - int random_min = -128; - ArcContainer ac; - int x1; - int y1; - int x2; - int y2; - - for(int i = 0; i < 10; i++){ - x1 = theRandom.get_int(random_min,random_max); - y1 = theRandom.get_int(random_min,random_max); - do{ - x2 = theRandom.get_int(random_min,random_max); - y2 = theRandom.get_int(random_min,random_max); - }while((x1 == x2) && (y1 == y2)); - - std::cout << x1 << " " - << y1 << " " - << x2 << " " - << y2 << std::endl; - boost::variant< Circular_arc_2, Line_arc_2 > v = Line_arc_2(Point_2(x1,y1), Point_2(x2,y2)); - ac.push_back( v); - } - - for(int i = 0; i < 10; i++){ - x1 = theRandom.get_int(random_min,random_max); - y1 = theRandom.get_int(random_min,random_max); - boost::variant< Circular_arc_2, Line_arc_2 > v = Circle_2( Point_2(x1,y1), x1*x1 + y1*y1); - ac.push_back(v); - } - - - - - Arrangement arr; - Point_location _pl(arr); - for (ArcContainer::const_iterator it=ac.begin(); - it != ac.end(); ++it) { - //insert(arr,_pl,*it); - insert_curve(arr, *it, _pl); - }; - - return 0; -}; diff --git a/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement_Line_arc.cpp b/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement_Line_arc.cpp deleted file mode 100644 index a0bb27c840b..00000000000 --- a/Circular_kernel_2/examples/Circular_kernel_2/Circular_kernel_arrangement_Line_arc.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef CGAL::Quotient NT; -typedef CGAL::Cartesian Linear_k; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k; -typedef CGAL::Circular_kernel_2 Circular_k; - -//typedef Circular_k::Circular_arc_2 Arc; -typedef Circular_k::Line_arc_2 Arc_2; -typedef std::vector ArcContainer; - -typedef CGAL::Arr_line_arc_traits Traits; - -typedef CGAL::Arrangement_2 Arrangement; -typedef CGAL::Arr_naive_point_location Point_location; - -typedef Circular_k::Point_2 Point_2; -typedef Circular_k::Line_arc_2 Line_arc_2; -int main(){ - - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - //std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - int random_max = 5; - int random_min = -5; - for(int j = 0; j < 10 ; j++){ - - ArcContainer ac; - int x1; - int y1; - int x2; - int y2; - - for(int i = 0; i < 50; i++){ - x1 = theRandom.get_int(random_min,random_max); - y1 = theRandom.get_int(random_min,random_max); - do{ - x2 = theRandom.get_int(random_min,random_max); - y2 = theRandom.get_int(random_min,random_max); - }while((x1 == x2) && (y1 == y2)); - - - std::cout << x1 << " " - << y1 << " " - << x2 << " " - << y2 << std::endl; - ac.push_back( Line_arc_2(Point_2(x1,y1), Point_2(x2,y2))); - } - - //while(std::cin >> x1 >> y1 >> x2 >> y2){ - // ac.push_back( Line_arc_2(Point_2(x1,y1), Point_2(x2,y2))); - //} - - { - int i = 0; - Arrangement arr; - Point_location _pl(arr); - for (ArcContainer::const_iterator it=ac.begin(); - it != ac.end(); ++it) { - std::cout << i++ << std::endl; - //insert(arr,_pl,*it); - insert_curve(arr, *it,_pl); - } - } - } - return 0; -}; diff --git a/Circular_kernel_2/examples/Circular_kernel_2/Exact_circular_kernel.cpp b/Circular_kernel_2/examples/Circular_kernel_2/Exact_circular_kernel.cpp deleted file mode 100644 index 4ba891ef46f..00000000000 --- a/Circular_kernel_2/examples/Circular_kernel_2/Exact_circular_kernel.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -typedef CGAL::Exact_circular_kernel_2 Circular_k; - -typedef Circular_k::Point_2 Point_2; -typedef Circular_k::Circle_2 Circle_2; -typedef Circular_k::Circular_arc_2 Circular_arc_2; -typedef Circular_k::Line_arc_2 Line_arc_2; - -typedef boost::variant< Circular_arc_2, Line_arc_2> Arc_2; -typedef std::vector< Arc_2> ArcContainer; - -typedef CGAL::Arr_circular_line_arc_traits - Traits; - -typedef CGAL::Arrangement_2 Arr; -typedef CGAL::Arr_naive_point_location Point_location; - -int main(){ - - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - int random_max = 128; - int random_min = -128; - ArcContainer ac; - int x1, y1, x2, y2; - - for (int i = 0; i < 10; i++) { - x1 = theRandom.get_int(random_min,random_max); - y1 = theRandom.get_int(random_min,random_max); - do{ - x2 = theRandom.get_int(random_min,random_max); - y2 = theRandom.get_int(random_min,random_max); - } while((x1 == x2) && (y1 == y2)); - std::cout << x1 << " " << y1 << " " << x2 << " " << y2 << std::endl; - - boost::variant< Circular_arc_2, Line_arc_2 > - v = Line_arc_2(Point_2(x1,y1), Point_2(x2,y2)); - ac.push_back( v); - } - - for (int i = 0; i < 10; i++) { - x1 = theRandom.get_int(random_min,random_max); - y1 = theRandom.get_int(random_min,random_max); - - boost::variant< Circular_arc_2, Line_arc_2 > - v = Circle_2( Point_2(x1,y1), x1*x1 + y1*y1); - ac.push_back(v); - } - - Arr _pm; - Point_location _pl(_pm); - for (ArcContainer::const_iterator it=ac.begin(); it != ac.end(); ++it) { - insert_curve(_pm,*it,_pl); - }; - - return 0; -}; diff --git a/Circular_kernel_2/examples/Circular_kernel_2/GNUmakefile b/Circular_kernel_2/examples/Circular_kernel_2/GNUmakefile index 0b28a203f1e..240fae4c623 100644 --- a/Circular_kernel_2/examples/Circular_kernel_2/GNUmakefile +++ b/Circular_kernel_2/examples/Circular_kernel_2/GNUmakefile @@ -37,58 +37,13 @@ LDFLAGS = \ #---------------------------------------------------------------------# all: \ - arrangement_random_circles$(EXE_EXT) \ - arrangement_random_circles_segments$(EXE_EXT) \ - Exact_circular_kernel$(EXE_EXT) \ - Circular_kernel_arrangement$(EXE_EXT) \ - Circular_kernel_arrangement_Line_arc$(EXE_EXT) \ - Circular_kernel_arrangement_Line_Circular$(EXE_EXT) \ - intersecting_arcs$(EXE_EXT) \ - Lazy_Circular_kernel_arrangement$(EXE_EXT) \ - Lazy_Circular_kernel_arrangement_Line_arc$(EXE_EXT) \ - Lazy_Circular_kernel_arrangement_Line_Circular$(EXE_EXT) - -arrangement_random_circles$(EXE_EXT): arrangement_random_circles$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)arrangement_random_circles arrangement_random_circles$(OBJ_EXT) $(LDFLAGS) - -arrangement_random_circles_segments$(EXE_EXT): arrangement_random_circles_segments$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)arrangement_random_circles_segments arrangement_random_circles_segments$(OBJ_EXT) $(LDFLAGS) - -Exact_circular_kernel$(EXE_EXT): Exact_circular_kernel$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Exact_circular_kernel Exact_circular_kernel$(OBJ_EXT) $(LDFLAGS) - -Circular_kernel_arrangement$(EXE_EXT): Circular_kernel_arrangement$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Circular_kernel_arrangement Circular_kernel_arrangement$(OBJ_EXT) $(LDFLAGS) - -Circular_kernel_arrangement_Line_arc$(EXE_EXT): Circular_kernel_arrangement_Line_arc$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Circular_kernel_arrangement_Line_arc Circular_kernel_arrangement_Line_arc$(OBJ_EXT) $(LDFLAGS) - -Circular_kernel_arrangement_Line_Circular$(EXE_EXT): Circular_kernel_arrangement_Line_Circular$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Circular_kernel_arrangement_Line_Circular Circular_kernel_arrangement_Line_Circular$(OBJ_EXT) $(LDFLAGS) + intersecting_arcs$(EXE_EXT) intersecting_arcs$(EXE_EXT): intersecting_arcs$(OBJ_EXT) $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)intersecting_arcs intersecting_arcs$(OBJ_EXT) $(LDFLAGS) -Lazy_Circular_kernel_arrangement$(EXE_EXT): Lazy_Circular_kernel_arrangement$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Lazy_Circular_kernel_arrangement Lazy_Circular_kernel_arrangement$(OBJ_EXT) $(LDFLAGS) - -Lazy_Circular_kernel_arrangement_Line_arc$(EXE_EXT): Lazy_Circular_kernel_arrangement_Line_arc$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Lazy_Circular_kernel_arrangement_Line_arc Lazy_Circular_kernel_arrangement_Line_arc$(OBJ_EXT) $(LDFLAGS) - -Lazy_Circular_kernel_arrangement_Line_Circular$(EXE_EXT): Lazy_Circular_kernel_arrangement_Line_Circular$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Lazy_Circular_kernel_arrangement_Line_Circular Lazy_Circular_kernel_arrangement_Line_Circular$(OBJ_EXT) $(LDFLAGS) - clean: \ - arrangement_random_circles.clean \ - arrangement_random_circles_segments.clean \ - Exact_circular_kernel.clean \ - Circular_kernel_arrangement.clean \ - Circular_kernel_arrangement_Line_arc.clean \ - Circular_kernel_arrangement_Line_Circular.clean \ - intersecting_arcs.clean \ - Lazy_Circular_kernel_arrangement.clean \ - Lazy_Circular_kernel_arrangement_Line_arc.clean \ - Lazy_Circular_kernel_arrangement_Line_Circular.clean + intersecting_arcs.clean #---------------------------------------------------------------------# # suffix rules diff --git a/Circular_kernel_2/examples/Circular_kernel_2/Lazy_Circular_kernel_arrangement.cpp b/Circular_kernel_2/examples/Circular_kernel_2/Lazy_Circular_kernel_arrangement.cpp deleted file mode 100644 index a7e3e559465..00000000000 --- a/Circular_kernel_2/examples/Circular_kernel_2/Lazy_Circular_kernel_arrangement.cpp +++ /dev/null @@ -1,118 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef CGAL::Quotient NT1; -typedef CGAL::Cartesian Linear_k1; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k1; -typedef CGAL::Circular_kernel_2 CK1_; - -typedef CGAL::Interval_nt_advanced NT2; -typedef CGAL::Cartesian Linear_k2; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k2; -typedef CGAL::Circular_kernel_2 CK2_; - -typedef CGAL::Lazy_circular_kernel_2 Circular_k; - -typedef Circular_k::Circular_arc_2 Arc1; -typedef std::vector ArcContainer; - -typedef CK1_::Circular_arc_2 Arc2; -typedef std::vector ArcContainer2; - -#ifndef CGAL_CURVED_KERNEL_DEBUG -typedef CGAL::Arr_circular_arc_traits Traits; -typedef CGAL::Arr_circular_arc_traits Traits2; -#else -typedef CGAL::Arr_circular_arc_traits Traits0; -typedef CGAL::Circular_arc_traits_tracer Traits; - -typedef CGAL::Arr_circular_arc_traits Traits02; -typedef CGAL::Circular_arc_traits_tracer Traits2; -#endif - -//typedef Traits::Point_2 Point_2; -typedef Traits::Curve_2 Conic_arc_2; -typedef CGAL::Arrangement_2 Pmwx; -typedef CGAL::Arr_naive_point_location Point_location; - -//typedef Traits::Point_2 Point_2_2; -typedef Traits2::Curve_2 Conic_arc_2_2; -typedef CGAL::Arrangement_2 Pmwx2; -typedef CGAL::Arr_naive_point_location Point_location2; - -typedef Traits2::X_monotone_curve_2 X_monotone_curve_2_2; -typedef CK1_::Point_2 Point_2_2; -typedef CK1_::Circle_2 Circle_2_2; -typedef CK1_::Circular_arc_2 Circular_arc_2_2; - -typedef Traits::X_monotone_curve_2 X_monotone_curve_2; -typedef Circular_k::Point_2 Point_2; -typedef Circular_k::Circle_2 Circle_2; -typedef Circular_k::Circular_arc_2 Circular_arc_2; - -int main(){ - - CGAL::Timer clck1,clck2; - double t1,t2,t3,t4; - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - int random_max = 128; - int random_min = -128; - ArcContainer ac; - ArcContainer2 ac2; - int x; - int y; - for(int i = 0; i < 30; i++){ - x = theRandom.get_int(random_min,random_max); - y = theRandom.get_int(random_min,random_max); - ac.push_back( Circle_2( Point_2(x,y), x*x + y*y)); - ac2.push_back( Circle_2_2( Point_2_2(x,y), x*x + y*y)); - } - - Pmwx _pm; - Point_location _pl(_pm); - - clck1.start(); - t1=clck1.time(); - for (ArcContainer::const_iterator it=ac.begin(); - it != ac.end(); ++it) { - //insert(_pm,_pl,*it); - insert_curve(_pm,*it,_pl); - }; - t2=clck1.time(); - clck1.stop(); - - - Pmwx2 _pm2; - Point_location2 _pl2(_pm2); - clck2.start(); - t3=clck2.time(); - for (ArcContainer2::const_iterator it2=ac2.begin(); - it2 != ac2.end(); ++it2) { - //insert(_pm2,_pl2,*it2); - insert_curve(_pm2,*it2,_pl2); - }; - t4=clck2.time(); - clck2.stop(); - -std::cout<<"Lazy Circular_k ="<<(t2-t1)< v = Line_arc_2(Point_2(x1,y1), Point_2(x2,y2)); - ac.push_back( v); - - boost::variant< Circular_arc_2_2, Line_arc_2_2 > v2 = Line_arc_2_2(Point_2_2(x1,y1), Point_2_2(x2,y2)); - ac2.push_back( v2); - - } - - for(int i = 0; i < 10; i++){ - x1 = theRandom.get_int(random_min,random_max); - y1 = theRandom.get_int(random_min,random_max); - boost::variant< Circular_arc_2, Line_arc_2 > v = Circle_2( Point_2(x1,y1), x1*x1 + y1*y1); - ac.push_back(v); - - boost::variant< Circular_arc_2_2, Line_arc_2_2 > v2 = Circle_2_2( Point_2_2(x1,y1), x1*x1 + y1*y1); - ac2.push_back(v2); - } - - - - Pmwx _pm; - Point_location _pl(_pm); - - clck1.start(); - - t1=clck1.time(); - - - for (ArcContainer::const_iterator it=ac.begin(); - it != ac.end(); ++it) { - //insert(_pm,_pl,*it); - insert_curve(_pm,*it,_pl); - }; - - t2=clck1.time(); - - clck1.stop(); - - - Pmwx2 _pm2; - Point_location2 _pl2(_pm2); - - clck2.start(); - - t3=clck2.time(); - - - for (ArcContainer2::const_iterator it2=ac2.begin(); - it2 != ac2.end(); ++it2) { - //insert(_pm,_pl,*it); - insert_curve(_pm2,*it2,_pl2); - }; - - t4=clck2.time(); - - clck2.stop(); - - std::cout<<"Lazy Circular_k ="<<(t2-t1)<> x1 >> y1 >> x2 >> y2){ -// ac.push_back( Line_arc_2(Point_2(x1,y1), Point_2(x2,y2))); -// ac2.push_back( Line_arc_2_2(Point_2_2(x1,y1), Point_2_2(x2,y2))); -// } - - - Pmwx _pm; - Point_location _pl(_pm); - - clck1.start(); - t1=clck1.time(); - for (ArcContainer::const_iterator it=ac.begin(); - it != ac.end(); ++it) { - //insert(_pm,_pl,*it); - insert_curve(_pm,*it,_pl); - }; - t2=clck1.time(); - - clck1.stop(); - - Pmwx2 _pm2; - Point_location2 _pl2(_pm2); - - clck2.start(); - t3=clck2.time(); - for (ArcContainer2::const_iterator it2=ac2.begin(); - it2 != ac2.end(); ++it2) { - //insert(_pm2,_pl2,*it2); - insert_curve(_pm2,*it2,_pl2); - }; - t4=clck2.time(); - - clck2.stop(); - - std::cout<<"Lazy Circular_k ="<<(t2-t1)< - v = Line_arc_2(Point_2(x1,y1), Point_2(x2,y2)); - ac.push_back( v); - } - - for (int i = 0; i < 10; i++) { - x1 = theRandom.get_int(random_min,random_max); - y1 = theRandom.get_int(random_min,random_max); - - boost::variant< Circular_arc_2, Line_arc_2 > - v = Circle_2( Point_2(x1,y1), x1*x1 + y1*y1); - ac.push_back(v); - } - - Arr arr; - Point_location _pl(arr); - for (ArcContainer::const_iterator it=ac.begin(); it != ac.end(); ++it) { - insert_curve(arr, *it, _pl); - }; - - return 0; -};