diff --git a/Circular_kernel_2/Benchmarks/arr_traits_comparison.cpp b/Circular_kernel_2/Benchmarks/arr_traits_comparison.cpp index ff9c8c5a812..4fc5a9d3fec 100644 --- a/Circular_kernel_2/Benchmarks/arr_traits_comparison.cpp +++ b/Circular_kernel_2/Benchmarks/arr_traits_comparison.cpp @@ -11,28 +11,44 @@ #include #include +//bbox filtering +#include + typedef CGAL::Gmpq Number_type; +typedef CGAL::Lazy_exact_nt Lazy_nt; typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel_with_LK; typedef CGAL::Lazy_kernel< Kernel > Lazy_Kernel; typedef CGAL::Arr_circle_segment_traits_2 Lazy_Traits; typedef CGAL::Arr_circle_segment_traits_2 Traits; +typedef CGAL::Arr_circle_segment_traits_2 Traits_with_LK; -typedef CGAL::Cartesian K_exact; -typedef CGAL::Algebraic_kernel_for_circles_2_2 AK_exact; -typedef CGAL::Circular_kernel_2 CK_exact; +typedef CGAL::Algebraic_kernel_for_circles_2_2 AK_exact; +typedef CGAL::Circular_kernel_2 CK_exact; typedef CGAL::Interval_nt_advanced ANT; typedef CGAL::Cartesian ALK; typedef CGAL::Algebraic_kernel_for_circles_2_2 AAK; typedef CGAL::Circular_kernel_2 ACK; -typedef CGAL::Lazy_circular_kernel_2 CK; +typedef CGAL::Lazy_circular_kernel_2 Lazy_CK; -typedef CGAL::Arr_circular_line_arc_traits_2 Lazy_Traits_with_CK; +typedef CGAL::Algebraic_kernel_for_circles_2_2 AK_lazy; +typedef CGAL::Circular_kernel_2 CK_with_LK; + + +typedef CGAL::Arr_circular_line_arc_traits_2 Lazy_Traits_with_CK; typedef CGAL::Arr_circular_line_arc_traits_2 Traits_with_CK; +typedef CGAL::Arr_circular_line_arc_traits_2 Traits_with_CK_with_LK; + +typedef CGAL::Filtered_bbox_circular_kernel_2 Fbb_CK_exact; +typedef CGAL::Arr_circular_line_arc_traits_2 Traits_Fbb_CK_exact; + +typedef CGAL::Filtered_bbox_circular_kernel_2 Fbb_Lazy_CK; +typedef CGAL::Arr_circular_line_arc_traits_2 Traits_Fbb_Lazy_CK; template struct Get_exact{ - typename CK::EK::Root_of_2 operator()(const typename CK::Root_of_2& t) const { + typename CK::Root_of_2::Exact_type operator()(const typename CK::Root_of_2& t) const { return CGAL::exact(t); } }; @@ -116,10 +132,9 @@ struct Benchmark Arrangement_2 arr; insert (arr, curves.begin(), curves.end()); // Print the size of the arrangement. - std::cout << "The arrangement size:" << std::endl - << " V = " << arr.number_of_vertices() - << ", E = " << arr.number_of_edges() - << ", F = " << arr.number_of_faces() << std::endl; + std::cout << "(" << arr.number_of_vertices() + << "," << arr.number_of_edges() + << "," << arr.number_of_faces() << ")" << std::endl; time.stop(); std::cout << "Time for Arr_circle_segment_traits_2 " << time.time() << "\n"; } @@ -128,25 +143,27 @@ struct Benchmark CGAL::Timer time; time.start(); Arrangement_2_with_CK ck_arr; insert (ck_arr, ac.begin(), ac.end(),boost::false_type()); - std::cout << "The arrangement size:" << std::endl - << " V = " << ck_arr.number_of_vertices() - << ", E = " << ck_arr.number_of_edges() - << ", F = " << ck_arr.number_of_faces() << std::endl; + std::cout << "(" << ck_arr.number_of_vertices() + << "," << ck_arr.number_of_edges() + << "," << ck_arr.number_of_faces() << ")" << std::endl; time.stop(); std::cout << "Time for Arr_circular_line_arc_traits_2 " << time.time() << "\n"; } } }; - + int main( int argc, char* argv[] ) { - std::cout << "Running with Lazy\n"; + std::cout << "Running with Lazy_kernel\n"; Benchmark bench_lazy; bench_lazy.run(argv[1]); std::cout << "Running with Exact\n"; Benchmark bench; bench.run(argv[1]); + std::cout << "Running with Lazy_exact_nt\n"; + Benchmark bench_with_LK; + bench_with_LK.run(argv[1]); return 0; }