From 4fb1fe60798b19c5cc35c8c65aad4ca6fd827999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 1 Oct 2018 19:00:18 +0200 Subject: [PATCH 01/14] fix when not using Gmp --- ...nt_Delaunay_graph_Linf_filtered_traits_2.h | 2 +- .../include/CGAL/Side_of_bounded_square_2.h | 8 +++--- .../test_sdg_linf_2_et.cpp | 25 ++++++------------- .../test_sdg_linf_2_ft.cpp | 15 ++++------- .../test_sdg_linf_hierarchy_2_et.cpp | 25 ++++++------------- .../test_sdg_linf_hierarchy_2_ft.cpp | 15 ++++------- .../test_sdg_linf_new_range_api.cpp | 6 +++-- 7 files changed, 35 insertions(+), 61 deletions(-) diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h index 4f9c4a31648..5335a26b209 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h @@ -221,7 +221,7 @@ template, #else - class EK = Simple_cartesian< MP_Float >, + class EK = Simple_cartesian< CGAL::Quotient >, #endif class EK_MTag = Integral_domain_without_division_tag, class FK = Simple_cartesian< Interval_nt >, diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Side_of_bounded_square_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Side_of_bounded_square_2.h index 17cfb236743..37f205cf6c4 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Side_of_bounded_square_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Side_of_bounded_square_2.h @@ -70,7 +70,7 @@ namespace CGAL { bool samepq = false; bool samepr = false; bool sameqr = false; - const Comparison_result cmppq = compare(p, q); + const Comparison_result cmppq = CGAL::compare(p, q); switch(cmppq) { case SMALLER: min_p = &p; @@ -86,7 +86,7 @@ namespace CGAL { samepq = true; break; } - const Comparison_result cmppr = compare(p, r); + const Comparison_result cmppr = CGAL::compare(p, r); Comparison_result cmpqr; if (samepq) { cmpqr = cmppr; @@ -105,7 +105,7 @@ namespace CGAL { if (min_p == &p) { switch(cmppr) { case SMALLER: - cmpqr = compare(q, r); + cmpqr = CGAL::compare(q, r); switch(cmpqr) { case SMALLER: max_p = &r; @@ -135,7 +135,7 @@ namespace CGAL { max_p = &r; break; case LARGER: - cmpqr = compare(q, r); + cmpqr = CGAL::compare(q, r); switch(cmpqr) { case SMALLER: break; diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp index eca8eee9727..a53b491851c 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp @@ -10,28 +10,19 @@ #include #include -// choose number type -#ifdef CGAL_USE_GMP +#include +#include -# include -typedef CGAL::Gmpq exact_ring_t; -typedef CGAL::Gmpq exact_field_t; +// choose number type +typedef CGAL::Exact_integer exact_ring_t; +typedef CGAL::Exact_rational exact_field_t; namespace CGAL { // needed for the drawing methods -Gmpq sqrt(const Gmpq& x) { - return Gmpq( CGAL::sqrt( CGAL::to_double(x) ) ); +exact_ring_t sqrt(const exact_ring_t& x) { + return exact_ring_t( sqrt( to_double(x) ) ); +} } - -} //namespace CGAL -#else - -# include -# include -typedef CGAL::MP_Float exact_ring_t; -typedef CGAL::Quotient exact_field_t; - -#endif typedef exact_ring_t ring_number_t; typedef exact_field_t field_number_t; diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp index 91e5edbe13c..1030d7a135b 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp @@ -10,17 +10,12 @@ #include #include +#include +#include + // choose number type -#ifdef CGAL_USE_GMP -# include -typedef CGAL::Gmpq exact_ring_t; -typedef CGAL::Gmpq exact_field_t; -#else -# include -# include -typedef CGAL::MP_Float exact_ring_t; -typedef CGAL::Quotient exact_field_t; -#endif +typedef CGAL::Exact_integer exact_ring_t; +typedef CGAL::Exact_rational exact_field_t; #include diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_et.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_et.cpp index 2f05e01dac2..50a1bdd0e34 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_et.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_et.cpp @@ -10,28 +10,19 @@ #include #include -// choose number type -#ifdef CGAL_USE_GMP +#include +#include -# include -typedef CGAL::Gmpq exact_ring_t; -typedef CGAL::Gmpq exact_field_t; +// choose number type +typedef CGAL::Exact_integer exact_ring_t; +typedef CGAL::Exact_rational exact_field_t; namespace CGAL { // needed for the drawing methods -Gmpq sqrt(const Gmpq& x) { - return Gmpq( sqrt( to_double(x) ) ); +exact_ring_t sqrt(const exact_ring_t& x) { + return exact_ring_t( sqrt( to_double(x) ) ); +} } - -} //namespace CGAL -#else - -# include -# include -typedef CGAL::MP_Float exact_ring_t; -typedef CGAL::Quotient exact_field_t; - -#endif typedef exact_ring_t ring_number_t; typedef exact_field_t field_number_t; diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_ft.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_ft.cpp index 458a3a81c31..3e16425979c 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_ft.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_ft.cpp @@ -10,17 +10,12 @@ #include #include +#include +#include + // choose number type -#ifdef CGAL_USE_GMP -# include -typedef CGAL::Gmpq exact_ring_t; -typedef CGAL::Gmpq exact_field_t; -#else -# include -# include -typedef CGAL::MP_Float exact_ring_t; -typedef CGAL::Quotient exact_field_t; -#endif +typedef CGAL::Exact_integer exact_ring_t; +typedef CGAL::Exact_rational exact_field_t; #include diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_new_range_api.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_new_range_api.cpp index 791a866fb99..8b5124e1c6c 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_new_range_api.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_new_range_api.cpp @@ -7,12 +7,14 @@ #include #include #include -#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Field_with_sqrt_tag MTag; typedef CGAL::Integral_domain_without_division_tag EMTag; -typedef CGAL::Simple_cartesian EK; +typedef CGAL::Exact_rational Number_type; + +typedef CGAL::Simple_cartesian EK; typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_without_intersections_2 Gt; typedef CGAL::Segment_Delaunay_graph_Linf_2 SDG; From 9c1ecd1a43d8cd394f74efae8d95191dd87de811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 9 Oct 2018 14:30:30 +0200 Subject: [PATCH 02/14] use exact rational everywhere --- .../test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp | 3 +-- .../test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp | 3 +-- .../test_sdg_linf_hierarchy_2_et.cpp | 3 +-- .../test_sdg_linf_hierarchy_2_ft.cpp | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp index a53b491851c..43c4de102d9 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_et.cpp @@ -11,10 +11,9 @@ #include #include -#include // choose number type -typedef CGAL::Exact_integer exact_ring_t; +typedef CGAL::Exact_rational exact_ring_t; typedef CGAL::Exact_rational exact_field_t; namespace CGAL { diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp index 1030d7a135b..961eaa43605 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_2_ft.cpp @@ -11,10 +11,9 @@ #include #include -#include // choose number type -typedef CGAL::Exact_integer exact_ring_t; +typedef CGAL::Exact_rational exact_ring_t; typedef CGAL::Exact_rational exact_field_t; #include diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_et.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_et.cpp index 50a1bdd0e34..8b9733164a2 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_et.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_et.cpp @@ -11,10 +11,9 @@ #include #include -#include // choose number type -typedef CGAL::Exact_integer exact_ring_t; +typedef CGAL::Exact_rational exact_ring_t; typedef CGAL::Exact_rational exact_field_t; namespace CGAL { diff --git a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_ft.cpp b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_ft.cpp index 3e16425979c..ed6565c1997 100644 --- a/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_ft.cpp +++ b/Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_linf_hierarchy_2_ft.cpp @@ -11,10 +11,9 @@ #include #include -#include // choose number type -typedef CGAL::Exact_integer exact_ring_t; +typedef CGAL::Exact_rational exact_ring_t; typedef CGAL::Exact_rational exact_field_t; #include From a11f6562c6ce59916e2f36802ffec934d7072a76 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 11 Jan 2019 10:47:34 +0100 Subject: [PATCH 03/14] Support Qt-5.12: qcollectiongenerator merged into qhelpgenerator --- .../Periodic_3_triangulation_3/CMakeLists.txt | 19 ++++++++++--------- .../demo/Periodic_Lloyd_3/CMakeLists.txt | 11 ++++++++--- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt index ed5aad38c95..ea79ae56227 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt @@ -22,7 +22,13 @@ if(Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) endif(Qt5_FOUND) -if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET Qt5::qcollectiongenerator) +if( Qt5Help_VERSION VERSION_LESS 5.12 ) + set(CGAL_QCOLLECTIONGENERATOR_TARGET Qt5::qcollectiongenerator) +else() + set(CGAL_QCOLLECTIONGENERATOR_TARGET Qt5::qhelpgenerator) +endif() + +if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET ${CGAL_QCOLLECTIONGENERATOR_TARGET}) # UI files (Qt Designer files) qt5_wrap_ui ( UI_FILES MainWindow.ui ) @@ -35,15 +41,10 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET Qt5::qcollectiongener qt5_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_MainWindow.cpp" ) qt5_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_Viewer.cpp" ) - if(DEFINED QT_QCOLLECTIONGENERATOR_EXECUTABLE) - else() - set(QT_QCOLLECTIONGENERATOR_EXECUTABLE qcollectiongenerator) - endif() - # generate QtAssistant collection file add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Periodic_3_triangulation_3.qhc DEPENDS Periodic_3_triangulation_3.qhp Periodic_3_triangulation_3.qhcp - COMMAND Qt5::qcollectiongenerator + COMMAND ${CGAL_QCOLLECTIONGENERATOR_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/Periodic_3_triangulation_3.qhcp -o ${CMAKE_CURRENT_BINARY_DIR}/Periodic_3_triangulation_3.qhc ) @@ -80,8 +81,8 @@ else () set(PERIODIC_TRIANGULATION_MISSING_DEPS "Qt5, ${PERIODIC_TRIANGULATION_MISSING_DEPS}") endif() - if (NOT TARGET Qt5::qcollectiongenerator) - set(PERIODIC_TRIANGULATION_MISSING_DEPS "qcollectiongenerator, ${PERIODIC_TRIANGULATION_MISSING_DEPS}") + if (NOT TARGET ${CGAL_QCOLLECTIONGENERATOR_TARGET}) + set(PERIODIC_TRIANGULATION_MISSING_DEPS "${CGAL_QCOLLECTIONGENERATOR_TARGET}, ${PERIODIC_TRIANGULATION_MISSING_DEPS}") endif() message(STATUS "NOTICE: This demo requires ${PERIODIC_TRIANGULATION_MISSING_DEPS}and will not be compiled.") diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt index d711a8dd6c7..540eb1bbce8 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -23,8 +23,13 @@ include(${CGAL_USE_FILE}) find_package(Qt5 QUIET COMPONENTS Xml Script Help OpenGL Svg) +if( Qt5Help_VERSION VERSION_LESS 5.12 ) + set(CGAL_QCOLLECTIONGENERATOR_TARGET Qt5::qcollectiongenerator) +else() + set(CGAL_QCOLLECTIONGENERATOR_TARGET Qt5::qhelpgenerator) +endif() -if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET Qt5::qcollectiongenerator ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET ${CGAL_QCOLLECTIONGENERATOR_TARGET} ) include_directories (BEFORE ../../include ./ ) @@ -43,7 +48,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET Qt5::qcollectiongene # generate QtAssistant collection file add_custom_command ( OUTPUT Periodic_Lloyd_3.qhc DEPENDS Periodic_Lloyd_3.qhp Periodic_Lloyd_3.qhcp - COMMAND Qt5::qcollectiongenerator + COMMAND ${CGAL_QCOLLECTIONGENERATOR_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/Periodic_Lloyd_3.qhcp -o ${CMAKE_CURRENT_BINARY_DIR}/Periodic_Lloyd_3.qhc WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} @@ -71,7 +76,7 @@ else( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND QT_QCOLLECTIONGENERATOR_EX endif() if(NOT QT_QCOLLECTIONGENERATOR_EXECUTABLE) - set(PERIODIC_LLOYD_MISSING_DEPS "qcollectiongenerator, ${PERIODIC_LLOYD_MISSING_DEPS}") + set(PERIODIC_LLOYD_MISSING_DEPS "${CGAL_QCOLLECTIONGENERATOR_TARGET}, ${PERIODIC_LLOYD_MISSING_DEPS}") endif() From 28ce2a5240e432f5845a33ad9ee1dff0c29d550d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 11 Jan 2019 12:29:40 +0100 Subject: [PATCH 04/14] Fixed stack order in non recursive conflict walking Edges must be output in a CCW order, which is achieved by walking ccw-ly first. In the recursive function, we correctly call 'propagate(..., ccw(j))' first. For the non-recursive version which uses a stack, then we must add 'ccw(j)' last since the stack is a LIFO structure. --- Triangulation_2/include/CGAL/Delaunay_triangulation_2.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h index bf45a49f793..ad22e75d9ca 100644 --- a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h @@ -503,8 +503,11 @@ private: } else { *(pit.first)++ = fn; int j = fn->index(fh); - stack.push(std::make_pair(fn,ccw(j))); + + // In the non-recursive version, we walk via 'ccw(j)' first. Here, we are filling the stack + // and the order is thus the opposite (we want the last element of the stack to be 'ccw(j)') stack.push(std::make_pair(fn,cw(j))); + stack.push(std::make_pair(fn,ccw(j))); } } return pit; From 04f3ad63fa1b453c3f6386914530ba9a14bbbec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 11 Jan 2019 12:33:16 +0100 Subject: [PATCH 05/14] Added some sanity tests for the T2 find_conflict functions --- .../CGAL/_test_cls_delaunay_triangulation_2.h | 63 ++++++++++++++++--- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_delaunay_triangulation_2.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_delaunay_triangulation_2.h index 97419a8cc71..c55597c89a4 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_delaunay_triangulation_2.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_delaunay_triangulation_2.h @@ -20,20 +20,21 @@ // coordinator : INRIA Sophia-Antipolis // ============================================================================ -#include -#include -//#include #include +#include +#include +#include +#include +#include #include -using std::rand; +using std::rand; template void _test_delaunay_duality( const Del &T ); - template void _test_cls_delaunay_triangulation_2( const Del & ) @@ -136,14 +137,58 @@ _test_cls_delaunay_triangulation_2( const Del & ) // test insertion through get_conflicts + star_hole conflicts.clear(); hole_bd.clear(); - T2.get_conflicts_and_boundary(Point(1,1,2), - std::back_inserter(conflicts), - std::back_inserter(hole_bd)); + Point query(1,1,2); + T2.get_conflicts_and_boundary(query, + std::back_inserter(conflicts), + std::back_inserter(hole_bd)); + + // check the sanity of the boundary (faces are not in conflict && edges are ccw ordered) + typename std::list::iterator curr = hole_bd.begin(), last = --(hole_bd.end()); + Vertex_handle prev_vh = last->first->vertex(T2.ccw(last->second)); + do + { + assert(curr->first->vertex(T2.cw(curr->second)) == prev_vh); + assert(!T2.test_conflict(query, curr->first)); + prev_vh = curr->first->vertex(T2.ccw(curr->second)); + ++curr; + } + while(curr != hole_bd.end()); + T2.star_hole (Point(1,1,2), hole_bd.begin(), hole_bd.end(), conflicts.begin(), conflicts.end() ); assert(T2.is_valid()); - + + // check get_conflict for a large enough point set (to use the non-recursive function) + double x, y; + std::vector layer_pts; + + std::ifstream in("data/layers.xyz"); + assert(in); + while(in >> x >> y) + layer_pts.push_back(Point(x, y)); + + Del T2b(layer_pts.begin(), layer_pts.end()); + + conflicts.clear(); + hole_bd.clear(); + + query = Point(12.25, 0.031250); + T2b.get_conflicts_and_boundary(query, + std::back_inserter(conflicts), + std::back_inserter(hole_bd)); + + // check the sanity of the boundary (faces are not in conflict && edges are ccw ordered) + curr = hole_bd.begin(), last = --(hole_bd.end()); + prev_vh = last->first->vertex(T2b.ccw(last->second)); + do + { + assert(curr->first->vertex(T2b.cw(curr->second)) == prev_vh); + assert(!T2b.test_conflict(query, curr->first)); + prev_vh = curr->first->vertex(T2b.ccw(curr->second)); + ++curr; + } + while(curr != hole_bd.end()); /********************/ /***** Duality ******/ From 502c28796d23daf199efd3936b2ad12ac5337124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 11 Jan 2019 13:56:06 +0100 Subject: [PATCH 06/14] Clarify 'last' ==> 'top' --- Triangulation_2/include/CGAL/Delaunay_triangulation_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h index ad22e75d9ca..24b205a4cac 100644 --- a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h @@ -505,7 +505,7 @@ private: int j = fn->index(fh); // In the non-recursive version, we walk via 'ccw(j)' first. Here, we are filling the stack - // and the order is thus the opposite (we want the last element of the stack to be 'ccw(j)') + // and the order is thus the opposite (we want the top element of the stack to be 'ccw(j)') stack.push(std::make_pair(fn,cw(j))); stack.push(std::make_pair(fn,ccw(j))); } From 1e27cfba44ee22b7b88f3b870d9ad5c528ff4d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 11 Jan 2019 14:33:56 +0100 Subject: [PATCH 07/14] Add layers.xy data file for T2 tests --- .../test/Triangulation_2/data/layers.xy | 502 ++++++++++++++++++ .../CGAL/_test_cls_delaunay_triangulation_2.h | 2 +- 2 files changed, 503 insertions(+), 1 deletion(-) create mode 100644 Triangulation_2/test/Triangulation_2/data/layers.xy diff --git a/Triangulation_2/test/Triangulation_2/data/layers.xy b/Triangulation_2/test/Triangulation_2/data/layers.xy new file mode 100644 index 00000000000..1207d7eeb95 --- /dev/null +++ b/Triangulation_2/test/Triangulation_2/data/layers.xy @@ -0,0 +1,502 @@ +10 0 +10 0.01 +10 0.02 +10 0.029999999999999999 +10 0.040000000000000001 +10 0.050000000000000003 +10 0.059999999999999998 +10 0.070000000000000007 +10 0.080000000000000002 +10 0.089999999999999997 +10 0.10000000000000001 +10 0.11 +10 0.12 +10 0.13 +10 0.14000000000000001 +10 0.14999999999999999 +10 0.16 +10 0.17000000000000001 +10 0.17999999999999999 +10 0.19 +10 0.20000000000000001 +10 0.20999999999999999 +10 0.22 +10 0.23000000000000001 +10 0.23999999999999999 +10 0.25 +10 0.26000000000000001 +10 0.27000000000000002 +10 0.28000000000000003 +10 0.28999999999999998 +10 0.29999999999999999 +10 0.31 +10 0.32000000000000001 +10 0.33000000000000002 +10 0.34000000000000002 +10 0.34999999999999998 +10 0.35999999999999999 +10 0.37 +10 0.38 +10 0.39000000000000001 +10 0.40000000000000002 +10 0.40999999999999998 +10 0.41999999999999998 +10 0.42999999999999999 +10 0.44 +10 0.45000000000000001 +10 0.46000000000000002 +10 0.46999999999999997 +10 0.47999999999999998 +10 0.48999999999999999 +10 0.5 +10 0.51000000000000001 +10 0.52000000000000002 +10 0.53000000000000003 +10 0.54000000000000004 +10 0.55000000000000004 +10 0.56000000000000005 +10 0.56999999999999995 +10 0.57999999999999996 +10 0.58999999999999997 +10 0.59999999999999998 +10 0.60999999999999999 +10 0.62 +10 0.63 +10 0.64000000000000001 +10 0.65000000000000002 +10 0.66000000000000003 +10 0.67000000000000004 +10 0.68000000000000005 +10 0.68999999999999995 +10 0.69999999999999996 +10 0.70999999999999996 +10 0.71999999999999997 +10 0.72999999999999998 +10 0.73999999999999999 +10 0.75 +10 0.76000000000000001 +10 0.77000000000000002 +10 0.78000000000000003 +10 0.79000000000000004 +10 0.80000000000000004 +10 0.81000000000000005 +10 0.81999999999999995 +10 0.82999999999999996 +10 0.83999999999999997 +10 0.84999999999999998 +10 0.85999999999999999 +10 0.87 +10 0.88 +10 0.89000000000000001 +10 0.90000000000000002 +10 0.91000000000000003 +10 0.92000000000000004 +10 0.93000000000000005 +10 0.93999999999999995 +10 0.94999999999999996 +10 0.95999999999999996 +10 0.96999999999999997 +10 0.97999999999999998 +10 0.98999999999999999 +10 1 +10 1.01 +10 1.02 +10 1.03 +10 1.04 +10 1.05 +10 1.0600000000000001 +10 1.0700000000000001 +10 1.0800000000000001 +10 1.0900000000000001 +10 1.1000000000000001 +10 1.1100000000000001 +10 1.1200000000000001 +10 1.1299999999999999 +10 1.1399999999999999 +10 1.1499999999999999 +10 1.1599999999999999 +10 1.1699999999999999 +10 1.1799999999999999 +10 1.1899999999999999 +10 1.2 +10 1.21 +10 1.22 +10 1.23 +10 1.24 +10 1.25 +10 1.26 +10 1.27 +10 1.28 +10 1.29 +10 1.3 +10 1.3100000000000001 +10 1.3200000000000001 +10 1.3300000000000001 +10 1.3400000000000001 +10 1.3500000000000001 +10 1.3600000000000001 +10 1.3700000000000001 +10 1.3799999999999999 +10 1.3899999999999999 +10 1.3999999999999999 +10 1.4099999999999999 +10 1.4199999999999999 +10 1.4299999999999999 +10 1.4399999999999999 +10 1.45 +10 1.46 +10 1.47 +10 1.48 +10 1.49 +10 1.5 +10 1.51 +10 1.52 +10 1.53 +10 1.54 +10 1.55 +10 1.5600000000000001 +10 1.5700000000000001 +10 1.5800000000000001 +10 1.5900000000000001 +10 1.6000000000000001 +10 1.6100000000000001 +10 1.6200000000000001 +10 1.6299999999999999 +10 1.6399999999999999 +10 1.6499999999999999 +10 1.6599999999999999 +10 1.6699999999999999 +10 1.6799999999999999 +10 1.6899999999999999 +10 1.7 +10 1.71 +10 1.72 +10 1.73 +10 1.74 +10 1.75 +10 1.76 +10 1.77 +10 1.78 +10 1.79 +10 1.8 +10 1.8100000000000001 +10 1.8200000000000001 +10 1.8300000000000001 +10 1.8400000000000001 +10 1.8500000000000001 +10 1.8600000000000001 +10 1.8700000000000001 +10 1.8799999999999999 +10 1.8899999999999999 +10 1.8999999999999999 +10 1.9099999999999999 +10 1.9199999999999999 +10 1.9299999999999999 +10 1.9399999999999999 +10 1.95 +10 1.96 +10 1.97 +10 1.98 +10 1.99 +10 2 +10 2.0099999999999998 +10 2.02 +10 2.0299999999999998 +10 2.04 +10 2.0499999999999998 +10 2.0600000000000001 +10 2.0699999999999998 +10 2.0800000000000001 +10 2.0899999999999999 +10 2.1000000000000001 +10 2.1099999999999999 +10 2.1200000000000001 +10 2.1299999999999999 +10 2.1400000000000001 +10 2.1499999999999999 +10 2.1600000000000001 +10 2.1699999999999999 +10 2.1800000000000002 +10 2.1899999999999999 +10 2.2000000000000002 +10 2.21 +10 2.2200000000000002 +10 2.23 +10 2.2400000000000002 +10 2.25 +10 2.2599999999999998 +10 2.27 +10 2.2799999999999998 +10 2.29 +10 2.2999999999999998 +10 2.3100000000000001 +10 2.3199999999999998 +10 2.3300000000000001 +10 2.3399999999999999 +10 2.3500000000000001 +10 2.3599999999999999 +10 2.3700000000000001 +10 2.3799999999999999 +10 2.3900000000000001 +10 2.3999999999999999 +10 2.4100000000000001 +10 2.4199999999999999 +10 2.4300000000000002 +10 2.4399999999999999 +10 2.4500000000000002 +10 2.46 +10 2.4700000000000002 +10 2.48 +10 2.4900000000000002 +10 2.5 +20 0 +20 0.01 +20 0.02 +20 0.029999999999999999 +20 0.040000000000000001 +20 0.050000000000000003 +20 0.059999999999999998 +20 0.070000000000000007 +20 0.080000000000000002 +20 0.089999999999999997 +20 0.10000000000000001 +20 0.11 +20 0.12 +20 0.13 +20 0.14000000000000001 +20 0.14999999999999999 +20 0.16 +20 0.17000000000000001 +20 0.17999999999999999 +20 0.19 +20 0.20000000000000001 +20 0.20999999999999999 +20 0.22 +20 0.23000000000000001 +20 0.23999999999999999 +20 0.25 +20 0.26000000000000001 +20 0.27000000000000002 +20 0.28000000000000003 +20 0.28999999999999998 +20 0.29999999999999999 +20 0.31 +20 0.32000000000000001 +20 0.33000000000000002 +20 0.34000000000000002 +20 0.34999999999999998 +20 0.35999999999999999 +20 0.37 +20 0.38 +20 0.39000000000000001 +20 0.40000000000000002 +20 0.40999999999999998 +20 0.41999999999999998 +20 0.42999999999999999 +20 0.44 +20 0.45000000000000001 +20 0.46000000000000002 +20 0.46999999999999997 +20 0.47999999999999998 +20 0.48999999999999999 +20 0.5 +20 0.51000000000000001 +20 0.52000000000000002 +20 0.53000000000000003 +20 0.54000000000000004 +20 0.55000000000000004 +20 0.56000000000000005 +20 0.56999999999999995 +20 0.57999999999999996 +20 0.58999999999999997 +20 0.59999999999999998 +20 0.60999999999999999 +20 0.62 +20 0.63 +20 0.64000000000000001 +20 0.65000000000000002 +20 0.66000000000000003 +20 0.67000000000000004 +20 0.68000000000000005 +20 0.68999999999999995 +20 0.69999999999999996 +20 0.70999999999999996 +20 0.71999999999999997 +20 0.72999999999999998 +20 0.73999999999999999 +20 0.75 +20 0.76000000000000001 +20 0.77000000000000002 +20 0.78000000000000003 +20 0.79000000000000004 +20 0.80000000000000004 +20 0.81000000000000005 +20 0.81999999999999995 +20 0.82999999999999996 +20 0.83999999999999997 +20 0.84999999999999998 +20 0.85999999999999999 +20 0.87 +20 0.88 +20 0.89000000000000001 +20 0.90000000000000002 +20 0.91000000000000003 +20 0.92000000000000004 +20 0.93000000000000005 +20 0.93999999999999995 +20 0.94999999999999996 +20 0.95999999999999996 +20 0.96999999999999997 +20 0.97999999999999998 +20 0.98999999999999999 +20 1 +20 1.01 +20 1.02 +20 1.03 +20 1.04 +20 1.05 +20 1.0600000000000001 +20 1.0700000000000001 +20 1.0800000000000001 +20 1.0900000000000001 +20 1.1000000000000001 +20 1.1100000000000001 +20 1.1200000000000001 +20 1.1299999999999999 +20 1.1399999999999999 +20 1.1499999999999999 +20 1.1599999999999999 +20 1.1699999999999999 +20 1.1799999999999999 +20 1.1899999999999999 +20 1.2 +20 1.21 +20 1.22 +20 1.23 +20 1.24 +20 1.25 +20 1.26 +20 1.27 +20 1.28 +20 1.29 +20 1.3 +20 1.3100000000000001 +20 1.3200000000000001 +20 1.3300000000000001 +20 1.3400000000000001 +20 1.3500000000000001 +20 1.3600000000000001 +20 1.3700000000000001 +20 1.3799999999999999 +20 1.3899999999999999 +20 1.3999999999999999 +20 1.4099999999999999 +20 1.4199999999999999 +20 1.4299999999999999 +20 1.4399999999999999 +20 1.45 +20 1.46 +20 1.47 +20 1.48 +20 1.49 +20 1.5 +20 1.51 +20 1.52 +20 1.53 +20 1.54 +20 1.55 +20 1.5600000000000001 +20 1.5700000000000001 +20 1.5800000000000001 +20 1.5900000000000001 +20 1.6000000000000001 +20 1.6100000000000001 +20 1.6200000000000001 +20 1.6299999999999999 +20 1.6399999999999999 +20 1.6499999999999999 +20 1.6599999999999999 +20 1.6699999999999999 +20 1.6799999999999999 +20 1.6899999999999999 +20 1.7 +20 1.71 +20 1.72 +20 1.73 +20 1.74 +20 1.75 +20 1.76 +20 1.77 +20 1.78 +20 1.79 +20 1.8 +20 1.8100000000000001 +20 1.8200000000000001 +20 1.8300000000000001 +20 1.8400000000000001 +20 1.8500000000000001 +20 1.8600000000000001 +20 1.8700000000000001 +20 1.8799999999999999 +20 1.8899999999999999 +20 1.8999999999999999 +20 1.9099999999999999 +20 1.9199999999999999 +20 1.9299999999999999 +20 1.9399999999999999 +20 1.95 +20 1.96 +20 1.97 +20 1.98 +20 1.99 +20 2 +20 2.0099999999999998 +20 2.02 +20 2.0299999999999998 +20 2.04 +20 2.0499999999999998 +20 2.0600000000000001 +20 2.0699999999999998 +20 2.0800000000000001 +20 2.0899999999999999 +20 2.1000000000000001 +20 2.1099999999999999 +20 2.1200000000000001 +20 2.1299999999999999 +20 2.1400000000000001 +20 2.1499999999999999 +20 2.1600000000000001 +20 2.1699999999999999 +20 2.1800000000000002 +20 2.1899999999999999 +20 2.2000000000000002 +20 2.21 +20 2.2200000000000002 +20 2.23 +20 2.2400000000000002 +20 2.25 +20 2.2599999999999998 +20 2.27 +20 2.2799999999999998 +20 2.29 +20 2.2999999999999998 +20 2.3100000000000001 +20 2.3199999999999998 +20 2.3300000000000001 +20 2.3399999999999999 +20 2.3500000000000001 +20 2.3599999999999999 +20 2.3700000000000001 +20 2.3799999999999999 +20 2.3900000000000001 +20 2.3999999999999999 +20 2.4100000000000001 +20 2.4199999999999999 +20 2.4300000000000002 +20 2.4399999999999999 +20 2.4500000000000002 +20 2.46 +20 2.4700000000000002 +20 2.48 +20 2.4900000000000002 +20 2.5 diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_delaunay_triangulation_2.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_delaunay_triangulation_2.h index c55597c89a4..2204331cfe8 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_delaunay_triangulation_2.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_delaunay_triangulation_2.h @@ -163,7 +163,7 @@ _test_cls_delaunay_triangulation_2( const Del & ) double x, y; std::vector layer_pts; - std::ifstream in("data/layers.xyz"); + std::ifstream in("data/layers.xy"); assert(in); while(in >> x >> y) layer_pts.push_back(Point(x, y)); From 3979b415ece81fe2be3bdcca47cec80b58ffd5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 14 Jan 2019 17:49:17 +0100 Subject: [PATCH 08/14] remove useless heading messing up brief --- .../doc/Straight_skeleton_2/Concepts/VertexContainer_2.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/VertexContainer_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/VertexContainer_2.h index 15dfdf25092..b35ba7ee047 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/VertexContainer_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/VertexContainer_2.h @@ -2,8 +2,6 @@ \ingroup PkgStraightSkeleton2Concepts \cgalConcept -\cgalHeading{Introduction} - A model for the `VertexContainer_2` concept defines the requirements for a resizable container of 2D points. It is used to output the offset polygons generated by the `Polygon_offset_builder_2` class. \cgalHasModel CGAL::Polygon_2 From 829c412b10a6e64eec345d54653920fe4673ee8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 14 Jan 2019 17:53:40 +0100 Subject: [PATCH 09/14] move note outside the brief --- .../Concepts/PolynomialTraits_d--PolynomialSubresultants.h | 4 ++-- ...PolynomialTraits_d--PolynomialSubresultantsWithCofactors.h | 4 ++-- .../PolynomialTraits_d--PrincipalSturmHabichtSequence.h | 4 ++-- .../Concepts/PolynomialTraits_d--PrincipalSubresultants.h | 4 ++-- .../Concepts/PolynomialTraits_d--SturmHabichtSequence.h | 4 ++-- .../PolynomialTraits_d--SturmHabichtSequenceWithCofactors.h | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PolynomialSubresultants.h b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PolynomialSubresultants.h index 87cdc87ecc6..026c76a8848 100644 --- a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PolynomialSubresultants.h +++ b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PolynomialSubresultants.h @@ -3,8 +3,6 @@ \ingroup PkgPolynomialConcepts \cgalConcept -Note: This functor is optional! - Computes the polynomial subresultant of two polynomials \f$ p\f$ and \f$ q\f$ of type `PolynomialTraits_d::Polynomial_d` with respect to outermost variable. Let @@ -23,6 +21,8 @@ The result is written in an output range, starting with the \f$ 0\f$-th subresul \f$ \mathrm{Sres}_0(p,q)\f$ (aka as the resultant of \f$ p\f$ and \f$ q\f$). +\note This functor is optional. + \cgalRefines `AdaptableBinaryFunction` \cgalRefines `CopyConstructible` \cgalRefines `DefaultConstructible` diff --git a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PolynomialSubresultantsWithCofactors.h b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PolynomialSubresultantsWithCofactors.h index b1981463df7..56c1e14f641 100644 --- a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PolynomialSubresultantsWithCofactors.h +++ b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PolynomialSubresultantsWithCofactors.h @@ -3,8 +3,6 @@ \ingroup PkgPolynomialConcepts \cgalConcept -Note: This functor is optional! - Computes the polynomial subresultant of two polynomials \f$ p\f$ and \f$ q\f$ of degree \f$ n\f$ and \f$ m\f$, respectively, as defined in the documentation of `PolynomialTraits_d::PolynomialSubresultants`. @@ -16,6 +14,8 @@ the cofactors of \f$ \mathrm{Sres}_i(p,q)\f$. The result is written in three output ranges, each of length \f$ \min\{n,m\}+1\f$, starting with the \f$ 0\f$-th subresultant and the corresponding cofactors. +\note This functor is optional. + \cgalRefines `AdaptableBinaryFunction` \cgalRefines `CopyConstructible` \cgalRefines `DefaultConstructible` diff --git a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PrincipalSturmHabichtSequence.h b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PrincipalSturmHabichtSequence.h index bd4bd491935..376a3e279ef 100644 --- a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PrincipalSturmHabichtSequence.h +++ b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PrincipalSturmHabichtSequence.h @@ -3,8 +3,6 @@ \ingroup PkgPolynomialConcepts \cgalConcept -Note: This functor is optional! - Computes the principal leading coefficients of the Sturm-Habicht sequence of a polynomials \f$ f\f$ of type `PolynomialTraits_d::Polynomial_d` with respect a certain variable \f$ x_i\f$. @@ -19,6 +17,8 @@ In case that `PolynomialTraits_d::Coefficient_type` is `RealEmbeddable`, the fun on the resulting sequence to count the number of distinct real roots of the polynomial \f$ f\f$. +\note This functor is optional. + \cgalRefines `AdaptableBinaryFunction` \cgalRefines `CopyConstructible` \cgalRefines `DefaultConstructible` diff --git a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PrincipalSubresultants.h b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PrincipalSubresultants.h index 2cddb81e1ed..3a63bc6f76d 100644 --- a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PrincipalSubresultants.h +++ b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--PrincipalSubresultants.h @@ -3,8 +3,6 @@ \ingroup PkgPolynomialConcepts \cgalConcept -Note: This functor is optional! - Computes the principal subresultant of two polynomials \f$ p\f$ and \f$ q\f$ of type `PolynomialTraits_d::Coefficient_type` with respect to the outermost variable. @@ -19,6 +17,8 @@ principal subresultant \f$ \mathrm{sres}_0(p,q)\f$ ,aka as the resultant of \f$ p\f$ and \f$ q\f$. (Note that \f$ \mathrm{sres}_0(p,q)=\mathrm{Sres}_0(p,q)\f$ by definition) +\note This functor is optional. + \cgalRefines `AdaptableBinaryFunction` \cgalRefines `CopyConstructible` \cgalRefines `DefaultConstructible` diff --git a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--SturmHabichtSequence.h b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--SturmHabichtSequence.h index f6a4676dfc3..32478346def 100644 --- a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--SturmHabichtSequence.h +++ b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--SturmHabichtSequence.h @@ -3,8 +3,6 @@ \ingroup PkgPolynomialConcepts \cgalConcept -Note: This functor is optional! - Computes the Sturm-Habicht sequence (aka the signed subresultant sequence) of a polynomial \f$ f\f$ of type @@ -27,6 +25,8 @@ The result is written in an output range, starting with the \f$ 0\f$-th Sturm-Habicht polynomial (which is equal to the discriminant of \f$ f\f$ up to a multiple of the leading coefficient). +\note This functor is optional. + \cgalRefines `AdaptableBinaryFunction` \cgalRefines `CopyConstructible` \cgalRefines `DefaultConstructible` diff --git a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--SturmHabichtSequenceWithCofactors.h b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--SturmHabichtSequenceWithCofactors.h index e77f9b78cd2..85efdb9edf9 100644 --- a/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--SturmHabichtSequenceWithCofactors.h +++ b/Polynomial/doc/Polynomial/Concepts/PolynomialTraits_d--SturmHabichtSequenceWithCofactors.h @@ -3,8 +3,6 @@ \ingroup PkgPolynomialConcepts \cgalConcept -Note: This functor is optional! - Computes the Sturm-Habicht polynomials of a polynomial \f$ f\f$ of degree \f$ n\f$, as defined in the documentation of `PolynomialTraits_d::SturmHabichtSequence`. Moreover, for \f$ \mathrm{Stha}_i(f)\f$, polynomials \f$ u_i\f$ and \f$ v_i\f$ @@ -16,6 +14,8 @@ The result is written in three output ranges, each of length \f$ \min\{n,m\}+1\f starting with the \f$ 0\f$-th Sturm-Habicht polynomial \f$ \mathrm{Stha_0(f)}\f$ and the corresponding cofactors. +\note This functor is optional. + \cgalRefines `AdaptableBinaryFunction` \cgalRefines `CopyConstructible` \cgalRefines `DefaultConstructible` From 1d64eae84387527c0e6b2e3911c59b8ee58baf95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 14 Jan 2019 17:58:49 +0100 Subject: [PATCH 10/14] reduce brief --- .../doc/Solver_interface/Concepts/DiagonalizeTraits.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h b/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h index 345bd48dd39..678dc2c87a2 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h +++ b/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h @@ -4,7 +4,9 @@ Concept providing functions to extract eigenvectors and eigenvalues from covariance matrices represented by an array `a`, using symmetric -diagonalization. For example, a matrix of dimension 3 is defined as +diagonalization. + +For example, a matrix of dimension 3 is defined as follows:
\f$ \begin{bmatrix} From 043d3c60fa06f5161a38ff4779ba09150e772bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 17 Jan 2019 16:29:59 +0100 Subject: [PATCH 11/14] Fixed wrongly using the (unsigned) degree type in CatmullClark mask computations --- .../include/CGAL/Subdivision_method_3/subdivision_masks_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_masks_3.h b/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_masks_3.h index e6353e38b61..6e753295000 100644 --- a/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_masks_3.h +++ b/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_masks_3.h @@ -215,13 +215,13 @@ public: /// computes the Catmull-Clark vertex-point `pt` of the vertex `vertex`. void vertex_node(vertex_descriptor vertex, Point& pt) { Halfedge_around_target_circulator vcir(vertex, *(this->pmesh)); - typename boost::graph_traits::degree_size_type n = degree(vertex, *(this->pmesh)); + int n = static_cast(degree(vertex, *(this->pmesh))); FT Q[] = {0.0, 0.0, 0.0}, R[] = {0.0, 0.0, 0.0}; Point_ref S = get(this->vpmap,vertex); Point q; - for (typename boost::graph_traits::degree_size_type i = 0; i < n; i++, ++vcir) { + for (int i = 0; i < n; i++, ++vcir) { Point_ref p2 = get(this->vpmap, target(opposite(*vcir, *(this->pmesh)), *(this->pmesh))); R[0] += (S[0] + p2[0]) / 2; R[1] += (S[1] + p2[1]) / 2; From 624cf0793fdc2d62247f3f501173f973cf401824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 22 Jan 2019 16:03:52 +0100 Subject: [PATCH 12/14] remove applications directory --- Scripts/developer_scripts/cgal_create_release_with_cmake.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake index db6119a6bf5..4b2cef873a6 100644 --- a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake +++ b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake @@ -198,6 +198,7 @@ if (TESTSUITE) endif() # removal of extra directories and files +file(REMOVE_RECURSE ${release_dir}/applications) file(REMOVE_RECURSE ${release_dir}/benchmark) file(REMOVE_RECURSE ${release_dir}/archive) file(REMOVE ${release_dir}/include/CGAL/license/generate_files.cmake) From e34ddaef38fd61204bd48cad4dc061eeca53085f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 22 Jan 2019 19:04:41 +0100 Subject: [PATCH 13/14] reset the halfedge pointer of the faces before setting them that way in the bounded case, the infinite face has no halfedge associated, only holes. Before the patch it could be that an erased one was associated --- Nef_2/include/CGAL/Nef_2/HDS_items.h | 4 +++- Nef_2/include/CGAL/Nef_2/PM_const_decorator.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/HDS_items.h b/Nef_2/include/CGAL/Nef_2/HDS_items.h index 1265cb2eb87..25b7da232d1 100644 --- a/Nef_2/include/CGAL/Nef_2/HDS_items.h +++ b/Nef_2/include/CGAL/Nef_2/HDS_items.h @@ -389,7 +389,9 @@ public: hit->reset_fcit(); for (Isolated_vertex_iterator vit = iv_begin(); vit!=iv_end(); ++vit) vit->reset_ivit(); - FC.clear(); IV.clear(); } + FC.clear(); IV.clear(); + _e=Halfedge_handle(); + } /*{\Mtext There are the same iterator ranges defined for the const iterators |Hole_const_iterator|, |Isolated_vertex_const_iterator|. diff --git a/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h b/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h index 2e0f62cb940..5f4b92ef5d2 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h @@ -473,7 +473,7 @@ check_integrity_and_topological_planarity(bool faces) const int fc_num(0),iv_num(0); Face_const_iterator fit; for (fit = faces_begin(); fit != faces_end(); ++fit) { - if (!first) { + if (!first && halfedge(fit)!=Halfedge_const_handle()) { CGAL_assertion( face(halfedge(fit))==fit ); ++fc_num; } Hole_const_iterator fcit; From b8933836fa7ffbd74f1236853b5a10902facbc5d Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Wed, 23 Jan 2019 09:31:35 +0100 Subject: [PATCH 14/14] Fix normal estimation parameter --- .../Plugins/Point_set/Point_set_normal_estimation_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp index ab53c6c887b..784e49120e8 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp @@ -235,7 +235,7 @@ void Polyhedron_demo_point_set_normal_estimation_plugin::on_actionNormalEstimati std::cerr << "Estimates normal direction by Jet Fitting (k=" << dialog.jet_neighbors() <<")...\n"; // Estimates normals direction. - Jet_estimate_normals_functor functor (points, dialog.pca_neighbors()); + Jet_estimate_normals_functor functor (points, dialog.jet_neighbors()); run_with_qprogressdialog (functor, "Estimating normals by jet fitting...", mw); std::size_t memory = CGAL::Memory_sizer().virtual_size();