diff --git a/Circular_kernel_2/Benchmarks/DxfArrayBenchmarks/benchmark.h b/Circular_kernel_2/Benchmarks/DxfArrayBenchmarks/benchmark.h index 994e40ddb53..9a144bd89c5 100644 --- a/Circular_kernel_2/Benchmarks/DxfArrayBenchmarks/benchmark.h +++ b/Circular_kernel_2/Benchmarks/DxfArrayBenchmarks/benchmark.h @@ -260,14 +260,14 @@ private: typedef typename CGAL::Arr_naive_point_location Point_location; std::cout << "memory size before construction" << mem_sizer.virtual_size() << std::endl; - std::cout << "memory resident size before insert_curves()" << mem_sizer.resident_size () << std::endl; + std::cout << "memory resident size before insert()" << mem_sizer.resident_size () << std::endl; MemBefore = mem_sizer.virtual_size ()/1000; Pmwx _pm; Point_location _pl(_pm); try{ this->start(); - insert_curves(_pm,ac.begin(),ac.end()); + insert(_pm,ac.begin(),ac.end(),boost::false_type()); this->stop(); } catch (...) { @@ -280,8 +280,8 @@ private: if (!fail){this->summarize(_pm.number_of_vertices(),_pm.number_of_halfedges());} MemAfter = mem_sizer.virtual_size ()/1000; - std::cout << "memory size after insert_curves()" << mem_sizer.virtual_size () << std::endl; - std::cout << "memory resident size after insert_curves()" << mem_sizer.resident_size () << std::endl; + std::cout << "memory size after insert()" << mem_sizer.virtual_size () << std::endl; + std::cout << "memory resident size after insert()" << mem_sizer.resident_size () << std::endl; _pm.clear(); } diff --git a/Circular_kernel_2/Benchmarks/Input_data.h b/Circular_kernel_2/Benchmarks/Input_data.h index a0fa4516681..3c9f9d34b1b 100644 --- a/Circular_kernel_2/Benchmarks/Input_data.h +++ b/Circular_kernel_2/Benchmarks/Input_data.h @@ -25,7 +25,7 @@ void _bench_input_grid(ArcContainer& ac){ for(int i = 0; i < 20; i++){ for(int j = 0; j <20; j++){ - ac.push_back( Circle_2( Point_2(x + j*r, y + i*r), r*r)); + ac.push_back(typename CK::Circular_arc_2 ( Circle_2( Point_2(x + j*r, y + i*r), r*r))); } } } @@ -42,7 +42,7 @@ void _bench_input_grid2(ArcContainer& ac){ for(int i = 0; i < 20; i++){ for(int j = 0; j < 20; j++){ - ac.push_back(Circle_2( Point_2(x + j*r, y + i*r), r*r)); + ac.push_back(typename CK::Circular_arc_2 ( Circle_2( Point_2(x + j*r, y + i*r), r*r) )); } } @@ -51,7 +51,7 @@ void _bench_input_grid2(ArcContainer& ac){ for(int i = 0; i < 20; i++){ for(int j = 0; j < 20; j++){ - ac.push_back( Circle_2( Point_2(x + j*r, y + i*r), r*r)); + ac.push_back(typename CK::Circular_arc_2 ( Circle_2( Point_2(x + j*r, y + i*r), r*r))); } } @@ -77,7 +77,7 @@ void _bench_input_random(ArcContainter& arcs) double y = theRandom.get_double(random_min,random_max); double r = theRandom.get_double(0.1,random_max); fout << x << " " << y << " " << r << " " ; - arcs.push_back( Circle_2( Point_2(x,y), r*r)); + arcs.push_back(typename CK::Circular_arc_2 ( Circle_2( Point_2(x,y), r*r) )); } fout.close(); @@ -94,7 +94,7 @@ void _bench_input_file(ArcContainter& arcs){ std::ifstream fin("random.inp"); for(int i = 0; i < 100 ; i++){ fin >> x >> y >> r ; - arcs.push_back( Circle_2( Point_2(x,y), r*r)); + arcs.push_back(typename CK::Circular_arc_2 ( Circle_2( Point_2(x,y), r*r))); } fin.close(); @@ -115,7 +115,7 @@ void _bench_input_rotation(ArcContainter& ac){ for(int i = 0; i < 5; i++){ for(int j = 0; j < 5; j++){ R = (r+k)*(r+k); - ac.push_back( Circle_2( Point_2(x + i*r, y + j*r),R)); + ac.push_back(typename CK::Circular_arc_2 ( Circle_2( Point_2(x + i*r, y + j*r),R) )); } } } diff --git a/Circular_kernel_2/Benchmarks/arrangement_traits/benchmark.h b/Circular_kernel_2/Benchmarks/arrangement_traits/benchmark.h index ba495588330..9ba0d3c9522 100644 --- a/Circular_kernel_2/Benchmarks/arrangement_traits/benchmark.h +++ b/Circular_kernel_2/Benchmarks/arrangement_traits/benchmark.h @@ -206,7 +206,7 @@ class Bench typedef typename CGAL::Arrangement_2 Pmwx; typedef typename CGAL::Arr_naive_point_location Point_location; std::cout << "memory size before construction" << mem_sizer.virtual_size() << std::endl; - std::cout << "memory resident size before insert_curves()" << mem_sizer.resident_size () << std::endl; + std::cout << "memory resident size before insert()" << mem_sizer.resident_size () << std::endl; Pmwx _pm; Point_location _pl(_pm); @@ -214,7 +214,7 @@ class Bench try{ this->start(); - insert_curves(_pm,ac.begin(),ac.end()); + insert(_pm,ac.begin(),ac.end(),boost::false_type()); this->stop(); } @@ -231,8 +231,8 @@ class Bench if (!fail){this->summarize(_pm.number_of_vertices(),_pm.number_of_halfedges());} - std::cout << "memory size after insert_curves()" << mem_sizer.virtual_size () << std::endl; - std::cout << "memory resident size after insert_curves()" << mem_sizer.resident_size () << std::endl; + std::cout << "memory size after insert()" << mem_sizer.virtual_size () << std::endl; + std::cout << "memory resident size after insert()" << mem_sizer.resident_size () << std::endl; } diff --git a/Circular_kernel_2/Benchmarks/arrangement_traits/benchmarks_arrangement.cpp b/Circular_kernel_2/Benchmarks/arrangement_traits/benchmarks_arrangement.cpp index 14f2f3819fc..10a44b21aa8 100644 --- a/Circular_kernel_2/Benchmarks/arrangement_traits/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/Benchmarks/arrangement_traits/benchmarks_arrangement.cpp @@ -195,7 +195,7 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i]); // // for (typename ArcContainer::const_iterator it=ac.begin(); // // it != ac.end(); ++it) { // // //insert(_pm,_pl,*it); -// // insert_curves(_pm,*it,_pl); +// // insert(_pm,*it,_pl); // // }; // // bench.stop(); // // bench.summarize(_pm.number_of_vertices(),_pm.number_of_halfedges()); diff --git a/Circular_kernel_2/Benchmarks/benchmark.h b/Circular_kernel_2/Benchmarks/benchmark.h index f3651efd872..ebc5e887648 100644 --- a/Circular_kernel_2/Benchmarks/benchmark.h +++ b/Circular_kernel_2/Benchmarks/benchmark.h @@ -29,13 +29,13 @@ private: int i; typedef std::size_t size_type; CGAL::Memory_sizer mem_sizer; - char* Dxffile; + std::string Dxffile; bool ONLY_DXF; double MemBefore,MemAfter; public: - Bench(const bool only_dxf=false, char *fhtml="benchmarks.html", char* ftex="benchmarks.tex",char* Dxffilename=""): + Bench(const bool only_dxf=false, const char *fhtml="benchmarks.html", const char* ftex="benchmarks.tex",const char* Dxffilename=""): htmlout(fhtml,std::ios::app), texout(ftex,std::ios::app){ i=0; @@ -161,7 +161,7 @@ private: void summarize(int vertices,int hedges){ int temp; - temp=CGAL::Interval_nt<>::number_of_failures(); +// temp=CGAL::Interval_nt<>::number_of_failures(); numof_f_fails = temp - numof_f_fails; std::cout << " numbers_of_filter_fails : " << numof_f_fails << std::endl; @@ -188,7 +188,7 @@ private: << " Time (sec): " << utime.tv_sec << std::endl << " (usec): " << std::setw(6) << std::setfill('0') << utime.tv_usec << std::endl; - numof_f_fails = CGAL::Interval_nt<>::number_of_failures(); +// numof_f_fails = CGAL::Interval_nt<>::number_of_failures(); } void fail(void){ @@ -213,13 +213,13 @@ private: typedef typename CGAL::Arr_naive_point_location Point_location; std::cout << "memory size before construction" << mem_sizer.virtual_size() << std::endl; - std::cout << "memory resident size before insert_curves()" << mem_sizer.resident_size () << std::endl; + std::cout << "memory resident size before insert()" << mem_sizer.resident_size () << std::endl; MemBefore = mem_sizer.virtual_size ()/1000000; Pmwx _pm; Point_location _pl(_pm); try{ this->start(); - insert_curves(_pm,ac.begin(),ac.end()); + insert(_pm,ac.begin(),ac.end(),boost::false_type()); this->stop(); } catch (std::exception &e) { this->fail(); @@ -236,8 +236,8 @@ private: MemAfter = mem_sizer.virtual_size ()/1000000; - std::cout << "memory size after insert_curves()" << mem_sizer.virtual_size () << std::endl; - std::cout << "memory resident size after insert_curves()" << mem_sizer.resident_size () << std::endl; + std::cout << "memory size after insert()" << mem_sizer.virtual_size () << std::endl; + std::cout << "memory resident size after insert()" << mem_sizer.resident_size () << std::endl; _pm.clear(); } @@ -282,7 +282,7 @@ template } template - void dfx(char* Dfxfile){ + void dfx(const char* Dfxfile){ i=4; ArcContainer arc; @@ -316,7 +316,7 @@ template } public: template - void Compute(char* dxffile){ + void Compute(const char* dxffile){ if(!ONLY_DXF){ this->grid(); this->grid2(); @@ -351,12 +351,12 @@ public: } template - void Compute_dxf(char* dxffile){ + void Compute_dxf(const char* dxffile){ this->dfx(dxffile); this->close_row(); } - void kernel(char* kernel){ + void kernel(const char* kernel){ this->open_row(); this->open_cell(); htmlout << kernel; @@ -365,8 +365,8 @@ template } - void newDxfFilename(char* Dxffilename=""){ - char* newDxf = Dxffilename; + void newDxfFilename(const char* Dxffilename=""){ + const char* newDxf = Dxffilename; if(!ONLY_DXF){ htmlout<< "Kernelgrid Igrid IIrandom doubleDxf input is: "<< newDxf <<" rotation " diff --git a/Circular_kernel_2/Benchmarks/benchmark_CK2.cpp b/Circular_kernel_2/Benchmarks/benchmark_CK2.cpp index 199e1b78192..6860df8c89e 100644 --- a/Circular_kernel_2/Benchmarks/benchmark_CK2.cpp +++ b/Circular_kernel_2/Benchmarks/benchmark_CK2.cpp @@ -10,12 +10,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -23,19 +23,20 @@ #include #include +#include + // CIRCULAR KERNEL TYPEDEFS typedef CGAL::MP_Float RT; typedef CGAL::Quotient NT1; typedef CGAL::Cartesian Linear_k1; typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k1; typedef CGAL::Circular_kernel_2 CircularKernel; -typedef CGAL::Arr_circular_arc_traits CircularK_CA_Traits; +typedef CGAL::Arr_circular_arc_traits_2 CircularK_CA_Traits; typedef CircularKernel::Circular_arc_2 CircularKArc; typedef std::vector CircularKArcContainer; typedef CircularKernel::Circular_arc_2 Circular_arc_2; typedef CircularKernel::Line_arc_2 Line_arc_2; -typedef CGAL::Arr_circular_line_arc_traits CircularK_Variant_Traits; +typedef CGAL::Arr_circular_line_arc_traits_2 CircularK_Variant_Traits; typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; @@ -45,20 +46,20 @@ typedef CGAL::Cartesian Linear_k3; typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k3; typedef CGAL::Circular_kernel_2 CK3_; typedef CGAL::Lazy_circular_kernel_2 LazyCurvedK; -typedef CGAL::Arr_circular_arc_traits LazyCurvedK_CA_Traits; +typedef CGAL::Arr_circular_arc_traits_2 LazyCurvedK_CA_Traits; typedef LazyCurvedK::Circular_arc_2 LazyArc; typedef std::vector LazyArcContainer; typedef LazyCurvedK::Circular_arc_2 Circular_arc_3; typedef LazyCurvedK::Line_arc_2 Line_arc_3; typedef boost::variant LazyVarArc; typedef std::vector LazyVarContainer; -typedef CGAL::Arr_circular_line_arc_traits LazyCurvedK_Variant_Traits; +//~ typedef CGAL::Arr_circular_line_arc_traits_2 LazyCurvedK_Variant_Traits; +typedef CGAL::Arr_circular_line_arc_traits_2 LazyCurvedK_Variant_Traits; // BBOX TYPEDEFS typedef CGAL::Filtered_bbox_circular_kernel_2 BBCircularKernel ; -typedef CGAL::Arr_circular_arc_traits +typedef CGAL::Arr_circular_arc_traits_2 BBCircularKernel_CA_Traits; typedef BBCircularKernel::Circular_arc_2 BBCircularKernelArc; @@ -72,13 +73,12 @@ typedef boost::variant BBCircVarArc; typedef std::vector BBCircVarContainer; -typedef CGAL::Arr_circular_line_arc_traits BBCircVariantTraits; +typedef CGAL::Arr_circular_line_arc_traits_2 BBCircVariantTraits; // BBOX(LAZY) typedef CGAL::Filtered_bbox_circular_kernel_2 BBLazyKernel ; -typedef CGAL::Arr_circular_arc_traits +typedef CGAL::Arr_circular_arc_traits_2 BBLazyKernel_CA_Traits; typedef BBLazyKernel::Circular_arc_2 BBLazyKernelArc; @@ -92,11 +92,10 @@ typedef boost::variant BBLazyVarArc; typedef std::vector BBLazyVarContainer; -typedef CGAL::Arr_circular_line_arc_traits BBLazyVariantTraits; +typedef CGAL::Arr_circular_line_arc_traits_2 BBLazyVariantTraits; template -void do_main(char *s) { +void do_main(const char *s) { // TYPEDEFS typedef typename CK::Circular_arc_2 C2; @@ -120,7 +119,7 @@ void do_main(char *s) { struct rusage before, after; struct timeval utime, stime; getrusage(RUSAGE_SELF,&before); - insert_curves(_pm,ac.begin(),ac.end()); + insert(_pm,ac.begin(),ac.end(),boost::false_type()); getrusage(RUSAGE_SELF,&after); timersub(&(after.ru_utime),&(before.ru_utime),&utime); timersub(&(after.ru_stime),&(before.ru_stime),&stime); @@ -157,7 +156,7 @@ void do_main(int k) { if(k == 0) { for(cx = 0.0; cx <= 10.0; cx += 0.5) { for(cy = 0.0; cy <= 10.0; cy += 0.5) { - ac.push_back(typename CK::Construct_circle_2()(Point_2(cx,cy),rft)); + ac.push_back(typename CK::Circular_arc_2 ( typename CK::Circle_2(Point_2(cx,cy),rft) ) ); } } } @@ -166,14 +165,14 @@ void do_main(int k) { if(k == 1) { for(cx = 0.0; cx <= 0.2; cx += 0.01) { for(cy = 0.0; cy <= 0.2; cy += 0.01) { - ac.push_back(typename CK::Construct_circle_2()(Point_2(cx,cy),rft)); + ac.push_back(typename CK::Circular_arc_2 ( typename CK::Circle_2(Point_2(cx,cy),rft) )); } } } // ONE CIRCLE if(k == 2) { - ac.push_back(typename CK::Construct_circle_2()(Point_2(0,0),5)); + ac.push_back(typename CK::Circular_arc_2 ( typename CK::Circle_2(Point_2(0,0),5) )); } // RANDOM CASE @@ -185,7 +184,7 @@ void do_main(int k) { double x = theRandom.get_double(0.0,1.0); double y = theRandom.get_double(0.0,1.0); double r = theRandom.get_double(0.00001,1.0); - ac.push_back(typename CK::Construct_circle_2()(Point_2(x,y),FT(r))); + ac.push_back(typename CK::Circular_arc_2 ( typename CK::Circle_2(Point_2(x,y),FT(r)) )); } } @@ -194,10 +193,10 @@ void do_main(int k) { double h = (std::sqrt(3.0)+0.01); for(cx = 0.0; cx <= 40.4; cx += 2.01) { for(cy = h; cy <= h*20; cy += h*2) { - ac.push_back(typename CK::Construct_circle_2()(Point_2(cx+1.0,cy),rft)); + ac.push_back(typename CK::Circular_arc_2 ( typename CK::Circle_2(Point_2(cx+1.0,cy),rft) )); } for(cy = 0.0; cy <= h*20.0; cy += h*2) { - ac.push_back(typename CK::Construct_circle_2()(Point_2(cx,cy),rft)); + ac.push_back(typename CK::Circular_arc_2 ( typename CK::Circle_2(Point_2(cx,cy),rft))); } } } @@ -210,7 +209,7 @@ void do_main(int k) { struct rusage before, after; struct timeval utime, stime; getrusage(RUSAGE_SELF,&before); - insert_curves(_pm,ac.begin(),ac.end()); + insert(_pm,ac.begin(),ac.end(),boost::false_type()); getrusage(RUSAGE_SELF,&after); timersub(&(after.ru_utime),&(before.ru_utime),&utime); timersub(&(after.ru_stime),&(before.ru_stime),&stime); @@ -228,15 +227,15 @@ void do_main(int k) { int main(int argc, char* argv[]){ - char* dxf_filename[] = { "DXF/51.dxf", - "DXF/cad_l1.dxf", - "DXF/cad_l2.dxf", - "DXF/che_mod1.dxf", - "DXF/CIOnZDraw.dxf", - "DXF/mask1.dxf", - "DXF/elekonta.dxf", - "DXF/netlist_signal_1.dxf", - "DXF/painttrack.dxf" }; + const char* dxf_filename[] = { "DXF/51.dxf", + "DXF/cad_l1.dxf", + "DXF/cad_l2.dxf", + "DXF/che_mod1.dxf", + "DXF/CIOnZDraw.dxf", + "DXF/mask1.dxf", + "DXF/elekonta.dxf", + "DXF/netlist_signal_1.dxf", + "DXF/painttrack.dxf" }; if(argc == 3) { int i = argv[1][0]-'0'; int j = argv[2][0]-'0'; diff --git a/Circular_kernel_2/Benchmarks/benchmarks_arrangement.cpp b/Circular_kernel_2/Benchmarks/benchmarks_arrangement.cpp index ee68ca4423d..8cd6298208e 100644 --- a/Circular_kernel_2/Benchmarks/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/Benchmarks/benchmarks_arrangement.cpp @@ -18,18 +18,20 @@ #include #include -#include +#include //#include #include +#ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON #include +#endif #include #include #include -#include +#include #include @@ -39,9 +41,9 @@ int main(int argc, char* argv[]) { //char* Dxffilename[]={"myFirst.dxf","cad_l1.dxf"}; - char* Dxffilename[]={"myFirst.dxf","minimask0.dxf","minimask1.dxf","mask0.dxf","mask1.dxf","smallpainttrack.dxf","mask0_25.dxf","mask0_5.dxf","cad_l2.dxf","cad_l1.dxf","CIOnZDraw.dxf","che_mod1.dxf","elekonta.dxf","painttrack.dxf","netlist_signal_1.dxf","51.dxf"}; - char* Htmlfilename; - char* Texfilename; + const char* Dxffilename[]={"myFirst.dxf","minimask0.dxf","minimask1.dxf","mask0.dxf","mask1.dxf","smallpainttrack.dxf","mask0_25.dxf","mask0_5.dxf","cad_l2.dxf","cad_l1.dxf","CIOnZDraw.dxf","che_mod1.dxf","elekonta.dxf","painttrack.dxf","netlist_signal_1.dxf","51.dxf"}; + std::string Htmlfilename; + std::string Texfilename; char exten[4]; int i; i=0; @@ -154,7 +156,7 @@ Bench bench; //If you want create table with all datasets you supose to use th typedef CGAL::Circular_kernel_2 CircularKernel; // #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits CircularK_CA_Traits; + typedef CGAL::Arr_circular_arc_traits_2 CircularK_CA_Traits; // #else // typedef CGAL::Circular_arc_traits Traits0; // typedef CGAL::Circular_arc_traits_tracer CircularK_CA_Traits; @@ -169,7 +171,7 @@ Bench bench; //If you want create table with all datasets you supose to use th typedef CircularKernel::Circular_arc_2 Circular_arc_2; typedef CircularKernel::Line_arc_2 Line_arc_2; - typedef CGAL::Arr_circular_line_arc_traits CircularK_Variant_Traits; + typedef CGAL::Arr_circular_line_arc_traits_2 CircularK_Variant_Traits; typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; @@ -203,7 +205,7 @@ bench.Compute_no_dxf LazyCurvedK; // #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits LazyCurvedK_CA_Traits; + typedef CGAL::Arr_circular_arc_traits_2 LazyCurvedK_CA_Traits; // #else // typedef CGAL::Circular_arc_traits Traits0_2; // typedef CGAL::Circular_arc_traits_tracer LazyCurved_kTraits; @@ -221,7 +223,7 @@ bench.Compute_no_dxf LazyVarArc; typedef std::vector LazyVarContainer; - typedef CGAL::Arr_circular_line_arc_traits LazyCurvedK_Variant_Traits; + typedef CGAL::Arr_circular_line_arc_traits_2 LazyCurvedK_Variant_Traits; bench.kernel("LazyKVar"); @@ -239,7 +241,7 @@ bench.Compute_no_dxf CircularKernelHexagon; // #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits CircularKernHex_CA_Traits; + typedef CGAL::Arr_circular_arc_traits_2 CircularKernHex_CA_Traits; // #else // typedef CGAL::Circular_arc_traits Traits0_3; // typedef CGAL::Circular_arc_traits_tracer CircularKernHex_CA_Traits; @@ -256,7 +258,7 @@ bench.Compute_no_dxf CircularKernHexVarArc; typedef std::vector CircularKernHexVarArcContainer; - typedef CGAL::Arr_circular_line_arc_traits CircularKernHex_Variant_Traits; + typedef CGAL::Arr_circular_line_arc_traits_2 CircularKernHex_Variant_Traits; bench.kernel("CK Hex VarTraits"); @@ -275,7 +277,7 @@ bench.Compute_no_dxf LazyKernelHexagon; // #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits LazyKernelHexagon_CA_Traits; + typedef CGAL::Arr_circular_arc_traits_2 LazyKernelHexagon_CA_Traits; // #else // typedef CGAL::Circular_arc_traits Traits0_4; // typedef CGAL::Circular_arc_traits_tracer LazyKernelHexagon_CA_Traits; @@ -291,7 +293,7 @@ bench.Compute_no_dxf HxLazyVarArc; typedef std::vector HxLazyVarContainer; - typedef CGAL::Arr_circular_line_arc_traits HxLazyVariantTraits; + typedef CGAL::Arr_circular_line_arc_traits_2 HxLazyVariantTraits; bench.kernel("LazyK Hex VarTraits") ; @@ -308,7 +310,7 @@ bench.Compute_no_dxf() typedef CGAL::Filtered_bbox_circular_kernel_2 BBCircularKernel ; // #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits BBCircularKernel_CA_Traits; + typedef CGAL::Arr_circular_arc_traits_2 BBCircularKernel_CA_Traits; // #else // typedef CGAL::Circular_arc_traits Traits0_5; // typedef CGAL::Circular_arc_traits_tracer BBCircularKernel_CA_Traits; @@ -323,7 +325,7 @@ bench.Compute_no_dxf() typedef BBCircularKernel::Line_arc_2 Line_arc_6; typedef boost::variant BBCircVarArc; typedef std::vector BBCircVarContainer; - typedef CGAL::Arr_circular_line_arc_traits BBCircVariantTraits; + typedef CGAL::Arr_circular_line_arc_traits_2 BBCircVariantTraits; bench.kernel("CK BBox VarTraits") ; @@ -340,7 +342,7 @@ bench.Compute_no_dxf() typedef CGAL::Filtered_bbox_circular_kernel_2 BBLazyCurvedK; // #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits BBLazyCurvedK_CA_Traits; + typedef CGAL::Arr_circular_arc_traits_2 BBLazyCurvedK_CA_Traits; // #else // typedef CGAL::Circular_arc_traits Traits0_6; // typedef CGAL::Circular_arc_traits_tracer BBLazyCurvedK_CA_Traits; @@ -357,7 +359,7 @@ bench.Compute_no_dxf() typedef BBLazyCurvedK::Line_arc_2 Line_arc_7; typedef boost::variant BBLazyVarArc; typedef std::vector< BBLazyVarArc> BBLazyVarContainer; - typedef CGAL::Arr_circular_line_arc_traits BBLazyVariantTraits; + typedef CGAL::Arr_circular_line_arc_traits_2 BBLazyVariantTraits; bench.kernel("LLazyK BBox VarTraits") ; diff --git a/Circular_kernel_2/Benchmarks/incremental_insertion/benchmark.h b/Circular_kernel_2/Benchmarks/incremental_insertion/benchmark.h index 97629a2a126..2ab0bd868d0 100644 --- a/Circular_kernel_2/Benchmarks/incremental_insertion/benchmark.h +++ b/Circular_kernel_2/Benchmarks/incremental_insertion/benchmark.h @@ -208,7 +208,7 @@ class Bench typedef typename CGAL::Arrangement_2 Pmwx; typedef typename CGAL::Arr_naive_point_location Point_location; std::cout << "memory size before construction" << mem_sizer.virtual_size() << std::endl; - std::cout << "memory resident size before insert_curves()" << mem_sizer.resident_size () << std::endl; + std::cout << "memory resident size before insert()" << mem_sizer.resident_size () << std::endl; Pmwx _pm; Point_location _pl(_pm); @@ -217,7 +217,7 @@ class Bench this->start(); for (typename ArcContainer::const_iterator it=ac.begin(); it != ac.end(); ++it) { - insert_curve(_pm,*it,_pl); + insert(_pm,*it,_pl,boost::false_type()); }; this->stop(); } @@ -234,8 +234,8 @@ class Bench if (!fail){this->summarize(_pm.number_of_vertices(),_pm.number_of_halfedges());} _pm.clear(); - std::cout << "memory size after insert_curves()" << mem_sizer.virtual_size () << std::endl; - std::cout << "memory resident size after insert_curves()" << mem_sizer.resident_size () << std::endl; + std::cout << "memory size after insert()" << mem_sizer.virtual_size () << std::endl; + std::cout << "memory resident size after insert()" << mem_sizer.resident_size () << std::endl; } diff --git a/Circular_kernel_2/Benchmarks/makefile b/Circular_kernel_2/Benchmarks/makefile deleted file mode 100644 index 0747d1d22e6..00000000000 --- a/Circular_kernel_2/Benchmarks/makefile +++ /dev/null @@ -1,66 +0,0 @@ -# Created by the script cgal_create_makefile -# This is the makefile for compiling a CGAL application. - -#---------------------------------------------------------------------# -# include platform specific settings -#---------------------------------------------------------------------# -# Choose the right include file from the /make directory. - -# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE - - #-DNDEBUG \ - #-O2 -fprofile-arcs -ftest-coverage \ - #-DCGAL_PROFILE \ - #-g - -include $(CGAL_MAKEFILE) - - -#---------------------------------------------------------------------# -# compiler flags -#---------------------------------------------------------------------# - -CXXFLAGS = \ - -DNDEBUG \ - -O2 \ - -I../include \ - $(TESTSUITE_CXXFLAGS) \ - $(EXTRA_FLAGS) \ - $(CGAL_CXXFLAGS) \ - $(LONG_NAME_PROBLEM_CXXFLAGS) - -#---------------------------------------------------------------------# -# linker flags -#---------------------------------------------------------------------# - -LIBPATH = \ - $(CGAL_LIBPATH) - -LDFLAGS = \ - $(LONG_NAME_PROBLEM_LDFLAGS) \ - $(CGAL_LDFLAGS) -#---------------------------------------------------------------------# -# target entries -#---------------------------------------------------------------------# - -all: \ - benchmark_CK2$(EXE_EXT)\ - benchmarks_arrangement$(EXE_EXT) - -benchmarks_arrangement$(EXE_EXT): benchmarks_arrangement$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)benchmarks_arrangement benchmarks_arrangement$(OBJ_EXT) $(LDFLAGS) - -benchmark_CK2$(EXE_EXT): benchmark_CK2$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)benchmark_CK2 benchmark_CK2$(OBJ_EXT) $(LDFLAGS) - -clean: \ - benchmarks_arrangement.clean\ - benchmark_CK2.clean - -#---------------------------------------------------------------------# -# suffix rules -#---------------------------------------------------------------------# - -.cpp$(OBJ_EXT): - $(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $< - diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2.h index 48b3cd9487d..eaebb6f9114 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2.h @@ -93,7 +93,13 @@ struct Circular_kernel_2 >, Circular_kernel_2 > -{}; +{ + // for Lazy hexagons/bbox kernels + // Please remove this if you consider it to be sloppy + struct Circular_tag{}; + typedef Circular_tag Definition_tag; + // +}; } //namespace CGAL diff --git a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2.h b/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2.h index dd44c93bfbf..235e0e20298 100644 --- a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2.h +++ b/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2.h @@ -63,8 +63,8 @@ template typedef typename CK::Compare_x_2 Compare_x_2; typedef typename CK::Compare_y_2 Compare_y_2; typedef typename CK::Compare_xy_2 Compare_xy_2; - typedef typename CK::Compute_Circular_x_2 Compute_Circular_x_2; - typedef typename CK::Compute_Circular_y_2 Compute_Circular_y_2; + typedef typename CK::Compute_circular_x_2 Compute_circular_x_2; + typedef typename CK::Compute_circular_y_2 Compute_circular_y_2; typedef Hexagon_functors::Construct_circular_source_vertex_2 Construct_circular_source_vertex_2; typedef Hexagon_functors::Construct_circular_target_vertex_2 Construct_circular_target_vertex_2; typedef Hexagon_functors::Construct_circular_min_vertex_2 Construct_circular_min_vertex_2; diff --git a/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_2.h b/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_2.h index 42a7aa99882..f4129f036c0 100644 --- a/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_2.h +++ b/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_2.h @@ -166,10 +166,6 @@ public: Lazy_make_x_monotone_2 , \ typename boost::mpl::if_, \ Lazy_make_x_monotone_2 , \ - typename boost::mpl::if_, \ - Lazy_advanced_make_x_monotone_2 , \ - typename boost::mpl::if_, \ - Lazy_advanced_make_x_monotone_2 , \ typename boost::mpl::if_, \ Lazy_functor_2_2 , \ typename boost::mpl::if_, \ @@ -178,7 +174,7 @@ public: Lazy_construction_nt,\ typename boost::mpl::if_,\ Lazy_construction_object,\ - Lazy_construction >::type >::type >::type >::type >::type >::type >::type >::type >::type C; \ + Lazy_construction >::type >::type >::type >::type >::type >::type >::type C; \ C Cf() const { return C(); } diff --git a/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_constructions.h b/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_constructions.h index c313ddacb82..8ef36266a26 100644 --- a/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_constructions.h +++ b/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_constructions.h @@ -47,17 +47,17 @@ make_lazy_CK(const Object& eto) object_cast >(&eto))){ return make_object(std::make_pair(typename LK::Circular_arc_point_2( - new Lazy_construct_rep_0(ptr->first)),ptr->second)); } else if(const typename EK::Circular_arc_2* ptr = object_cast(&eto)){ return make_object(typename LK::Circular_arc_2( - new Lazy_construct_rep_0(*ptr))); } else if(const typename EK::Line_arc_2* ptr = object_cast(&eto)){ return make_object(typename LK::Line_arc_2( - new Lazy_construct_rep_0(*ptr))); } else{ std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's" << std::endl; @@ -94,7 +94,7 @@ public: CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); try { Protect_FPU_rounding P; - Lazy_vector lv(new Lazy_construct_rep_with_vector_2(ac, ec, l1, l2)); + Lazy_vector lv(new Lazy_rep_with_vector_2(ac, ec, l1, l2)); for(unsigned int i = 0; i < lv.approx().size(); i++){ @@ -103,21 +103,21 @@ public: if((temp_p=object_cast >(& (lv.approx()[i])))){ *it = make_object(std::make_pair(typename LK::Circular_arc_point_2( - new Lazy_construct_rep_1, + new Lazy_rep_1, Ith, E2A, Lazy_vector>(Ith(i,false), Ith(i,false), lv)),temp_p->second)); ++it; } else if(object_cast(& (lv.approx()[i]))){ *it = make_object(typename LK::Circular_arc_2( - new Lazy_construct_rep_1, + new Lazy_rep_1, Ith,E2A, Lazy_vector>(Ith(i), Ith(i), lv))); ++it; } else if(object_cast(& (lv.approx()[i]))){ *it = make_object(typename LK::Line_arc_2( - new Lazy_construct_rep_1, + new Lazy_rep_1, Ith,E2A, Lazy_vector>(Ith(i), Ith(i), lv))); @@ -172,20 +172,20 @@ public: CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); try { Protect_FPU_rounding P; - Lazy_vector lv(new Lazy_construct_rep_with_vector_1(ac, ec, l1)); + Lazy_vector lv(new Lazy_rep_with_vector_1(ac, ec, l1)); // lv.approx() is a std::vector // that is, when we get here we have constructed all approximate results for(unsigned int i = 0; i < lv.approx().size(); i++){ if(object_cast(& (lv.approx()[i]))){ *it = make_object(typename LK::Circular_arc_2( - new Lazy_construct_rep_1, + new Lazy_rep_1, Ith,E2A, Lazy_vector>(Ith(i), Ith(i), lv))); ++it; } else if(object_cast(& (lv.approx()[i]))){ *it = make_object(typename LK::Line_arc_2( - new Lazy_construct_rep_1, + new Lazy_rep_1, Ith,E2A, Lazy_vector>(Ith(i), Ith(i), lv))); @@ -240,20 +240,20 @@ public: CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); try { Protect_FPU_rounding P; - Lazy_vector lv(new Lazy_construct_rep_with_vector_1(ac, ec, l1)); + Lazy_vector lv(new Lazy_rep_with_vector_1(ac, ec, l1)); // lv.approx() is a std::vector // that is, when we get here we have constructed all approximate results for(unsigned int i = 0; i < lv.approx().size(); i++){ if(object_cast(& (lv.approx()[i].first))){ *it = std::make_pair(make_object(typename LK::Circular_arc_2( - new Lazy_construct_rep_1, + new Lazy_rep_1, Ith,E2A, Lazy_vector>(Ith(i), Ith(i), lv))),lv.approx()[i].second); ++it; } else if(object_cast(& (lv.approx()[i].first))){ *it = std::make_pair(make_object(typename LK::Line_arc_2( - new Lazy_construct_rep_1, + new Lazy_rep_1, Ith,E2A, Lazy_vector>(Ith(i), Ith(i), lv))),lv.approx()[i].second); @@ -315,30 +315,30 @@ template CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); try { Protect_FPU_rounding P; - Lazy_object lo(new Lazy_construct_rep_1(ac, ec, l1)); + Lazy_object lo(new Lazy_rep_1(ac, ec, l1)); std::pair *temp_p; if((temp_p=object_cast >(& (lo.approx())))){ - typedef Lazy_construct_rep_1, + typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(std::make_pair(typename LK::Circular_arc_point_2(lcr),temp_p->second)); } else if(object_cast(& (lo.approx()))){ - typedef Lazy_construct_rep_1, + typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circular_arc_point_2(lcr)); } else if(object_cast(& (lo.approx()))){ - typedef Lazy_construct_rep_1, + typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circular_arc_2(lcr));} else if(object_cast(& (lo.approx()))){ - typedef Lazy_construct_rep_1, + typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); @@ -364,31 +364,31 @@ template CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); try { Protect_FPU_rounding P; - Lazy_object lo(new Lazy_construct_rep_2(ac, ec, l1, l2)); + Lazy_object lo(new Lazy_rep_2(ac, ec, l1, l2)); std::pair *temp_p; if((temp_p=object_cast >(& (lo.approx())))){ - typedef Lazy_construct_rep_1, + typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(std::make_pair(typename LK::Circular_arc_point_2(lcr),temp_p->second)); } else if(object_cast(& (lo.approx()))){ - typedef Lazy_construct_rep_1, + typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circular_arc_point_2(lcr)); } else if(object_cast(& (lo.approx()))){ - typedef Lazy_construct_rep_1, + typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circular_arc_2(lcr));} else if(object_cast(& (lo.approx()))){ - typedef Lazy_construct_rep_1, + typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); diff --git a/Circular_kernel_2/include/CGAL/Simple_circular_kernel_2.h b/Circular_kernel_2/include/CGAL/Simple_circular_kernel_2.h index 129721d4090..389a1dc5e61 100644 --- a/Circular_kernel_2/include/CGAL/Simple_circular_kernel_2.h +++ b/Circular_kernel_2/include/CGAL/Simple_circular_kernel_2.h @@ -90,7 +90,13 @@ struct Circular_kernel_2 >, Circular_kernel_2 > -{}; +{ + // for Lazy hexagons/bbox kernels + // Please remove this if you consider it to be sloppy + struct Circular_tag{}; + typedef Circular_tag Definition_tag; + // +}; } //namespace CGAL