diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml new file mode 100644 index 00000000000..2113372a877 --- /dev/null +++ b/.github/workflows/reuse.yml @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: 2020 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: GPL-3.0-or-later + +name: REUSE Compliance Check + +on: [push, pull_request] + +jobs: + reuse: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: REUSE version + uses: fsfe/reuse-action@v1 + with: + args: --version + - name: REUSE lint + uses: fsfe/reuse-action@v1 + with: + args: --include-submodules lint + - name: REUSE SPDX SBOM + uses: fsfe/reuse-action@v1 + with: + args: spdx + - name: install dependencies + run: sudo apt-get install -y cmake + - name: Create CGAL internal release + run: | + mkdir -p ./release + cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake + - name: REUSE lint release tarball + uses: fsfe/reuse-action@v1 + with: + args: --root ./release/CGAL-9.9 --include-submodules lint diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 00000000000..06784d71d6b --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,12 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: CGAL +Upstream-Contact: CGAL Editorial Board +Source: https://github.com/CGAL/cgal + +Files: .* *.cmake *.md .github/* Maintenance/* */TODO */doc/* */deb/* */applications/* */doc_html/* */scripts/* */developer_scripts/* */demo/* */examples/* */src/* */test/* */benchmarks/* */benchmark/* */package_info/* */data/* */cmake/* +Copyright: 1995-2023 The CGAL Project +License: CC0-1.0 + +Files: CMakeLists.txt GraphicsView/include/CGAL/Qt/ImageInterface.ui GraphicsView/include/CGAL/Qt/resources/qglviewer-icon.xpm Installation/AUTHORS Installation/CMakeLists.txt Installation/README Installation/auxiliary/cgal_create_cmake_script.1 Installation/auxiliary/gmp/README Installation/include/CGAL/license/gpl_package_list.txt MacOSX/auxiliary/cgal_app.icns copyright +Copyright: 1995-2023 The CGAL Project +License: CC0-1.0 diff --git a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h index 9a673026409..62484d59653 100644 --- a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h +++ b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -34,7 +33,7 @@ namespace CGAL { /*! * \ingroup PkgAABBTreeRef - * Primitive type for a edge of a polyhedral surface. + * Primitive type for an edge of a polyhedral surface. * It wraps an `edge_descriptor` into a 3D segment. * The class model of `HalfedgeGraph` from which the primitive is built should not be deleted * while the AABB tree holding the primitive is in use. diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 0016d4ecc09..1bc5173cb24 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -27,7 +27,6 @@ #include #include #include -#include #ifdef CGAL_HAS_THREADS #include @@ -143,7 +142,7 @@ namespace CGAL { /// An explicit call to `build()` must be made to ensure that the next call to /// a query function will not trigger the construction of the data structure. /// A call to `AABBTraits::set_shared_data(t...)` is made using the internally stored traits. - /// This procedure has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of + /// This procedure has a complexity of \cgalBigO{n log(n)}, where \f$n\f$ is the number of /// primitives of the tree. template void build(T&& ...); @@ -326,7 +325,7 @@ public: boost::optional< typename Intersection_and_primitive_id::Type > first_intersection(const Ray& query) const { - return first_intersection(query, boost::lambda::constant(false)); + return first_intersection(query, [](Primitive_id){ return false; }); } /// \endcond @@ -351,7 +350,7 @@ public: boost::optional first_intersected_primitive(const Ray& query) const { - return first_intersected_primitive(query, boost::lambda::constant(false)); + return first_intersected_primitive(query, [](Primitive_id){ return false; }); } /// \endcond ///@} diff --git a/AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp b/AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp index 5b78ff33016..3b2307a134b 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp b/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp index 4e86ed22d7f..649f594d7e9 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp @@ -3,7 +3,6 @@ #include #include -#include #include #include @@ -92,7 +91,7 @@ int main() Vector bbox_center((bbox.xmin() + bbox.xmax()) / 2, (bbox.ymin() + bbox.ymax()) / 2, (bbox.zmin() + bbox.zmax()) / 2); - boost::array extents; + std::array extents; extents[0] = bbox.xmax() - bbox.xmin(); extents[1] = bbox.ymax() - bbox.ymin(); extents[2] = bbox.zmax() - bbox.zmin(); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h index 82483c0dcce..56c421eee1f 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h @@ -612,10 +612,8 @@ class Test_is_square { CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(Second_argument_type); - static_assert( - ( ::std::is_same< AS , First_argument_type>::value)); - static_assert( - ( ::std::is_same< AS& , Second_argument_type>::value)); + static_assert(::std::is_same< AS , First_argument_type>::value); + static_assert(::std::is_same< AS& , Second_argument_type>::value); //static_assert(::std::is_same< bool , Result_type>::value); bool b = Result_type(true); CGAL_USE(b); @@ -674,12 +672,9 @@ public: CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(Second_argument_type); CGAL_USE_TYPE(Result_type); - static_assert( - ( ::std::is_same::value)); - static_assert( - ( ::std::is_same< AS , Second_argument_type>::value)); - static_assert( - ( ::std::is_same< AS , Result_type>::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same< AS , Second_argument_type>::value); + static_assert(::std::is_same< AS , Result_type>::value); AS epsilon(1); assert( test_equality_epsilon( AS (2), root( 4, AS (16) ), epsilon ) ); @@ -821,6 +816,7 @@ void test_algebraic_structure(){ static_assert(::std::is_same< Tag, Algebraic_category>::value); static_assert(!::std::is_same< Simplify, Null_functor>::value); static_assert(!::std::is_same< Unit_part, Null_functor>::value); + const Simplify simplify=Simplify();; const Unit_part unit_part= Unit_part(); @@ -940,8 +936,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) { typedef CGAL::Algebraic_structure_traits AST; typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive; - static_assert( - !(::std::is_same::value)); + static_assert(!::std::is_same::value); CGAL_USE_TYPE(Is_numerical_sensitive); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h index b8bd5995a6f..70db25837e9 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -66,14 +65,14 @@ namespace internal { template struct Is_derived_from_Handle_with_policy { - typedef boost::false_type Tag; + typedef std::false_type Tag; }; template struct Is_derived_from_Handle_with_policy { typedef typename - boost::is_base_of< CGAL::Handle_with_policy + std::is_base_of< CGAL::Handle_with_policy < typename Comparable::T, typename Comparable::Handle_policy, typename Comparable::Allocator >, @@ -90,7 +89,7 @@ template struct Compare_for_vert_line_map_ }; template - struct Compare_for_vert_line_map_ { + struct Compare_for_vert_line_map_ { bool operator() (const Comparable& a, const Comparable& b) const { return CGAL::Handle_id_less_than< Comparable >()(a,b); diff --git a/Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h index 98dedd0f75b..832be2b8d29 100644 --- a/Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h +++ b/Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h @@ -80,7 +80,7 @@ use binary search. `Alpha_shape_2::number_of_solid_components()` performs a graph traversal and takes time linear in the number of faces of the underlying triangulation. `Alpha_shape_2::find_optimal_alpha()` uses binary search and takes time -\f$ O(n \log n)\f$, where \f$ n\f$ is the number of points. +\cgalBigO{n \log n}, where \f$ n\f$ is the number of points. */ template< typename Dt, typename ExactAlphaComparisonTag > diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h index 7ce92e13c34..728cb446934 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h @@ -448,7 +448,7 @@ struct Alpha_nt_selector_2 GeomTraits, // If the base traits is already exact then we don't need to do anything, // and we can simply directly use the traits class - Boolean_tag::value && + Boolean_tag::value && ExactAlphaComparisonTag::value >, Weighted_tag> { }; diff --git a/Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h index 70f1bec2182..7136eed539b 100644 --- a/Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h @@ -77,7 +77,7 @@ use binary search. `Alpha_shape_3::number_of_solid_components()` performs a graph traversal and takes time linear in the number of cells of the underlying triangulation. `Alpha_shape_3::find_optimal_alpha()` uses binary search and takes time -\f$ O(n \log n)\f$, where \f$ n\f$ is the number of points. +\cgalBigO{n \log n}, where \f$ n\f$ is the number of points. */ template< typename Dt, typename ExactAlphaComparisonTag > diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h index cf732c40d67..d753b2457cb 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h @@ -417,7 +417,7 @@ struct Alpha_nt_selector_3 GeomTraits, // If the base traits is already exact then we don't need to do anything, // and we can simply directly use the traits class - Boolean_tag::value && + Boolean_tag::value && ExactAlphaComparisonTag::value >, Weighted_tag> { }; diff --git a/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h index f599e971bb0..586f82ddfe3 100644 --- a/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -255,7 +254,7 @@ public: std::back_inserter(cells), Emptyset_iterator())); - Facet facet=*boost::prior(facets_on_the_boundary_of_the_hole.end()); + Facet facet=*std::prev(facets_on_the_boundary_of_the_hole.end()); // Remember the points that are hidden by the conflicting cells, // as they will be deleted during the insertion. diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index 648835842e3..f12ad06804b 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -173,7 +173,7 @@ class Alpha_wrap_3 using Alpha_PQ = Modifiable_priority_queue, CGAL_BOOST_PAIRING_HEAP>; protected: - const Oracle& m_oracle; + const Oracle m_oracle; SC_Iso_cuboid_3 m_bbox; FT m_alpha, m_sq_alpha; @@ -1343,6 +1343,7 @@ private: return true; } +public: // Not the best complexity, but it's very cheap compared to the rest of the algorithm. void make_manifold() { diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/AlgebraicCurveParser.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/AlgebraicCurveParser.cpp index 009eede6a79..d54d5242074 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/AlgebraicCurveParser.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/AlgebraicCurveParser.cpp @@ -12,7 +12,7 @@ // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // -// SPDX-License-Identifier: GPL-3.0+ +// SPDX-License-Identifier: GPL-3.0-or-later // // Author(s): Saurabh Singh // Ahmed Essam diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/AlgebraicCurveParser.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/AlgebraicCurveParser.h index e838f2e3c0d..5e8ac4b0fd2 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/AlgebraicCurveParser.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/AlgebraicCurveParser.h @@ -12,7 +12,7 @@ // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // -// SPDX-License-Identifier: GPL-3.0+ +// SPDX-License-Identifier: GPL-3.0-or-later // // Author(s): Saurabh Singh // Ahmed Essam diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 431083db107..62571bfdee9 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -1223,10 +1223,10 @@ halfedge \f$e_{\mathrm{pred}}\f$ directed toward \f$v\f$, such that \f$c\f$ is located between the curves associated with \f$e_{\mathrm{pred}}\f$ and the next halfedge in the clockwise order in the circular list of halfedges around \f$v\f$; see -\cgalFigureRef{aos_fig-insert}. This search may take \f$O(d)\f$ time, +\cgalFigureRef{aos_fig-insert}. This search may take \cgalBigO{d} time, where \f$d\f$ is the degree of the vertex \f$v\f$. \cgalFootnote{We can store the handles to the halfedges incident to \f$v\f$ in an efficient -search structure to obtain \f$O(\log d)\f$ access time. However, as +search structure to obtain \cgalBigO{\log d} access time. However, as \f$d\f$ is usually very small, this may lead to a waste of storage space without a meaningful improvement in running time in practice.} However, if the halfedge \f$e_{\mathrm{pred}}\f$ is known in advance, @@ -1488,9 +1488,9 @@ keep up-to-date as this arrangement changes. As mentioned above, the triangulation strategy is provided only for educational purposes, and thus we do not elaborate on this strategy. The data structure needed by the landmark and the trapezoidal map RIC -strategies can be constructed in \f$O(N \log N)\f$ time, where \f$N\f$ +strategies can be constructed in \cgalBigO{N \log N} time, where \f$N\f$ is the overall number of edges in the arrangement, but the constant -hidden in the \f$O()\f$ notation for the trapezoidal map RIC strategy +hidden in the \cgalBigO{ } notation for the trapezoidal map RIC strategy is much larger. Thus, construction needed by the landmark algorithm is in practice significantly faster than the construction needed by the trapezoidal map RIC strategy. In addition, although both resulting @@ -1647,7 +1647,7 @@ Section \ref arr_ssecpl. The output pairs are sorted in increasing \f$xy\f$-lexicographical order of the query point. The batched point-location operation is carried out by sweeping the -arrangement. Thus, it takes \f$O((m+N)\log{(m+N)})\f$ time, where +arrangement. Thus, it takes \cgalBigO{(m+N)\log{(m+N)}} time, where \f$N\f$ is the number of edges in the arrangement. Issuing separate queries exploiting a point-location strategy with logarithmic query time per query, such as the trapezoidal map RIC strategy (see Section @@ -2037,11 +2037,11 @@ so it must be construct from scratch. In the first case, we sweep over the input curves, compute their intersection points, and construct the \dcel that represents their -arrangement. This process is performed in \f$O\left((n + k)\log -n\right)\f$ time, where \f$k\f$ is the total number of intersection +arrangement. This process is performed in \cgalBigO{left((n + k)\log +n\right} time, where \f$k\f$ is the total number of intersection points. The running time is asymptotically better than the time needed for incremental insertion if the arrangement is relatively sparse -(when \f$k\f$ is \f$O(\frac{n^2}{\log n}\f$)), but it is recommended +(when \f$k\f$ is \cgalBigO{\frac{n^2}{\log n}}), but it is recommended that this aggregate construction process be used even for dense arrangements, since the plane-sweep algorithm performs fewer geometric operations compared to the incremental insertion algorithms, and hence @@ -4346,7 +4346,7 @@ a point with respect to an \f$x\f$-monotone polyline, we use binary search to locate the relevant segment that contains the point in its \f$x\f$-range. Then, we compute the position of the point with respect to this segment. Thus, operations on \f$x\f$-monotone polylines of -size \f$m\f$ typically take \f$O(\log m)\f$ time. +size \f$m\f$ typically take \cgalBigO{\log m} time. You are free to choose the underlying segment traits class. Your decision could be based, for example, on the number of expected diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h index 0027ec53409..e662503bee4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h @@ -12,9 +12,9 @@ Seidel \cgalCite{s-sfira-91} (see also [\cgalCite{bkos-cgaa-00} Chapter 6). It subdivides each arrangement face to pseudo-trapezoidal cells, each of constant complexity, and constructs and maintains a linear-size search structure on top of these cells, such that each query can be answered -in \f$ O(\log n)\f$ time, where \f$ n\f$ is the complexity of the arrangement. +in \cgalBigO{\log n} time, where \f$ n\f$ is the complexity of the arrangement. -Constructing the search structures takes \f$ O(n \log n)\f$ expected time +Constructing the search structures takes \cgalBigO{n \log n} expected time and may require a small number of rebuilds \cgalCite{hkh-iiplgtds-12}. Therefore attaching a trapezoidal point-location object to an existing arrangement may incur some overhead in running times. In addition, the point-location diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h index e913bc9f7db..4d5c07d46ea 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h @@ -352,7 +352,7 @@ namespace CGAL { //typedef const result_type& qualified_result_type; template < typename T > - //typename boost::remove_reference::type + //std::remove_reference_t Circular_arc_point_2 operator()(const T &a) const { @@ -370,7 +370,7 @@ namespace CGAL { typedef Point_2 result_type; //typedef const result_type& qualified_result_type; - //typename boost::remove_reference::type + //std::remove_reference_t result_type operator() (const boost::variant< Arc1, Arc2 > & cv) const { @@ -397,7 +397,7 @@ namespace CGAL { //typedef const result_type& qualified_result_type; template < typename T > - //typename boost::remove_reference::type + //std::remove_reference_t Circular_arc_point_2 operator()(const T &a) const { @@ -420,7 +420,7 @@ namespace CGAL { typedef Point_2 result_type; //typedef const result_type& qualified_result_type; - //typename boost::remove_reference::type + //std::remove_reference result_type operator() (const boost::variant< Arc1, Arc2 > & cv) const { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index 638e5f630b2..f7b77c63a43 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -79,7 +79,7 @@ public: typedef Tag_true Has_left_category; typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - //typedef boost::true_type Has_line_segment_constructor; + //typedef std::true_type Has_line_segment_constructor; typedef Arr_oblivious_side_tag Left_side_category; typedef Arr_oblivious_side_tag Bottom_side_category; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index c87b4a357e7..7a0a2eaa3af 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -66,7 +66,7 @@ public: typedef Arr_contracted_side_tag Top_side_category; typedef Arr_identified_side_tag Right_side_category; - typedef boost::integral_constant Zero_atan_y; + typedef std::integral_constant Zero_atan_y; // Traits objects typedef Arr_extended_direction_3 Point_2; @@ -358,7 +358,7 @@ public: */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, - boost::true_type) const + std::true_type) const { const Direction_3& normal = xcv.normal(); dp = (CGAL::sign(normal.dz()) == POSITIVE) ? @@ -371,7 +371,7 @@ public: */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, - boost::false_type) const + std::false_type) const { const Direction_3& normal = xcv.normal(); FT z((atan_x * normal.dx() + atan_y * normal.dy()) / @@ -383,7 +383,7 @@ public: * \param[in] cv the curve */ bool overlap_with_identification(const X_monotone_curve_2& xcv, - boost::true_type) const + std::true_type) const { const Direction_3& normal = xcv.normal(); return ((x_sign(normal) == ZERO) && @@ -395,7 +395,7 @@ public: * \param[in] cv the curve */ bool overlap_with_identification(const X_monotone_curve_2& xcv, - boost::false_type) const + std::false_type) const { const Direction_3& normal = xcv.normal(); const Direction_3& iden_normal = identification_normal(); @@ -441,7 +441,7 @@ public: Point_2 p; Direction_3& d(p); d = Direction_3(x, y, z); - init(p, boost::integral_constant()); + init(p, std::integral_constant()); return p; } @@ -454,14 +454,14 @@ public: Point_2 p; Direction_3& d(p); d = Direction_3(other); - init(p, boost::integral_constant()); + init(p, std::integral_constant()); return p; } /*! Initialize a point on the sphere, * \param[in] p the point to initialize. */ - void init(Point_2& p, boost::true_type) const + void init(Point_2& p, std::true_type) const { const Direction_3& dir = p; if (y_sign(dir) != ZERO) { @@ -480,7 +480,7 @@ public: /*! Initialize a point on the sphere, * \param[in] p the point to initialize. */ - void init(Point_2& p, boost::false_type) const + void init(Point_2& p, std::false_type) const { const Direction_3& dir = p; if ((x_sign(dir) == ZERO) && (y_sign(dir) == ZERO)) { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h index 84c9cee01d9..c216a07bc9c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -2419,7 +2419,7 @@ protected: /*! Obtain the index of the subcurve in the polycurve that contains the * point q in its x-range. The function performs a binary search, so if the * point q is in the x-range of the polycurve with n subcurves, the subcurve - * containing it can be located in O(log n) operations. + * containing it can be located in \cgalBigO{log n} operations. * \param cv The polycurve curve. * \param q The point. * \return An index i such that q is in the x-range of cv[i]. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index c39c34099a5..d54f4c2cb0e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -61,7 +61,7 @@ namespace Ss2 = Surface_sweep_2; // The last parameter is used to resolve ambiguity between this function and // do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and // Curve_2 are the same class. -// The last parameter should be boost::false_type but we used a +// The last parameter should be std::false_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, @@ -132,7 +132,7 @@ void insert(Arrangement_on_surface_2& arr, // // The last parameter is used to resolve ambiguity between this function and // do_intersect of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, @@ -406,7 +406,7 @@ void insert_non_empty(Arrangement_on_surface_2&, @@ -460,7 +460,7 @@ void insert(Arrangement_on_surface_2& arr, // // The last parameter is used to resolve ambiguity between this function and // insert of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, @@ -1522,7 +1522,7 @@ zone(Arrangement_on_surface_2& arr, // Checks whether the given x-monotone curve intersects the existing arrangement. // The last parameter is used to resolve ambiguity between this function and // do_intersect of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_on_surface_2<>&, @@ -1559,7 +1559,7 @@ do_intersect(Arrangement_on_surface_2& arr, // The last parameter is used to resolve ambiguity between this function and // do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and // Curve_2 are the same class. -// The last parameter should be boost::false_type but we used a +// The last parameter should be std::false_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h index a97588ecde2..93788c728d0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h @@ -24,7 +24,7 @@ #include -#include +#include namespace CGAL { @@ -62,7 +62,7 @@ namespace CGAL // In the meanwhile we use a default implementation. template -class is_arrangement_2 : public boost::false_type +class is_arrangement_2 : public std::false_type {}; //-------------------------------- Arrangement_2 @@ -74,7 +74,7 @@ class Arrangement_2; template class is_arrangement_2< Arrangement_2 -> : public boost::false_type +> : public std::false_type {}; @@ -87,7 +87,7 @@ class Arrangement_on_surface_2; template class is_arrangement_2< Arrangement_on_surface_2 -> : public boost::true_type +> : public std::true_type {}; } // namespace CGAL diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h index c1ece0d0d57..5e95ec2d731 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h @@ -62,7 +62,6 @@ #include #include -#include #include diff --git a/BGL/include/CGAL/boost/graph/Dual.h b/BGL/include/CGAL/boost/graph/Dual.h index 78cc2b6c6f7..7d7481b1625 100644 --- a/BGL/include/CGAL/boost/graph/Dual.h +++ b/BGL/include/CGAL/boost/graph/Dual.h @@ -458,7 +458,7 @@ out_degree(typename boost::graph_traits >::vertex_descriptor v, const Dual

& dual) { const typename Dual

::Primal& primal = dual.primal(); - return boost::distance(halfedges_around_face(halfedge(v,primal),primal)); + return halfedges_around_face(halfedge(v,primal),primal).size(); } template diff --git a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h index e1e9f6f0a6f..3a0a851b682 100644 --- a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h +++ b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h @@ -42,7 +42,7 @@ namespace CGAL { * boost::filtered_graph, * this class only requires a way to access the selected faces and will automatically select the * edges/halfedges and vertices present in the adapted graph. A vertex is selected if it is incident to at least one - * selected face. A edge is selected if it is incident to at least a selected face. A halfedge is selected if its edge + * selected face. An edge is selected if it is incident to at least a selected face. A halfedge is selected if its edge * is selected. * * Since this class is a model of the `FaceGraph` concept, there is a restriction on the set of selected faces: @@ -486,8 +486,8 @@ struct Face_filtered_graph selected_halfedges.reset(); typedef typename boost::property_traits::value_type Patch_index; - std::unordered_set pids(boost::begin(selected_face_patch_indices), - boost::end(selected_face_patch_indices)); + std::unordered_set pids(std::begin(selected_face_patch_indices), + std::end(selected_face_patch_indices)); for(face_descriptor fd : faces(_graph) ) { diff --git a/BGL/include/CGAL/boost/graph/IO/STL.h b/BGL/include/CGAL/boost/graph/IO/STL.h index 7198d8640aa..d2cb78c4524 100644 --- a/BGL/include/CGAL/boost/graph/IO/STL.h +++ b/BGL/include/CGAL/boost/graph/IO/STL.h @@ -264,7 +264,7 @@ bool write_STL(std::ostream& os, if(get_mode(os) == BINARY) { os << "FileType: Binary "; - const boost::uint32_t N32 = static_cast(faces(g).size()); + const std::uint32_t N32 = static_cast(faces(g).size()); os.write(reinterpret_cast(&N32), sizeof(N32)); for(const face_descriptor f : faces(g)) diff --git a/BGL/include/CGAL/boost/graph/helpers.h b/BGL/include/CGAL/boost/graph/helpers.h index 21644ebf18f..34597b22192 100644 --- a/BGL/include/CGAL/boost/graph/helpers.h +++ b/BGL/include/CGAL/boost/graph/helpers.h @@ -848,12 +848,12 @@ inline std::enable_if_t::value, void> clear_impl(FaceGraph& g) { - while(boost::begin(edges(g))!=boost::end(edges(g))) - remove_edge(*boost::begin(edges(g)), g); - while(boost::begin(faces(g))!=boost::end(faces(g))) - remove_face(*boost::begin(faces(g)), g); - while(boost::begin(vertices(g))!=boost::end(vertices(g))) - remove_vertex(*boost::begin(vertices(g)), g); + while(std::begin(edges(g))!=std::end(edges(g))) + remove_edge(*std::begin(edges(g)), g); + while(std::begin(faces(g))!=std::end(faces(g))) + remove_face(*std::begin(faces(g)), g); + while(std::begin(vertices(g))!=std::end(vertices(g))) + remove_vertex(*std::begin(vertices(g)), g); } template @@ -975,9 +975,9 @@ template void clear(FaceGraph& g) { internal::clear_impl(g); - CGAL_postcondition(std::distance(boost::begin(edges(g)),boost::end(edges(g))) == 0); - CGAL_postcondition(std::distance(boost::begin(vertices(g)),boost::end(vertices(g))) == 0); - CGAL_postcondition(std::distance(boost::begin(faces(g)),boost::end(faces(g))) == 0); + CGAL_postcondition(std::distance(std::begin(edges(g)),std::end(edges(g))) == 0); + CGAL_postcondition(std::distance(std::begin(vertices(g)),std::end(vertices(g))) == 0); + CGAL_postcondition(std::distance(std::begin(faces(g)),std::end(faces(g))) == 0); } /** diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index fbe1f2e4513..80b02a191a1 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -140,7 +140,7 @@ struct Point_accessor typedef ValueType value_type; typedef Handle key_type; - typedef typename boost::mpl::if_< boost::is_reference, + typedef typename boost::mpl::if_< std::is_reference, ValueType&, ValueType >::type Reference; diff --git a/BGL/include/CGAL/boost/graph/property_maps.h b/BGL/include/CGAL/boost/graph/property_maps.h index c10935e27f2..aab29d9b881 100644 --- a/BGL/include/CGAL/boost/graph/property_maps.h +++ b/BGL/include/CGAL/boost/graph/property_maps.h @@ -15,9 +15,7 @@ #include #include -#include #include -#include namespace CGAL{ @@ -25,7 +23,7 @@ namespace CGAL{ template < class TriangleMesh, class VertexPointMap = typename boost::property_map::type > struct Triangle_from_face_descriptor_map{ - typename boost::remove_const::type* m_tm; + typename std::remove_const_t* m_tm; VertexPointMap m_vpm; Triangle_from_face_descriptor_map() @@ -33,13 +31,13 @@ struct Triangle_from_face_descriptor_map{ {} Triangle_from_face_descriptor_map(TriangleMesh const* tm) - : m_tm( const_cast::type*>(tm) ) + : m_tm( const_cast*>(tm) ) , m_vpm( get(vertex_point, *m_tm) ) {} Triangle_from_face_descriptor_map(TriangleMesh const* tm, VertexPointMap vpm ) - : m_tm(const_cast::type*>(tm)) + : m_tm(const_cast*>(tm)) , m_vpm(vpm) {} @@ -57,7 +55,7 @@ struct Triangle_from_face_descriptor_map{ get(const Triangle_from_face_descriptor_map& pmap, key_type f) { - typename boost::remove_const::type & tm = *(pmap.m_tm); + std::remove_const_t& tm = *(pmap.m_tm); CGAL_precondition(halfedge(f,tm) == next(next(next(halfedge(f,tm),tm),tm),tm)); return value_type( get(pmap.m_vpm, target(halfedge(f,tm),tm)), @@ -70,7 +68,7 @@ struct Triangle_from_face_descriptor_map{ get(const Triangle_from_face_descriptor_map& pmap, const std::pair& f) { - typename boost::remove_const::type & tm = *(pmap.m_tm); + std::remove_const_t & tm = *(pmap.m_tm); CGAL_precondition(halfedge(f.first,tm) == next(next(next(halfedge(f.first,tm),tm),tm),tm)); return value_type( get(pmap.m_vpm, target(halfedge(f.first,tm),tm)), @@ -88,13 +86,13 @@ struct Segment_from_edge_descriptor_map{ {} Segment_from_edge_descriptor_map(PolygonMesh const * pm) - : m_pm( const_cast::type*>(pm) ) + : m_pm( const_cast*>(pm) ) , m_vpm( get(vertex_point, *m_pm) ) {} Segment_from_edge_descriptor_map(PolygonMesh const * pm, VertexPointMap vpm ) - : m_pm( const_cast::type*>(pm) ) + : m_pm( const_cast*>(pm) ) , m_vpm(vpm) {} @@ -106,7 +104,7 @@ struct Segment_from_edge_descriptor_map{ typedef value_type reference; typedef boost::readable_property_map_tag category; //data - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //get function for property map @@ -138,16 +136,16 @@ struct One_point_from_face_descriptor_map{ {} One_point_from_face_descriptor_map(PolygonMesh const * g) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm( get(vertex_point, *m_pm) ) {} One_point_from_face_descriptor_map(PolygonMesh const * g, VertexPointMap vpm ) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm(vpm) {} - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //classical typedefs @@ -182,12 +180,12 @@ struct Source_point_from_edge_descriptor_map{ {} Source_point_from_edge_descriptor_map(PolygonMesh const * g) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm( get(vertex_point, *m_pm) ) {} Source_point_from_edge_descriptor_map(PolygonMesh const * g, VertexPointMap vpm ) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm(vpm) {} @@ -198,7 +196,7 @@ struct Source_point_from_edge_descriptor_map{ typedef boost::readable_property_map_tag category; //data - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //get function for property map diff --git a/BGL/include/CGAL/boost/graph/visitor.h b/BGL/include/CGAL/boost/graph/visitor.h index 085c6ce01d9..f7df1e748b2 100644 --- a/BGL/include/CGAL/boost/graph/visitor.h +++ b/BGL/include/CGAL/boost/graph/visitor.h @@ -14,13 +14,13 @@ #include #include -#include +#include namespace boost { template struct graph_traits< - boost::tuple, boost::reference_wrapper > > + boost::tuple, std::reference_wrapper > > : boost::graph_traits< Graph > { typedef boost::graph_traits Base; @@ -29,20 +29,20 @@ namespace boost template struct graph_traits< - boost::tuple, boost::reference_wrapper > const > + boost::tuple, std::reference_wrapper > const > : boost::graph_traits< Graph > {}; template struct property_map< - boost::tuple, boost::reference_wrapper >, + boost::tuple, std::reference_wrapper >, PropertyTag> : public property_map {}; template struct property_map< - const boost::tuple, boost::reference_wrapper >, + const boost::tuple, std::reference_wrapper >, PropertyTag> : public property_map {}; @@ -52,11 +52,11 @@ namespace boost namespace CGAL { template -boost::tuple, - boost::reference_wrapper > +boost::tuple, + std::reference_wrapper > make_graph_with_visitor(V& v, Graph& g) { - return boost::make_tuple(boost::ref(v), boost::ref(g)); + return boost::make_tuple(std::ref(v), std::ref(g)); } template @@ -67,11 +67,8 @@ public: typedef typename gt::halfedge_descriptor halfedge_descriptor; typedef typename gt::edge_descriptor edge_descriptor; typedef typename gt::vertex_descriptor vertex_descriptor; - - }; - //// OVERLOADS FOR Visitor template @@ -260,119 +257,119 @@ void get(PropertyTag ptag, const Visitor_base& w) template typename boost::graph_traits::vertices_size_type -num_vertices(const boost::tuple, - boost::reference_wrapper >& w) +num_vertices(const boost::tuple, + std::reference_wrapper >& w) { - num_vertices(boost::unwrap_ref(w.get<0>())); - return num_vertices(boost::unwrap_ref(w.get<1>())); + num_vertices(get<0>(w).get()); + return num_vertices(get<1>(w).get()); } template typename boost::graph_traits::edges_size_type -num_edges(const boost::tuple, - boost::reference_wrapper >& w) +num_edges(const boost::tuple, + std::reference_wrapper >& w) { - num_edges(boost::unwrap_ref(w.get<0>())); - return num_edges(boost::unwrap_ref(w.get<1>())); + num_edges(get<0>(w).get()); + return num_edges(get<1>(w).get()); } template typename boost::graph_traits::degree_size_type degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - degree(v, boost::unwrap_ref(w.get<0>())); - return degree(v, boost::unwrap_ref(w.get<1>())); + degree(v, get<0>(w).get()); + return degree(v, get<1>(w).get()); } template typename boost::graph_traits::degree_size_type out_degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - out_degree(v, boost::unwrap_ref(w.get<0>())); - return out_degree(v, boost::unwrap_ref(w.get<1>())); + out_degree(v, get<0>(w).get()); + return out_degree(v, get<1>(w).get()); } template typename boost::graph_traits::degree_size_type in_degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - in_degree(v, boost::unwrap_ref(w.get<0>())); - return in_degree(v, boost::unwrap_ref(w.get<1>())); + in_degree(v, get<0>(w).get()); + return in_degree(v, get<1>(w).get()); } template typename boost::graph_traits::vertex_descriptor source(typename boost::graph_traits::edge_descriptor e - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - source(e, boost::unwrap_ref(w.get<0>())); - return source(e, boost::unwrap_ref(w.get<1>())); + source(e, get<0>(w).get()); + return source(e, get<1>(w).get); } template typename boost::graph_traits::vertex_descriptor target(typename boost::graph_traits::edge_descriptor e - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - target(e, boost::unwrap_ref(w.get<0>())); - return target(e, boost::unwrap_ref(w.get<1>())); + target(e, get<0>(w).get()); + return target(e, get<1>(w).get()); } template std::pair::edge_descriptor, bool> edge(typename boost::graph_traits::vertex_descriptor u , typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - edge(u, v, boost::unwrap_ref(w.get<0>())); - return edge(u, v, boost::unwrap_ref(w.get<1>())); + edge(u, v, get<0>(w).get()); + return edge(u, v, get<1>(w).get); } template inline CGAL::Iterator_range::vertex_iterator> -vertices(const boost::tuple, - boost::reference_wrapper >& w) +vertices(const boost::tuple, + std::reference_wrapper >& w) { - vertices(boost::unwrap_ref(w.get<0>())); - return vertices(boost::unwrap_ref(w.get<1>())); + vertices(get<0>(w).get()); + return vertices(get<1>(w).get()); } template inline CGAL::Iterator_range::edge_iterator> -edges(const boost::tuple, - boost::reference_wrapper >& w) +edges(const boost::tuple, + std::reference_wrapper >& w) { - edges(boost::unwrap_ref(w.get<0>())); - return edges(boost::unwrap_ref(w.get<1>())); + edges(get<0>(w).get()); + return edges(get<1>(w).get()); } template inline CGAL::Iterator_range::in_edge_iterator> in_edges(typename boost::graph_traits::vertex_descriptor u - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - in_edges(u, boost::unwrap_ref(w.get<0>())); - return in_edges(u, boost::unwrap_ref(w.get<1>())); + in_edges(u, get<0>(w).get()); + return in_edges(u, get<1>(w).get()); } template inline CGAL::Iterator_range::out_edge_iterator> out_edges(typename boost::graph_traits::vertex_descriptor u - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - out_edges(u, boost::unwrap_ref(w.get<0>())); - return out_edges(u, boost::unwrap_ref(w.get<1>())); + out_edges(u, get<0>(w).get()); + return out_edges(u, get<1>(w).get()); } // @@ -381,72 +378,72 @@ out_edges(typename boost::graph_traits::vertex_descriptor u template typename boost::graph_traits< Graph >::vertex_descriptor -add_vertex(boost::tuple, - boost::reference_wrapper >& w) +add_vertex(boost::tuple, + std::reference_wrapper >& w) { - add_vertex(boost::unwrap_ref(w.get<0>())); - return add_vertex(boost::unwrap_ref(w.get<1>())); + add_vertex(get<0>(w).get()); + return add_vertex(get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor add_vertex(const typename boost::graph_traits::vertex_property_type& p - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - add_vertex(p, boost::unwrap_ref(w.get<0>())); - return add_vertex(p, boost::unwrap_ref(w.get<1>())); + add_vertex(p, get<0>(w).get()); + return add_vertex(p, get<1>(w).get()); } template void remove_vertex(typename boost::graph_traits< Graph >::vertex_descriptor v - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - remove_vertex(v, boost::unwrap_ref(w.get<0>())); - remove_vertex(v, boost::unwrap_ref(w.get<1>())); + remove_vertex(v, get<0>(w).get()); + remove_vertex(v, get<1>(w).get()); } template typename boost::graph_traits< Graph >::edge_descriptor -add_edge(boost::tuple, - boost::reference_wrapper >& w) +add_edge(boost::tuple, + std::reference_wrapper >& w) { - add_edge(boost::unwrap_ref(w.get<0>())); - return add_edge(boost::unwrap_ref(w.get<1>())); + add_edge(get<0>(w).get()); + return add_edge(get<1>(w).get()); } template void remove_edge(typename boost::graph_traits< Graph >::edge_descriptor e -, boost::tuple, - boost::reference_wrapper >& w) +, boost::tuple, + std::reference_wrapper >& w) { - remove_edge(e, boost::unwrap_ref(w.get<0>())); - remove_edge(e, boost::unwrap_ref(w.get<1>())); + remove_edge(e, get<0>(w).get()); + remove_edge(e, get<1>(w).get()); } template void set_target(typename boost::graph_traits< Graph >::halfedge_descriptor h1 , typename boost::graph_traits< Graph >::vertex_descriptor v -, boost::tuple, - boost::reference_wrapper >& w) +, boost::tuple, + std::reference_wrapper >& w) { - set_target(h1, v, boost::unwrap_ref(w.get<0>())); - set_target(h1, v, boost::unwrap_ref(w.get<1>())); + set_target(h1, v, get<0>(w).get()); + set_target(h1, v, get<1>(w).get()); } template void set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1 , typename boost::graph_traits< Graph >::halfedge_descriptor h2 - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - set_next(h1, h2, boost::unwrap_ref(w.get<0>())); - set_next(h1, h2, boost::unwrap_ref(w.get<1>())); + set_next(h1, h2, get<0>(w).get()); + set_next(h1, h2, get<1>(w).get()); } // @@ -454,65 +451,65 @@ set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1 // template typename boost::graph_traits< Graph >::face_descriptor -add_face(boost::tuple, - boost::reference_wrapper >& w) +add_face(boost::tuple, + std::reference_wrapper >& w) { - add_face(boost::unwrap_ref(w.get<0>())); - return add_face(boost::unwrap_ref(w.get<1>())); + add_face(get<0>(w).get()); + return add_face(get<1>(w).get()); } template typename boost::graph_traits< Graph >::face_descriptor add_face(InputIterator begin, InputIterator end, - boost::tuple, - boost::reference_wrapper >& w) + boost::tuple, + std::reference_wrapper >& w) { - add_face(begin, end, boost::unwrap_ref(w.get<0>())); - return add_face(begin, end, boost::unwrap_ref(w.get<1>())); + add_face(begin, end, get<0>(w).get()); + return add_face(begin, end, get<1>(w).get()); } template void remove_face(typename boost::graph_traits< Graph >::face_descriptor f -, boost::tuple, -boost::reference_wrapper >& w) +, boost::tuple, +std::reference_wrapper >& w) { - remove_face(f, boost::unwrap_ref(w.get<0>())); - return remove_face(f, boost::unwrap_ref(w.get<1>())); + remove_face(f, get<0>(w).get()); + return remove_face(f, get<1>(w).get()); } template void set_face(typename boost::graph_traits< Graph >::halfedge_descriptor h , typename boost::graph_traits< Graph >::face_descriptor f -, const boost::tuple, -boost::reference_wrapper >& w) +, const boost::tuple, +std::reference_wrapper >& w) { - set_face(h, f, boost::unwrap_ref(w.get<0>())); - set_face(h, f, boost::unwrap_ref(w.get<1>())); + set_face(h, f, get<0>(w).get()); + set_face(h, f, get<1>(w).get()); } template void set_halfedge(typename boost::graph_traits< Graph >::face_descriptor f , typename boost::graph_traits< Graph >::halfedge_descriptor h -, boost::tuple, -boost::reference_wrapper >& w) +, boost::tuple, +std::reference_wrapper >& w) { - set_halfedge(f, h, boost::unwrap_ref(w.get<0>())); - set_halfedge(f, h, boost::unwrap_ref(w.get<1>())); + set_halfedge(f, h, get<0>(w).get()); + set_halfedge(f, h, get<1>(w).get()); } template void set_halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v , typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, -boost::reference_wrapper >& w) +, const boost::tuple, +std::reference_wrapper >& w) { - set_halfedge(v, h, boost::unwrap_ref(w.get<0>())); - set_halfedge(v, h, boost::unwrap_ref(w.get<1>())); + set_halfedge(v, h, get<0>(w).get()); + set_halfedge(v, h, get<1>(w).get()); } // @@ -521,31 +518,31 @@ boost::reference_wrapper >& w) template typename boost::graph_traits< Graph >::edge_descriptor edge(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - edge(h, boost::unwrap_ref(w.get<0>())); - return edge(h, boost::unwrap_ref(w.get<1>())); + edge(h, get<0>(w).get()); + return edge(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::edge_descriptor e -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - halfedge(e, boost::unwrap_ref(w.get<0>())); - return halfedge(e, boost::unwrap_ref(w.get<1>())); + halfedge(e, get<0>(w).get()); + return halfedge(e, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - halfedge(v, boost::unwrap_ref(w.get<0>())); - return halfedge(v, boost::unwrap_ref(w.get<1>())); + halfedge(v, get<0>(w).get()); + return halfedge(v, get<1>(w).get()); } template @@ -553,58 +550,58 @@ std::pair< typename boost::graph_traits< Graph >::halfedge_descriptor , bool> halfedge(typename boost::graph_traits< Graph >::vertex_descriptor u , typename boost::graph_traits< Graph >::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - halfedge(u, v, boost::unwrap_ref(w.get<0>())); - return halfedge(u, v, boost::unwrap_ref(w.get<1>())); + halfedge(u, v, get<0>(w).get()); + return halfedge(u, v, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor opposite(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - opposite(h, boost::unwrap_ref(w.get<0>())); - return opposite(h, boost::unwrap_ref(w.get<1>())); + opposite(h, get<0>(w).get()); + return opposite(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor source(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - source(h, boost::unwrap_ref(w.get<0>())); - return source(h, boost::unwrap_ref(w.get<1>())); + source(h, get<0>(w).get()); + return source(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor target(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - target(h, boost::unwrap_ref(w.get<0>())); - return target(h, boost::unwrap_ref(w.get<1>())); + target(h, get<0>(w).get()); + return target(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor next(typename boost::graph_traits< Graph >::halfedge_descriptor outedge -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - next(outedge, boost::unwrap_ref(w.get<0>())); - return next(outedge, boost::unwrap_ref(w.get<1>())); + next(outedge, get<0>(w).get()); + return next(outedge, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - prev(outedge, boost::unwrap_ref(w.get<0>())); - return prev(outedge, boost::unwrap_ref(w.get<1>())); + prev(outedge, get<0>(w).get()); + return prev(outedge, get<1>(w).get()); } // @@ -612,73 +609,73 @@ prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge // template CGAL::Iterator_range::halfedge_iterator> -halfedges(const boost::tuple, boost::reference_wrapper >& w) +halfedges(const boost::tuple, std::reference_wrapper >& w) { - halfedges(boost::unwrap_ref(w.get<0>())); - return halfedges(boost::unwrap_ref(w.get<1>())); + halfedges(get<0>(w).get()); + return halfedges(get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedges_size_type -num_halfedges(const boost::tuple, boost::reference_wrapper >& w) +num_halfedges(const boost::tuple, std::reference_wrapper >& w) { - num_halfedges(boost::unwrap_ref(w.get<0>())); - return num_halfedges(boost::unwrap_ref(w.get<1>())); + num_halfedges(get<0>(w).get()); + return num_halfedges(get<1>(w).get()); } // Graph template typename boost::graph_traits< Graph >::face_descriptor face(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - face(h, boost::unwrap_ref(w.get<0>())); - return face(h, boost::unwrap_ref(w.get<1>())); + face(h, get<0>(w).get()); + return face(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::face_descriptor f -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - halfedge(f, boost::unwrap_ref(w.get<0>())); - return halfedge(f, boost::unwrap_ref(w.get<1>())); + halfedge(f, get<0>(w).get()); + return halfedge(f, get<1>(w).get()); } template inline CGAL::Iterator_range::face_iterator > -faces(const boost::tuple, boost::reference_wrapper >& w) +faces(const boost::tuple, std::reference_wrapper >& w) { - faces(boost::unwrap_ref(w.get<0>())); - return faces(boost::unwrap_ref(w.get<1>())); + faces(get<0>(w).get()); + return faces(get<1>(w).get()); } template typename boost::graph_traits::faces_size_type -num_faces(const boost::tuple, - boost::reference_wrapper >& w) +num_faces(const boost::tuple, + std::reference_wrapper >& w) { - num_faces(boost::unwrap_ref(w.get<0>())); - return num_faces(boost::unwrap_ref(w.get<1>())); + num_faces(get<0>(w).get()); + return num_faces(get<1>(w).get()); } template -bool is_valid(const boost::tuple, - boost::reference_wrapper >& w +bool is_valid(const boost::tuple, + std::reference_wrapper >& w , bool verbose = false) { - is_valid(boost::unwrap_ref(w.get<0>()), verbose); - return is_valid(boost::unwrap_ref(w.get<1>()), verbose); + is_valid(get<0>(w).get(), verbose); + return is_valid(get<1>(w).get(), verbose); } template typename boost::property_map< Graph, PropertyTag >::type get(PropertyTag ptag, - const boost::tuple, - boost::reference_wrapper >& w) + const boost::tuple, + std::reference_wrapper >& w) { - get(ptag, boost::unwrap_ref(w.get<0>())); - return get(ptag, boost::unwrap_ref(w.get<1>())); + get(ptag, get<0>(w).get()); + return get(ptag, get<1>(w).get()); } }//end namespace CGAL diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index 4c2ade85ea1..fe7c3275dd1 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -270,8 +270,8 @@ join_vertex_interior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 3); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 3); + assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3); assert(degree(f.x, f.m) == 4); assert(CGAL::is_valid_polygon_mesh(f.m)); } @@ -295,8 +295,8 @@ join_vertex_exterior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 4); + assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3); assert(degree(f.y, f.m) == 3); assert(CGAL::is_valid_polygon_mesh(f.m)); } @@ -314,8 +314,8 @@ join_vertex_exterior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 4); + assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3); assert(CGAL::is_valid_polygon_mesh(f.m)); assert(degree(f.w, f.m) == 3); @@ -344,8 +344,8 @@ split_vertex() assert(CGAL::is_valid_polygon_mesh(f.m)); assert(CGAL::internal::exact_num_vertices(f.m) == 7); assert(CGAL::internal::exact_num_edges(f.m) == 8); - assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 5); - assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 7); + assert(CGAL::halfedges_around_face(h1, f.m).size() == 5); + assert(CGAL::halfedges_around_face(h2, f.m).size() == 7); } template @@ -371,8 +371,8 @@ split_join_vertex_inverse() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_edges(f.m) == 6); assert(CGAL::internal::exact_num_halfedges(f.m) == 12); - assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 3); - assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 3); + assert(CGAL::halfedges_around_face(h1, f.m).size() == 3); + assert(CGAL::halfedges_around_face(h2, f.m).size() == 3); } @@ -476,8 +476,8 @@ test_swap_edges() { Graph g; CGAL::make_tetrahedron(pt,pt,pt,pt,g); - halfedge_descriptor h1 = *std::next(boost::begin(halfedges(g)), i); - halfedge_descriptor h2 = *std::next(boost::begin(halfedges(g)), j); + halfedge_descriptor h1 = *std::next(std::begin(halfedges(g)), i); + halfedge_descriptor h2 = *std::next(std::begin(halfedges(g)), j); CGAL::internal::swap_edges(h1, h2, g); assert(CGAL::is_valid_polygon_mesh(g)); } diff --git a/BGL/test/BGL/test_Face_filtered_graph.cpp b/BGL/test/BGL/test_Face_filtered_graph.cpp index 2bab2e1d83c..5dd6521bb02 100644 --- a/BGL/test/BGL/test_Face_filtered_graph.cpp +++ b/BGL/test/BGL/test_Face_filtered_graph.cpp @@ -37,7 +37,7 @@ void test_halfedge_around_vertex_iterator(const Graph& g) assert(target(*havit, fg) == *vit); // check if we are really moving clockwise - halfedge_around_target_iterator step = boost::next(havit); + halfedge_around_target_iterator step = std::next(havit); if(step != havend) { halfedge_descriptor stepd = *step; assert(stepd == opposite(next(*havit, fg), fg)); diff --git a/BGL/test/BGL/test_Properties.cpp b/BGL/test/BGL/test_Properties.cpp index 04c8ae7beb6..e05a0a7eba5 100644 --- a/BGL/test/BGL/test_Properties.cpp +++ b/BGL/test/BGL/test_Properties.cpp @@ -68,9 +68,9 @@ void test_uniqueness(const Graph&, #endif typename boost::range_iterator::type - begin = boost::begin(range), - begin2 = boost::begin(range), - end = boost::end(range); + begin = std::begin(range), + begin2 = std::begin(range), + end = std::end(range); typedef std::unordered_set id_map; typedef std::pair resultp; diff --git a/BGL/test/BGL/test_graph_traits.cpp b/BGL/test/BGL/test_graph_traits.cpp index 3d71af5a7c2..08e80ef75c7 100644 --- a/BGL/test/BGL/test_graph_traits.cpp +++ b/BGL/test/BGL/test_graph_traits.cpp @@ -34,7 +34,7 @@ void test_halfedge_around_vertex_iterator(const Graph& g) assert(target(*havit, g) == *vit); // check if we are really moving clockwise - halfedge_around_target_iterator step = boost::next(havit); + halfedge_around_target_iterator step = std::next(havit); if(step != havend) { halfedge_descriptor stepd = *step; assert(stepd == opposite(next(*havit, g), g)); diff --git a/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Barycentric_coordinates_2.txt b/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Barycentric_coordinates_2.txt index 72588aec436..b3f13fcf819 100644 --- a/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Barycentric_coordinates_2.txt +++ b/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Barycentric_coordinates_2.txt @@ -451,10 +451,10 @@ To fix the problem, we modify the weights \f$w_i\f$ as After the above normalization, this gives us the precise algorithm to compute Wachspress coordinates -but with \f$O(n^2)\f$ performance only. The max speed \f$O(n)\f$ algorithm uses the standard +but with \cgalBigO{n^2} performance only. The max speed \cgalBigO{n} algorithm uses the standard weights \f$w_i\f$. Note that mathematically this modification does not change the coordinates. One should be cautious when using the unnormalized Wachspress weights. In that case, you must choose the -\f$O(n)\f$ type. +\cgalBigO{n} type. It is known that for strictly convex polygons the denominator's zero set of the Wachspress coordinates (\f$W^{wp} = 0~\f$) is a curve, which (in many cases) lies quite @@ -507,10 +507,10 @@ To fix the problem, similarly to the previous subsection, we modify the weights After the above normalization, this yields the precise algorithm to compute discrete harmonic coordinates -but with \f$O(n^2)\f$ performance only. The max speed \f$O(n)\f$ algorithm uses the standard +but with \cgalBigO{n^2} performance only. The max speed \cgalBigO{n} algorithm uses the standard weights \f$w_i\f$. Again, mathematically this modification does not change the coordinates, one should be cautious when using the unnormalized discrete harmonic weights. In that case, -you must choose the \f$O(n)\f$ type. +you must choose the \cgalBigO{n} type. \b Warning: as for Wachspress coordinates, we do not recommend using discrete harmonic coordinates for exterior points, because the curve \f$W^{dh} = 0\f$ may have several components, @@ -563,7 +563,7 @@ After the normalization of these weights as before \f$b_i = \frac{w_i}{W^{mv}}\qquad\f$ with \f$\qquad W^{mv} = \sum_{j=1}^n w_j\f$ -we obtain the max precision \f$O(n^2)\f$ algorithm. The max speed \f$O(n)\f$ algorithm computes the +we obtain the max precision \cgalBigO{n^2} algorithm. The max speed \cgalBigO{n} algorithm computes the weights \f$w_i\f$ using the pseudocode from here. These weights @@ -575,7 +575,7 @@ with \f$\qquad t_i = \frac{\text{det}(d_i, d_{i+1})}{r_ir_{i+1} + d_id_{i+1}}\f$ are also normalized. Note that they are unstable if a query point is closer than \f$\approx 1.0e-10\f$ to the polygon boundary, similarly to Wachspress and discrete harmonic coordinates and one should be cautious when using the unnormalized mean value weights. In that case, you must choose the -\f$O(n)\f$ type. +\cgalBigO{n} type. \anchor compute_hm_coord @@ -654,17 +654,17 @@ The resulting timings for all closed-form coordinates can be found in the figure \cgalFigureBegin{analytic_timings, analytic_timings.png} Time in seconds to compute \f$n\f$ coordinate values for a polygon with \f$n\f$ vertices -at 1 million query points with the max speed \f$O(n)\f$ algorithms (dashed) and +at 1 million query points with the max speed \cgalBigO{n} algorithms (dashed) and the max precision \f$0(n^2)\f$ algorithms (solid) for Wachspress (blue), discrete harmonic (red), and mean value (green) coordinates. \cgalFigureEnd -From the figure above we observe that the \f$O(n^2)\f$ algorithm is as fast -as the \f$O(n)\f$ algorithm if we have a polygon with a small number of vertices. +From the figure above we observe that the \cgalBigO{n^2} algorithm is as fast +as the \cgalBigO{n} algorithm if we have a polygon with a small number of vertices. But as the number of vertices is increased, the linear algorithm outperforms the squared one, as expected. One of the reasons for this behavior is that for a small number of vertices -the multiplications of \f$n-2\f$ elements inside the \f$O(n^2)\f$ algorithm take almost the -same time as the corresponding divisions in the \f$O(n)\f$ algorithm. For a polygon with +the multiplications of \f$n-2\f$ elements inside the \cgalBigO{n^2} algorithm take almost the +same time as the corresponding divisions in the \cgalBigO{n} algorithm. For a polygon with many vertices, these multiplications are substantially slower. To benchmark harmonic coordinates, we used a MacBook Pro 2018 with 2.2 GHz Intel Core i7 processor (6 cores) diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d.h index 33d006577bf..856d1a16929 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d.h @@ -119,7 +119,7 @@ We implement Khachyian's algorithm for rounding polytopes \cgalCite{cgal:k-rprnm-96}. Internally, we use `double`-arithmetic and (initially a single) Cholesky-decomposition. The algorithm's running time is -\f$ {\cal O}(nd^2(\epsilon^{-1}+\ln d + \ln\ln(n)))\f$, where \f$ n=|P|\f$ and +\cgalBigO{nd^2(\epsilon^{-1}+\ln d + \ln\ln(n))}, where \f$ n=|P|\f$ and \f$ 1+\epsilon\f$ is the desired approximation ratio. \cgalHeading{Example} diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_of_spheres_d.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_of_spheres_d.h index 8d360443390..fbcd5f02e2d 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_of_spheres_d.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_of_spheres_d.h @@ -76,7 +76,7 @@ We implement two algorithms, the LP-algorithm and a heuristic \cgalCite{msw-sblp-92}. As described in the documentation of concept `MinSphereOfSpheresTraits`, each has its advantages and disadvantages: Our implementation of the LP-algorithm has maximal -expected running time \f$ O(2^d n)\f$, while the heuristic comes without +expected running time \cgalBigO{2^d n}, while the heuristic comes without any complexity guarantee. In particular, the LP-algorithm runs in linear time for fixed dimension \f$ d\f$. (These running times hold for the arithmetic model, so they count the number of operations on diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/rectangular_p_center_2.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/rectangular_p_center_2.h index f3baaa625f1..519b3eeb24f 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/rectangular_p_center_2.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/rectangular_p_center_2.h @@ -245,7 +245,7 @@ must be a model for `RectangularPCenterTraits_2`. \cgalHeading{Implementation} The runtime is linear for \f$ p \in \{2,\,3\}\f$ and -\f$ \mathcal{O}(n \cdot \log n)\f$ for \f$ p = 4\f$ where \f$ n\f$ is the number of +\cgalBigO{n \cdot \log n} for \f$ p = 4\f$ where \f$ n\f$ is the number of input points. These runtimes are worst case optimal. The \f$ 3\f$-center algorithm uses a prune-and-search technique described in \cgalCite{cgal:h-slacr-99}. The \f$ 4\f$-center implementation uses sorted matrix diff --git a/Bounding_volumes/doc/Bounding_volumes/Concepts/MinSphereOfSpheresTraits.h b/Bounding_volumes/doc/Bounding_volumes/Concepts/MinSphereOfSpheresTraits.h index 49b32647f3c..a1a0126cf9e 100644 --- a/Bounding_volumes/doc/Bounding_volumes/Concepts/MinSphereOfSpheresTraits.h +++ b/Bounding_volumes/doc/Bounding_volumes/Concepts/MinSphereOfSpheresTraits.h @@ -79,7 +79,7 @@ The recommended choice is the first, which is a synonym to the one of the other two methods which we consider "the best in practice." In case of `CGAL::LP_algorithm`, the minsphere will be computed using the LP-algorithm \cgalCite{msw-sblp-92}, which in our -implementation has maximal expected running time \f$ O(2^d n)\f$ (in the +implementation has maximal expected running time \cgalBigO{2^d n} (in the number of operations on the number type `FT`). In case of `CGAL::Farthest_first_heuristic`, a simple heuristic will be used instead which seems to work fine in practice, but comes without diff --git a/Box_intersection_d/doc/Box_intersection_d/Box_intersection_d.txt b/Box_intersection_d/doc/Box_intersection_d/Box_intersection_d.txt index 64cead02532..2dcd2db8d30 100644 --- a/Box_intersection_d/doc/Box_intersection_d/Box_intersection_d.txt +++ b/Box_intersection_d/doc/Box_intersection_d/Box_intersection_d.txt @@ -350,12 +350,12 @@ parameter the function switches from the streamed segment-tree algorithm to the two-way-scan algorithm, see \cgalCite{cgal:ze-fsbi-02} for the details. -The streamed segment-tree algorithm needs \f$ O(n \log^d (n) + k)\f$ -worst-case running time and \f$ O(n)\f$ space, where \f$ n\f$ is the number of +The streamed segment-tree algorithm needs \cgalBigO{n \log^d (n) + k} +worst-case running time and \cgalBigO{n} space, where \f$ n\f$ is the number of boxes in both input sequences, \f$ d\f$ the (constant) dimension of the boxes, and \f$ k\f$ the output complexity, i.e., the number of pairwise -intersections of the boxes. The two-way-scan algorithm needs \f$ O(n \log -(n) + l)\f$ worst-case running time and \f$ O(n)\f$ space, where \f$ l\f$ is the +intersections of the boxes. The two-way-scan algorithm needs \cgalBigO{n \log +(n) + l} worst-case running time and \cgalBigO{n} space, where \f$ l\f$ is the number of pairwise overlapping intervals in one dimensions (the dimension where the algorithm is used instead of the segment tree). Note that \f$ l\f$ is not necessarily related to \f$ k\f$ and using the diff --git a/Box_intersection_d/doc/Box_intersection_d/CGAL/box_intersection_d.h b/Box_intersection_d/doc/Box_intersection_d/CGAL/box_intersection_d.h index f9ec7ba1ae1..0f7fd9bccdd 100644 --- a/Box_intersection_d/doc/Box_intersection_d/CGAL/box_intersection_d.h +++ b/Box_intersection_d/doc/Box_intersection_d/CGAL/box_intersection_d.h @@ -77,7 +77,7 @@ namespace CGAL { \cgalHeading{Implementation} The algorithm is trivially testing all pairs and runs therefore in time - \f$ O(nm)\f$ where \f$ n\f$ is the size of the first sequence and \f$ m\f$ is the + \cgalBigO{nm} where \f$ n\f$ is the size of the first sequence and \f$ m\f$ is the size of the second sequence. */ @@ -219,12 +219,12 @@ void box_intersection_all_pairs_d( algorithm to the two-way-scan algorithm, see \cgalCite{cgal:ze-fsbi-02} for the details. - The streamed segment-tree algorithm needs \f$ O(n \log^d (n) + k)\f$ - worst-case running time and \f$ O(n)\f$ space, where \f$ n\f$ is the number of + The streamed segment-tree algorithm needs \cgalBigO{n \log^d (n) + k} + worst-case running time and \cgalBigO{n} space, where \f$ n\f$ is the number of boxes in both input sequences, \f$ d\f$ the (constant) dimension of the boxes, and \f$ k\f$ the output complexity, i.e., the number of pairwise - intersections of the boxes. The two-way-scan algorithm needs \f$ O(n \log - (n) + l)\f$ worst-case running time and \f$ O(n)\f$ space, where \f$ l\f$ is the + intersections of the boxes. The two-way-scan algorithm needs \cgalBigO{n \log + (n) + l} worst-case running time and \cgalBigO{n} space, where \f$ l\f$ is the number of pairwise overlapping intervals in one dimensions (the dimension where the algorithm is used instead of the segment tree). Note that \f$ l\f$ is not necessarily related to \f$ k\f$ and using the @@ -397,7 +397,7 @@ namespace CGAL { \cgalHeading{Implementation} The algorithm is trivially testing all pairs and runs therefore in time - \f$ O(n^2)\f$ where \f$ n\f$ is the size of the input sequence. This algorithm + \cgalBigO{n^2} where \f$ n\f$ is the size of the input sequence. This algorithm does not use the id-number of the boxes. */ diff --git a/Box_intersection_d/include/CGAL/box_intersection_d.h b/Box_intersection_d/include/CGAL/box_intersection_d.h index 1ac7a802d7d..b1bbe31ada5 100644 --- a/Box_intersection_d/include/CGAL/box_intersection_d.h +++ b/Box_intersection_d/include/CGAL/box_intersection_d.h @@ -63,10 +63,10 @@ void box_intersection_segment_tree_d( const NT sup = Box_intersection_d::box_limits::sup(); #ifndef CGAL_LINKED_WITH_TBB - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB - if(boost::is_convertible::value) + if(std::is_convertible::value) { // Here is an illustration for n=2. // diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h b/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h index c40f95ca378..9c27b948b3d 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h @@ -39,10 +39,10 @@ typedef char CGAL_INT8; typedef short CGAL_INT16; -typedef boost::int32_t CGAL_INT32; +typedef std::int32_t CGAL_INT32; typedef unsigned char CGAL_UINT8; typedef unsigned short CGAL_UINT16; -typedef boost::uint32_t CGAL_UINT32; +typedef std::uint32_t CGAL_UINT32; /***************************************************************************** * diff --git a/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h b/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h index 57e8555557d..99a7f528f17 100644 --- a/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h +++ b/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h @@ -55,31 +55,31 @@ struct VTK_type_generator { }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_CHAR; typedef vtkUnsignedCharArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_SHORT; typedef vtkShortArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_SHORT; typedef vtkUnsignedShortArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_INT; typedef vtkIntArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_INT; typedef vtkUnsignedIntArray ArrayType; }; diff --git a/CGAL_ImageIO/include/CGAL/SEP_header.h b/CGAL_ImageIO/include/CGAL/SEP_header.h index 17c40493ef5..9bf345d4c6e 100644 --- a/CGAL_ImageIO/include/CGAL/SEP_header.h +++ b/CGAL_ImageIO/include/CGAL/SEP_header.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -106,9 +105,9 @@ namespace CGAL { class SEP_header { - boost::array _n; - boost::array _d; - boost::array _o; + std::array _n; + std::array _d; + std::array _o; SEP_header_aux::String_dict _string_dict; diff --git a/CGAL_ipelets/demo/CGAL_ipelets/pca.cpp b/CGAL_ipelets/demo/CGAL_ipelets/pca.cpp index 5e476893af0..50d96042ba6 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/pca.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/pca.cpp @@ -67,8 +67,8 @@ void pcaIpelet::protected_run(int fn) for (std::list::iterator it=poly_list.begin();it!=poly_list.end();++it) if (it->size()==3){ tri_list.push_back(Kernel::Triangle_2(*(it->vertices_begin()), - *boost::next(it->vertices_begin()), - *boost::next(it->vertices_begin(),2) + *std::next(it->vertices_begin()), + *std::next(it->vertices_begin(),2) )); } else{ diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h index 1d55bf3269e..48572f24118 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h @@ -317,10 +317,10 @@ public: IpeSegmentSubPath* create_polyline(const iterator first, const iterator last,bool setclose=false) const { - if (boost::next(first)!=last){ + if (std::next(first)!=last){ IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath(); IpeVector Prev_pt=IpeVector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ; - for (iterator it = boost::next(first);it!=last;++it){ + for (iterator it = std::next(first);it!=last;++it){ IpeVector Cur_pt=IpeVector(CGAL::to_double(it->x()),CGAL::to_double(it->y())); SSP_ipe -> AppendSegment(Prev_pt,Cur_pt); Prev_pt=Cur_pt; diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h index cae6c0794f8..276e5d5c651 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h @@ -329,10 +329,10 @@ public: ipe::Curve* create_polyline(const iterator first, const iterator last,bool setclose=false) const { - if (boost::next(first)!=last){ + if (std::next(first)!=last){ ipe::Curve* SSP_ipe = new ipe::Curve(); ipe::Vector Prev_pt=ipe::Vector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ; - for (iterator it = boost::next(first);it!=last;++it){ + for (iterator it = std::next(first);it!=last;++it){ ipe::Vector Cur_pt=ipe::Vector(CGAL::to_double(it->x()),CGAL::to_double(it->y())); SSP_ipe -> appendSegment(Prev_pt,Cur_pt); Prev_pt=Cur_pt; diff --git a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h index 1e7db3856c0..6c37f7e6907 100644 --- a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h +++ b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h @@ -267,7 +267,7 @@ private: try{ this->start(); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); this->stop(); } catch (...) { diff --git a/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h b/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h index 36210feffcb..179ea2b2f82 100644 --- a/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h +++ b/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h @@ -214,7 +214,7 @@ class Bench try{ this->start(); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); this->stop(); } diff --git a/Circular_kernel_2/benchmark/benchmark.h b/Circular_kernel_2/benchmark/benchmark.h index 9d13d728f65..92ba72909ca 100644 --- a/Circular_kernel_2/benchmark/benchmark.h +++ b/Circular_kernel_2/benchmark/benchmark.h @@ -219,7 +219,7 @@ private: Point_location _pl(_pm); try{ this->start(); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); this->stop(); } catch (std::exception &e) { this->fail(); diff --git a/Circular_kernel_2/benchmark/benchmark_CK2.cpp b/Circular_kernel_2/benchmark/benchmark_CK2.cpp index 54a4137e4ce..fca08228340 100644 --- a/Circular_kernel_2/benchmark/benchmark_CK2.cpp +++ b/Circular_kernel_2/benchmark/benchmark_CK2.cpp @@ -87,7 +87,7 @@ void do_main(const char *s) { struct rusage before, after; struct timeval utime, stime; getrusage(RUSAGE_SELF,&before); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); getrusage(RUSAGE_SELF,&after); timersub(&(after.ru_utime),&(before.ru_utime),&utime); timersub(&(after.ru_stime),&(before.ru_stime),&stime); @@ -177,7 +177,7 @@ void do_main(int k) { struct rusage before, after; struct timeval utime, stime; getrusage(RUSAGE_SELF,&before); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); getrusage(RUSAGE_SELF,&after); timersub(&(after.ru_utime),&(before.ru_utime),&utime); timersub(&(after.ru_stime),&(before.ru_stime),&stime); diff --git a/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h b/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h index 3787adde522..1a251c11978 100644 --- a/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h +++ b/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h @@ -217,7 +217,7 @@ class Bench this->start(); for (typename ArcContainer::const_iterator it=ac.begin(); it != ac.end(); ++it) { - insert(_pm,*it,_pl,boost::false_type()); + insert(_pm,*it,_pl,std::false_type()); }; this->stop(); } diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index 2dcb0200ba6..1c111779ef8 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -27,8 +27,6 @@ #include #include -#include - // These are name redefinitions for backwards compatibility // with the pre iterator-traits style adaptors. @@ -193,45 +191,45 @@ template inline void Assert_circulator( const C &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_iterator( const I &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_input_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_output_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_forward_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_bidirectional_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_random_access_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } // The assert at-least-category functions use the following // functions to resolve properly. Note the proper order of the diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt index 2e36037ea23..ed3c60b63b5 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt +++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt @@ -297,7 +297,7 @@ Several functions allow to create specific configurations of darts into a combin \subsection ssecadvmarks Boolean Marks -It is often necessary to mark darts, for example to retrieve in O(1) if a given dart was already processed during a specific algorithm, for example, iteration over a given range. Users can also mark specific parts of a combinatorial map (for example mark all the darts belonging to objects having specific semantics). To answer these needs, a `GenericMap` has a certain number of Boolean marks (fixed by the constant \link GenericMap::NB_MARKS `NB_MARKS`\endlink). When one wants to use a Boolean mark, the following methods are available (with `cm` an instance of a combinatorial map): +It is often necessary to mark darts, for example to retrieve in \cgalBigO{1} if a given dart was already processed during a specific algorithm, for example, iteration over a given range. Users can also mark specific parts of a combinatorial map (for example mark all the darts belonging to objects having specific semantics). To answer these needs, a `GenericMap` has a certain number of Boolean marks (fixed by the constant \link GenericMap::NB_MARKS `NB_MARKS`\endlink). When one wants to use a Boolean mark, the following methods are available (with `cm` an instance of a combinatorial map):

  • get a new free mark: `size_type m = cm.`\link GenericMap::get_new_mark `get_new_mark()`\endlink (throws the exception Exception_no_more_available_mark if no mark is available);
  • set mark `m` for a given dart `d0`: `cm.`\link GenericMap::mark `mark(d0,m)`\endlink; @@ -498,7 +498,7 @@ Step 2 defines the onsplit and onmerge dynamic functors. We can see here that wi The next operations will call these functors when 2-cells are split or merged. The \link CombinatorialMap::sew `sew<3>`\endlink operation calls 1 onmerge as two faces are identified; the \link GenericMap::insert_cell_0_in_cell_2 `insert_cell_0_in_cell_2`\endlink operation calls 3 onsplit as one face is split in 4. -Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the fonctor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged. +Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the functor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged. \cgalExample{Combinatorial_map/map_3_dynamic_onmerge.cpp} diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index e2145afb1f3..2141b6e1ab4 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -1154,7 +1154,7 @@ namespace CGAL { } /** Unmark all the darts of the map for a given mark. - * If all the darts are marked or unmarked, this operation takes O(1) + * If all the darts are marked or unmarked, this operation takes \cgalBigO{1} * operations, otherwise it traverses all the darts of the map. * @param amark the given mark. */ diff --git a/Cone_spanners_2/doc/Cone_spanners_2/Cone_spanners_2.txt b/Cone_spanners_2/doc/Cone_spanners_2/Cone_spanners_2.txt index 8de2f97693d..d21ef3f1aca 100644 --- a/Cone_spanners_2/doc/Cone_spanners_2/Cone_spanners_2.txt +++ b/Cone_spanners_2/doc/Cone_spanners_2/Cone_spanners_2.txt @@ -160,7 +160,7 @@ In constructing Theta graphs, this functor uses the algorithm from Chapter 4 of the book by Narasimhan and Smid \cgalCite{cgal:ns-gsn-07}. Basically, it is a sweep line algorithm and uses a balanced search tree to store the vertices that have already been scanned. -It has the complexity of \f$O(n \log n)\f$, where \f$n\f$ is the number of vertices in the plane. +It has the complexity of \cgalBigO{n \log n}, where \f$n\f$ is the number of vertices in the plane. This complexity has been proved to be optimal. For more details on how to use this `Construct_theta_graph_2` functor to write an application to build Theta graphs, @@ -178,13 +178,13 @@ The functor `Construct_yao_graph_2` has a similar definition as `Construct_theta The way of using these two template parameters is the same as that of `Construct_theta_graph_2`, so please refer to the previous subsection for the details. We note here that construction algorithm for Yao graph -is a slight adaptation of the algorithm for constructing Theta graph, having a complexity of \f$O(n^2)\f$. +is a slight adaptation of the algorithm for constructing Theta graph, having a complexity of \cgalBigO{n^2}. The increase of complexity in this adaptation is because in constructing Theta graph, the searching of the 'closest' node by projection distance can be done by a balanced search tree, but in constructing Yao graph, the searching of the 'closest' node by Euclidean distance cannot be done by a balanced search tree. -Note that an optimal algorithm for constructing Yao graph with a complexity of \f$O(n \log n)\f$ is +Note that an optimal algorithm for constructing Yao graph with a complexity of \cgalBigO{n \log n} is described in \cgalCite{cgal:cht-oacov-90}. However, this algorithm is much more complex to implement than the current algorithm implemented, and it can hardly reuse the codes for constructing Theta graphs, so it is not implemented in this package right now. diff --git a/Convex_decomposition_3/doc/Convex_decomposition_3/Convex_decomposition_3.txt b/Convex_decomposition_3/doc/Convex_decomposition_3/Convex_decomposition_3.txt index 6720620e075..98f1e2e2d6a 100644 --- a/Convex_decomposition_3/doc/Convex_decomposition_3/Convex_decomposition_3.txt +++ b/Convex_decomposition_3/doc/Convex_decomposition_3/Convex_decomposition_3.txt @@ -18,11 +18,11 @@ Minkowski sums of the convex pieces, and unite the pair-wise sums. While it is desirable to have a decomposition into a minimum number of pieces, this problem is known to be NP-hard \cgalCite{c-cpplb-84}. Our -implementation decomposes a Nef polyhedron \f$ N\f$ into \f$ O(r^2)\f$ convex +implementation decomposes a Nef polyhedron \f$ N\f$ into \cgalBigO{r^2} convex pieces, where \f$ r\f$ is the number of edges that have two adjacent facets that span an angle of more than 180 degrees with respect to the interior of the polyhedron. Those edges are also called reflex edges. -The bound of \f$ O(r^2)\f$ convex pieces is worst-case +The bound of \cgalBigO{r^2} convex pieces is worst-case optimal \cgalCite{c-cpplb-84}. \cgalFigureBegin{figverticalDecomposition,two_cubes_all_in_one.png} diff --git a/Convex_decomposition_3/doc/Convex_decomposition_3/PackageDescription.txt b/Convex_decomposition_3/doc/Convex_decomposition_3/PackageDescription.txt index 8d49a1ce844..4d65e689fad 100644 --- a/Convex_decomposition_3/doc/Convex_decomposition_3/PackageDescription.txt +++ b/Convex_decomposition_3/doc/Convex_decomposition_3/PackageDescription.txt @@ -6,7 +6,7 @@ \cgalPkgPicture{Convex_decomposition_3/fig/Convex_decomposition_3-teaser.png} \cgalPkgSummaryBegin \cgalPkgAuthor{Peter Hachenberger} -\cgalPkgDesc{This packages provides a function for decomposing a bounded polyhedron into convex sub-polyhedra. The decomposition yields \f$ O(r^2)\f$ convex pieces, where \f$ r\f$ is the number of edges, whose adjacent facets form an angle of more than 180 degrees with respect to the polyhedron's interior. This bound is worst-case optimal. } +\cgalPkgDesc{This packages provides a function for decomposing a bounded polyhedron into convex sub-polyhedra. The decomposition yields \cgalBigO{r^2} convex pieces, where \f$ r\f$ is the number of edges, whose adjacent facets form an angle of more than 180 degrees with respect to the polyhedron's interior. This bound is worst-case optimal. } \cgalPkgManuals{Chapter_Convex_Decomposition_of_Polyhedra,PkgConvexDecomposition3Ref} \cgalPkgSummaryEnd \cgalPkgShortInfoBegin diff --git a/Convex_decomposition_3/include/CGAL/convex_decomposition_3.h b/Convex_decomposition_3/include/CGAL/convex_decomposition_3.h index 7993309d4d0..08d6750b7fb 100644 --- a/Convex_decomposition_3/include/CGAL/convex_decomposition_3.h +++ b/Convex_decomposition_3/include/CGAL/convex_decomposition_3.h @@ -41,12 +41,12 @@ The function `convex_decomposition_3()` inserts additional facets into the given `Nef_polyhedron_3` `N`, such that each bounded marked volume (the outer volume is unbounded) is subdivided into convex pieces. The modified polyhedron represents a decomposition into -\f$ O(r^2)\f$ convex pieces, where \f$ r\f$ is the number of edges that have two +\cgalBigO{r^2} convex pieces, where \f$ r\f$ is the number of edges that have two adjacent facets that span an angle of more than 180 degrees with respect to the interior of the polyhedron. The worst-case running time of our implementation is -\f$ O(n^2r^4\sqrt[3]{nr^2}\log{(nr)})\f$, where \f$ n\f$ is the complexity of +\cgalBigO{n^2r^4\sqrt[3]{nr^2}\log{(nr)}}, where \f$ n\f$ is the complexity of the polyhedron (the complexity of a `Nef_polyhedron_3` is the sum of its `Vertices`, `Halfedges` and `SHalfedges`) and \f$ r\f$ is the number of reflex edges. diff --git a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_akl_toussaint.h b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_akl_toussaint.h index 4df696cd96e..1b22a558868 100644 --- a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_akl_toussaint.h +++ b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_akl_toussaint.h @@ -44,7 +44,7 @@ functions that return instances of these types: \cgalHeading{Implementation} This function uses the algorithm of Akl and -Toussaint \cgalCite{at-fcha-78} that requires \f$ O(n \log n)\f$ time for \f$ n\f$ input +Toussaint \cgalCite{at-fcha-78} that requires \cgalBigO{n \log n} time for \f$ n\f$ input points. diff --git a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_bykat.h b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_bykat.h index 03ca5875518..6bf670ff5ac 100644 --- a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_bykat.h +++ b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_bykat.h @@ -45,7 +45,7 @@ functions that return instances of these types: This function implements the non-recursive variation of Eddy's algorithm \cgalCite{e-nchap-77} described in \cgalCite{b-chfsp-78}. -This algorithm requires \f$ O(n h)\f$ time +This algorithm requires \cgalBigO{n h} time in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points. */ template diff --git a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_eddy.h b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_eddy.h index 9a023d34070..836366e0b90 100644 --- a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_eddy.h +++ b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_eddy.h @@ -47,7 +47,7 @@ This function implements Eddy's algorithm \cgalCite{e-nchap-77}, which is the two-dimensional version of the quickhull algorithm \cgalCite{bdh-qach-96}. -This algorithm requires \f$ O(n h)\f$ time +This algorithm requires \cgalBigO{n h} time in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points. */ diff --git a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_graham_andrew.h b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_graham_andrew.h index 20119b4243b..f2225a2fd33 100644 --- a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_graham_andrew.h +++ b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_graham_andrew.h @@ -44,7 +44,7 @@ functions that return instances of these types: This function implements Andrew's variant of the Graham scan algorithm \cgalCite{a-aeach-79} and follows the presentation of Mehlhorn -\cgalCite{m-mdscg-84}. This algorithm requires \f$ O(n \log n)\f$ time +\cgalCite{m-mdscg-84}. This algorithm requires \cgalBigO{n \log n} time in the worst case for \f$ n\f$ input points. @@ -101,7 +101,7 @@ functions that return instances of these types: \cgalHeading{Implementation} -This algorithm requires \f$ O(n)\f$ time in the worst case for +This algorithm requires \cgalBigO{n} time in the worst case for \f$ n\f$ input points. \cgalHeading{Example} diff --git a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_jarvis.h b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_jarvis.h index 41478fb06f9..e3ad2818c2f 100644 --- a/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_jarvis.h +++ b/Convex_hull_2/doc/Convex_hull_2/CGAL/ch_jarvis.h @@ -44,7 +44,7 @@ functions that return instances of these types: \cgalHeading{Implementation} This function uses the Jarvis march (gift-wrapping) -algorithm \cgalCite{j-ichfs-73}. This algorithm requires \f$ O(n h)\f$ time +algorithm \cgalCite{j-ichfs-73}. This algorithm requires \cgalBigO{n h} time in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points. */ @@ -97,7 +97,7 @@ functions that return instances of these types: \cgalHeading{Implementation} The function uses the Jarvis march (gift-wrapping) algorithm \cgalCite{j-ichfs-73}. -This algorithm requires \f$ O(n h)\f$ time in the worst +This algorithm requires \cgalBigO{n h} time in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points \pre `start_p` and `stop_p` are extreme points with respect to diff --git a/Convex_hull_2/doc/Convex_hull_2/CGAL/convex_hull_2.h b/Convex_hull_2/doc/Convex_hull_2/CGAL/convex_hull_2.h index 0e54242c874..20a14e030eb 100644 --- a/Convex_hull_2/doc/Convex_hull_2/CGAL/convex_hull_2.h +++ b/Convex_hull_2/doc/Convex_hull_2/CGAL/convex_hull_2.h @@ -47,9 +47,9 @@ functions that return instances of these types: One of two algorithms is used, depending on the type of iterator used to specify the input points. For input iterators, the algorithm used is that of Bykat \cgalCite{b-chfsp-78}, which -has a worst-case running time of \f$ O(n h)\f$, where \f$ n\f$ is the number of input +has a worst-case running time of \cgalBigO{n h}, where \f$ n\f$ is the number of input points and \f$ h\f$ is the number of extreme points. For all other types of -iterators, the \f$ O(n \log n)\f$ algorithm of of Akl and Toussaint +iterators, the \cgalBigO{n \log n} algorithm of of Akl and Toussaint \cgalCite{at-fcha-78} is used. @@ -128,7 +128,7 @@ functions that return instances of these types: This function uses Andrew's variant of Graham's scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84}. The algorithm has worst-case running time -of \f$ O(n \log n)\f$ for \f$ n\f$ input points. +of \cgalBigO{n \log n} for \f$ n\f$ input points. */ @@ -192,7 +192,7 @@ functions that return instances of these types: This function uses Andrew's variant of Graham's scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84}. The algorithm -has worst-case running time of \f$ O(n \log n)\f$ for \f$ n\f$ input points. +has worst-case running time of \cgalBigO{n \log n} for \f$ n\f$ input points. */ template diff --git a/Convex_hull_2/doc/Convex_hull_2/CGAL/convexity_check_2.h b/Convex_hull_2/doc/Convex_hull_2/CGAL/convexity_check_2.h index ae033c8acea..002cd7f66de 100644 --- a/Convex_hull_2/doc/Convex_hull_2/CGAL/convexity_check_2.h +++ b/Convex_hull_2/doc/Convex_hull_2/CGAL/convexity_check_2.h @@ -32,7 +32,7 @@ functions that return instances of these types: \cgalHeading{Implementation} -The algorithm requires \f$ O(n)\f$ time for a set of \f$ n\f$ input points. +The algorithm requires \cgalBigO{n} time for a set of \f$ n\f$ input points. @@ -80,7 +80,7 @@ functions that return instances of these types: \cgalHeading{Implementation} -The algorithm requires \f$ O(n)\f$ time for a set of \f$ n\f$ input points. +The algorithm requires \cgalBigO{n} time for a set of \f$ n\f$ input points. diff --git a/Convex_hull_2/doc/Convex_hull_2/Convex_hull_2.txt b/Convex_hull_2/doc/Convex_hull_2/Convex_hull_2.txt index bca9d0f275f..c07ebc8a8a4 100644 --- a/Convex_hull_2/doc/Convex_hull_2/Convex_hull_2.txt +++ b/Convex_hull_2/doc/Convex_hull_2/Convex_hull_2.txt @@ -52,17 +52,17 @@ class need not be specified and defaults to types and operations defined in the kernel in which the input point type is defined. Given a sequence of \f$ n\f$ input points with \f$ h\f$ extreme points, -the function `convex_hull_2()` uses either the output-sensitive \f$ O(n h)\f$ algorithm of Bykat \cgalCite{b-chfsp-78} -(a non-recursive version of the quickhull \cgalCite{bdh-qach-96} algorithm) or the algorithm of Akl and Toussaint, which requires \f$ O(n \log n)\f$ time +the function `convex_hull_2()` uses either the output-sensitive \cgalBigO{n h} algorithm of Bykat \cgalCite{b-chfsp-78} +(a non-recursive version of the quickhull \cgalCite{bdh-qach-96} algorithm) or the algorithm of Akl and Toussaint, which requires \cgalBigO{n \log n} time in the worst case. The algorithm chosen depends on the kind of iterator used to specify the input points. These two algorithms are also available via the functions `ch_bykat()` and `ch_akl_toussaint()`, respectively. Also available are -the \f$ O(n \log n)\f$ Graham-Andrew scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84} +the \cgalBigO{n \log n} Graham-Andrew scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84} (`ch_graham_andrew()`), -the \f$ O(n h)\f$ Jarvis march algorithm \cgalCite{j-ichfs-73} +the \cgalBigO{n h} Jarvis march algorithm \cgalCite{j-ichfs-73} (`ch_jarvis()`), -and Eddy's \f$ O(n h)\f$ algorithm \cgalCite{e-nchap-77} +and Eddy's \cgalBigO{n h} algorithm \cgalCite{e-nchap-77} (`ch_eddy()`), which corresponds to the two-dimensional version of the quickhull algorithm. The linear-time algorithm of Melkman for producing the convex hull of @@ -105,7 +105,7 @@ provide the computation of the counterclockwise sequence of extreme points on the lower hull and upper hull, respectively. The algorithm used in these functions is Andrew's variant of Graham's scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84}, -which has worst-case running time of \f$ O(n \log n)\f$. +which has worst-case running time of \cgalBigO{n \log n}. There are also functions available for computing certain subsequences of the sequence of extreme points on the convex hull. The function diff --git a/Convex_hull_3/doc/Convex_hull_3/CGAL/convexity_check_3.h b/Convex_hull_3/doc/Convex_hull_3/CGAL/convexity_check_3.h index 7c51293eb3f..cd5e70c7b45 100644 --- a/Convex_hull_3/doc/Convex_hull_3/CGAL/convexity_check_3.h +++ b/Convex_hull_3/doc/Convex_hull_3/CGAL/convexity_check_3.h @@ -16,7 +16,7 @@ vertices of the convex hull). \cgalHeading{Implementation} This function implements the tests described in \cgalCite{mnssssu-cgpvg-96} to -determine convexity and requires \f$ O(e + f)\f$ time for a polyhedron with +determine convexity and requires \cgalBigO{e + f} time for a polyhedron with \f$ e\f$ edges and \f$ f\f$ faces. diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 16a685e08dd..87062e5c29d 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -30,7 +30,6 @@ #include #include -#include #include namespace CGAL @@ -261,7 +260,7 @@ namespace CGAL // The check is done only if the number type is not float or double because in that // case we know the construction of dual points is not exact CGAL_assertion_msg( - boost::is_floating_point::value || + std::is_floating_point::value || Convex_hull_3::internal::point_inside_convex_polyhedron(P, *origin), "halfspace_intersection_3: origin not in the polyhedron" ); diff --git a/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h b/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h index 4cf555e37b3..e57dc65772e 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h @@ -151,7 +151,7 @@ struct GT3_for_CH3 { template ::type::value && + std::is_floating_point::type::value && R_::Has_filtered_predicates_tag::value > > class Convex_hull_traits_3 diff --git a/Convex_hull_3/include/CGAL/convex_hull_3.h b/Convex_hull_3/include/CGAL/convex_hull_3.h index 18a11329308..51555a5d57b 100644 --- a/Convex_hull_3/include/CGAL/convex_hull_3.h +++ b/Convex_hull_3/include/CGAL/convex_hull_3.h @@ -42,8 +42,6 @@ #include #include -#include -#include #include #include @@ -149,7 +147,7 @@ namespace internal { //struct to select the default traits class for computing convex hull template< class Point_3, class PolygonMesh = Default, - class Is_floating_point=typename boost::is_floating_point::Kernel::FT>::type, + class Is_floating_point=typename std::is_floating_point::Kernel::FT>::type, class Has_filtered_predicates_tag=typename Kernel_traits::Kernel::Has_filtered_predicates_tag > struct Default_traits_for_Chull_3{ typedef typename Kernel_traits::Kernel type; @@ -157,7 +155,7 @@ struct Default_traits_for_Chull_3{ //FT is a floating point type and Kernel is a filtered kernel template -struct Default_traits_for_Chull_3{ +struct Default_traits_for_Chull_3{ typedef Convex_hull_traits_3< typename Kernel_traits::Kernel, PolygonMesh, Tag_true > type; }; @@ -174,7 +172,7 @@ struct Default_polyhedron_for_Chull_3 >{ template struct Is_cartesian_kernel { - typedef boost::false_type type; + typedef std::false_type type; }; template @@ -235,7 +233,7 @@ public: //interval arithmetic (the protector must be created before using this predicate) //and in case of failure, exact arithmetic is used. template -class Is_on_positive_side_of_plane_3, boost::true_type >{ +class Is_on_positive_side_of_plane_3, std::true_type >{ typedef Simple_cartesian::Type> Exact_K; typedef Simple_cartesian Approx_K; typedef Convex_hull_traits_3 Traits; @@ -613,7 +611,7 @@ partition_outside_sets(const std::list& new_facets, } if(! point_list.empty()){ pending_facets.push_back(f); - f->it = boost::prior(pending_facets.end()); + f->it = std::prev(pending_facets.end()); } else { f->it = pending_facets.end(); } @@ -748,7 +746,7 @@ void non_coplanar_quickhull_3(std::list& points, for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){ if (! fit->points.empty()){ pending_facets.push_back(fit); - fit->it = boost::prior(pending_facets.end()); + fit->it = std::prev(pending_facets.end()); } else { fit->it = pending_facets.end(); } diff --git a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp index c52ef82bf22..269c14995bc 100644 --- a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp +++ b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp @@ -29,6 +29,6 @@ int main() static_assert(std::is_same::type>::value); static_assert(std::is_same::type>::value); static_assert(std::is_same,Default_traits_for_Chull_3::type>::value); - static_assert(std::is_same, boost::true_type >::Protector,CGAL::Protect_FPU_rounding >::value); + static_assert(std::is_same, std::true_type >::Protector,CGAL::Protect_FPU_rounding >::value); return 0; } diff --git a/Convex_hull_d/doc/Convex_hull_d/CGAL/Convex_hull_d.h b/Convex_hull_d/doc/Convex_hull_d/CGAL/Convex_hull_d.h index aef8523a7d7..aa1d645b345 100644 --- a/Convex_hull_d/doc/Convex_hull_d/CGAL/Convex_hull_d.h +++ b/Convex_hull_d/doc/Convex_hull_d/CGAL/Convex_hull_d.h @@ -69,7 +69,7 @@ The time and space requirements are input dependent. Let \f$C_1\f$, \f$C_2\f$, \ let \f$ k_i\f$ be the number of facets of \f$ C_i\f$ that are visible from \f$ x\f$ and that are not already facets of \f$ C_{i-1}\f$. -Then the time for inserting \f$ x\f$ is \f$ O(dim \sum_i k_i)\f$ and +Then the time for inserting \f$ x\f$ is \cgalBigO{dim \sum_i k_i} and the number of new simplices constructed during the insertion of \f$x\f$ is the number of facets of the hull which were not already facets of the hull before the insertion. diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt index ef2ae5bd276..0f7d11e3f81 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt @@ -169,7 +169,7 @@ complexity are known. Also, the theoretic interest in efficiency for realistic inputs, as opposed to worst-case situations, is growing \cgalCite{v-ffrim-97}. For practical purposes, insight into the constant factors hidden in the -\f$ O\f$-notation is necessary, especially if there are several competing +\cgalBigO{ }-notation is necessary, especially if there are several competing algorithms. Therefore, different implementations should be supplied if there is diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_kernels.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_kernels.txt index 30b56687143..78706045ef7 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_kernels.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_kernels.txt @@ -7,7 +7,7 @@ \authors Stefan Schirra The layer of geometry kernels provides -basic geometric entities of constant size\cgalFootnote{In dimension \f$ d\f$, an entity of size \f$ O(d)\f$ is considered to be of constant size.} and +basic geometric entities of constant size\cgalFootnote{In dimension \f$ d\f$, an entity of size \cgalBigO{d} is considered to be of constant size.} and primitive operations on them. Each entity is provided as both a stand-alone class, which is parameterized by a kernel class, and as a type in the kernel class. Each operation in the kernel is provided via diff --git a/Documentation/doc/resources/1.8.13/BaseDoxyfile.in b/Documentation/doc/resources/1.8.13/BaseDoxyfile.in index ae2cc84f6c1..8da5219dc69 100644 --- a/Documentation/doc/resources/1.8.13/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.13/BaseDoxyfile.in @@ -159,9 +159,9 @@ ALIASES = "cgal=%CGAL" \ "cgalPkgSince{1}=Introduced in: \cgal \1
    " \ "cgalPkgDependsOn{1}=Depends on: \1
    " \ "cgalPkgLicense{1}=License: \1
    " \ - "cgalPkgDemo{2}=Windows Demo: \1
    Common Demo Dlls: dlls
    " \ - "cgalPkgDemo{4}=Windows Demos: \1, \3
    Common Demo Dlls: dlls
    " \ - "cgalPkgDemo{6}=Windows Demos: \1, \3, \5
    Common Demo Dlls: dlls
    " \ + "cgalPkgDemo{2}=Windows demo: \1
    Common demo dlls: dlls
    " \ + "cgalPkgDemo{4}=Windows demos: \1, \3
    Common demo dlls: dlls
    " \ + "cgalPkgDemo{6}=Windows demos: \1, \3, \5
    Common demo dlls: dlls
    " \ "cgalPkgDescriptionEnd=" \ "cgalModifBegin=\htmlonly
    \endhtmlonly \xrefitem Modification \"Modifications\" \"MODIFICATIONS\" " \ "cgalModifEnd=\htmlonly
    \endhtmlonly \latexonly END MODIFICATIONS \endlatexonly" \ @@ -188,7 +188,9 @@ ALIASES = "cgal=%CGAL" \ "cgalParamNEnd=
\htmlonly[block] \endhtmlonly " \ "cgalParamSectionBegin{1}=\cgalParamNBegin{\1}" \ "cgalParamSectionEnd=\cgalParamNEnd" \ - "cgalParamPrecondition{1}=
  • Precondition: \1
  • " + "cgalParamPrecondition{1}=
  • Precondition: \1
  • " \ + "cgalBigO{1}=\f$O(\1)\f$" \ + "cgalBigOLarge{1}=\f$O\left(\1\right)\f$" # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given diff --git a/Documentation/doc/resources/1.9.6/BaseDoxyfile.in b/Documentation/doc/resources/1.9.6/BaseDoxyfile.in index 1cfd0a6ffd9..b4561aaa0c2 100644 --- a/Documentation/doc/resources/1.9.6/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.9.6/BaseDoxyfile.in @@ -168,9 +168,9 @@ ALIASES = "cgal=%CGAL" \ "cgalPkgSince{1}=Introduced in: \cgal \1
    " \ "cgalPkgDependsOn{1}=Depends on: \1
    " \ "cgalPkgLicense{1}=License: \1
    " \ - "cgalPkgDemo{2}=Windows Demo: \1
    Common Demo Dlls: dlls
    " \ - "cgalPkgDemo{4}=Windows Demos: \1, \3
    Common Demo Dlls: dlls
    " \ - "cgalPkgDemo{6}=Windows Demos: \1, \3, \5
    Common Demo Dlls: dlls
    " \ + "cgalPkgDemo{2}=Windows demo: \1
    Common demo dlls: dlls
    " \ + "cgalPkgDemo{4}=Windows demos: \1, \3
    Common demo dlls: dlls
    " \ + "cgalPkgDemo{6}=Windows demos: \1, \3, \5
    Common demo dlls: dlls
    " \ "cgalPkgDescriptionEnd=" \ "cgalModifBegin=\htmlonly
    \endhtmlonly \xrefitem Modification \"Modifications\" \"MODIFICATIONS\"" \ "cgalModifEnd=\htmlonly
    \endhtmlonly \latexonly END MODIFICATIONS \endlatexonly" \ @@ -197,7 +197,9 @@ ALIASES = "cgal=%CGAL" \ "cgalParamNEnd= \htmlonly[block] \endhtmlonly " \ "cgalParamSectionBegin{1}=\cgalParamNBegin{\1}" \ "cgalParamSectionEnd=\cgalParamNEnd" \ - "cgalParamPrecondition{1}=
  • Precondition: \1
  • " + "cgalParamPrecondition{1}=
  • Precondition: \1
  • " \ + "cgalBigO{1}=\f$O(\1)\f$" \ + "cgalBigOLarge{1}=\f$O\left(\1\right)\f$" # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h index c8aa90f709b..b9f922ef699 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h @@ -129,14 +129,14 @@ public: template class is_arrangement_2< Envelope_diagram_on_surface_2 -> : public boost::true_type +> : public std::true_type {}; // specialization template class is_arrangement_2< Envelope_diagram_2 -> : public boost::true_type +> : public std::true_type {}; diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index e7024f6220b..43d6a5ddc11 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -2088,10 +2088,10 @@ struct Lazy_construction { typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; - typedef typename boost::remove_cv< - typename boost::remove_reference < typename AC::result_type >::type >::type AT; - typedef typename boost::remove_cv< - typename boost::remove_reference < typename EC::result_type >::type >::type ET; + typedef std::remove_cv_t< + std::remove_reference_t < typename AC::result_type > > AT; + typedef std::remove_cv_t< + std::remove_reference_t < typename EC::result_type > > ET; typedef typename Default::Get::type E2A; diff --git a/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index 183c322257e..702ded2525d 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -29,8 +29,6 @@ #include #include #include -#include -#include #include #if defined(BOOST_MSVC) @@ -64,8 +62,8 @@ public: template struct Has_result_type - : boost::integral_constant< bool, - Has_result_type_helper< typename boost::remove_cv::type>::value> + : std::integral_constant< bool, + Has_result_type_helper< std::remove_cv_t>::value> {}; template @@ -192,10 +190,10 @@ private: template struct Lazy_wrapper_traits : boost::mpl::eval_if< internal::Has_result_type, - boost::mpl::eval_if< std::is_same< typename boost::remove_cv< - typename boost::remove_reference< + boost::mpl::eval_if< std::is_same< std::remove_cv_t< + std::remove_reference_t< typename internal::Lazy_result_type::type - >::type >::type, + > >, typename Approximate_kernel::FT>, boost::mpl::int_, boost::mpl::eval_if< std::is_same< typename internal::Lazy_result_type::type, diff --git a/Generalized_map/doc/Generalized_map/Generalized_map.txt b/Generalized_map/doc/Generalized_map/Generalized_map.txt index 491a8c9ed3d..ec178eb6dc1 100644 --- a/Generalized_map/doc/Generalized_map/Generalized_map.txt +++ b/Generalized_map/doc/Generalized_map/Generalized_map.txt @@ -296,7 +296,7 @@ Several functions allow to create specific configurations of darts into a genera \subsection ssecadvmarksgmap Boolean Marks -It is often necessary to mark darts, for example to retrieve in O(1) if a given dart was already processed during a specific algorithm, for example, iteration over a given range. Users can also mark specific parts of a generalized map (for example mark all the darts belonging to objects having specific semantics). To answer these needs, a `GeneralizedMap` has a certain number of Boolean marks (fixed by the constant \link GenericMap::NB_MARKS `NB_MARKS`\endlink). When one wants to use a Boolean mark, the following methods are available (with `gm` an instance of a generalized map): +It is often necessary to mark darts, for example to retrieve in \cgalBigO{1} if a given dart was already processed during a specific algorithm, for example, iteration over a given range. Users can also mark specific parts of a generalized map (for example mark all the darts belonging to objects having specific semantics). To answer these needs, a `GeneralizedMap` has a certain number of Boolean marks (fixed by the constant \link GenericMap::NB_MARKS `NB_MARKS`\endlink). When one wants to use a Boolean mark, the following methods are available (with `gm` an instance of a generalized map):
    • get a new free mark: `size_type m = gm.`\link GenericMap::get_new_mark `get_new_mark()`\endlink (throws the exception Exception_no_more_available_mark if no mark is available);
    • set mark `m` for a given dart `d0`: `gm.`\link GenericMap::mark `mark(d0,m)`\endlink; @@ -520,7 +520,7 @@ Step 2 defines the onsplit and onmerge dynamic functors. We can see here that wi The next operations will call these functors when 2-cells are split or merged. The \link GeneralizedMap::sew `sew<3>`\endlink operation calls 1 onmerge as two faces are identified; the \link GenericMap::insert_cell_0_in_cell_2 `insert_cell_0_in_cell_2`\endlink operation calls 3 onsplit as one face is split in 4. -Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the fonctor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged. +Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the functor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged. \cgalExample{Generalized_map/gmap_3_dynamic_onmerge.cpp} diff --git a/Generalized_map/include/CGAL/Generalized_map.h b/Generalized_map/include/CGAL/Generalized_map.h index d7f75bd151a..e6daae4eb73 100644 --- a/Generalized_map/include/CGAL/Generalized_map.h +++ b/Generalized_map/include/CGAL/Generalized_map.h @@ -1038,7 +1038,7 @@ namespace CGAL { } /** Unmark all the darts of the map for a given mark. - * If all the darts are marked or unmarked, this operation takes O(1) + * If all the darts are marked or unmarked, this operation takes \cgalBigO{1} * operations, otherwise it traverses all the darts of the map. * @param amark the given mark. */ diff --git a/Generator/doc/Generator/CGAL/random_convex_hull_in_disc_2.h b/Generator/doc/Generator/CGAL/random_convex_hull_in_disc_2.h index 6526a99c377..fb72a01f99a 100644 --- a/Generator/doc/Generator/CGAL/random_convex_hull_in_disc_2.h +++ b/Generator/doc/Generator/CGAL/random_convex_hull_in_disc_2.h @@ -28,8 +28,8 @@ The generated polygon will have an average number of vertices \f$ n^\frac{1}{3}( The implementation is based on an incremental construction of a convex hull. At each step, we choose a number of points to pick uniformly at random in the disc. Then, a subset of these points, that won't change the convex hull, is evaluated using a Binomial law. As these points won't be generated, the time and size complexities are reduced \cgalCite{Devillers2014Generator}. -A tradeoff between time and memory is provided with the option `fast`, true by default. Using the `fast` option, both time and size expected complexities are \f$O\left(n^\frac{1}{3}\log^\frac{2}{3}n \right)\f$. - If this option is disabled, the expected size complexity becomes \f$O\left(n^\frac{1}{3}\right)\f$ but the expected time complexity becomes \f$O\left(n^\frac{1}{3}\log^2 n \right)\f$. +A tradeoff between time and memory is provided with the option `fast`, true by default. Using the `fast` option, both time and size expected complexities are \cgalBigOLarge{n^\frac{1}{3}\log^\frac{2}{3}n}. + If this option is disabled, the expected size complexity becomes \cgalBigOLarge{n^\frac{1}{3}} but the expected time complexity becomes \cgalBigOLarge{n^\frac{1}{3}\log^2 n}. \cgalHeading{Example} diff --git a/Generator/doc/Generator/CGAL/random_convex_set_2.h b/Generator/doc/Generator/CGAL/random_convex_set_2.h index 41f8613bc65..7d60fc29664 100644 --- a/Generator/doc/Generator/CGAL/random_convex_set_2.h +++ b/Generator/doc/Generator/CGAL/random_convex_set_2.h @@ -31,8 +31,8 @@ R >` for some representation class `R`, \cgalHeading{Implementation} The implementation uses the centroid method -described in \cgalCite{cgal:s-zkm-96} and has a worst case running time of \f$ O(r -\cdot n + n \cdot \log n)\f$, where \f$ r\f$ is the time needed by `pg` +described in \cgalCite{cgal:s-zkm-96} and has a worst case running time of \cgalBigO{r +\cdot n + n \cdot \log n}, where \f$ r\f$ is the time needed by `pg` to generate a random point. \cgalHeading{Example} diff --git a/Generator/doc/Generator/CGAL/random_polygon_2.h b/Generator/doc/Generator/CGAL/random_polygon_2.h index 6025350bb99..e4297073966 100644 --- a/Generator/doc/Generator/CGAL/random_polygon_2.h +++ b/Generator/doc/Generator/CGAL/random_polygon_2.h @@ -37,11 +37,11 @@ The default traits class `Default_traits` is the kernel in which The implementation is based on the method of eliminating self-intersections in a polygon by using so-called "2-opt" moves. Such a move eliminates an intersection between two edges by reversing the order of the vertices between -the edges. No more than \f$ O(n^3)\f$ such moves are required to simplify a polygon +the edges. No more than \cgalBigO{n^3} such moves are required to simplify a polygon defined on \f$ n\f$ points \cgalCite{ls-utstp-82}. Intersecting edges are detected using a simple sweep through the vertices and then one intersection is chosen at random to eliminate after each sweep. -The worse-case running time is therefore \f$ O(n^4 \log n)\f$. +The worse-case running time is therefore \cgalBigO{n^4 \log n}. \cgalHeading{Example} diff --git a/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h b/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h index a161df1da76..958915aa635 100644 --- a/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h +++ b/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h @@ -118,8 +118,8 @@ struct Apply_approx_sqrt Apply_approx_sqrt(const Functor& f) : Functor(f) { } template - typename boost::remove_reference< - typename cpp11::result_of::type>::type + std::remove_reference_t< + typename cpp11::result_of::type> operator()(const T& t) const { return approximate_sqrt( static_cast(*this)(t) ); diff --git a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_default.h b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_default.h index 5d620b9aba3..5f3c33fc739 100644 --- a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_default.h +++ b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_default.h @@ -24,7 +24,7 @@ removal. \cgalHeading{Implementation} Currently, `HalfedgeDS_default` is derived from `CGAL::HalfedgeDS_list`. -The copy constructor and the assignment operator need \f$ O(n)\f$ time with +The copy constructor and the assignment operator need \cgalBigO{n} time with \f$ n\f$ the total number of vertices, halfedges, and faces. */ diff --git a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_list.h b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_list.h index 66407bbf6dd..34dce0c1363 100644 --- a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_list.h +++ b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_list.h @@ -20,7 +20,7 @@ iterators that supports removal. \cgalHeading{Implementation} `HalfedgeDS_list` uses internally the `CGAL::In_place_list` container class. -The copy constructor and the assignment operator need \f$ O(n)\f$ time with +The copy constructor and the assignment operator need \cgalBigO{n} time with \f$ n\f$ the total number of vertices, halfedges, and faces. `CGAL_ALLOCATOR(int)` is used as default argument for the diff --git a/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h b/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h index 9914445e81a..542d5a447f7 100644 --- a/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h +++ b/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/Heat_method_3/doc/Heat_method_3/Heat_method_3.txt b/Heat_method_3/doc/Heat_method_3/Heat_method_3.txt index 7d747c2a328..82ad37d2d41 100644 --- a/Heat_method_3/doc/Heat_method_3/Heat_method_3.txt +++ b/Heat_method_3/doc/Heat_method_3/Heat_method_3.txt @@ -223,8 +223,8 @@ The algorithm is as follows: The time complexity of the algorithm is determined primarily by the choice of linear solver. In the current implementation, Cholesky -prefactorization is roughly \f$ O(N^{1.5})\f$ and computation of distances is -roughly \f$ O(N)\f$, where \f$ N\f$ is the number of vertices in the triangulation. +prefactorization is roughly \cgalBigO{N^{1.5}} and computation of distances is +roughly \cgalBigO{N}, where \f$ N\f$ is the number of vertices in the triangulation. The algorithm uses two \f$ N \times N\f$ matrices, both with the same pattern of non-zeros (in average 7 non-zeros per row/column). The cost of computation is independent of the size diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h index 1c7340d4e60..afb6bff830e 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h @@ -18,7 +18,6 @@ #define CGAL_HOMOGENEOUS_POINT_2_H #include -#include #include #include @@ -54,8 +53,8 @@ public: template < typename Tx, typename Ty > PointH2(const Tx & x, const Ty & y, - std::enable_if_t< boost::mpl::and_, - boost::is_convertible >::value >* = 0) + std::enable_if_t< boost::mpl::and_, + std::is_convertible >::value >* = 0) : base(x, y) {} PointH2(const FT& x, const FT& y) diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h index 8f6cb17a535..87da02cabff 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h @@ -52,9 +52,9 @@ public: template < typename Tx, typename Ty, typename Tz > PointH3(const Tx & x, const Ty & y, const Tz & z, - std::enable_if_t< boost::mpl::and_< boost::mpl::and_< boost::is_convertible, - boost::is_convertible >, - boost::is_convertible >::value >* = 0) + std::enable_if_t< boost::mpl::and_< boost::mpl::and_< std::is_convertible, + std::is_convertible >, + std::is_convertible >::value >* = 0) : base(x, y, z) {} PointH3(const FT& x, const FT& y, const FT& z) diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h index 5460f21e7ce..81cd3107595 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h @@ -23,8 +23,6 @@ #include #include -#include - namespace CGAL { template < class R_ > @@ -59,8 +57,8 @@ public: template < typename Tx, typename Ty > VectorH2(const Tx & x, const Ty & y, - std::enable_if_t< boost::mpl::and_, - boost::is_convertible >::value >* = 0) + std::enable_if_t< boost::mpl::and_, + std::is_convertible >::value >* = 0) : base(CGAL::make_array(x, y, RT(1))) {} VectorH2(const FT& x, const FT& y) @@ -101,12 +99,12 @@ public: Cartesian_const_iterator cartesian_begin() const { return make_cartesian_const_iterator_begin(CGAL::get_pointee_or_identity(base).begin(), - boost::prior(CGAL::get_pointee_or_identity(base).end())); + std::prev(CGAL::get_pointee_or_identity(base).end())); } Cartesian_const_iterator cartesian_end() const { - return make_cartesian_const_iterator_end(boost::prior(CGAL::get_pointee_or_identity(base).end())); + return make_cartesian_const_iterator_end(std::prev(CGAL::get_pointee_or_identity(base).end())); } int dimension() const; diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h index 544ffa96493..5228d5251ad 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h @@ -21,8 +21,6 @@ #include #include -#include - namespace CGAL { template < class R_ > @@ -69,9 +67,9 @@ public: template < typename Tx, typename Ty, typename Tz > VectorH3(const Tx & x, const Ty & y, const Tz & z, - std::enable_if_t< boost::mpl::and_< boost::mpl::and_< boost::is_convertible, - boost::is_convertible >, - boost::is_convertible >::value >* = 0) + std::enable_if_t< boost::mpl::and_< boost::mpl::and_< std::is_convertible, + std::is_convertible >, + std::is_convertible >::value >* = 0) : base(CGAL::make_array(x, y, z, RT(1))) {} VectorH3(const FT& x, const FT& y, const FT& z) @@ -117,12 +115,12 @@ public: Cartesian_const_iterator cartesian_begin() const { return make_cartesian_const_iterator_begin(get_pointee_or_identity(base).begin(), - boost::prior(get_pointee_or_identity(base).end())); + std::prev(get_pointee_or_identity(base).end())); } Cartesian_const_iterator cartesian_end() const { - return make_cartesian_const_iterator_end(boost::prior(get_pointee_or_identity(base).end())); + return make_cartesian_const_iterator_end(std::prev(get_pointee_or_identity(base).end())); } int dimension() const { return 3; }; diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h index 2629ec1aff7..538991692ba 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h @@ -431,7 +431,7 @@ public: template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_base_of::value_type>::value + std::is_base_of::value_type>::value >* = nullptr) #else template < class InputIterator > diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h index 32d730aab7c..724f45794e6 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h @@ -23,7 +23,7 @@ namespace CGAL { class Hyperbolic_data { - typedef boost::int8_t Id; + typedef std::int8_t Id; private: // - 2 for infinite face diff --git a/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h index 080fc203bfb..9e7c501bd2b 100644 --- a/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h @@ -14,8 +14,8 @@ that do not contain any point of the point set. \cgalHeading{Implementation} The algorithm is an implementation of \cgalCite{o-naler-90}. The runtime of an -insertion or a removal is \f$ O(\log n)\f$. A query takes \f$ O(n^2)\f$ worst -case time and \f$ O(n \log n)\f$ expected time. The working storage is \f$ +insertion or a removal is \cgalBigO{\log n}. A query takes \cgalBigO{n^2} worst +case time and \cgalBigO{n \log n} expected time. The working storage is \f$ O(n)\f$. */ diff --git a/Inscribed_areas/doc/Inscribed_areas/CGAL/extremal_polygon_2.h b/Inscribed_areas/doc/Inscribed_areas/CGAL/extremal_polygon_2.h index a2170b12402..be734082d3b 100644 --- a/Inscribed_areas/doc/Inscribed_areas/CGAL/extremal_polygon_2.h +++ b/Inscribed_areas/doc/Inscribed_areas/CGAL/extremal_polygon_2.h @@ -32,8 +32,8 @@ convex polygon (oriented clock- or counterclockwise). \cgalHeading{Implementation} The implementation uses monotone matrix search -\cgalCite{akmsw-gamsa-87} and has a worst case running time of \f$ O(k -\cdot n + n \cdot \log n)\f$, where \f$ n\f$ is the number of vertices in +\cgalCite{akmsw-gamsa-87} and has a worst case running time of \cgalBigO{k +\cdot n + n \cdot \log n}, where \f$ n\f$ is the number of vertices in \f$ P\f$. */ @@ -89,8 +89,8 @@ where `K` is a model of `Kernel`. \cgalHeading{Implementation} The implementation uses monotone matrix search -\cgalCite{akmsw-gamsa-87} and has a worst case running time of \f$ O(k -\cdot n + n \cdot \log n)\f$, where \f$ n\f$ is the number of vertices in +\cgalCite{akmsw-gamsa-87} and has a worst case running time of \cgalBigO{k +\cdot n + n \cdot \log n}, where \f$ n\f$ is the number of vertices in \f$ P\f$. \cgalHeading{Example} @@ -158,8 +158,8 @@ defined that computes the squareroot of a number. \cgalHeading{Implementation} The implementation uses monotone matrix search -\cgalCite{akmsw-gamsa-87} and has a worst case running time of \f$ O(k -\cdot n + n \cdot \log n)\f$, where \f$ n\f$ is the number of vertices in +\cgalCite{akmsw-gamsa-87} and has a worst case running time of \cgalBigO{k +\cdot n + n \cdot \log n}, where \f$ n\f$ is the number of vertices in \f$ P\f$. \cgalHeading{Example} diff --git a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h index 4ef236892ab..a76cb0785ce 100644 --- a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h @@ -46,7 +46,7 @@ namespace CGAL { The algorithm checks all the empty rectangles that are bounded by either points or edges of the bounding box (other empty rectangles can be enlarged - and remain empty). There are O(n^2) such rectangles. It is done in three + and remain empty). There are \cgalBigO{n^2} such rectangles. It is done in three phases. In the first one empty rectangles that are bounded by two opposite edges of the bounding box are checked. In the second one, other empty rectangles that are bounded by one or two edges of the bounding box are diff --git a/Installation/.reuse/dep5 b/Installation/.reuse/dep5 new file mode 100644 index 00000000000..ef2e017a397 --- /dev/null +++ b/Installation/.reuse/dep5 @@ -0,0 +1,12 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: CGAL +Upstream-Contact: CGAL Editorial Board +Source: https://github.com/CGAL/cgal + +Files: *.cmake *.md doc/* doc_html/* scripts/* developer_scripts/* package_info/* demo/* examples/* src/* test/* benchmarks/* benchmark/* data/* cmake/* +Copyright: 1995-2023 The CGAL Project +License: CC0-1.0 + +Files: include/CGAL/Qt/ImageInterface.ui include/CGAL/Qt/resources/qglviewer-icon.xpm AUTHORS CMakeLists.txt README auxiliary/cgal_create_cmake_script.1 auxiliary/gmp/README include/CGAL/license/gpl_package_list.txt auxiliary/cgal_app.icns copyright VERSION +Copyright: 1995-2023 The CGAL Project +License: CC0-1.0 diff --git a/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h b/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h index 0e18ed8baaf..2464a122904 100644 --- a/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h +++ b/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h @@ -22,8 +22,6 @@ #include #include -#include - #include #include #include @@ -343,7 +341,7 @@ regular_neighbor_coordinates_2(const Rt& rt, OutputIterator out, OutputFunctor fct, std::enable_if_t< - !boost::is_convertible::value >* = 0) { diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h index 424e1fc9361..b55ccf02acb 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h @@ -21,8 +21,6 @@ #include -#include - #include #include #include @@ -53,8 +51,8 @@ void intersection_coplanar_triangles_cutoff(const typename Kernel::Point_3& p, CGAL_kernel_assertion_code(int pt_added = 0;) - const typename Kernel::Point_3* prev = &(*boost::prior(inter_pts.end())); - Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : boost::prior(inter_pts.end()); + const typename Kernel::Point_3* prev = &(*std::prev(inter_pts.end())); + Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : std::prev(inter_pts.end()); for(Iterator it=inter_pts.begin(); it!=stop; ++it) { const typename Kernel::Point_3& curr = *it; @@ -120,10 +118,10 @@ intersection_coplanar_triangles(const typename K::Triangle_3& t1, return intersection_return(*inter_pts.begin()); case 2: return intersection_return( - k.construct_segment_3_object()(*inter_pts.begin(), *boost::next(inter_pts.begin())) ); + k.construct_segment_3_object()(*inter_pts.begin(), *std::next(inter_pts.begin())) ); case 3: return intersection_return( - k.construct_triangle_3_object()(*inter_pts.begin(), *boost::next(inter_pts.begin()), *boost::prior(inter_pts.end())) ); + k.construct_triangle_3_object()(*inter_pts.begin(), *std::next(inter_pts.begin()), *std::prev(inter_pts.end())) ); default: return intersection_return( std::vector(inter_pts.begin(),inter_pts.end())); diff --git a/Interval_skip_list/doc/Interval_skip_list/CGAL/Interval_skip_list.h b/Interval_skip_list/doc/Interval_skip_list/CGAL/Interval_skip_list.h index a8fbc32ede1..f3d71baac8b 100644 --- a/Interval_skip_list/doc/Interval_skip_list/CGAL/Interval_skip_list.h +++ b/Interval_skip_list/doc/Interval_skip_list/CGAL/Interval_skip_list.h @@ -9,10 +9,10 @@ allows to find all members of a set of intervals that overlap a point. \cgalHeading{Implementation} The insertion and deletion of a segment in the interval skip list -takes expected time \f$ O(\log^2 n)\f$, if the segment endpoints are +takes expected time \cgalBigO{\log^2 n}, if the segment endpoints are chosen from a continuous distribution. A stabbing query takes expected -time \f$ O(\log n)\f$, and finding all intervals that contain a point -takes expected time \f$ O(\log n + k)\f$, where \f$ k\f$ is the number of +time \cgalBigO{\log n}, and finding all intervals that contain a point +takes expected time \cgalBigO{\log n + k}, where \f$ k\f$ is the number of intervals. The implementation is based on the code developed by Eric N. Hansen. diff --git a/Kernel_23/include/CGAL/Kernel/Type_mapper.h b/Kernel_23/include/CGAL/Kernel/Type_mapper.h index 683b7fe9255..6b3ce37ed85 100644 --- a/Kernel_23/include/CGAL/Kernel/Type_mapper.h +++ b/Kernel_23/include/CGAL/Kernel/Type_mapper.h @@ -21,9 +21,6 @@ #include -#include -#include - #include #include @@ -111,9 +108,9 @@ struct Type_mapper_impl < typename K1::FT, K1, K2 > template < typename T, typename K1, typename K2 > struct Type_mapper : - internal::Type_mapper_impl< typename boost::remove_cv< - typename boost::remove_reference < T >::type - >::type, K1, K2 > + internal::Type_mapper_impl< std::remove_cv_t< + std::remove_reference_t< T > + >, K1, K2 > { }; } //namespace CGAL diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h index c6d25336aa2..27141b2fb6d 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h @@ -26,8 +26,6 @@ #include #include -#include - #include #include @@ -60,10 +58,10 @@ _test_cls_point_2(const R& ) CGAL::Weighted_point_2 wp(p1); CGAL::Point_2 p7(wp); - static_assert(!(boost::is_convertible, - CGAL::Point_2 >::value)); - static_assert(!(boost::is_convertible, - CGAL::Weighted_point_2 >::value)); + static_assert(!std::is_convertible, + CGAL::Point_2 >::value); + static_assert(!std::is_convertible, + CGAL::Weighted_point_2 >::value); std::cout << '.'; diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h index f96de09c0d9..b2e003eedfe 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h @@ -58,10 +58,10 @@ _test_cls_point_3(const R& ) CGAL::Weighted_point_3 wp(p1); CGAL::Point_3 p7(wp); - static_assert(!(boost::is_convertible, - CGAL::Point_3 >::value)); - static_assert(!(boost::is_convertible, - CGAL::Weighted_point_3 >::value)); + static_assert(!std::is_convertible, + CGAL::Point_3 >::value); + static_assert(!std::is_convertible, + CGAL::Weighted_point_3 >::value); std::cout << '.'; diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Aff_transformation_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Aff_transformation_d.h index b79f5d360e3..aa572c2df9a 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Aff_transformation_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Aff_transformation_d.h @@ -17,10 +17,10 @@ by the constructors below. Affine Transformations are implemented by matrices of number type `RT` as a handle type. All operations like creation, initialization, input and output on a transformation \f$ t\f$ take time -\f$ O(t.dimension()^2)\f$. `dimension()` takes constant time. +\cgalBigO{t.dimension()^2}. `dimension()` takes constant time. The operations for inversion and composition have the cubic costs of the used matrix operations. The space requirement is -\f$ O(t.dimension()^2)\f$. +\cgalBigO{t.dimension()^2}. */ template< typename Kernel > diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Direction_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Direction_d.h index 27d21d10128..d2010da0b6d 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Direction_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Direction_d.h @@ -22,9 +22,9 @@ We provide the operations of the lower dimensional interface `dx()`, Directions are implemented by arrays of integers as an item type. All operations like creation, initialization, tests, inversion, input and -output on a direction \f$ d\f$ take time \f$ O(d.\mathit{dimension}())\f$. +output on a direction \f$ d\f$ take time \cgalBigO{d.\mathit{dimension}()}. `dimension()`, coordinate access and conversion take constant -time. The space requirement is \f$ O(d.\mathit{dimension}())\f$. +time. The space requirement is \cgalBigO{d.\mathit{dimension}()}. */ template< typename Kernel > diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Hyperplane_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Hyperplane_d.h index 26db5cca77f..6323520da58 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Hyperplane_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Hyperplane_d.h @@ -27,8 +27,8 @@ other. Hyperplanes are implemented by arrays of integers as an item type. All operations like creation, initialization, tests, vector arithmetic, input and output on a hyperplane \f$ h\f$ take time -\f$ O(h.dimension())\f$. coordinate access and `dimension()` take -constant time. The space requirement is \f$ O(h.dimension())\f$. +\cgalBigO{h.dimension()}. coordinate access and `dimension()` take +constant time. The space requirement is \cgalBigO{h.dimension()}. */ template< typename Kernel > diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Line_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Line_d.h index fe21afdf8a5..512c13d93b4 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Line_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Line_d.h @@ -11,10 +11,10 @@ An instance of data type `Line_d` is an oriented line in Lines are implemented by a pair of points as an item type. All operations like creation, initialization, tests, direction calculation, input and output on a line \f$ l\f$ take time -\f$ O(l.dimension())\f$. `dimension()`, coordinate and point +\cgalBigO{l.dimension()}. `dimension()`, coordinate and point access, and identity test take constant time. The operations for -intersection calculation also take time \f$ O(l.dimension())\f$. The -space requirement is \f$ O(l.dimension())\f$. +intersection calculation also take time \cgalBigO{l.dimension()}. The +space requirement is \cgalBigO{l.dimension()}. */ template< typename Kernel > diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Point_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Point_d.h index 3446b32e73b..15b93518809 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Point_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Point_d.h @@ -24,9 +24,9 @@ dimensional interface `x()`, `y()`, `z()`, `hx()`, Points are implemented by arrays of `RT` items. All operations like creation, initialization, tests, point - vector arithmetic, input -and output on a point \f$ p\f$ take time \f$ O(p.dimension())\f$. +and output on a point \f$ p\f$ take time \cgalBigO{p.dimension()}. `dimension()`, coordinate access and conversions take constant -time. The space requirement for points is \f$ O(p.dimension())\f$. +time. The space requirement for points is \cgalBigO{p.dimension()}. */ template< typename Kernel > diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Ray_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Ray_d.h index 0f86aaa0d07..658e78f0d6c 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Ray_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Ray_d.h @@ -12,9 +12,9 @@ it goes to infinity. Rays are implemented by a pair of points as an item type. All operations like creation, initialization, tests, direction calculation, input and output on a ray \f$ r\f$ take time -\f$ O(r.dimension())\f$. `dimension()`, coordinate and point +\cgalBigO{r.dimension()}. `dimension()`, coordinate and point access, and identity test take constant time. The space requirement is -\f$ O(r.dimension())\f$. +\cgalBigO{r.dimension()}. */ template< typename Kernel > diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Segment_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Segment_d.h index 1f832f54436..ca4a082da2e 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Segment_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Segment_d.h @@ -14,11 +14,11 @@ called the target point of \f$ s\f$, both points are called endpoints of Segments are implemented by a pair of points as an item type. All operations like creation, initialization, tests, the calculation of the direction and source - target vector, input and output on a -segment \f$ s\f$ take time \f$ O(s.dimension())\f$. `dimension()`, +segment \f$ s\f$ take time \cgalBigO{s.dimension()}. `dimension()`, coordinate and end point access, and identity test take constant time. The operations for intersection calculation also take time -\f$ O(s.dimension())\f$. The space requirement is -\f$ O(s.dimension())\f$. +\cgalBigO{s.dimension()}. The space requirement is +\cgalBigO{s.dimension()}. */ template< typename Kernel > diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Sphere_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Sphere_d.h index 96ed16be9b2..c00376e3aec 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Sphere_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Sphere_d.h @@ -17,11 +17,11 @@ orientation of the defining points, i.e., `orientation(A)`. Spheres are implemented by a vector of points as a handle type. All operations like creation, initialization, tests, input and output of a -sphere \f$ s\f$ take time \f$ O(s.dimension()) \f$. `dimension()`, +sphere \f$ s\f$ take time \cgalBigO{s.dimension()}$. `dimension()`, point access take constant time. The `center()`-operation takes -time \f$ O(d^3)\f$ on its first call and constant time thereafter. The -sidedness and orientation tests take time \f$ O(d^3)\f$. The space -requirement for spheres is \f$ O(s.dimension())\f$ neglecting the +time \cgalBigO{d^3} on its first call and constant time thereafter. The +sidedness and orientation tests take time \cgalBigO{d^3}. The space +requirement for spheres is \cgalBigO{s.dimension()} neglecting the storage room of the points. */ diff --git a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Vector_d.h b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Vector_d.h index c6b38b3d78d..db6a139309b 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Vector_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Kernel_d/Vector_d.h @@ -26,9 +26,9 @@ lower dimensional interface `x()`, `y()`, `z()`, Vectors are implemented by arrays of variables of type `RT`. All operations like creation, initialization, tests, vector arithmetic, -input and output on a vector \f$ v\f$ take time \f$ O(v.dimension())\f$. +input and output on a vector \f$ v\f$ take time \cgalBigO{v.dimension()}. coordinate access, `dimension()` and conversions take constant -time. The space requirement of a vector is \f$ O(v.dimension())\f$. +time. The space requirement of a vector is \cgalBigO{v.dimension()}. */ template< typename Kernel > diff --git a/LICENSES/BSL-1.0.txt b/LICENSES/BSL-1.0.txt new file mode 100644 index 00000000000..36b7cd93cdf --- /dev/null +++ b/LICENSES/BSL-1.0.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 00000000000..0e259d42c99 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/LICENSES/GPL-2.0-only.txt b/LICENSES/GPL-2.0-only.txt new file mode 100644 index 00000000000..0106771c764 --- /dev/null +++ b/LICENSES/GPL-2.0-only.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/LICENSES/GPL-2.0-or-later.txt b/LICENSES/GPL-2.0-or-later.txt new file mode 100644 index 00000000000..0106771c764 --- /dev/null +++ b/LICENSES/GPL-2.0-or-later.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/LICENSES/GPL-3.0-only.txt b/LICENSES/GPL-3.0-only.txt new file mode 100644 index 00000000000..94a9ed024d3 --- /dev/null +++ b/LICENSES/GPL-3.0-only.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/LICENSES/GPL-3.0-or-later.txt b/LICENSES/GPL-3.0-or-later.txt new file mode 100644 index 00000000000..94a9ed024d3 --- /dev/null +++ b/LICENSES/GPL-3.0-or-later.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/LICENSES/LGPL-2.1-only.txt b/LICENSES/LGPL-2.1-only.txt new file mode 100644 index 00000000000..b042f57e217 --- /dev/null +++ b/LICENSES/LGPL-2.1-only.txt @@ -0,0 +1,178 @@ + +GNU LESSER GENERAL PUBLIC LICENSE + +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + + (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Libraries + +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + +one line to give the library's name and an idea of what it does. +Copyright (C) year name of author + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice + +That's all there is to it! diff --git a/LICENSES/LGPL-3.0-only.txt b/LICENSES/LGPL-3.0-only.txt new file mode 100644 index 00000000000..65c5ca88a67 --- /dev/null +++ b/LICENSES/LGPL-3.0-only.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/LICENSES/LGPL-3.0-or-later.txt b/LICENSES/LGPL-3.0-or-later.txt new file mode 100644 index 00000000000..65c5ca88a67 --- /dev/null +++ b/LICENSES/LGPL-3.0-or-later.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/LICENSES/LicenseRef-Commercial.txt b/LICENSES/LicenseRef-Commercial.txt new file mode 100644 index 00000000000..1c5db3b7d70 --- /dev/null +++ b/LICENSES/LicenseRef-Commercial.txt @@ -0,0 +1,6 @@ +The CGAL software consists of several components, each of which is licensed under +an open source license. If the open source license is not suitable to your +needs, it is possible to obtain commercial licenses +from GeometryFactory (www.geometryfactory.com) for each component of CGAL. + +Get more information at "contact@geometryfactory.com". diff --git a/LICENSES/LicenseRef-RFL.txt b/LICENSES/LicenseRef-RFL.txt new file mode 100644 index 00000000000..49f77c2445e --- /dev/null +++ b/LICENSES/LicenseRef-RFL.txt @@ -0,0 +1,19 @@ +Copyright (c) 2014 Stefan Walk + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000000..89de354795e --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/IO_off.cpp b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/IO_off.cpp index d1be42f9fe4..40024a4b51f 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/IO_off.cpp +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/IO_off.cpp @@ -42,7 +42,7 @@ bool read_off_ascii(Surface_mesh& mesh, Vec2f t; Surface_mesh::Vertex v; typename CGAL::GetVertexPointMap::const_type - vpm = choose_parameter(get_parameter(np, CGAL::boost::internal_np::vertex_point), + vpm = choose_parameter(get_parameter(np, CGAL::internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, mesh)); @@ -164,7 +164,7 @@ bool read_off_binary(Surface_mesh& mesh, if (has_normals) normals = mesh.vertex_property("v:normal"); if (has_texcoords) texcoords = mesh.vertex_property("v:texcoord"); typename CGAL::GetVertexPointMap::const_type - vpm = choose_parameter(get_parameter(np, CGAL::boost::internal_np::vertex_point), + vpm = choose_parameter(get_parameter(np, CGAL::internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, mesh)); diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Surface_mesh.h b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Surface_mesh.h index f092321e4a9..295b1c8ba2b 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Surface_mesh.h +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Surface_mesh.h @@ -1103,7 +1103,7 @@ public: //--------------------------------------------------- property handling { return Halfedge_property(hprops_.add(name, t)); } - /** add a edge property of type \c T with name \c name and default value \c t. + /** add an edge property of type \c T with name \c name and default value \c t. fails if a property named \c name exists already, since the name has to be unique. in this case it returns an invalid property */ template Edge_property add_edge_property(const std::string& name, const T t=T()) diff --git a/Matrix_search/doc/Matrix_search/CGAL/sorted_matrix_search.h b/Matrix_search/doc/Matrix_search/CGAL/sorted_matrix_search.h index 39974070137..661621e5f43 100644 --- a/Matrix_search/doc/Matrix_search/CGAL/sorted_matrix_search.h +++ b/Matrix_search/doc/Matrix_search/CGAL/sorted_matrix_search.h @@ -52,7 +52,7 @@ true. The implementation uses an algorithm by Frederickson and Johnson\cgalCite{fj-fkppc-83}, \cgalCite{fj-gsrsm-84} and runs in -\f$ \mathcal{O}(n \cdot k + f \cdot \log (n \cdot k))\f$, where \f$ n\f$ is +\cgalBigO{n \cdot k + f \cdot \log (n \cdot k)}, where \f$ n\f$ is the number of input matrices, \f$ k\f$ denotes the maximal dimension of any input matrix and \f$ f\f$ the time needed for one feasibility test. diff --git a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h index 6366741afad..380696549c1 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h +++ b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h @@ -33,8 +33,6 @@ #include #include -#include -#include #include #include @@ -329,7 +327,7 @@ private: typename FT_list::iterator pos = std::find_if( big_moves_.begin(), big_moves_.end(), - boost::lambda::_1 < new_sq_move ); + [&](const FT& v) { return v< new_sq_move; } ); big_moves_.insert(pos, new_sq_move); } @@ -343,8 +341,6 @@ private: bool check_convergence() const { - namespace bl = boost::lambda; - FT sum(0); for(typename FT_list::const_iterator it = big_moves_.begin(); it != big_moves_.end(); diff --git a/Mesh_3/benchmark/Mesh_3/StdAfx.h b/Mesh_3/benchmark/Mesh_3/StdAfx.h index a07ee4b3f16..e1b24ae23fa 100644 --- a/Mesh_3/benchmark/Mesh_3/StdAfx.h +++ b/Mesh_3/benchmark/Mesh_3/StdAfx.h @@ -137,11 +137,7 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include diff --git a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h index 59cd91281cc..0be7ea4e741 100644 --- a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -32,8 +32,6 @@ #endif #include -#include -#include #include #include @@ -156,8 +154,8 @@ class Implicit_multi_domain_to_labeling_function_wrapper class Implicit_function_traits { public: - typedef typename boost::remove_reference< - typename boost::remove_cv< Point_ >::type>::type Point; + typedef std::remove_reference_t< + std::remove_cv_t< Point_ >> Point; }; public: diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index c3df90819dc..fa30efc12ca 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -36,12 +36,9 @@ #include #endif -#include -#include #include #include #include -#include #include #ifdef CGAL_LINKED_WITH_TBB @@ -1931,7 +1928,7 @@ private: { # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each( outdated_cells.begin(), outdated_cells.end(), @@ -1959,7 +1956,7 @@ private: { # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for ( @@ -2129,8 +2126,8 @@ private: template void reset_sliver_cache(CellRange& cell_range) const { - reset_sliver_cache(boost::begin(cell_range), - boost::end(cell_range)); + reset_sliver_cache(std::begin(cell_range), + std::end(cell_range)); } template @@ -2146,8 +2143,8 @@ private: template void reset_circumcenter_cache(CellRange& cell_range) const { - reset_circumcenter_cache(boost::begin(cell_range), - boost::end(cell_range)); + reset_circumcenter_cache(std::begin(cell_range), + std::end(cell_range)); } template @@ -2696,7 +2693,7 @@ rebuild_restricted_delaunay(OutdatedCells& outdated_cells, # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { std::vector outdated_cells_vector; outdated_cells_vector.reserve(outdated_cells.size()); @@ -2820,7 +2817,7 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, // Note: ~58% of rebuild_restricted_delaunay time #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each(first_cell, last_cell, Update_cell(c3t3_, updater)); @@ -2842,7 +2839,7 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each( facets.begin(), facets.end(), @@ -2954,7 +2951,7 @@ move_point(const Vertex_handle& old_vertex, # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(old_vertex, std::back_inserter(incident_cells_)); } @@ -3436,7 +3433,7 @@ get_least_square_surface_plane(const Vertex_handle& v, Facet_vector facets; # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.finite_incident_facets_threadsafe(v, std::back_inserter(facets)); } @@ -3845,7 +3842,7 @@ get_conflict_zone_topo_change(const Vertex_handle& old_vertex, # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(old_vertex, removal_conflict_cells); } diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h index 7b83d8b05bc..019cb18589c 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h @@ -44,8 +44,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB # include # include @@ -802,7 +800,7 @@ compute_moves(Moving_vertices_set& moving_vertices) #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::concurrent_vector vertices_not_moving_any_more; @@ -888,7 +886,7 @@ compute_move(const Vertex_handle& v) incident_cells.reserve(64); #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells)); } @@ -947,7 +945,7 @@ update_mesh(const Moves_vector& moves, #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { // Apply moves in triangulation tbb::parallel_for(tbb::blocked_range(0, moves.size()), @@ -1040,7 +1038,7 @@ fill_sizing_field() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { typedef tbb::enumerable_thread_specific< std::vector< std::pair > > Local_list; @@ -1111,7 +1109,7 @@ average_circumradius_length(const Vertex_handle& v) const incident_cells.reserve(64); #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells)); } diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index 185efe6229c..94220c276e6 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -63,7 +63,6 @@ #endif #include -#include #include #include @@ -653,7 +652,7 @@ initialize() defined(CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE) #ifndef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE - if(boost::is_convertible::value) + if(std::is_convertible::value) #endif // If that macro is defined, then estimated_bbox must be initialized { Base::set_bbox(r_oracle_.bbox()); @@ -666,7 +665,7 @@ initialize() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { // we're not multi-thread, yet r_c3t3_.triangulation().set_lock_data_structure(0); @@ -861,7 +860,7 @@ Mesher_3:: status() const { #ifdef CGAL_LINKED_WITH_TBB - if(boost::is_convertible::value) { + if(std::is_convertible::value) { return Mesher_status( # if CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE approximate_number_of_vertices(Concurrency_tag()), diff --git a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h index 6a99119535b..31dab91f2b6 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h @@ -2104,7 +2104,7 @@ repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out) // `check_and_repopulate_edges()::vertices` before it is passed itself // to `repopulate_edges_around_corner()`. if(c3t3_.is_in_complex(to_repopulate.back())) - std::copy(to_repopulate.begin(), boost::prior(to_repopulate.end()), out); + std::copy(to_repopulate.begin(), std::prev(to_repopulate.end()), out); else std::copy(to_repopulate.begin(), to_repopulate.end(), out); diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h index 2abcb9f3241..c5f9155d366 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -175,7 +174,7 @@ template::value, + std::is_convertible::value, // Parallel # ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE @@ -663,7 +662,7 @@ scan_triangulation_impl() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { # if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) std::cerr << "Scanning triangulation for bad cells (in parallel)"; diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h index 8374a106b62..8322c3d8630 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h @@ -48,7 +48,6 @@ #include #include #include -#include #include #include @@ -643,7 +642,7 @@ template::value, + std::is_convertible::value, // Parallel # ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE Meshes::Filtered_deque_container @@ -984,7 +983,7 @@ scan_triangulation_impl() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { # if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) std::cerr << "Scanning triangulation for bad facets (in parallel) - " diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h index 17b04cc4239..c46dad7a808 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h @@ -251,7 +251,7 @@ private: { #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { //Sequential @@ -280,7 +280,7 @@ private: #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { if(m_bad_vertices_initialized) { @@ -359,7 +359,7 @@ public: { #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(*eit), typename Base::Quality()); @@ -402,7 +402,7 @@ public: #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(vit), typename Base::Quality()); @@ -471,7 +471,7 @@ public: Facet get_next_element_impl() { #ifdef CGAL_LINKED_WITH_TBB - if (boost::is_convertible::value) + if (std::is_convertible::value) return Base::get_next_element_impl(); else #endif @@ -570,7 +570,7 @@ public: { #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(edge), typename Base::Quality()); @@ -585,7 +585,7 @@ public: else { #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { m_bad_edges.left.erase( edge_to_edgevv(edge) ); // @TODO: pourquoi?! @@ -622,7 +622,7 @@ public: #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(*vit), typename Base::Quality()); @@ -645,7 +645,7 @@ public: #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(v), typename Base::Quality()); diff --git a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h index 87a0416f7b3..9554a14cc0e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h @@ -59,7 +59,6 @@ #include #include #include -#include #include @@ -928,7 +927,7 @@ perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& visitor) const #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->create_task_group(); diff --git a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h index 7011e8a50fb..2084e58ce33 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h +++ b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h @@ -39,7 +39,6 @@ #include #include #include -#include #include #include // std::setprecision @@ -623,7 +622,7 @@ private: { #if defined( CGAL_LINKED_WITH_TBB ) && ( !defined (BOOST_MSVC) || !defined( _DEBUG ) || !defined (CGAL_TEST_SUITE) ) // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) enqueue_task( ch, this->erase_counter(ch), criterion_value); // Sequential @@ -920,7 +919,7 @@ pump_vertices(FT sliver_criterion_limit, #if defined( CGAL_LINKED_WITH_TBB ) && ( !defined (BOOST_MSVC) || !defined( _DEBUG ) || !defined (CGAL_TEST_SUITE) ) // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->create_task_group(); diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h index e8ac78646df..4ef2453bfe4 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h @@ -57,14 +57,12 @@ get(Get_curve_index, const typename Primitive::Id id) { }} // end namespace CGAL::Mesh_3 -#include - namespace boost { // specialization for using pointers as property maps template struct property_traits > { typedef typename std::iterator_traits::value_type ConstPair; - typedef typename boost::remove_const::type value_type; + typedef std::remove_const_t value_type; typedef value_type& reference; typedef typename Primitive::Id key_type; typedef readable_property_map_tag category; diff --git a/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h b/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h index 51ed2e86c59..1f94745c004 100644 --- a/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h +++ b/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h @@ -29,7 +29,7 @@ #include #include -#include // for boost::prior +#include // for std::prev #include #include @@ -387,8 +387,8 @@ void snap_graph_vertices(Graph& graph, { if(poly_it->begin() != poly_it->end()) { tree.insert(*poly_it->begin()); - if(boost::next(poly_it->begin()) != poly_it->end()) { - tree.insert(*boost::prior(poly_it->end())); + if(std::next(poly_it->begin()) != poly_it->end()) { + tree.insert(*std::prev(poly_it->end())); } } } @@ -1049,10 +1049,10 @@ polylines_to_protect(std::vector >& polylines, continue; typename Polyline::const_iterator pit = polyline.begin(); - while (boost::next(pit) != polyline.end()) + while (std::next(pit) != polyline.end()) { vertex_descriptor v = g_manip.get_vertex(*pit, false); - vertex_descriptor w = g_manip.get_vertex(*boost::next(pit), false); + vertex_descriptor w = g_manip.get_vertex(*std::next(pit), false); g_manip.try_add_edge(v, w); ++pit; } @@ -1182,10 +1182,10 @@ merge_and_snap_polylines(const CGAL::Image_3& image, continue; auto pit = polyline.begin(); - while (boost::next(pit) != polyline.end()) + while (std::next(pit) != polyline.end()) { vertex_descriptor v = g_manip.get_vertex(*pit, false); - vertex_descriptor w = g_manip.get_vertex(*boost::next(pit), false); + vertex_descriptor w = g_manip.get_vertex(*std::next(pit), false); g_manip.try_add_edge(v, w); ++pit; } @@ -1194,7 +1194,7 @@ merge_and_snap_polylines(const CGAL::Image_3& image, // snap graph to existing_polylines snap_graph_vertices(graph, image.vx(), image.vy(), image.vz(), - boost::begin(existing_polylines), boost::end(existing_polylines), + std::begin(existing_polylines), std::end(existing_polylines), K()); // rebuild polylines_to_snap diff --git a/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h b/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h index 343b16ebdc2..70c6d34add0 100644 --- a/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h +++ b/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h @@ -47,7 +47,7 @@ search_for_connected_components_in_labeled_image(const CGAL::Image_3& image, const std::size_t nz = image.zdim(); const std::size_t size = nx * ny * nz; - typedef boost::uint16_t uint; + typedef std::uint16_t uint; if(nx > 65535 || ny > 65535 || nz > 65535) { diff --git a/Mesh_3/include/CGAL/Mesh_cell_base_3.h b/Mesh_3/include/CGAL/Mesh_cell_base_3.h index 787124c3ec7..b52243fbbc2 100644 --- a/Mesh_3/include/CGAL/Mesh_cell_base_3.h +++ b/Mesh_3/include/CGAL/Mesh_cell_base_3.h @@ -30,8 +30,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB # include #endif diff --git a/Mesh_3/include/CGAL/Mesh_criteria_3.h b/Mesh_3/include/CGAL/Mesh_criteria_3.h index 0fa4cf43902..a6220203a64 100644 --- a/Mesh_3/include/CGAL/Mesh_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_criteria_3.h @@ -28,7 +28,7 @@ #include #include #include // for the macro DBL_MAX -#include + namespace CGAL { @@ -101,7 +101,7 @@ public: template void add_facet_criterion(Facet_criterion* criterion) { - static_assert(boost::is_base_of< + static_assert(std::is_base_of< typename Facet_criteria::Abstract_criterion, Facet_criterion >::value); @@ -110,7 +110,7 @@ public: template void add_cell_criterion(Cell_criterion* criterion) { - static_assert(boost::is_base_of< + static_assert(std::is_base_of< typename Cell_criteria::Abstract_criterion, Cell_criterion >::value); diff --git a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h index 4d690c94f1c..00aa58d54cd 100644 --- a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h +++ b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h @@ -37,7 +37,6 @@ #include #include -#include // for boost::prior and boost::next #include #include @@ -883,7 +882,7 @@ public: } Curve_index maximal_curve_index() const { if(edges_incidences_.empty()) return Curve_index(); - return boost::prior(edges_incidences_.end())->first; + return std::prev(edges_incidences_.end())->first; } void build_curves_aabb_tree() const { @@ -1458,9 +1457,9 @@ insert_edge(InputIterator first, InputIterator end) // 'compute_corners_incidences()', that corner is incident only to a // loop, then it will be removed from the set of corners. register_corner(*first, curve_index); - if ( *first != *boost::prior(end) ) + if ( *first != *std::prev(end) ) { - register_corner(*boost::prior(end), curve_index); + register_corner(*std::prev(end), curve_index); } // Create a new polyline diff --git a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h index 17e69ff984c..ce6de8775be 100644 --- a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h @@ -456,9 +456,9 @@ public: // here we have a new free vertex on patch #`patch_id` if(random.uniform_smallint( - boost::uint32_t(0), - boost::uint32_t(nb_of_free_vertices_on_patch[patch_id])) - < boost::uint32_t(needed_vertices_on_patch[patch_id])) + std::uint32_t(0), + std::uint32_t(nb_of_free_vertices_on_patch[patch_id])) + < std::uint32_t(needed_vertices_on_patch[patch_id])) { several_vertices_on_patch[patch_id].push_back(vit); --needed_vertices_on_patch[patch_id]; @@ -884,7 +884,7 @@ merge_duplicated_points(const PointSet& duplicated_points) typename Union_find_t::handle first_handle = handles[range_begin->second]; // In a second loop on the equal-range, update new_ids around p - for (it = boost::next(range_begin); it != range_end; ++it) + for (it = std::next(range_begin); it != range_end; ++it) { #if CGAL_MESH_3_VERBOSE > 10 std::cerr << " - #" << it->second << "\n"; diff --git a/Mesh_3/include/CGAL/refine_mesh_3.h b/Mesh_3/include/CGAL/refine_mesh_3.h index 3f11e81ce8a..b4823d073f4 100644 --- a/Mesh_3/include/CGAL/refine_mesh_3.h +++ b/Mesh_3/include/CGAL/refine_mesh_3.h @@ -77,14 +77,14 @@ public: #if defined(CGAL_LINKED_WITH_TBB)\ && !defined(CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE) - if (boost::is_convertible::value) + if (std::is_convertible::value) { if (dimension == -1) r_c3t3_.add_far_point(new_vertex); } #endif #ifdef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE - if (boost::is_convertible::value) + if (std::is_convertible::value) { if (dimension == -1) r_c3t3_.add_far_point(new_vertex); diff --git a/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp b/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp index 58eab9a7500..c9a88cecf46 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp @@ -75,7 +75,7 @@ struct Implicit_tester : public Tester #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->verify(c3t3, domain, criteria, Bissection_tag(), 40, 65, 60, 110); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp b/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp index 6a7a8aa0b57..7877b7558d5 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp @@ -73,7 +73,7 @@ struct Implicit_tester : public Tester #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->verify(c3t3, domain, criteria, Bissection_tag(), 40, 65, 60, 110); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp index cb8bcbe6125..09021df2d4c 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp @@ -90,7 +90,7 @@ struct Polyhedron_tester : public Tester this->verify_c3t3_volume(c3t3, vol*0.95, vol*1.05); #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->verify(c3t3, domain, criteria, Polyhedral_tag(), 110, 140, 190, 235, 300, 450); diff --git a/Mesh_3/test/Mesh_3/test_meshing_utilities.h b/Mesh_3/test/Mesh_3/test_meshing_utilities.h index a9c545a7555..1851c14737f 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_utilities.h +++ b/Mesh_3/test/Mesh_3/test_meshing_utilities.h @@ -399,7 +399,7 @@ struct Tester // Parallel typedef typename C3t3::Concurrency_tag Concurrency_tag; - if (boost::is_convertible::value) + if (std::is_convertible::value) assert(hdist <= reference_value*4.); else #endif //CGAL_LINKED_WITH_TBB diff --git a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Polygon_convex_decomposition_2.h b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Polygon_convex_decomposition_2.h index eb8a49f4354..3e5baf33182 100644 --- a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Polygon_convex_decomposition_2.h +++ b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Polygon_convex_decomposition_2.h @@ -5,8 +5,8 @@ namespace CGAL { The `Greene_convex_decomposition_2` class implements the approximation algorithm of Greene for the decomposition of an input polygon into convex -sub-polygons \cgalCite{g-dpcp-83}. This algorithm takes \f$ O(n \log n)\f$ -time and \f$ O(n)\f$ space, where \f$ n\f$ is the size of the input polygon, +sub-polygons \cgalCite{g-dpcp-83}. This algorithm takes \cgalBigO{n \log n} +time and \cgalBigO{n} space, where \f$ n\f$ is the size of the input polygon, and outputs a decomposition whose size is guaranteed to be no more than four times the size of the optimal decomposition. @@ -38,7 +38,7 @@ and Mehlhorn for decomposing a polygon into convex sub-polygons \cgalCite{hm-ftsp-83}. This algorithm constructs a triangulation of the input polygon and proceeds by removing unnecessary triangulation edges. Given the triangulation, the -algorithm requires \f$ O(n)\f$ time and space to construct a convex +algorithm requires \cgalBigO{n} time and space to construct a convex decomposition (where \f$ n\f$ is the size of the input polygon), whose size is guaranteed to be no more than four times the size of the optimal decomposition. @@ -69,7 +69,7 @@ namespace CGAL { The `Optimal_convex_decomposition_2` class provides an implementation of Greene's dynamic programming algorithm for optimal decomposition of a polygon into convex sub-polygons \cgalCite{g-dpcp-83}. Note that -this algorithm requires \f$ O(n^4)\f$ time and \f$ O(n^3)\f$ space in +this algorithm requires \cgalBigO{n^4} time and \cgalBigO{n^3} space in the worst case, where \f$ n\f$ is the size of the input polygon. diff --git a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Polygon_vertical_decomposition_2.h b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Polygon_vertical_decomposition_2.h index 132f04b2963..eae2b05c67b 100644 --- a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Polygon_vertical_decomposition_2.h +++ b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Polygon_vertical_decomposition_2.h @@ -8,8 +8,8 @@ decomposition of a polygon or a polygon with holes into pseudo trapezoids utilizing the CGAL::decompose() free function of the \ref chapterArrangement_on_surface_2 "2D Arrangements" package. -The algorithm operates in \f$ O(n \log n)\f$ time and takes -\f$ O(n)\f$ space at the worst case, where \f$ n\f$ is the +The algorithm operates in \cgalBigO{n \log n} time and takes +\cgalBigO{n} space at the worst case, where \f$ n\f$ is the size of the input polygon. \cgalModels `PolygonWithHolesConvexDecomposition_2` diff --git a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Small_side_angle_bisector_decomposition_2.h b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Small_side_angle_bisector_decomposition_2.h index 8688bbd2de9..cfbce57f7a3 100644 --- a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Small_side_angle_bisector_decomposition_2.h +++ b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/Small_side_angle_bisector_decomposition_2.h @@ -12,7 +12,7 @@ connect two reflex vertices with an edge. When this is not possible any more, it eliminates the reflex vertices one by one by connecting them to other convex vertices, such that the new edge best approximates the angle bisector of the reflex vertex. The algorithm operates in -\f$ O(n^2)\f$ time and takes \f$ O(n)\f$ space at the worst case, where +\cgalBigO{n^2} time and takes \cgalBigO{n} space at the worst case, where \f$ n\f$ is the size of the input polygon. \cgalModels `PolygonConvexDecomposition_2` diff --git a/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt b/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt index bb0d0c90cb9..6c6567f67e9 100644 --- a/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt +++ b/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt @@ -53,7 +53,7 @@ they form with the \f$ x\f$-axis; see the figure above. The Minkowski sum can therefore be computed using an operation similar to the merge step of the merge-sort algorithm\cgalFootnote{See, for example, -https://en.wikipedia.org/wiki/Merge_sort.} in \f$ O(m + n)\f$ time, +https://en.wikipedia.org/wiki/Merge_sort.} in \cgalBigO{m + n} time, starting from the two bottommost vertices in \f$ P\f$ and in \f$ Q\f$ and merging the ordered list of edges. @@ -294,7 +294,7 @@ the dynamic-programming algorithm of Greene \cgalCite{g-dpcp-83} for computing an optimal decomposition of a polygon into a minimal number of convex sub-polygons. While this algorithm results in a small number of convex polygons, it consumes rather many resources, as it runs in -\f$ O(n^4) \f$ time and \f$ O(n^3) \f$ space in the worst case, where +\cgalBigO{n^4} time and \cgalBigO{n^3} space in the worst case, where \f$ n \f$ is the number of vertices in the input polygon.
    • The `Hertel_Mehlhorn_convex_decomposition_2` class @@ -302,7 +302,7 @@ template implements the approximation algorithm suggested by Hertel and Mehlhorn \cgalCite{hm-ftsp-83}, which triangulates the input polygon and then discards unnecessary triangulation edges. After triangulation (carried out by the constrained-triangulation procedure of CGAL) the -algorithm runs in \f$ O(n) \f$ time and space, and guarantees that the +algorithm runs in \cgalBigO{n} time and space, and guarantees that the number of sub-polygons it generates is not more than four times the optimum. @@ -310,7 +310,7 @@ optimum. implementation of Greene's approximation algorithm \cgalCite{g-dpcp-83}, which computes a convex decomposition of the polygon based on its partitioning into \f$ y\f$-monotone polygons. -This algorithm runs in \f$ O(n \log n)\f$ time and \f$ O(n)\f$ space, +This algorithm runs in \cgalBigO{n \log n} time and \cgalBigO{n} space, and has the same guarantee on the quality of approximation as Hertel and Mehlhorn's algorithm. @@ -318,7 +318,7 @@ and Mehlhorn's algorithm. template is an implementation of a decomposition algorithm introduced in \cgalCite{cgal:afh-pdecm-02}. It is based on the angle-bisector decomposition method suggested by Chazelle and Dobkin -\cgalCite{cd-ocd-85}, which runs in \f$ O(n^2)\f$ time. In addition, +\cgalCite{cd-ocd-85}, which runs in \cgalBigO{n^2} time. In addition, it applies a heuristic by Flato that reduces the number of output polygons in many common cases. The convex decompositions that it produces usually yield efficient running times for Minkowski sum diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h index a528585c5c6..05d35f8026f 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h @@ -182,7 +182,7 @@ namespace CGAL { /// After one or more calls to `AABB_tree_with_join::insert()` the internal data /// structure of the tree must be reconstructed. This procedure - /// has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of + /// has a complexity of \cgalBigO{n log(n)}, where \f$n\f$ is the number of /// primitives of the tree. This procedure is called implicitly /// at the first call to a query member function. You can call /// AABB_tree_with_join::build() explicitly to ensure that the next call to diff --git a/Minkowski_sum_2/include/CGAL/Polygon_convex_decomposition_2.h b/Minkowski_sum_2/include/CGAL/Polygon_convex_decomposition_2.h index bda03b68ff8..60ddd0b6761 100644 --- a/Minkowski_sum_2/include/CGAL/Polygon_convex_decomposition_2.h +++ b/Minkowski_sum_2/include/CGAL/Polygon_convex_decomposition_2.h @@ -22,7 +22,7 @@ namespace CGAL { /*! * \class - * The O(n^4) optimal strategy for decomposing a polygon into convex + * The \cgalBigO{n^4} optimal strategy for decomposing a polygon into convex * sub-polygons. */ template ` is implemented with union by rank and path compression. The running time for \f$ m\f$ set operations on \f$ n\f$ elements -is \f$ O(n \alpha(m,n))\f$ where \f$ \alpha(m,n)\f$ is the extremely slow growing +is \cgalBigO{n \alpha(m,n)} where \f$ \alpha(m,n)\f$ is the extremely slow growing inverse of Ackermann's function. */ diff --git a/Miscellany/doc/Miscellany/CGAL/Unique_hash_map.h b/Miscellany/doc/Miscellany/CGAL/Unique_hash_map.h index 05debda348d..38cfa3c17c0 100644 --- a/Miscellany/doc/Miscellany/CGAL/Unique_hash_map.h +++ b/Miscellany/doc/Miscellany/CGAL/Unique_hash_map.h @@ -28,7 +28,7 @@ of type `Data` specified in the definition of `map`. \cgalHeading{Implementation} `Unique_hash_map` is implemented via a chained hashing scheme. Access -operations `map``[i]` take expected time \f$ O(1)\f$. The `table_size` +operations `map``[i]` take expected time \cgalBigO{1}. The `table_size` parameter passed to chained hashing can be used to avoid unnecessary rehashing when set to the number of expected elements in the map. The design is derived from the \stl `hash_map` and the \leda type diff --git a/Miscellany/doc/Miscellany/Miscellany.txt b/Miscellany/doc/Miscellany/Miscellany.txt index 54dbb62d562..eb8ed642c34 100644 --- a/Miscellany/doc/Miscellany/Miscellany.txt +++ b/Miscellany/doc/Miscellany/Miscellany.txt @@ -47,7 +47,7 @@ global macro `CGAL_PROFILE`. The class `Unique_hash_map` implements an injective mapping between a set of unique keys and a set of data values. This is implemented using -a chained hashing scheme and access operations take \f$ O(1)\f$ expected time. +a chained hashing scheme and access operations take \cgalBigO{1} expected time. Such a mapping is useful, for example, when keys are pointers, handles, iterators or circulators that refer to unique memory locations. In this case, the default hash function is `Handle_hash_function`. @@ -57,7 +57,7 @@ In this case, the default hash function is `Handle_hash_function`. \cgal also provides a class `Union_find` that implements a partition of values into disjoint sets. This is implemented with union by rank and path compression. The running time for \f$ m\f$ set operations on \f$ n\f$ elements -is \f$ O(n\alpha(m,n))\f$ where \f$ \alpha(m,n)\f$ is the extremely slowly growing +is \cgalBigO{n\alpha(m,n)} where \f$ \alpha(m,n)\f$ is the extremely slowly growing inverse of Ackermann's function. \section MiscellanyProtected Protected Access to Internal Representations diff --git a/Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h b/Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h index 361b38fe561..9d0bbb4126d 100644 --- a/Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h +++ b/Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h @@ -33,14 +33,14 @@ Operations like `empty` take constant time. The operations `clear`, `complement`, `interior`, `closure`, `boundary`, `regularization`, input and output take linear time. All binary set operations and comparison operations take time -\f$ O(n \log n)\f$ where \f$ n\f$ is the size of the output plus the size of the +\cgalBigO{n \log n} where \f$ n\f$ is the size of the output plus the size of the input. The point location and ray shooting operations are implemented in two flavors. The `NAIVE` operations run in linear query time without any preprocessing, the `DEFAULT` operations (equals `LMWT`) run in sub-linear query time, but preprocessing is triggered with the -first operation. Preprocessing takes time \f$ O(N^2)\f$, the sub-linear +first operation. Preprocessing takes time \cgalBigO{N^2}, the sub-linear point location time is either logarithmic when LEDA's persistent dictionaries are present or if not then the point location time is worst-case linear, but experiments show often sublinear runtimes. Ray @@ -49,7 +49,7 @@ triangulation overlaid on the plane map representation. The cost of the walk is proportional to the number of triangles passed in direction `d` until an obstacle is met. In a minimum weight triangulation of the obstacles (the plane map representing the -polyhedron) the theory provides a \f$ O(\sqrt{n})\f$ bound for the number +polyhedron) the theory provides a \cgalBigO{\sqrt{n}} bound for the number of steps. Our locally minimum weight triangulation approximates the minimum weight triangulation only heuristically (the calculation of the minimum weight triangulation is conjectured to be NP hard). Thus diff --git a/Nef_2/include/CGAL/Nef_2/PM_point_locator.h b/Nef_2/include/CGAL/Nef_2/PM_point_locator.h index ede8d2b033a..c03e60e3fcf 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_point_locator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_point_locator.h @@ -159,7 +159,7 @@ public: const Direction& d, bool& collinear) const /*{\Xop returns a halfedge |e| bounding a wedge in between two neighbored edges in the adjacency list of |v| which contains |d|. - If |d| extends along a edge then |e| is this edge. If |d| extends + If |d| extends along an edge then |e| is this edge. If |d| extends into the interior of such a wedge then |e| is the first edge hit when |d| is rotated clockwise. \precond |v| is not isolated.}*/ { CGAL_NEF_TRACEN("out_wedge "< { } bool is_part_of_edge(Vertex_handle v) { - /* determines if a vertex v is part of a edge, checking at its local + /* determines if a vertex v is part of an edge, checking at its local graph for exactly two antipodal vertices */ SM_decorator SD(&*v); diff --git a/Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h b/Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h index 7a297d61838..96dfc3d41f5 100644 --- a/Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h +++ b/Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h @@ -58,7 +58,7 @@ Operations like `empty` take constant time. The operations `clear`, `complement`, `interior`, `closure`, `boundary`, `regularization`, input and output take linear time. All binary set operations and comparison operations take time -\f$ O(n \log n)\f$ where \f$ n\f$ is the size of the output plus the size of the +\cgalBigO{n \log n} where \f$ n\f$ is the size of the output plus the size of the input. The point location and ray shooting operations are implemented in the diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_point_locator.h b/Nef_S2/include/CGAL/Nef_S2/SM_point_locator.h index 8dbce0ced5e..563c5471b45 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_point_locator.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_point_locator.h @@ -119,7 +119,7 @@ public: bool& collinear) const /*{\Xop returns a halfedge |e| bounding a wedge in between two neighbored edges in the adjacency list of |v| which contains |d|. - If |d| extends along a edge then |e| is this edge. If |d| extends + If |d| extends along an edge then |e| is this edge. If |d| extends into the interior of such a wedge then |e| is the first edge hit when |d| is rotated clockwise. \precond |v| is not isolated.}*/ { CGAL_NEF_TRACEN("out_wedge "< #include -#include +#include #include #include #include @@ -89,7 +89,7 @@ struct Cartesian_LA_base_d : public Dimension_base ::add::type Iterator_list; - template > struct Functor { + template > struct Functor { typedef Null_functor type; }; template struct Functor,D> { @@ -105,19 +105,19 @@ struct Cartesian_LA_base_d : public Dimension_base typedef CartesianDVectorBase::Construct_cartesian_const_iterator type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Sum_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Difference_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Opposite_vector type; }; template struct Functor::value || !LA_vector::template Property::value> > { typedef CartesianDVectorBase::Midpoint type; @@ -135,24 +135,24 @@ struct Cartesian_LA_base_d : public Dimension_base typedef CartesianDVectorBase::PV_dimension type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Orientation_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Orientation_of_points type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Scalar_product type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Squared_distance_to_origin_stored type; }; // Use integral_constant in case of failure, to distinguish from the previous one. template struct Functor::value || !LA_vector::template Property::value)*2> > { typedef CartesianDVectorBase::Squared_distance_to_origin_via_dotprod type; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h b/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h index c96e0eea647..7124d799251 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h @@ -38,10 +38,10 @@ template struct LA_eigen { struct Rebind_dimension { typedef LA_eigen< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; - template struct Property : boost::true_type {}; - template struct Property : boost::true_type {}; - template struct Property : boost::true_type {}; + template struct Property : std::false_type {}; + template struct Property : std::true_type {}; + template struct Property : std::true_type {}; + template struct Property : std::true_type {}; typedef Eigen::Matrix::value,1,Eigen::ColMajor|Eigen::AutoAlign,Eigen_dimension::value,1> Vector; typedef Eigen::Matrix Dynamic_vector; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h index be1b2b3a6f0..2c69eec6da6 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h @@ -38,7 +38,7 @@ template struct Array_vector { struct Rebind_dimension { typedef Array_vector< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; static const unsigned d_=Max_dim_::value; static_assert(d_ != (unsigned)UNKNOWN_DIMENSION); diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h index 950910925a3..90a35986e50 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h @@ -31,19 +31,19 @@ namespace CGAL { typedef Dimension_tag<4> Dimension; typedef Dimension_tag<4> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; /* MAYBE? template struct Property - : boost::true_type {}; + : std::true_type {}; */ template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; typedef __m256d Vector; struct Construct_vector { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h index 2a222f81d72..293fdfdc1d3 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_points_from_iterator_to_vectors }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; // TODO: use std::minus, boost::bind, etc template struct Minus_fixed { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h index 5e135e530be..110305fe61e 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -74,7 +74,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -108,7 +108,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -144,7 +144,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -182,7 +182,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h index e6db622451c..bf7ab454eac 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -72,7 +72,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -104,7 +104,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -138,7 +138,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -174,7 +174,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h index 653ac9c8dd6..66edfeba37d 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h @@ -42,7 +42,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c){ @@ -66,7 +66,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d){ @@ -90,7 +90,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e){ @@ -114,7 +114,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f){ @@ -138,7 +138,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f, diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h index f423bf8b093..59a3752f61c 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h @@ -46,7 +46,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b){ return CGAL::determinant_of_vectors(a,b); @@ -69,7 +69,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c){ @@ -93,7 +93,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d){ @@ -117,7 +117,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e){ @@ -141,7 +141,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

      {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f){ diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h index 1330bf6fa77..24607f39e69 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h @@ -32,17 +32,17 @@ namespace CGAL { typedef Dimension_tag<2> Dimension; typedef Dimension_tag<2> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; /* MAYBE? template struct Property - : boost::true_type {}; + : std::true_type {}; */ template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; typedef __m128d Vector; struct Construct_vector { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h index d864c67bbc5..d02965cd4e7 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h @@ -70,13 +70,13 @@ namespace CGAL { typedef Dimension_tag<2> Dimension; typedef Dimension_tag<2> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; //template struct Property - // : boost::true_type {}; + // : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; //template struct Property - // : boost::true_type {}; + // : std::true_type {}; // Advertise somehow that the sign_of_determinant* are exact? typedef std::array Vector; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h index 9dfda2c38b1..89ccbace201 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h @@ -29,7 +29,7 @@ template struct Vector_vector { struct Rebind_dimension { typedef Vector_vector< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; struct Construct_vector { struct Dimension { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h b/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h index f8608d9fd4d..a1e788113af 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h @@ -20,7 +20,7 @@ namespace CGAL { BOOST_MPL_HAS_XXX_TRAIT_DEF(Is_pretty) \ } \ template::value> \ - struct Is_pretty : boost::false_type {}; \ + struct Is_pretty : std::false_type {}; \ template \ struct Is_pretty : T::Is_pretty {} diff --git a/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h b/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h index 99a28ab578f..a3255d25eb0 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h @@ -69,19 +69,19 @@ namespace CGAL { Provides_functor::type>, Provides_functors::type> > {}; template - struct Provides_functors : boost::true_type {}; + struct Provides_functors : std::true_type {}; template::type::value> struct Provides_types : boost::mpl::and_ < Provides_type::type>, Provides_types::type> > {}; template - struct Provides_types : boost::true_type {}; + struct Provides_types : std::true_type {}; namespace internal { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_Type,template Type,false) } template::value /* false */> - struct Provides_type_i : boost::false_type {}; + struct Provides_type_i : std::false_type {}; template struct Provides_type_i : Has_type_different_from, Null_type> {}; @@ -93,7 +93,7 @@ namespace CGAL { template::value /* false */> - struct Provides_functor_i : boost::false_type {}; + struct Provides_functor_i : std::false_type {}; template struct Provides_functor_i : Has_type_different_from, Null_functor> {}; @@ -332,19 +332,19 @@ namespace CGAL { struct Stores_squared_norm_tag {}; template struct Preserved_by_non_linear_extra_coordinate - : boost::false_type {}; + : std::false_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; // Kernel properties struct Point_stores_squared_distance_to_origin_tag {}; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/utils.h b/NewKernel_d/include/CGAL/NewKernel_d/utils.h index 487eae5bc10..a1ac6faeddd 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/utils.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/utils.h @@ -35,7 +35,7 @@ namespace internal { } template ::value /*false*/> -struct Has_type_different_from : boost::false_type {}; +struct Has_type_different_from : std::false_type {}; template struct Has_type_different_from : boost::mpl::not_ > {}; @@ -88,7 +88,7 @@ struct Has_type_different_from } }; - template struct has_cheap_constructor : boost::is_arithmetic{}; + template struct has_cheap_constructor : std::is_arithmetic{}; template struct has_cheap_constructor > { enum { value=true }; }; @@ -104,7 +104,7 @@ struct Has_type_different_from template struct Type_copy_cv { typedef U const volatile type; }; template struct Type_copy_cvref : - Type_copy_ref::type,U>::type> {}; + Type_copy_ref,U>::type> {}; struct Dereference_functor { template struct result{}; diff --git a/Number_types/include/CGAL/Lazy_exact_nt.h b/Number_types/include/CGAL/Lazy_exact_nt.h index d3b31c57689..3f06ef3fb32 100644 --- a/Number_types/include/CGAL/Lazy_exact_nt.h +++ b/Number_types/include/CGAL/Lazy_exact_nt.h @@ -18,7 +18,6 @@ #include // for Root_of functor #include -#include #include #include @@ -385,7 +384,7 @@ public : // Also check that ET and AT are constructible from T? template Lazy_exact_nt (T i, std::enable_if_t, std::is_enum >, + boost::mpl::or_, std::is_enum >, boost::mpl::not_ > >::value,void*> = 0) : Base(new Lazy_exact_Cst(i)) {} diff --git a/Number_types/include/CGAL/Mpzf.h b/Number_types/include/CGAL/Mpzf.h index daa0d9222b5..020ea8ce94b 100644 --- a/Number_types/include/CGAL/Mpzf.h +++ b/Number_types/include/CGAL/Mpzf.h @@ -188,7 +188,7 @@ template struct no_pool { }; // Only used with an argument known not to be 0. -inline int ctz (boost::uint64_t x) { +inline int ctz (std::uint64_t x) { #if defined(_MSC_VER) unsigned long ret; _BitScanForward64(&ret, x); @@ -200,7 +200,7 @@ inline int ctz (boost::uint64_t x) { return __builtin_ctzll (x); #endif } -inline int clz (boost::uint64_t x) { +inline int clz (std::uint64_t x) { #if defined(_MSC_VER) unsigned long ret; _BitScanReverse64(&ret, x); @@ -430,7 +430,7 @@ struct Mpzf { } Mpzf(double d){ init(); - using boost::uint64_t; + using std::uint64_t; union { #ifdef CGAL_LITTLE_ENDIAN struct { uint64_t man:52; uint64_t exp:11; uint64_t sig:1; } s; diff --git a/Number_types/include/CGAL/known_bit_size_integers.h b/Number_types/include/CGAL/known_bit_size_integers.h index 5f9e786701f..c5bc43fed54 100644 --- a/Number_types/include/CGAL/known_bit_size_integers.h +++ b/Number_types/include/CGAL/known_bit_size_integers.h @@ -34,19 +34,19 @@ namespace CGAL { - typedef boost::int8_t Integer8; - typedef boost::int16_t Integer16; - typedef boost::int32_t Integer32; + typedef std::int8_t Integer8; + typedef std::int16_t Integer16; + typedef std::int32_t Integer32; - typedef boost::uint8_t UInteger8; - typedef boost::uint16_t UInteger16; - typedef boost::uint32_t UInteger32; + typedef std::uint8_t UInteger8; + typedef std::uint16_t UInteger16; + typedef std::uint32_t UInteger32; #ifndef BOOST_NO_INT64_T // this macro is still provided but its use is discouraged # define CGAL_HAS_INTEGER64 - typedef boost::int64_t Integer64; - typedef boost::uint64_t UInteger64; + typedef std::int64_t Integer64; + typedef std::uint64_t UInteger64; #endif } //namespace CGAL diff --git a/Number_types/test/Number_types/known_bit_size_integers.cpp b/Number_types/test/Number_types/known_bit_size_integers.cpp index fce35d25f64..351ffa412af 100644 --- a/Number_types/test/Number_types/known_bit_size_integers.cpp +++ b/Number_types/test/Number_types/known_bit_size_integers.cpp @@ -7,19 +7,16 @@ int main() std::cout << "Verifying the sizes of boost::[u]int{8,16,32,64}_t" << std::endl; - static_assert(sizeof(boost::int8_t) == 1); - static_assert(sizeof(boost::int16_t) == 2); - static_assert(sizeof(boost::int32_t) == 4); -#ifndef BOOST_NO_INT64_T - static_assert(sizeof(boost::int64_t) == 8); -#endif + static_assert(sizeof(std::int8_t) == 1); + static_assert(sizeof(std::int16_t) == 2); + static_assert(sizeof(std::int32_t) == 4); + static_assert(sizeof(std::int64_t) == 8); - static_assert(sizeof(boost::uint8_t) == 1); - static_assert(sizeof(boost::uint16_t) == 2); - static_assert(sizeof(boost::uint32_t) == 4); -#ifndef BOOST_NO_INT64_T - static_assert(sizeof(boost::uint64_t) == 8); -#endif + + static_assert(sizeof(std::uint8_t) == 1); + static_assert(sizeof(std::uint16_t) == 2); + static_assert(sizeof(std::uint32_t) == 4); + static_assert(sizeof(std::uint64_t) == 8); return 0; } diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h index d1840743412..b8d09a2dbfd 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h @@ -34,7 +34,6 @@ #include #include #include -#include namespace CGAL { @@ -1185,9 +1184,9 @@ public: // number type (like a multiprecision), the coordinates of the points // will increase a lot due to the relocation step. These functions // simply turn a relocated point to a rounded to double version. - void relocate_on_the_double_grid(Point&, boost::true_type) const + void relocate_on_the_double_grid(Point&, std::true_type) const {} - void relocate_on_the_double_grid(Point& p, boost::false_type) const + void relocate_on_the_double_grid(Point& p, std::false_type) const { double x=to_double(m_traits.compute_x_2_object()(p)); double y=to_double(m_traits.compute_y_2_object()(p)); @@ -1196,7 +1195,7 @@ public: void relocate_on_the_double_grid(Point& p) const { relocate_on_the_double_grid(p, - typename boost::is_float::type()); + typename std::is_floating_point::type()); } Point compute_relocation(Vertex_handle vertex) const { diff --git a/Orthtree/doc/Orthtree/Orthtree.txt b/Orthtree/doc/Orthtree/Orthtree.txt index 0a957a6fa51..bfe72403866 100644 --- a/Orthtree/doc/Orthtree/Orthtree.txt +++ b/Orthtree/doc/Orthtree/Orthtree.txt @@ -234,7 +234,7 @@ Because of its simplicity, an octree can be constructed faster than a kd-tree. %Orthtree nodes are uniform, so orthtrees will tend to have deeper hierarchies than equivalent kd-trees. As a result, orthtrees will generally perform worse for nearest neighbor searches. -Both nearest neighbor algorithms have a theoretical complexity of O(log(n)), +Both nearest neighbor algorithms have a theoretical complexity of \cgalBigO{log(n)}, but the orthtree can generally be expected to have a higher coefficient. \cgalFigureBegin{Orthtree_nearest_neighbor_benchmark_fig, nearest_neighbor_benchmark.png} diff --git a/Partition_2/doc/Partition_2/CGAL/is_y_monotone_2.h b/Partition_2/doc/Partition_2/CGAL/is_y_monotone_2.h index 2a5768e9613..ec9e97fc8cf 100644 --- a/Partition_2/doc/Partition_2/CGAL/is_y_monotone_2.h +++ b/Partition_2/doc/Partition_2/CGAL/is_y_monotone_2.h @@ -22,7 +22,7 @@ type `std::iterator_traits::%value_type` is defined. \cgalHeading{Implementation} -This function requires \f$ O(n)\f$ time for a polygon with \f$ n\f$ vertices. +This function requires \cgalBigO{n} time for a polygon with \f$ n\f$ vertices. \cgalHeading{Example} diff --git a/Partition_2/doc/Partition_2/CGAL/partition_2.h b/Partition_2/doc/Partition_2/CGAL/partition_2.h index 4387d8981a9..7ec0e01596b 100644 --- a/Partition_2/doc/Partition_2/CGAL/partition_2.h +++ b/Partition_2/doc/Partition_2/CGAL/partition_2.h @@ -46,7 +46,7 @@ with the representation type determined by `std::iterator_traits This function implements the algorithm of Hertel and Mehlhorn \cgalCite{hm-ftsp-83} and is based on the class `Constrained_triangulation_2`. Given a triangulation of -the polygon, the function requires \f$ O(n)\f$ time and +the polygon, the function requires \cgalBigO{n} time and space for a polygon with \f$ n\f$ vertices. \cgalHeading{Example} @@ -116,7 +116,7 @@ with the representation type determined by `std::iterator_traits: \cgalHeading{Implementation} This function implements the approximation algorithm of -Greene \cgalCite{g-dpcp-83} and requires \f$ O(n \log n)\f$ time and \f$ O(n)\f$ space +Greene \cgalCite{g-dpcp-83} and requires \cgalBigO{n \log n} time and \cgalBigO{n} space to produce a convex partitioning given a \f$ y\f$-monotone partitioning of a polygon with \f$ n\f$ vertices. The function `y_monotone_partition_2()` is used to produce the monotone partition. @@ -184,7 +184,7 @@ with the representation type determined by `std::iterator_traits: \cgalHeading{Implementation} This function implements the dynamic programming algorithm of Greene -\cgalCite{g-dpcp-83}, which requires \f$ O(n^4)\f$ time and \f$ O(n^3)\f$ space to +\cgalCite{g-dpcp-83}, which requires \cgalBigO{n^4} time and \cgalBigO{n^3} space to produce a partitioning of a polygon with \f$ n\f$ vertices. \cgalHeading{Example} @@ -254,8 +254,8 @@ with the representation type determined by `std::iterator_traits: \cgalHeading{Implementation} This function implements the algorithm presented by de Berg et al. -\cgalCite{bkos-cgaa-97} which requires \f$ O(n \log n)\f$ time -and \f$ O(n)\f$ space for a polygon with \f$ n\f$ vertices. +\cgalCite{bkos-cgaa-97} which requires \cgalBigO{n \log n} time +and \cgalBigO{n} space for a polygon with \f$ n\f$ vertices. \cgalHeading{Example} diff --git a/Partition_2/doc/Partition_2/CGAL/partition_is_valid_2.h b/Partition_2/doc/Partition_2/CGAL/partition_is_valid_2.h index 69ddf012ebf..20efe4eefc0 100644 --- a/Partition_2/doc/Partition_2/CGAL/partition_is_valid_2.h +++ b/Partition_2/doc/Partition_2/CGAL/partition_is_valid_2.h @@ -41,7 +41,7 @@ with the representation type determined by `std::iterator_traits: This function calls `partition_is_valid_2()` using the function object `Is_convex_2` to determine the convexity of each partition polygon. -Thus the time required by this function is \f$ O(n \log n + e \log e)\f$ where +Thus the time required by this function is \cgalBigO{n \log n + e \log e} where \f$ n\f$ is the total number of vertices in the partition polygons and \f$ e\f$ the total number of edges. @@ -103,7 +103,7 @@ with the representation type determined by `std::iterator_traits: \cgalHeading{Implementation} -This function requires \f$ O(n \log n + e \log e + \Sigma_{i=1}^p m_i)\f$ where \f$ n\f$ +This function requires \cgalBigO{n \log n + e \log e + \Sigma_{i=1}^p m_i} where \f$ n\f$ is the total number of vertices of the \f$ p\f$ partition polygons, \f$ e\f$ is the total number of edges of the partition polygons and \f$ m_i\f$ is the time required by `Traits::Is_valid()` to test if partition polygon \f$ p_i\f$ is valid. @@ -161,7 +161,7 @@ with the representation type determined by `std::iterator_traits: This function uses the function `partition_is_valid_2()` together with the function object `Is_y_monotone_2` to determine if each polygon -is \f$ y\f$-monotone or not. Thus the time required is \f$ O(n \log n + e \log e)\f$ +is \f$ y\f$-monotone or not. Thus the time required is \cgalBigO{n \log n + e \log e} where \f$ n\f$ is the total number of vertices of the partition polygons and \f$ e\f$ is the total number of edges. diff --git a/Partition_2/doc/Partition_2/CGAL/polygon_function_objects.h b/Partition_2/doc/Partition_2/CGAL/polygon_function_objects.h index 4cd55a93376..d7341e0f5f8 100644 --- a/Partition_2/doc/Partition_2/CGAL/polygon_function_objects.h +++ b/Partition_2/doc/Partition_2/CGAL/polygon_function_objects.h @@ -13,7 +13,7 @@ a convex polygon or not. \cgalHeading{Implementation} -This test requires \f$ O(n)\f$ time for a polygon with \f$ n\f$ vertices. +This test requires \cgalBigO{n} time for a polygon with \f$ n\f$ vertices. */ template< typename Traits > @@ -62,7 +62,7 @@ Function object class that indicates all sequences of points are valid. \cgalHeading{Implementation} -This test requires \f$ O(1)\f$ time. +This test requires \cgalBigO{1} time. */ template< typename Traits > @@ -110,7 +110,7 @@ a \f$ y\f$-monotone polygon or not. \cgalHeading{Implementation} -This test requires \f$ O(n)\f$ time for a polygon with \f$ n\f$ vertices. +This test requires \cgalBigO{n} time for a polygon with \f$ n\f$ vertices. */ template< typename Traits > diff --git a/Partition_2/doc/Partition_2/PackageDescription.txt b/Partition_2/doc/Partition_2/PackageDescription.txt index 4d5b6ba9c91..ec875293336 100644 --- a/Partition_2/doc/Partition_2/PackageDescription.txt +++ b/Partition_2/doc/Partition_2/PackageDescription.txt @@ -31,8 +31,8 @@ Functions are available for partitioning planar polygons into two types of subpolygons (`y`-monotone polygons and convex polygons). The function that produces a `y`-monotone partitioning is based on the -algorithm presented in \cgalCite{bkos-cgaa-97} which requires \f$ O(n \log n) \f$ time -and \f$ O(n) \f$ space for a polygon with \f$ n \f$ vertices and guarantees nothing +algorithm presented in \cgalCite{bkos-cgaa-97} which requires \cgalBigO{n \log n} time +and \cgalBigO{n} space for a polygon with \f$ n \f$ vertices and guarantees nothing about the number of polygons produced with respect to the optimal number Three functions are provided for producing convex partitions. Two of these functions produce approximately optimal @@ -41,12 +41,12 @@ defined in terms of the number of partition polygons. The two functions that implement approximation algorithms are guaranteed to produce no more than four times the optimal number of convex pieces. The optimal partitioning function provides an implementation of Greene's dynamic programming algorithm -\cgalCite{g-dpcp-83}, which requires \f$ O(n^4) \f$ time and \f$ O(n^3) \f$ space to produce a +\cgalCite{g-dpcp-83}, which requires \cgalBigO{n^4} time and \cgalBigO{n^3} space to produce a convex partitioning. One of the approximation algorithms is also due to -Greene \cgalCite{g-dpcp-83} and requires \f$ O(n \log n) \f$ time and \f$ O(n) \f$ space +Greene \cgalCite{g-dpcp-83} and requires \cgalBigO{n \log n} time and \cgalBigO{n} space to produce a convex partitioning given a `y`-monotone partitioning. The other approximation algorithm is a result of Hertel and -Mehlhorn \cgalCite{hm-ftsp-83}, which requires \f$ O(n) \f$ time and space to produce +Mehlhorn \cgalCite{hm-ftsp-83}, which requires \cgalBigO{n} time and space to produce a convex partitioning from a triangulation of a polygon. Each of the partitioning functions uses a traits class to supply the primitive types and predicates used by the algorithms. diff --git a/Partition_2/doc/Partition_2/Partition_2.txt b/Partition_2/doc/Partition_2/Partition_2.txt index a574547db37..6402e4fae46 100644 --- a/Partition_2/doc/Partition_2/Partition_2.txt +++ b/Partition_2/doc/Partition_2/Partition_2.txt @@ -39,7 +39,7 @@ is a polygon whose vertices \f$ v_1, \ldots, v_n\f$ can be divided into two chai intersects either chain at most once. For producing a \f$ y\f$-monotone partition of a given polygon, the sweep-line algorithm presented in \cgalCite{bkos-cgaa-97} is implemented by the function -`y_monotone_partition_2()`. This algorithm runs in \f$ O(n \log n)\f$ time and requires \f$ O(n)\f$ space. +`y_monotone_partition_2()`. This algorithm runs in \cgalBigO{n \log n} time and requires \cgalBigO{n} space. This algorithm does not guarantee a bound on the number of polygons produced with respect to the optimal number. @@ -72,7 +72,7 @@ An optimal convex partition can be produced using the function `optimal_convex_p This function provides an implementation of Greene's dynamic programming algorithm for optimal partitioning \cgalCite{g-dpcp-83}. -This algorithm requires \f$ O(n^4)\f$ time and \f$ O(n^3)\f$ space in the worst case. +This algorithm requires \cgalBigO{n^4} time and \cgalBigO{n^3} space in the worst case. The function `approx_convex_partition_2()` implements the simple approximation algorithm of Hertel and Mehlhorn \cgalCite{hm-ftsp-83} that @@ -81,12 +81,12 @@ throwing out unnecessary triangulation edges. The triangulation used in this function is one produced by the 2-dimensional constrained triangulation package of \cgal. For a given triangulation, this convex partitioning -algorithm requires \f$ O(n)\f$ time and space to construct a decomposition into +algorithm requires \cgalBigO{n} time and space to construct a decomposition into no more than four times the optimal number of convex pieces. The sweep-line approximation algorithm of Greene \cgalCite{g-dpcp-83}, which, given a monotone partition of a polygon, produces a convex partition in -\f$ O(n \log n)\f$ time and \f$ O(n)\f$ space, is implemented +\cgalBigO{n \log n} time and \cgalBigO{n} space, is implemented by the function `greene_approx_convex_partition_2()`. The function `y_monotone_partition_2()` described in Section \ref secpartition_2_monotone is used to produce the monotone diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h index b95c3c7f607..bd100faf015 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -28,19 +28,19 @@ CGAL::Triangulation_data_structure_2< \cgalHeading{Implementation} Insertion is implemented by inserting in the triangulation, then -performing a sequence of Delaunay flips. The number of flips is \f$ O(d)\f$ +performing a sequence of Delaunay flips. The number of flips is \cgalBigO{d} if the new vertex is of degree \f$ d\f$ in the new triangulation. For -points distributed uniformly at random, insertion takes time \f$ O(1)\f$ on +points distributed uniformly at random, insertion takes time \cgalBigO{1} on average. Removal calls the removal in the triangulation and then re-triangulates the hole in such a way that the Delaunay criterion is -satisfied. Removal of a vertex of degree \f$ d\f$ takes time \f$ O(d^2)\f$. The -expected degree \f$ d\f$ is \f$ O(1)\f$ for a random vertex in the +satisfied. Removal of a vertex of degree \f$ d\f$ takes time \cgalBigO{d^2}. The +expected degree \f$ d\f$ is \cgalBigO{1} for a random vertex in the triangulation. After a point location step, the nearest neighbor is found in time -\f$ O(n)\f$ in the worst case, but in expected time \f$ O(1)\f$ on average for +\cgalBigO{n} in the worst case, but in expected time \cgalBigO{1} on average for vertices distributed uniformly at random and any query point. \sa `CGAL::Periodic_2_triangulation_2` diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h index af9757a095f..1689f5187bc 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h @@ -55,7 +55,7 @@ optional parameter is given). Insertion of a point is done by locating a face that contains the point, and then splitting this face. Apart from the location, -insertion takes a time \f$ O(1)\f$. +insertion takes a time \cgalBigO{1}. Removal of a vertex is more difficult than in the Euclidean space, since the star of a vertex may not be disjoint from the star of a diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h index b737a7a6edc..1232e426aed 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -208,7 +208,7 @@ public: insert(InputIterator first, InputIterator last, bool is_large_point_set = true, std::enable_if_t < - boost::is_convertible < + std::is_convertible < typename std::iterator_traits::value_type, Point >::value >* = nullptr) @@ -420,7 +420,7 @@ public: InputIterator last, bool is_large_point_set = true, std::enable_if_t < - boost::is_convertible < + std::is_convertible < typename std::iterator_traits::value_type, std::pair::type> >::value >* = nullptr @@ -436,8 +436,8 @@ public: bool is_large_point_set = true, std::enable_if_t < boost::mpl::and_ < - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + std::is_convertible< typename std::iterator_traits::value_type, Point >, + std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* = nullptr) { return insert_with_info< boost::tuple::type> >(first, last, is_large_point_set); diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index bf479baf399..c851268390e 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -3141,7 +3141,7 @@ repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out) // `check_and_repopulate_edges()::vertices` before it is passed itself // to `repopulate_edges_around_corner()`. if(c3t3_.is_in_complex(to_repopulate.back())) - std::copy(to_repopulate.begin(), boost::prior(to_repopulate.end()), out); + std::copy(to_repopulate.begin(), std::prev(to_repopulate.end()), out); else std::copy(to_repopulate.begin(), to_repopulate.end(), out); diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h index 3e806a7ba50..7eed15886cd 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h @@ -909,7 +909,7 @@ public: std::cout << "four offsets: " << std::endl; #endif - boost::array offsets; + std::array offsets; for(int i=0; i<4; ++i) { #ifdef CGAL_PERIODIC_SET_POINT_VERBOSE diff --git a/Point_set_3/doc/Point_set_3/Point_set_3.txt b/Point_set_3/doc/Point_set_3/Point_set_3.txt index 449e557d88e..51365998882 100644 --- a/Point_set_3/doc/Point_set_3/Point_set_3.txt +++ b/Point_set_3/doc/Point_set_3/Point_set_3.txt @@ -117,7 +117,7 @@ For example, if the following line is found in the PLY header: > property uchar red -Then a property named `red` and with type `boost::uint8_t` (`boost` +Then a property named `red` and with type `std::uint8_t` (`boost` types are used because of their fixed memory size) will be instantiated in the point set and filled with the corresponding values. diff --git a/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp b/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp index 01add66acb1..f0ecd03904f 100644 --- a/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp +++ b/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp @@ -32,9 +32,9 @@ int main (int argc, char** argv) std::cerr << " * " << properties[i] << std::endl; // Recover "label" property of type int - Point_set::Property_map label_prop; + Point_set::Property_map label_prop; bool found = false; - boost::tie(label_prop, found) = point_set.property_map ("label"); + boost::tie(label_prop, found) = point_set.property_map ("label"); if(found) { diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 2d0f2083dcc..70cd87aee04 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -48,7 +48,7 @@ namespace internal { #ifdef CGAL_POINT_SET_3_USE_STD_SIZE_T_AS_SIZE_TYPE typedef std::size_t size_type; #else - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; #endif typedef CGAL::Point_set_3 Point_set_3; diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h index 58b9d8b9d99..67aa82e161c 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h @@ -118,40 +118,40 @@ public: continue; } - if(dynamic_cast*>(property)) + if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } else if(dynamic_cast*>(property)) @@ -456,14 +456,14 @@ bool write_PLY(std::ostream& os, typedef typename Point_set::Index Index; typedef typename Point_set::Point_map Point_map; typedef typename Point_set::Vector_map Vector_map; - typedef typename Point_set::template Property_map Int8_map; - typedef typename Point_set::template Property_map Uint8_map; - typedef typename Point_set::template Property_map Int16_map; - typedef typename Point_set::template Property_map Uint16_map; - typedef typename Point_set::template Property_map Int32_map; - typedef typename Point_set::template Property_map Uint32_map; - typedef typename Point_set::template Property_map Int64_map; - typedef typename Point_set::template Property_map Uint64_map; + typedef typename Point_set::template Property_map Int8_map; + typedef typename Point_set::template Property_map Uint8_map; + typedef typename Point_set::template Property_map Int16_map; + typedef typename Point_set::template Property_map Uint16_map; + typedef typename Point_set::template Property_map Int32_map; + typedef typename Point_set::template Property_map Uint32_map; + typedef typename Point_set::template Property_map Int64_map; + typedef typename Point_set::template Property_map Uint64_map; typedef typename Point_set::template Property_map Float_map; typedef typename Point_set::template Property_map Double_map; @@ -541,7 +541,7 @@ bool write_PLY(std::ostream& os, bool okay = false; { Int8_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property char " << prop[i] << std::endl; @@ -551,7 +551,7 @@ bool write_PLY(std::ostream& os, } { Uint8_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uchar " << prop[i] << std::endl; @@ -561,7 +561,7 @@ bool write_PLY(std::ostream& os, } { Int16_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property short " << prop[i] << std::endl; @@ -571,7 +571,7 @@ bool write_PLY(std::ostream& os, } { Uint16_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property ushort " << prop[i] << std::endl; @@ -581,7 +581,7 @@ bool write_PLY(std::ostream& os, } { Int32_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property int " << prop[i] << std::endl; @@ -591,7 +591,7 @@ bool write_PLY(std::ostream& os, } { Uint32_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uint " << prop[i] << std::endl; @@ -601,21 +601,21 @@ bool write_PLY(std::ostream& os, } { Int64_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property int " << prop[i] << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); + printers.push_back(new internal::Simple_property_printer(pmap)); continue; } } { Uint64_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uint " << prop[i] << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); + printers.push_back(new internal::Simple_property_printer(pmap)); continue; } } diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h index bd0281cd9d7..9c2c5885fec 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h @@ -45,8 +45,6 @@ #include #include -#include -#include #include /*! @@ -381,7 +379,7 @@ public: InputIterator beyond, ///< past-the-end iterator over the input points. NormalPMap normal_pmap, ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point). std::enable_if_t< - boost::is_convertible::value_type, Point>::value + std::is_convertible::value_type, Point>::value >* = 0 ) : m_tr(new Triangulation), m_bary(new std::vector) diff --git a/Polygon/include/CGAL/Polygon_2_algorithms.h b/Polygon/include/CGAL/Polygon_2_algorithms.h index 8233269217a..a66bff191bf 100644 --- a/Polygon/include/CGAL/Polygon_2_algorithms.h +++ b/Polygon/include/CGAL/Polygon_2_algorithms.h @@ -231,7 +231,7 @@ bool is_convex_2(ForwardIterator first, /// /// The simplicity test is implemented by means of a plane sweep algorithm. /// The algorithm is quite robust when used with inexact number types. -/// The running time is `O(n log n)`, where n is the number of vertices of the +/// The running time is \cgalBigO{n log n}, where n is the number of vertices of the /// polygon. /// /// \sa `PolygonTraits_2` diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index 8d541588736..00ccfd382f6 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt @@ -543,8 +543,8 @@ This can allow a user to stop the algorithm if a timeout needs to be implemented The hole filling algorithm has a complexity which depends on the number of vertices. While \cgalCite{liepa2003filling} has a running -time of \f$ O(n^3)\f$ , \cgalCite{zou2013algorithm} in most cases has -running time of \f$ O(n \log n)\f$. We benchmarked the function +time of \cgalBigO{n^3} , \cgalCite{zou2013algorithm} in most cases has +running time of \cgalBigO{n \log n}. We benchmarked the function `triangulate_refine_and_fair_hole()` for the two meshes below (as well as two more meshes with smaller holes). The machine used was a PC running Windows 10 with an Intel Core i7 CPU clocked at 2.70 GHz. diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 988e6c3a7ee..f37105cd6e6 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -721,7 +721,7 @@ bool clip(TriangleMesh& tm, using params::get_parameter; using params::choose_parameter; - if(boost::begin(faces(tm))==boost::end(faces(tm))) return true; + if(std::begin(faces(tm))==std::end(faces(tm))) return true; CGAL::Bbox_3 bbox = ::CGAL::Polygon_mesh_processing::bbox(tm); @@ -831,7 +831,7 @@ bool clip(TriangleMesh& tm, using params::get_parameter; using params::choose_parameter; - if(boost::begin(faces(tm))==boost::end(faces(tm))) return true; + if(std::begin(faces(tm))==std::end(faces(tm))) return true; TriangleMesh clipper; make_hexahedron(iso_cuboid[0], iso_cuboid[1], iso_cuboid[2], iso_cuboid[3], diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index 21024ad5c04..85c78461d73 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -155,10 +155,10 @@ double max_distance_to_mesh_impl(const PointRange& sample_points, using FT = typename Kernel::FT; #if !defined(CGAL_LINKED_WITH_TBB) - static_assert (!(boost::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else - if(boost::is_convertible::value) + if(std::is_convertible::value) { Distance_computation f(tree, hint, sample_points); tbb::parallel_reduce(tbb::blocked_range(0, sample_points.size()), f); @@ -481,8 +481,8 @@ struct Triangle_structure_sampler_for_triangle_mesh void sample_points() { Property_map_to_unary_function unary(pmap); - this->out = std::copy(boost::make_transform_iterator(boost::begin(vertices(tm)), unary), - boost::make_transform_iterator(boost::end(vertices(tm)), unary), + this->out = std::copy(boost::make_transform_iterator(std::begin(vertices(tm)), unary), + boost::make_transform_iterator(std::end(vertices(tm)), unary), this->out); } @@ -1995,8 +1995,8 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator& out) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - static_assert(!(boost::is_convertible::value), - "Parallel_tag is enabled but at least TBB or METIS is unavailable."); + static_assert(!std::is_convertible::value, + "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif using FT = typename Kernel::FT; @@ -2053,7 +2053,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 std::cout << "* num cores: " << nb_cores << std::endl; #endif - if(boost::is_convertible::value && + if(std::is_convertible::value && nb_cores > 1 && faces(tm1).size() >= min_nb_faces_to_split) { @@ -2207,7 +2207,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 #endif #if defined(CGAL_LINKED_WITH_TBB) && defined(CGAL_METIS_ENABLED) && defined(USE_PARALLEL_BEHD) - if(boost::is_convertible::value && + if(std::is_convertible::value && nb_cores > 1 && faces(tm1).size() >= min_nb_faces_to_split) { @@ -2270,8 +2270,8 @@ bounded_error_squared_symmetric_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator2& out2) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - static_assert(!(boost::is_convertible::value), - "Parallel_tag is enabled but at least TBB or METIS is unavailable."); + static_assert(!std::is_convertible::value, + "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif // Optimized version. diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index ee3d3159491..7d9a37385f8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -18,8 +18,6 @@ #include #include -#include -#include #include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h index 38f137cad01..c6f64c98322 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h @@ -17,7 +17,6 @@ #include -#include #include namespace CGAL { @@ -31,7 +30,7 @@ template ::value_type >::Kernel::FT diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h index b2047d2627e..a67631290d5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h @@ -243,9 +243,9 @@ struct Intersect_coplanar_faces_3 CGAL_assertion_code(int pt_added=0;) - Inter_pt_info* prev = &(*boost::prior(inter_pts.end())); + Inter_pt_info* prev = &(*std::prev(inter_pts.end())); bool inter_pts_size_g_2 = inter_pts.size() > 2; - Iterator stop = inter_pts_size_g_2 ? inter_pts.end() : boost::prior(inter_pts.end()); + Iterator stop = inter_pts_size_g_2 ? inter_pts.end() : std::prev(inter_pts.end()); for (Iterator it=inter_pts.begin();it!=stop;++it) { Inter_pt_info* curr=&(*it); @@ -253,7 +253,7 @@ struct Intersect_coplanar_faces_3 Orientation or_prev=orientations[prev],or_curr=orientations[curr]; if ( (or_prev==POSITIVE && or_curr==NEGATIVE) || (or_prev==NEGATIVE && or_curr==POSITIVE) ) { - Iterator it_curr = inter_pts_size_g_2 ? it:boost::next(it); + Iterator it_curr = inter_pts_size_g_2 ? it:std::next(it); prev=&(* inter_pts.insert( it_curr,operator()(*prev,*curr,h1,h2) ) ); orientations[prev]=COLLINEAR; CGAL_assertion_code(++pt_added;) @@ -278,7 +278,7 @@ struct Intersect_coplanar_faces_3 { if (orientations[&(*it)]==NEGATIVE){ inter_pts.erase(it++); - if (--nb_interpt == 2 && it!=inter_pts.end() && boost::next(it)==inter_pts.end()) should_revert_list=true; + if (--nb_interpt == 2 && it!=inter_pts.end() && std::next(it)==inter_pts.end()) should_revert_list=true; } else ++it; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 2c33bde8697..ce906b5c954 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1555,8 +1555,8 @@ triangulate_hole_polyline(const PointRange1& points, #endif typedef CGAL::internal::Triangulate_hole_polyline Fill; - std::vector P(boost::begin(points), boost::end(points)); - std::vector Q(boost::begin(third_points), boost::end(third_points)); + std::vector P(std::begin(points), std::end(points)); + std::vector Q(std::begin(third_points), std::end(third_points)); if(P.front() != P.back()){ P.push_back(P.front()); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h index 3271879dc64..1cfce7e81d9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h @@ -50,7 +50,7 @@ class Filtered_projection_traits typedef typename boost::property_traits::value_type Index_type; - typedef std::set::type> Set_of_indices; + typedef std::set> Set_of_indices; public: template diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 9cdb76ac76b..72ef49c3996 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -156,15 +156,15 @@ namespace internal { template bool same_range(const Range& r1, const Range& r2) { - return boost::begin(r1)==boost::begin(r2) && - boost::end(r1)==boost::end(r2); + return std::begin(r1)==std::begin(r2) && + std::end(r1)==std::end(r2); } template bool same_range(const Range1& r1, const Range2& r2) { - return std::distance(boost::begin(r1), boost::end(r1)) == - std::distance(boost::begin(r2), boost::end(r2)); + return std::distance(std::begin(r1), std::end(r1)) == + std::distance(std::begin(r2), std::end(r2)); } public: diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h index dac9b2d57fc..3de4f3fe12f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h @@ -122,8 +122,8 @@ public: return false; } - std::set interior_vertices(boost::begin(vertices), - boost::end(vertices)); + std::set interior_vertices(std::begin(vertices), + std::end(vertices)); if(interior_vertices.empty()) { return true; } #ifdef CGAL_PMP_FAIR_DEBUG diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h index 98a80e05a8e..29c756b9888 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h @@ -306,7 +306,7 @@ public: double alpha) { // do not use just std::set, the order effects the output (for the same input we want to get same output) - std::set interior_map(boost::begin(faces), boost::end(faces)); + std::set interior_map(std::begin(faces), std::end(faces)); // store boundary edges - to be used in relax std::set border_edges; @@ -325,7 +325,7 @@ public: std::map scale_attribute; calculate_scale_attribute(faces, interior_map, scale_attribute, accept_internal_facets); - std::vector all_faces(boost::begin(faces), boost::end(faces)); + std::vector all_faces(std::begin(faces), std::end(faces)); #ifdef CGAL_PMP_REFINE_DEBUG CGAL::Timer total_timer; total_timer.start(); #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h index d4fc6d730e4..26e205ea43d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -415,8 +415,8 @@ compute_face_face_intersection(const FaceRange& face_range1, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range1), boost::end(face_range1))); - boxes2.reserve(std::distance(boost::begin(face_range2), boost::end(face_range2))); + boxes1.reserve(std::distance(std::begin(face_range1), std::end(face_range1))); + boxes2.reserve(std::distance(std::begin(face_range2), std::end(face_range2))); typedef typename GetVertexPointMap::const_type VertexPointMap1; typedef typename GetVertexPointMap::const_type VertexPointMap2; @@ -548,7 +548,7 @@ compute_face_polyline_intersection(const FaceRange& face_range, typename boost::range_value::type>::value)); std::vector faces; - faces.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); + faces.reserve(std::distance(std::begin(face_range), std::end(face_range))); typedef CGAL::Box_intersection_d::ID_FROM_BOX_ADDRESS Box_policy; typedef CGAL::Box_intersection_d::Box_with_info_d Box; @@ -556,8 +556,8 @@ compute_face_polyline_intersection(const FaceRange& face_range, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); - boxes2.reserve(std::distance(boost::begin(polyline), boost::end(polyline)) - 1); + boxes1.reserve(std::distance(std::begin(face_range), std::end(face_range))); + boxes2.reserve(std::distance(std::begin(polyline), std::end(polyline)) - 1); for(face_descriptor f : face_range) { @@ -684,7 +684,7 @@ compute_face_polylines_intersection(const FaceRange& face_range, static_assert(std::is_same::type>::value); std::vector faces; - faces.reserve(std::distance( boost::begin(face_range), boost::end(face_range) )); + faces.reserve(std::distance( std::begin(face_range), std::end(face_range) )); typedef CGAL::Box_intersection_d::ID_FROM_BOX_ADDRESS Box_policy; typedef CGAL::Box_intersection_d::Box_with_info_d, Box_policy> Box; @@ -692,12 +692,12 @@ compute_face_polylines_intersection(const FaceRange& face_range, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); + boxes1.reserve(std::distance(std::begin(face_range), std::end(face_range))); std::size_t polylines_size = 0; for(Polyline poly : polyline_range) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; } boxes2.reserve(polylines_size); @@ -707,11 +707,11 @@ compute_face_polylines_intersection(const FaceRange& face_range, boxes1.push_back(Box(Polygon_mesh_processing::face_bbox(f, tm), std::make_pair(0, faces.size()-1))); } - std::size_t range_size = std::distance( boost::begin(polyline_range), boost::end(polyline_range) ); + std::size_t range_size = std::distance( std::begin(polyline_range), std::end(polyline_range) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polyline_range[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { Point p1 = poly[i]; @@ -785,8 +785,8 @@ compute_polyline_polyline_intersection(const Polyline& polyline1, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(polyline1), boost::end(polyline1)) - 1); - boxes2.reserve(std::distance(boost::begin(polyline2), boost::end(polyline2)) - 1); + boxes1.reserve(std::distance(std::begin(polyline1), std::end(polyline1)) - 1); + boxes2.reserve(std::distance(std::begin(polyline2), std::end(polyline2)) - 1); for(std::size_t i =0; i< polyline1.size()-1; ++i) { @@ -870,7 +870,7 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, CGAL::Bbox_3 b1, b2; for(Polyline poly : polylines1) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; b1 += CGAL::bbox_3(poly.begin(), poly.end()); } boxes1.reserve( polylines_size ); @@ -878,7 +878,7 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, polylines_size = 0; for(Polyline poly : polylines2) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; b2 += CGAL::bbox_3(poly.begin(), poly.end()); } boxes2.reserve(polylines_size); @@ -886,11 +886,11 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, if(!CGAL::do_overlap(b1,b2)) return out; - std::size_t range_size = std::distance( boost::begin(polylines1), boost::end(polylines1) ); + std::size_t range_size = std::distance( std::begin(polylines1), std::end(polylines1) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polylines1[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { const Point& p1 = poly[i]; @@ -899,11 +899,11 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, } } - range_size = std::distance( boost::begin(polylines2), boost::end(polylines2) ); + range_size = std::distance( std::begin(polylines2), std::end(polylines2) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polylines2[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { const Point& p1 = poly[i]; @@ -1147,7 +1147,7 @@ bool do_intersect(const PolylineRange& polylines1, typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type >::type + std::false_type >::type >::value >* = 0//end enable_if #endif @@ -1194,7 +1194,7 @@ bool do_intersect(const Polyline& polyline1, typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type + std::false_type >::type >::value >* = 0//end enable_if @@ -1365,7 +1365,7 @@ bool do_intersect(const TriangleMesh& tm, typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type + std::false_type >::type >::value >* = 0//end enable_if @@ -1435,7 +1435,7 @@ bool do_intersect(const TriangleMesh& tm, typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type + std::false_type >::type >::type // not a range of a range >::value diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h index af70795b209..85d5d7428a4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h @@ -222,7 +222,7 @@ void merge_vertices_in_range(const HalfedgeRange& sorted_hedges, typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - halfedge_descriptor in_h_kept = *boost::begin(sorted_hedges); + halfedge_descriptor in_h_kept = *std::begin(sorted_hedges); halfedge_descriptor out_h_kept = next(in_h_kept, pm); vertex_descriptor v_kept = target(in_h_kept, pm); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h index a7e9cf2480a..c2f32374480 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h @@ -215,8 +215,8 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange }; #if !defined(CGAL_LINKED_WITH_TBB) - static_assert (!(std::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else if(std::is_convertible::value) tbb::parallel_for(std::size_t(0), faces.size(), std::size_t(1), process_facet); @@ -352,10 +352,10 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re }; #if !defined(CGAL_LINKED_WITH_TBB) - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else - if (boost::is_convertible::value) + if (std::is_convertible::value) tbb::parallel_for(std::size_t(0), triangles.size(), std::size_t(1), process_facet); else #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index df32555bc53..5e829a15c64 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -197,7 +197,7 @@ bool is_polygon_soup_a_polygon_mesh(const PolygonRange& polygons) typedef typename boost::range_value::type Polygon; typedef typename boost::range_value::type V_ID; - if(boost::begin(polygons) == boost::end(polygons)) + if(std::begin(polygons) == std::end(polygons)) return true; //check there is no duplicated ordered edge, and @@ -213,7 +213,7 @@ bool is_polygon_soup_a_polygon_mesh(const PolygonRange& polygons) return false; polygon_vertices.clear(); - V_ID prev = *std::prev(boost::end(polygon)); + V_ID prev = *std::prev(std::end(polygon)); for(V_ID id : polygon) { if(max_idbuild(); m_aabb_trees[id] = t; m_traversal_traits[id] = Traversal_traits(m_aabb_trees[id]->traits()); @@ -600,7 +600,7 @@ public: } } // only one CC - points.push_back( get(vpm, *boost::begin(vertices(tm))) ); + points.push_back( get(vpm, *std::begin(vertices(tm))) ); } /*! diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp index 935c9525faa..e8e28c9c2bd 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp @@ -93,7 +93,7 @@ void test_intersections(Index index, const char* type) collision_detection.add_mesh(tm1, params::face_index_map(get(index, tm1))); // 0 // add tm1 using an external tree typename CGAL::Rigid_triangle_mesh_collision_detection::AABB_tree - tm1_tree(boost::begin(faces(tm1)), boost::end(faces(tm1)), tm1); + tm1_tree(std::begin(faces(tm1)), std::end(faces(tm1)), tm1); collision_detection.add_mesh(tm1_tree, tm1, params::face_index_map(get(index, tm1))); // 1 small_spheres collision_detection.add_mesh(tm2, params::face_index_map(get(index, tm2))); // 2 blobby collision_detection.add_mesh(tm3, params::face_index_map(get(index, tm3))); // 3 large_cube_coplanar diff --git a/Polyhedron/demo/Polyhedron/Plugins/Alpha_wrap_3/Alpha_wrap_3_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Alpha_wrap_3/Alpha_wrap_3_plugin.cpp index bb686a60f98..a105d1ba12e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Alpha_wrap_3/Alpha_wrap_3_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Alpha_wrap_3/Alpha_wrap_3_plugin.cpp @@ -10,7 +10,6 @@ #include "Scene_points_with_normal_item.h" #include -#include #include #include @@ -20,6 +19,8 @@ #include #include #include +#include +#include #include #include @@ -31,44 +32,85 @@ #include "ui_alpha_wrap_3_dialog.h" +using TS_Oracle = CGAL::Alpha_wraps_3::internal::Triangle_soup_oracle; +using SS_Oracle = CGAL::Alpha_wraps_3::internal::Segment_soup_oracle; +using Oracle = CGAL::Alpha_wraps_3::internal::Point_set_oracle; +using Wrapper = CGAL::Alpha_wraps_3::internal::Alpha_wrap_3; + +// Here is the pipeline for the interruption box: +// - The main window is connected to a wrapping thread, which performs the wrapping. +// - The wrapping has a visitor, AW3_interrupter_visitor, which has a shared_ptr to a Boolean +// - When the user clicks the box, the Boolean is switched to *false*, and the visitor throws +// - The wrapping thread catches the exception, and creates the wip mesh + +// Here is the pipeline for the iterative visualization: +// - The main window is connected to a wrapping thread, which performs the wrapping. +// - The wrapping has a visitor, Iterative_AW3_visualization_visitor +// - The visitor has a shared pointer to an emiter (can't emit directly from the visitor) +// - The visitor has shared pointers to a polygon soup (+ colors), which it updates itself +// before emitting a signal +// - There is a pause in the emition because it needs to wait for the main thread to draw the +// polygon soup before the visitor updates the polygon soup. + +struct Iterative_update_emiter + : public QObject +{ + Q_OBJECT + +public: + void emit_new_iteration(int sid) + { + Q_EMIT new_iteration(sid); + CGAL::Three::Three::getMutex()->lock(); + Three::getWaitCondition()->wait(CGAL::Three::Three::getMutex()); + CGAL::Three::Three::getMutex()->unlock(); + } + + void emit_last_iteration(int sid) + { + // Last iteration only updates the (existing) soup item's properties, but there is no change + // in geometry, so there is no need to wait for the main thread to update the main window. + Q_EMIT last_iteration(sid); + } + +Q_SIGNALS: + void new_iteration(int); + void last_iteration(int sid); +}; + struct Iterative_AW3_visualization_visitor + : public CGAL::Alpha_wraps_3::internal::Wrapping_default_visitor { private: - bool m_do_snapshot; - Scene_polygon_soup_item* m_iterative_wrap_item = nullptr; + const bool visualize_iterations; + + std::shared_ptr > points; + std::shared_ptr > > faces; + std::shared_ptr > fcolors; + std::shared_ptr > vcolors; + std::shared_ptr emiter; int sid = 0; public: - template - Iterative_AW3_visualization_visitor(Scene* scene, - const bool visualize_iterations, - const bool do_snapshot) - : m_do_snapshot(do_snapshot) - { - if(!visualize_iterations) - return; - - m_iterative_wrap_item = new Scene_polygon_soup_item(); - m_iterative_wrap_item->setName(QString("Iterative wrap")); - scene->addItem(m_iterative_wrap_item); - } - -public: - template - void on_alpha_wrapping_begin(const AlphaWrapper&) { } - - template - void on_flood_fill_begin(const AlphaWrapper&) { } - - template - void before_facet_treatment(const AlphaWrapper&, - const Facet&) { } + Iterative_AW3_visualization_visitor(const bool visualize_iterations, + std::shared_ptr > points, + std::shared_ptr > > faces, + std::shared_ptr > fcolors, + std::shared_ptr > vcolors, + std::shared_ptr emiter) + : visualize_iterations(visualize_iterations), + points(points), faces(faces), fcolors(fcolors), vcolors(vcolors), + emiter(emiter) + { } template void before_Steiner_point_insertion(const AlphaWrapper& wrapper, const Point& /* p */) { - if(m_iterative_wrap_item == nullptr) + if(!visualize_iterations) + return; + + if(!points || !faces || !fcolors || !vcolors) return; // If the next top of the queue has vertices on the bbox, don't draw (as to avoid producing @@ -82,18 +124,20 @@ public: return; // Extract the wrap as a triangle soup + points->clear(); + faces->clear(); + fcolors->clear(); + vcolors->clear(); using Dt = typename std::decay::type; using Vertex_handle = typename Dt::Vertex_handle; using Facet = typename Dt::Facet; using Cell_handle = typename Dt::Cell_handle; - std::vector points; - std::vector > faces; - std::unordered_map vertex_to_id; std::size_t nv = 0; +#if 0 // This is used to compute colors depending on what is old and what is new. // It is not currently used (a uniform gray color is used), but leaving it as it might be useful. std::size_t min_time_stamp = -1, max_time_stamp = 0; @@ -104,9 +148,7 @@ public: if(cit->time_stamp() < min_time_stamp) min_time_stamp = cit->time_stamp(); } - - std::vector vcolors; - std::vector fcolors; +#endif for(auto fit=wrapper.triangulation().finite_facets_begin(), fend=wrapper.triangulation().finite_facets_end(); fit!=fend; ++fit) { @@ -127,85 +169,143 @@ public: auto insertion_res = vertex_to_id.emplace(vh, nv); if(insertion_res.second) // successful insertion, never-seen-before vertex { - points.push_back(wrapper.triangulation().point(vh)); - vcolors.push_back(CGAL::IO::Color(0, 0, 0)); + points->push_back(wrapper.triangulation().point(vh)); + vcolors->push_back(CGAL::IO::Color(0, 0, 0)); ++nv; } ids[pos] = insertion_res.first->second; } - faces.emplace_back(std::vector{ids[0], ids[1], ids[2]}); + faces->emplace_back(std::vector{ids[0], ids[1], ids[2]}); + +#if 0 double color_val = double(c->time_stamp() - min_time_stamp) / double(max_time_stamp - min_time_stamp); - color_val = int(256. * color_val); - - // fcolors.push_back(CGAL::IO::Color(color_val, 10, 150)); // young is red, old is blue + color_val = int(256. * color_val); + fcolors.push_back(CGAL::IO::Color(color_val, 10, 150)); // young is red, old is blue // fcolors.push_back(CGAL::IO::Color(256 - color_val, 256 - color_val, 256 - color_val)); // young is light, old is dark - fcolors.push_back(CGAL::IO::Color(100, 100, 100)); // uniform darkish gray +#endif + fcolors->push_back(CGAL::IO::Color(100, 100, 100)); // uniform darkish gray } - // Update the wrap item's visualization - m_iterative_wrap_item->load(points, faces, fcolors, vcolors); - m_iterative_wrap_item->setName(QString("Iterative wrap #%1").arg(sid)); - m_iterative_wrap_item->setAlpha(255 / 2); - - m_iterative_wrap_item->invalidateOpenGLBuffers(); - m_iterative_wrap_item->redraw(); - m_iterative_wrap_item->itemChanged(); - - // Refresh the view - QApplication::processEvents(); - - if(m_do_snapshot) - { - std::stringstream oss; - oss << "Wrap_iteration-" << sid << ".png" << std::ends; - QString filename = QString::fromStdString(oss.str().c_str()); - - CGAL::Three::Viewer_interface* viewer = CGAL::Three::Three::activeViewer(); - viewer->saveSnapshot(filename, 1920, 1080, true /*expand*/, 2.0 /*oversampling*/); - } - - ++sid; + emiter->emit_new_iteration(sid++); } - template - void after_Steiner_point_insertion(const AlphaWrapper&, - const VertexHandle) { } - - template - void on_flood_fill_end(const AlphaWrapper&) { } - template void on_alpha_wrapping_end(const AlphaWrapper&) { - if(m_iterative_wrap_item == nullptr) + if(!visualize_iterations) return; - m_iterative_wrap_item->setName(QString("Iterative wrap #%1").arg(sid)); + emiter->emit_last_iteration(sid); + } +}; - m_iterative_wrap_item->setAlpha(255); - m_iterative_wrap_item->invalidateOpenGLBuffers(); - m_iterative_wrap_item->redraw(); - m_iterative_wrap_item->itemChanged(); +// Use a throw to get out of the AW3 refinement loop +class Out_of_patience_exception : public std::exception { }; - QApplication::processEvents(); +template +struct AW3_interrupter_visitor + : BaseVisitor +{ + // shared pointer because visitors are copied + std::shared_ptr should_stop = std::make_shared(false); - if(m_do_snapshot) + AW3_interrupter_visitor(const BaseVisitor base) + : BaseVisitor(base) + { } + + // Only overload this one because it gives a better state of the wrap (for other visitor calls, + // we often get tetrahedral spikes because there are artificial gates in the queue) + template + void before_Steiner_point_insertion(const Wrapper& wrapper, const Point& p) + { + if(*should_stop) + throw Out_of_patience_exception(); + + return BaseVisitor::before_Steiner_point_insertion(wrapper, p); + } +}; + +struct Wrapper_thread + : public QThread +{ + Q_OBJECT + + using Visitor = AW3_interrupter_visitor; + +public: + Wrapper wrapper; + const Oracle oracle; + const double alpha, offset; + const bool enforce_manifoldness; + Visitor visitor; + + SMesh wrap; + + QTimer* timer; + +public: + Wrapper_thread(const Oracle& oracle, + const double alpha, + const double offset, + const bool enforce_manifoldness, + Visitor visitor) + : wrapper(oracle), + alpha(alpha), offset(offset), + enforce_manifoldness(enforce_manifoldness), + visitor(visitor), + timer(new QTimer(this)) + { + connect(timer, SIGNAL(timeout()), + this, SLOT(emit_status())); + + timer->start(1000); + } + + ~Wrapper_thread() + { + delete timer; + } + + void run() override + { + QElapsedTimer elapsed_timer; + elapsed_timer.start(); + + // try-catch because the stop visitor currently uses a throw + try { - std::stringstream oss; - oss << "Wrap_iteration-" << sid << ".png" << std::ends; - QString filename = QString::fromStdString(oss.str().c_str()); + wrapper(alpha, offset, wrap, + CGAL::parameters::do_enforce_manifoldness(enforce_manifoldness) + .visitor(visitor)); - CGAL::Three::Viewer_interface* viewer = CGAL::Three::Three::activeViewer(); - viewer->saveSnapshot(filename); + Q_EMIT done(this); + } + catch(const Out_of_patience_exception&) + { + if(enforce_manifoldness) + wrapper.make_manifold(); + + // extract the wrap in its current state + wrapper.extract_surface(wrap, CGAL::get(CGAL::vertex_point, wrap), !enforce_manifoldness); + + Q_EMIT interrupted(this); } - m_iterative_wrap_item->setVisible(false); - - // Refresh the view - QApplication::processEvents(); + std::cout << "Wrapping took " << elapsed_timer.elapsed() / 1000. << "s" << std::endl; } + +public Q_SLOTS: + void emit_status() + { + Q_EMIT status_report(QString("%1 vertices").arg(wrapper.triangulation().number_of_vertices())); + } + +Q_SIGNALS: + void interrupted(Wrapper_thread*); + void done(Wrapper_thread*); + void status_report(QString); }; class Polyhedron_demo_alpha_wrap_3_plugin @@ -220,17 +320,24 @@ class Polyhedron_demo_alpha_wrap_3_plugin using Segments = std::vector; using Points = std::vector; - using TS_Oracle = CGAL::Alpha_wraps_3::internal::Triangle_soup_oracle; - using SS_Oracle = CGAL::Alpha_wraps_3::internal::Segment_soup_oracle; - using Oracle = CGAL::Alpha_wraps_3::internal::Point_set_oracle; - private: - CGAL::Bbox_3 wrap_bbox; - double wrap_bbox_diag_length; + CGAL::Bbox_3 m_wrap_bbox; + double m_wrap_bbox_diag_length; - QAction* actionAlpha_wrap_3_; + QAction* actionAlpha_wrap_3_ = nullptr; Ui::alpha_wrap_3_dialog ui; + // GUI for the interruption + QMessageBox* m_message_box = nullptr; + + // storage of intermediate wraps for iterative visualization + std::shared_ptr > m_iter_points; + std::shared_ptr > > m_iter_faces; + std::shared_ptr > m_iter_fcolors; + std::shared_ptr > m_iter_vcolors; + Scene_polygon_soup_item* m_iterative_wrap_item = nullptr; + bool m_do_snapshot = false; + public: void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, @@ -241,26 +348,30 @@ public: actionAlpha_wrap_3_ = new QAction("3D Alpha Wrapping", this->mw); if(actionAlpha_wrap_3_) - connect(actionAlpha_wrap_3_, SIGNAL(triggered()), this, SLOT(on_actionAlpha_wrap_3_triggered())); + { + connect(actionAlpha_wrap_3_, SIGNAL(triggered()), + this, SLOT(on_actionAlpha_wrap_3_triggered())); + } } bool applicable(QAction*) const { + if(scene->selectionIndices().empty()) + return false; + Q_FOREACH(int index, scene->selectionIndices()) { - if(qobject_cast(scene->item(index))) - return true; - if(qobject_cast(scene->item(index))) - return true; - if(qobject_cast(scene->item(index))) - return true; - if(qobject_cast(scene->item(index))) - return true; - if(qobject_cast(scene->item(index))) - return true; + if(!qobject_cast(scene->item(index)) && + !qobject_cast(scene->item(index)) && + !qobject_cast(scene->item(index)) && + !qobject_cast(scene->item(index)) && + !qobject_cast(scene->item(index))) + { + return false; + } } - return false; + return true; } QList actions() const @@ -275,28 +386,29 @@ private: } public Q_SLOTS: + // This is UI stuff void on_alphaValue_changed(double) { QSignalBlocker block(ui.relativeAlphaValue); - ui.relativeAlphaValue->setValue(wrap_bbox_diag_length / ui.alphaValue->value()); + ui.relativeAlphaValue->setValue(m_wrap_bbox_diag_length / ui.alphaValue->value()); } void on_relativeAlphaValue_changed(double) { QSignalBlocker block(ui.alphaValue); - ui.alphaValue->setValue(wrap_bbox_diag_length / ui.relativeAlphaValue->value()); + ui.alphaValue->setValue(m_wrap_bbox_diag_length / ui.relativeAlphaValue->value()); } void on_offsetValue_changed(double) { QSignalBlocker block(ui.relativeOffsetValue); - ui.relativeOffsetValue->setValue(wrap_bbox_diag_length / ui.offsetValue->value()); + ui.relativeOffsetValue->setValue(m_wrap_bbox_diag_length / ui.offsetValue->value()); } void on_relativeOffsetValue_changed(double) { QSignalBlocker block(ui.offsetValue); - ui.offsetValue->setValue(wrap_bbox_diag_length / ui.relativeOffsetValue->value()); + ui.offsetValue->setValue(m_wrap_bbox_diag_length / ui.relativeOffsetValue->value()); } void update_iteration_snapshot_checkbox() @@ -304,6 +416,108 @@ public Q_SLOTS: ui.snapshotIterations->setCheckable(ui.visualizeIterations->isChecked()); } + // This is for the visualization + void update_iterative_wrap_item(int sid) + { + if(m_iterative_wrap_item == nullptr) + return; + + // Update the wrap item's visualization + m_iterative_wrap_item->load(*m_iter_points, *m_iter_faces, *m_iter_fcolors, *m_iter_vcolors); + m_iterative_wrap_item->setName(QString("Iterative wrap #%1").arg(sid)); + m_iterative_wrap_item->setAlpha(255 / 2); + m_iterative_wrap_item->setRenderingMode(FlatPlusEdges); + + m_iterative_wrap_item->invalidateOpenGLBuffers(); + m_iterative_wrap_item->redraw(); + m_iterative_wrap_item->itemChanged(); + + // Refresh the view + CGAL::Three::Viewer_interface* viewer = CGAL::Three::Three::activeViewer(); + viewer->update(); + + CGAL::Three::Three::getWaitCondition()->wakeAll(); + + if(m_do_snapshot) + { + std::stringstream oss; + oss << "Wrap_iteration-" << sid << ".png" << std::ends; + QString filename = QString::fromStdString(oss.str().c_str()); + + viewer->saveSnapshot(filename, 1920, 1080, true /*expand*/, 2.0 /*oversampling*/); + } + } + + void finish_iterative_wrap_item(int sid) + { + if(m_iterative_wrap_item == nullptr) + return; + + if(m_do_snapshot) + { + m_iterative_wrap_item->setName(QString("Iterative wrap #%1").arg(sid)); + + m_iterative_wrap_item->setAlpha(255); + m_iterative_wrap_item->invalidateOpenGLBuffers(); + m_iterative_wrap_item->redraw(); + m_iterative_wrap_item->itemChanged(); + + // Refresh the view + CGAL::Three::Viewer_interface* viewer = CGAL::Three::Three::activeViewer(); + viewer->update(); + + std::stringstream oss; + oss << "Wrap_iteration-" << sid << ".png" << std::ends; + QString filename = QString::fromStdString(oss.str().c_str()); + + viewer->saveSnapshot(filename); + } + + CGAL_assertion(m_iterative_wrap_item); + scene->erase(scene->item_id(m_iterative_wrap_item)); + } + + void reset_iterative_wrap_item() + { + m_iterative_wrap_item = nullptr; + } + + // This is for the message box and thread interruption + void wrapping_done(Wrapper_thread* wrapper_thread) + { + Scene_surface_mesh_item* wrap_item = new Scene_surface_mesh_item(std::move(wrapper_thread->wrap)); + wrap_item->setName(tr("Wrap with alpha %2 offset %3").arg(wrapper_thread->alpha) + .arg(wrapper_thread->offset)); + wrap_item->setColor(Qt::gray); + const int wrap_item_id = scene->addItem(wrap_item); + scene->setSelectedItem(wrap_item_id); + + wrapper_thread->terminate(); + wrapper_thread->wait(); + delete wrapper_thread; + + if(m_message_box) + { + m_message_box->done(0); + m_message_box = nullptr; + } + } + + // In case we wish to do something more one day + void wrapping_interrupted(Wrapper_thread* wrapper_thread) + { + wrapping_done(wrapper_thread); + } + + void status_report(const QString& msg) + { + if(m_message_box == nullptr) + return; + + m_message_box->setInformativeText(msg); + } + + // Main call void on_actionAlpha_wrap_3_triggered() { QDialog dialog(mw); @@ -341,7 +555,7 @@ public Q_SLOTS: boost::graph_traits::halfedge_descriptor h = halfedge(f, *pMesh); if(!is_triangle(h, *pMesh)) { - print_message("Warning: non-triangular face in input"); + print_message("Warning: a non-triangular face in input has been ignored"); continue; } @@ -349,7 +563,7 @@ public Q_SLOTS: get(vpm, target(next(h, *pMesh), *pMesh)), get(vpm, source(h, *pMesh))); - wrap_bbox += triangles.back().bbox(); + m_wrap_bbox += triangles.back().bbox(); } continue; @@ -365,7 +579,7 @@ public Q_SLOTS: { if(p.size() != 3) { - print_message("Warning: non-triangular face in input"); + print_message("Warning: a non-triangular face in input has been ignored"); continue; } @@ -373,7 +587,7 @@ public Q_SLOTS: soup_item->points()[p[1]], soup_item->points()[p[2]]); - wrap_bbox += triangles.back().bbox(); + m_wrap_bbox += triangles.back().bbox(); } continue; @@ -393,7 +607,7 @@ public Q_SLOTS: boost::graph_traits::halfedge_descriptor h = halfedge(f, *pMesh); if(!is_triangle(h, *pMesh)) { - print_message("Warning: non-triangular face in input"); + print_message("Warning: a non-triangular face in input has been ignored"); continue; } @@ -401,7 +615,7 @@ public Q_SLOTS: get(vpm, target(next(h, *pMesh), *pMesh)), get(vpm, source(h, *pMesh))); - wrap_bbox += triangles.back().bbox(); + m_wrap_bbox += triangles.back().bbox(); } segments.reserve(segments.size() + selection_item->selected_edges.size()); @@ -410,7 +624,7 @@ public Q_SLOTS: segments.emplace_back(get(vpm, target(halfedge(e, *pMesh), *pMesh)), get(vpm, target(opposite(halfedge(e, *pMesh), *pMesh), *pMesh))); - wrap_bbox += segments.back().bbox(); + m_wrap_bbox += segments.back().bbox(); } points.reserve(points.size() + selection_item->selected_vertices.size()); @@ -418,7 +632,7 @@ public Q_SLOTS: { points.push_back(get(vpm, v)); - wrap_bbox += points.back().bbox(); + m_wrap_bbox += points.back().bbox(); } continue; @@ -460,14 +674,14 @@ public Q_SLOTS: // The relative value uses the bbox of the full scene and not that of selected items to wrap // This is intentional, both because it's tedious to make it otherwise, and because it seems // to be simpler to compare between "all wrapped" / "some wrapped" - wrap_bbox_diag_length = std::sqrt(CGAL::square(wrap_bbox.xmax() - wrap_bbox.xmin()) + - CGAL::square(wrap_bbox.ymax() - wrap_bbox.ymin()) + - CGAL::square(wrap_bbox.zmax() - wrap_bbox.zmin())); + m_wrap_bbox_diag_length = std::sqrt(CGAL::square(m_wrap_bbox.xmax() - m_wrap_bbox.xmin()) + + CGAL::square(m_wrap_bbox.ymax() - m_wrap_bbox.ymin()) + + CGAL::square(m_wrap_bbox.zmax() - m_wrap_bbox.zmin())); ui.relativeAlphaValue->setValue(20.); ui.relativeOffsetValue->setValue(600.); - ui.alphaValue->setValue(wrap_bbox_diag_length / ui.relativeAlphaValue->value()); - ui.offsetValue->setValue(wrap_bbox_diag_length / ui.relativeOffsetValue->value()); + ui.alphaValue->setValue(m_wrap_bbox_diag_length / ui.relativeAlphaValue->value()); + ui.offsetValue->setValue(m_wrap_bbox_diag_length / ui.relativeOffsetValue->value()); // EXECUTION int i = dialog.exec(); @@ -476,16 +690,6 @@ public Q_SLOTS: QApplication::setOverrideCursor(Qt::WaitCursor); - Q_FOREACH(int index, this->scene->selectionIndices()) - { - Scene_surface_mesh_item* sm_item = qobject_cast(this->scene->item(index)); - if(sm_item != nullptr) - sm_item->setRenderingMode(Flat); - Scene_polygon_soup_item* soup_item = qobject_cast(scene->item(index)); - if(soup_item != nullptr) - soup_item->setRenderingMode(Flat); - } - const bool wrap_triangles = ui.wrapTriangles->isChecked(); const bool wrap_segments = ui.wrapSegments->isChecked(); const bool wrap_points = ui.wrapPoints->isChecked(); @@ -495,9 +699,12 @@ public Q_SLOTS: const bool enforce_manifoldness = ui.runManifoldness->isChecked(); const bool visualize_iterations = ui.visualizeIterations->isChecked(); - const bool do_snapshot_iterations = ui.snapshotIterations->isChecked(); + m_do_snapshot = ui.snapshotIterations->isChecked(); - std::cout << "do wrap edges/faces: " << wrap_segments << " " << wrap_triangles << std::endl; + const bool use_message_box = ui.enableMessageBox->isChecked(); + + std::cout << "Wrapping edges? " << std::boolalpha << wrap_segments << std::endl; + std::cout << "Wrapping faces? " << std::boolalpha << wrap_triangles << std::endl; if(!wrap_triangles) { @@ -554,22 +761,91 @@ public Q_SLOTS: return; } - // Oracles are now set up, main function call - CGAL::Alpha_wraps_3::internal::Alpha_wrap_3 aw3(oracle); + // Switch from 'wait' to 'busy' + QApplication::restoreOverrideCursor(); + QApplication::setOverrideCursor(Qt::BusyCursor); - Iterative_AW3_visualization_visitor visitor(scene, - visualize_iterations, - do_snapshot_iterations); + Q_FOREACH(int index, this->scene->selectionIndices()) + { + Scene_surface_mesh_item* sm_item = qobject_cast(this->scene->item(index)); + if(sm_item != nullptr) + sm_item->setRenderingMode(Flat); + Scene_polygon_soup_item* soup_item = qobject_cast(scene->item(index)); + if(soup_item != nullptr) + soup_item->setRenderingMode(Flat); + } - SMesh wrap; - aw3(alpha, offset, wrap, - CGAL::parameters::do_enforce_manifoldness(enforce_manifoldness) - .visitor(visitor)); + if(visualize_iterations) + { + m_iterative_wrap_item = new Scene_polygon_soup_item(); + m_iterative_wrap_item->setName(QString("Iterative wrap")); + const int iterative_wrap_item_id = scene->addItem(m_iterative_wrap_item); + scene->setSelectedItem(iterative_wrap_item_id); - Scene_surface_mesh_item* wrap_item = new Scene_surface_mesh_item(wrap); - wrap_item->setName(tr("Wrap with alpha %2 offset %3").arg(alpha).arg(offset)); - wrap_item->setColor(Qt::gray); - scene->addItem(wrap_item); + // Deal with independent (e.g. manual from the main window) destruction of the iterative item + connect(m_iterative_wrap_item, SIGNAL(aboutToBeDestroyed()), + this, SLOT(reset_iterative_wrap_item())); + } + + // Visitors + m_iter_points = std::make_shared >(); + m_iter_faces = std::make_shared > >(); + m_iter_fcolors = std::make_shared >(); + m_iter_vcolors = std::make_shared >(); + std::shared_ptr emiter = std::make_shared(); + Iterative_AW3_visualization_visitor visu_visitor(visualize_iterations, m_iter_points, m_iter_faces, m_iter_fcolors, m_iter_vcolors, emiter); + AW3_interrupter_visitor visitor(visu_visitor); + + connect(emiter.get(), SIGNAL(new_iteration(int)), + this, SLOT(update_iterative_wrap_item(int))); + connect(emiter.get(), SIGNAL(last_iteration(int)), + this, SLOT(finish_iterative_wrap_item(int))); + + Wrapper_thread* wrapper_thread = new Wrapper_thread(oracle, alpha, offset, enforce_manifoldness, visitor); + if(wrapper_thread == nullptr) + { + QMessageBox::critical(mw, tr(""), tr("ERROR: failed to create thread")); + return; + } + + // Connect main thread to wrapping thread + QObject::connect(wrapper_thread, SIGNAL(done(Wrapper_thread*)), + this, SLOT(wrapping_done(Wrapper_thread*))); + QObject::connect(wrapper_thread, SIGNAL(interrupted(Wrapper_thread*)), + this, SLOT(wrapping_interrupted(Wrapper_thread*))); + QObject::connect(wrapper_thread, SIGNAL(status_report(QString)), + this, SLOT(status_report(QString))); + + // Launch thread + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::isLocked() = true; + CGAL::Three::Three::getMutex()->unlock(); + + // Create message box with stop button + if(use_message_box) + { + m_message_box = new QMessageBox(QMessageBox::NoIcon, + "Wrapping", + "Wrapping in progress...", + QMessageBox::Cancel, + mw); + m_message_box->setDefaultButton(QMessageBox::Cancel); + QAbstractButton* cancelButton = m_message_box->button(QMessageBox::Cancel); + cancelButton->setText(tr("Stop")); + + // Connect the message box to the thread + connect(cancelButton, &QAbstractButton::clicked, + this, [wrapper_thread]() { *(wrapper_thread->visitor.should_stop) = true; }); + + m_message_box->open(); + } + + // Actual start + wrapper_thread->start(); + + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::isLocked() = false; + CGAL::Three::Three::getMutex()->unlock(); QApplication::restoreOverrideCursor(); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Alpha_wrap_3/alpha_wrap_3_dialog.ui b/Polyhedron/demo/Polyhedron/Plugins/Alpha_wrap_3/alpha_wrap_3_dialog.ui index cc6cce92722..c02ccc3b17d 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Alpha_wrap_3/alpha_wrap_3_dialog.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Alpha_wrap_3/alpha_wrap_3_dialog.ui @@ -9,7 +9,7 @@ 0 0 - 646 + 839 673 @@ -17,339 +17,6 @@ 3D Alpha Wrapping - - - - 3D Alpha Wrapping - - - - - - Offset value (absolute): - - - - - - - <html><head/><body><p>Offset value (relative):<br/><span style=" font-size:9pt;">As ratio of the length of the bbox's diagonal<br/>(i.e., value </span><span style=" font-size:9pt; font-style:italic;">x </span><span style=" font-size:9pt;">means </span><span style=" font-size:9pt; font-style:italic;">offset := bbox_diag_l / x)</span></p></body></html> - - - - - - - 10 - - - 0.000000000000000 - - - 100000000.000000000000000 - - - 1.000000000000000 - - - 0.000000000000000 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - 10 - - - 0.000000000000000 - - - 10000000.000000000000000 - - - 1.000000000000000 - - - 0.000000000000000 - - - - - - - <html><head/><body><p>Snapshot iterations<br/><span style=" font-size:9pt;">For each iteration, save a snapshot of the viewer <br/>to a file named </span><span style=" font-size:9pt; font-style:italic;">Wrap-iteration_i.png</span></p></body></html> - - - - - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Visualize iterations - - - - - - - <html><head/><body><p>Alpha value (absolute):</p></body></html> - - - - - - - - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - true - - - - - - - Qt::Horizontal - - - - - - - - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - 10 - - - 0.000000000000000 - - - 10000000.000000000000000 - - - 1.000000000000000 - - - 0.000000000000000 - - - - - - - - - - false - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Wrap points / vertices - - - - - - - Qt::Horizontal - - - - - - - true - - - <html><head/><body><p>Enforce 2-manifold output</p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - - - - - - - <html><head/><body><p>Wrap faces / triangles</p></body></html> - - - - - - - - - - true - - - - - - - 10 - - - 0.000000000000000 - - - 100000000.000000000000000 - - - 1.000000000000000 - - - 0.000000000000000 - - - - - - - <html><head/><body><p>Alpha value (relative):<br/><span style=" font-size:9pt;">As the ratio of the length of the bbox's diagonal<br/>(i.e., value </span><span style=" font-size:9pt; font-style:italic;">x </span><span style=" font-size:9pt;">means alpha</span><span style=" font-size:9pt; font-style:italic;"> := bbox_diag_l / x)</span></p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - <html><head/><body><p>Wrap edges / segments</p></body></html> - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - @@ -373,18 +40,341 @@ + + + + 3D Alpha Wrapping + + + + + + + + + + + + + true + + + <html><head/><body><p>Enforce 2-manifold output</p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + <html><head/><body><p>Wrap faces / triangles</p></body></html> + + + + + + + <html><head/><body><p align="center">Absolute value</p></body></html> + + + + + + + + + + true + + + + + + + Qt::Horizontal + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + 7 + + + 0.000000000000000 + + + 10000000.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + <html><head/><body><p align="center">Relative value<br/><span style=" font-size:9pt;">As the ratio of the length of the bbox's diagonal<br/>(i.e., a value </span><span style=" font-size:9pt; font-style:italic;">x </span><span style=" font-size:9pt;">means value</span><span style=" font-size:9pt; font-style:italic;"> := bbox_diag_l / x)</span></p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Visualize iterations + + + + + + + Qt::Horizontal + + + + + + + <html><head/><body><p>Wrap edges / segments</p></body></html> + + + + + + + 7 + + + 0.000000000000000 + + + 100000000.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + 7 + + + 0.000000000000000 + + + 10000000.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + + + + true + + + + + + + Qt::Horizontal + + + + + + + Offset value: + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Wrap points / vertices + + + + + + + <html><head/><body><p>Alpha value:</p></body></html> + + + + + + + + + + true + + + + + + + + + + true + + + + + + + 7 + + + 0.000000000000000 + + + 100000000.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + <html><head/><body><p>Snapshot iterations<br/><span style=" font-size:9pt;">For each iteration, save a snapshot of the viewer <br/>to a file named </span><span style=" font-size:9pt; font-style:italic;">Wrap-iteration_i.png</span></p></body></html> + + + + + + + <html><head/><body><p>Enable interruption </p></body></html> + + + + + + + + + + true + + + + + + + + + + false + + + false + + + + + + alphaValue - relativeAlphaValue - offsetValue - relativeOffsetValue wrapTriangles wrapSegments runManifoldness visualizeIterations - snapshotIterations diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.cpp b/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.cpp index b919ba2ca6b..b26135e231a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.cpp @@ -19,7 +19,6 @@ #include #include #include -#include Cluster_classification::Cluster_classification(Scene_points_with_normal_item* points) : m_points (points) @@ -637,11 +636,11 @@ void Cluster_classification::compute_features (std::size_t nb_scales, float voxe bool colors = (m_color != Point_set::Property_map()); - Point_set::Property_map echo_map; + Point_set::Property_map echo_map; bool echo; - boost::tie (echo_map, echo) = m_points->point_set()->template property_map("echo"); + boost::tie (echo_map, echo) = m_points->point_set()->template property_map("echo"); if (!echo) - boost::tie (echo_map, echo) = m_points->point_set()->template property_map("number_of_returns"); + boost::tie (echo_map, echo) = m_points->point_set()->template property_map("number_of_returns"); Feature_set pointwise_features; @@ -773,17 +772,17 @@ void Cluster_classification::add_remaining_point_set_properties_as_features(Feat prop[i] == "r" || prop[i] == "g" || prop[i] == "b") continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; if (try_adding_simple_feature(feature_set, prop[i])) continue; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Point_set_item_classification.cpp b/Polyhedron/demo/Polyhedron/Plugins/Classification/Point_set_item_classification.cpp index b6295553e1a..12bc858fea9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Point_set_item_classification.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Point_set_item_classification.cpp @@ -14,7 +14,6 @@ #include #include #include -#include Point_set_item_classification::Point_set_item_classification(Scene_points_with_normal_item* points) : m_points (points) @@ -532,11 +531,11 @@ void Point_set_item_classification::compute_features (std::size_t nb_scales, flo bool colors = (m_color != Point_set::Property_map()); - Point_set::Property_map echo_map; + Point_set::Property_map echo_map; bool echo; - boost::tie (echo_map, echo) = m_points->point_set()->template property_map("echo"); + boost::tie (echo_map, echo) = m_points->point_set()->template property_map("echo"); if (!echo) - boost::tie (echo_map, echo) = m_points->point_set()->template property_map("number_of_returns"); + boost::tie (echo_map, echo) = m_points->point_set()->template property_map("number_of_returns"); m_generator = new Generator (*(m_points->point_set()), m_points->point_set()->point_map(), nb_scales, voxel_size); @@ -668,17 +667,17 @@ void Point_set_item_classification::add_remaining_point_set_properties_as_featur prop[i] == "r" || prop[i] == "g" || prop[i] == "b") continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; if (try_adding_simple_feature(prop[i])) continue; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Surface_mesh_item_classification.cpp b/Polyhedron/demo/Polyhedron/Plugins/Classification/Surface_mesh_item_classification.cpp index 3fc12e4dd2f..4880c0917db 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Surface_mesh_item_classification.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Surface_mesh_item_classification.cpp @@ -11,7 +11,6 @@ #include #include #include -#include Surface_mesh_item_classification::Surface_mesh_item_classification(Scene_surface_mesh_item* mesh) : m_mesh (mesh), diff --git a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp index af1eef9e115..51f960a7cb4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp @@ -1754,35 +1754,35 @@ private: return false; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } @@ -1801,35 +1801,35 @@ private: bool DisplayPropertyPlugin::is_property_scalar(std::string name, const SMesh* sm) { - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } @@ -1846,21 +1846,21 @@ private: bool DisplayPropertyPlugin::treat_point_property(std::string name, Point_set* ps) { - typedef typename Point_set::template Property_map Int8_map; - typedef typename Point_set::template Property_map Uint8_map; - typedef typename Point_set::template Property_map Int16_map; - typedef typename Point_set::template Property_map Uint16_map; - typedef typename Point_set::template Property_map Int32_map; - typedef typename Point_set::template Property_map Uint32_map; - typedef typename Point_set::template Property_map Int64_map; - typedef typename Point_set::template Property_map Uint64_map; + typedef typename Point_set::template Property_map Int8_map; + typedef typename Point_set::template Property_map Uint8_map; + typedef typename Point_set::template Property_map Int16_map; + typedef typename Point_set::template Property_map Uint16_map; + typedef typename Point_set::template Property_map Int32_map; + typedef typename Point_set::template Property_map Uint32_map; + typedef typename Point_set::template Property_map Int64_map; + typedef typename Point_set::template Property_map Uint64_map; typedef typename Point_set::template Property_map Float_map; typedef typename Point_set::template Property_map Double_map; bool okay = false; { Int8_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1869,7 +1869,7 @@ private: { Uint8_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1878,7 +1878,7 @@ private: { Int16_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1887,7 +1887,7 @@ private: { Uint16_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1896,7 +1896,7 @@ private: { Int32_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1905,7 +1905,7 @@ private: { Uint32_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1914,7 +1914,7 @@ private: { Int64_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1923,7 +1923,7 @@ private: { Uint64_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1953,21 +1953,21 @@ private: template bool DisplayPropertyPlugin::treat_sm_property(std::string name, SMesh* sm) { - typedef typename SMesh::template Property_map Int8_map; - typedef typename SMesh::template Property_map Uint8_map; - typedef typename SMesh::template Property_map Int16_map; - typedef typename SMesh::template Property_map Uint16_map; - typedef typename SMesh::template Property_map Int32_map; - typedef typename SMesh::template Property_map Uint32_map; - typedef typename SMesh::template Property_map Int64_map; - typedef typename SMesh::template Property_map Uint64_map; + typedef typename SMesh::template Property_map Int8_map; + typedef typename SMesh::template Property_map Uint8_map; + typedef typename SMesh::template Property_map Int16_map; + typedef typename SMesh::template Property_map Uint16_map; + typedef typename SMesh::template Property_map Int32_map; + typedef typename SMesh::template Property_map Uint32_map; + typedef typename SMesh::template Property_map Int64_map; + typedef typename SMesh::template Property_map Uint64_map; typedef typename SMesh::template Property_map Float_map; typedef typename SMesh::template Property_map Double_map; bool okay = false; { Int8_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -1976,7 +1976,7 @@ private: { Uint8_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -1985,7 +1985,7 @@ private: { Int16_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -1994,7 +1994,7 @@ private: { Uint16_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -2003,7 +2003,7 @@ private: { Int32_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -2012,7 +2012,7 @@ private: { Uint32_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -2021,7 +2021,7 @@ private: { Int64_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -2030,7 +2030,7 @@ private: { Uint64_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp index e500ffb92a8..0e4b1167f5a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp @@ -309,10 +309,10 @@ polylines_to_split(std::vector >& polylines, continue; typename Polyline::iterator pit = polyline.begin(); - while (boost::next(pit) != polyline.end()) + while (std::next(pit) != polyline.end()) { vertex_descriptor v = g_manip.get_vertex(*pit, false); - vertex_descriptor w = g_manip.get_vertex(*boost::next(pit), false); + vertex_descriptor w = g_manip.get_vertex(*std::next(pit), false); g_manip.try_add_edge(v, w); ++pit; } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 9ce5aa5e0c1..bd5f0eb143f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -856,18 +856,18 @@ private: template void switchReaderConverter(std::pair minmax) { - switchReaderConverter(minmax, typename boost::is_integral::type()); + switchReaderConverter(minmax, typename std::is_integral::type()); } template - void switchReaderConverter(std::pair minmax, boost::true_type) + void switchReaderConverter(std::pair minmax, std::true_type) { // IntConverter IntConverter x = { minmax }; pxr_.setIC(x); } template - void switchReaderConverter(std::pair minmax, boost::false_type) + void switchReaderConverter(std::pair minmax, std::false_type) { // IntConverter DoubleConverter x = { minmax }; pxr_.setFC(x); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp index 9a95dfc67bf..64ffff89444 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp @@ -787,7 +787,28 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, return item->polyhedron(); }); - if(bounding_polyhedron != nullptr) + if(!incident_sub.empty()) + { + thread = cgal_code_mesh_3( + polyhedrons, + incident_sub, + item_name, + angle, + facets_sizing, + facets_min_sizing, + approx, + tets_sizing, + tets_min_sizing, + edges_sizing, + edges_min_sizing, + tets_shape, + protect_features, + protect_borders, + sharp_edges_angle_bound, + manifold, + mesh_type == Mesh_type::SURFACE_ONLY); + } + else { thread = cgal_code_mesh_3( polyhedrons, @@ -809,27 +830,6 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, manifold, mesh_type == Mesh_type::SURFACE_ONLY); } - else if(!incident_sub.empty()) - { - thread = cgal_code_mesh_3( - polyhedrons, - incident_sub, - item_name, - angle, - facets_sizing, - facets_min_sizing, - approx, - tets_sizing, - tets_min_sizing, - edges_sizing, - edges_min_sizing, - tets_shape, - protect_features, - protect_borders, - sharp_edges_angle_bound, - manifold, - mesh_type == Mesh_type::SURFACE_ONLY); - } break; }//end case POLYHEDRAL_MESH_ITEMS // Implicit functions diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp index 37dcedc8adb..53693c31637 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp @@ -122,8 +122,8 @@ void split_long_duplicated_edge(const HedgeRange& hedge_range, { typedef typename HedgeRange::value_type Pair; typedef typename Pair::first_type halfedge_descriptor; - typedef typename boost::remove_pointer< - typename Pair::second_type>::type TriangleMesh; + typedef std::remove_pointer_t< + typename Pair::second_type> TriangleMesh; typedef typename boost::property_map::type PointPMap; typedef typename boost::property_traits::value_type Point_3; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp new file mode 100644 index 00000000000..42957269481 --- /dev/null +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp @@ -0,0 +1,691 @@ +#include "config.h" +#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER +#include +#include "ui_Remeshing_dialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include "Scene_surface_mesh_item.h" +#include "Scene_polygon_soup_item.h" +#include "Scene_polylines_item.h" +#include +#include +#include +#include + +#include "C3t3_type.h" + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include // std::shared_ptr + +namespace CGAL{ + +template +class Offset_function +{ + typedef AABB_face_graph_triangle_primitive Primitive; + typedef AABB_traits Traits; + typedef AABB_tree Tree; + typedef Side_of_triangle_mesh Side_of; + +public: + + Offset_function(TriangleMesh& tm, double offset_distance) + : m_tree_ptr(new Tree(std::begin(faces(tm)), + std::end(faces(tm)), + tm) ) + , m_side_of_ptr( new Side_of(*m_tree_ptr) ) + , m_offset_distance(offset_distance) + , m_is_closed( is_closed(tm) ) + { + CGAL_assertion(!m_tree_ptr->empty()); + } + + double operator()(const typename GeomTraits::Point_3& p) const + { + using CGAL::sqrt; + + Bounded_side side = m_is_closed?m_side_of_ptr->operator()(p):ON_UNBOUNDED_SIDE; + if (side==ON_BOUNDARY) return m_offset_distance; + + typename GeomTraits::Point_3 closest_point = m_tree_ptr->closest_point(p); + double distance = sqrt(squared_distance(p, closest_point)); + + return (side == ON_UNBOUNDED_SIDE ? -distance : distance) + m_offset_distance; + } + +private: + std::shared_ptr m_tree_ptr; + std::shared_ptr m_side_of_ptr; + double m_offset_distance; + bool m_is_closed; + +}; + +class Polygon_soup_offset_function { + typedef Scene_polygon_soup_item::Points Points; + typedef Scene_polygon_soup_item::Polygons Polygons; + + typedef Polygons::const_iterator Polygon_iterator; + + + class Polygon_soup_point_property_map { + const Points* points_vector_ptr; + public: + typedef Polygon_iterator key_type; + typedef EPICK::Point_3 value_type; + typedef const value_type& reference; + typedef boost::readable_property_map_tag category; + + Polygon_soup_point_property_map() = default; + Polygon_soup_point_property_map(const Points* ptr) + : points_vector_ptr(ptr) + {} + + friend reference get(Polygon_soup_point_property_map map, + key_type polygon_it) + { + return (*map.points_vector_ptr)[*polygon_it->begin()]; + } + }; + + + class Polygon_soup_triangle_property_map { + const Points* points_vector_ptr; + public: + typedef Polygon_iterator key_type; + typedef EPICK::Triangle_3 value_type; + typedef value_type reference; + typedef boost::readable_property_map_tag category; + + Polygon_soup_triangle_property_map() = default; + Polygon_soup_triangle_property_map(const Points* ptr) + : points_vector_ptr(ptr) + {} + + friend value_type get(Polygon_soup_triangle_property_map map, + key_type polygon_it) + { + auto it = polygon_it->begin(); + CGAL_assertion(it != polygon_it->end()); + const auto id0 = *it++; + CGAL_assertion(it != polygon_it->end()); + const auto id1 = *it++; + CGAL_assertion(it != polygon_it->end()); + const auto id2 = *it++; + CGAL_assertion(it == polygon_it->end()); + + return value_type( (*map.points_vector_ptr)[id0], + (*map.points_vector_ptr)[id1], + (*map.points_vector_ptr)[id2] ); + } + }; + + struct AABB_primitive : + public CGAL::AABB_primitive + { + typedef CGAL::AABB_primitive Base; + + typedef Polygon_iterator Id; + + template + AABB_primitive(Id id, ObjectPmap&& opmap, PointPmap&& ppmap) + : Base(id, std::forward(opmap), std::forward(ppmap)) + {} + + template + AABB_primitive(Iterator it, ObjectPmap&& opmap, PointPmap&& ppmap) + : Base(*it, std::forward(opmap), std::forward(ppmap)) + {} + }; // end struct template AABB_primitive + + + typedef CGAL::AABB_traits AABB_traits; + typedef CGAL::AABB_tree AABB_tree; + + std::shared_ptr m_tree_ptr; + double m_offset_distance; + + typedef Polygon_soup_triangle_property_map ObjectPmap; + typedef Polygon_soup_point_property_map PointPmap; +public: + Polygon_soup_offset_function(const Scene_polygon_soup_item* soup, + const double offset_distance) + : m_tree_ptr + (std::make_shared(begin(soup->polygons()), + end(soup->polygons()), + ObjectPmap(&soup->points()), + PointPmap(&soup->points())) + ) + , m_offset_distance(offset_distance) + { + CGAL_assertion(! m_tree_ptr->empty() ); + } + + double operator()(const EPICK::Point_3& p) const + { + using CGAL::sqrt; + + EPICK::Point_3 closest_point = m_tree_ptr->closest_point(p); + double distance = sqrt(squared_distance(p, closest_point)); + + return m_offset_distance - distance; + } + +}; // end class Polygon_soup_offset_function + +} //end of CGAL namespace + +Scene_surface_mesh_item* make_item(SMesh* sm) +{ + return new Scene_surface_mesh_item(sm); +} + +CGAL::Offset_function +offset_function(SMesh* surface_mesh_ptr, double offset_value) { + return { *surface_mesh_ptr, offset_value }; +} + +CGAL::Polygon_soup_offset_function +offset_function(Scene_polygon_soup_item* item, double offset_value) { + return { item, offset_value }; +} + +template +struct Result_type { + typedef T type; +}; + +template <> +struct Result_type { + typedef SMesh type; +}; + +template +CGAL::Bbox_3 bbox(Mesh* mesh_ptr) { + return CGAL::Polygon_mesh_processing::bbox(*mesh_ptr); +} + +CGAL::Bbox_3 bbox(Scene_polygon_soup_item* item) { + return item->bbox(); +} +class MeshGuard{ + SMesh* mesh; + bool done; +public: + MeshGuard(SMesh* mesh):mesh(mesh), done(false){} + void setDone(){done = true;} + ~MeshGuard(){ + if(!done) + delete mesh; + } +}; +// declare the CGAL function +template +SMesh* cgal_off_meshing(QWidget*, + Mesh* tm_ptr, + Scene_polylines_item* polylines_item, + const double offset_value, + const double angle, + const double sizing, + const double approx, + const double edge_size, + int tag) +{ + typedef EPICK GT; + typedef CGAL::Labeled_mesh_domain_3 Mesh_domain_base; + typedef CGAL::Mesh_domain_with_polyline_features_3 Mesh_domain; + typedef C3t3::Triangulation Tr; + typedef CGAL::Mesh_criteria_3 Mesh_criteria; + typedef GT::Sphere_3 Sphere_3; + + CGAL::Bbox_3 bbox = ::bbox(tm_ptr); + + GT::Point_3 center((bbox.xmax()+bbox.xmin())/2, + (bbox.ymax()+bbox.ymin())/2, + (bbox.zmax()+bbox.zmin())/2); + double sqrad = 0.6 * std::sqrt( CGAL::square(bbox.xmax()-bbox.xmin())+ + CGAL::square(bbox.ymax()-bbox.ymin())+ + CGAL::square(bbox.zmax()-bbox.zmin()) ) + + offset_value; + sqrad=CGAL::square(sqrad); + + CGAL::Timer timer; + timer.start(); + + namespace p = CGAL::parameters; + + Mesh_domain domain = + Mesh_domain::create_implicit_mesh_domain + (p::function = offset_function(tm_ptr, offset_value), + p::bounding_object = Sphere_3(center, sqrad), + p::relative_error_bound = 1e-7, + p::construct_surface_patch_index = [](int i, int j) { return (i * 1000 + j); }); + + const CGAL::Mesh_facet_topology topology = CGAL::FACET_VERTICES_ON_SAME_SURFACE_PATCH; + auto manifold_option = p::non_manifold(); + if(tag == 1) manifold_option = p::manifold_with_boundary(); + if(tag == 2) manifold_option = p::manifold(); + Mesh_criteria criteria(p::facet_angle = angle, + p::facet_size = sizing, + p::facet_distance = approx, + p::facet_topology = topology, + p::edge_size = edge_size); + + if (polylines_item!=nullptr) + { + typedef std::vector Surface_patch_ids; + std::vector surface_patch_ids; + + domain.add_features_and_incidences(polylines_item->polylines.begin(), + polylines_item->polylines.end(), + CGAL::Identity_property_map(), + CGAL::Constant_property_map( + surface_patch_ids)); + } + + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, + p::no_perturb(), + p::no_exude(), + manifold_option); + + const Tr& tr = c3t3.triangulation(); + + timer.stop(); + std::cerr << "done (" << timer.time() << " ms, " << tr.number_of_vertices() << " vertices)" << std::endl; + + if(tr.number_of_vertices() > 0) + { + typedef typename Result_type::type Result_mesh; + // add remesh as new polyhedron + Result_mesh *pRemesh = new Result_mesh; + //if the thread is interrupted before the mesh is returned, delete it. + MeshGuard guard(pRemesh); + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, *pRemesh); + guard.setDone(); + if(CGAL::is_closed(*pRemesh) + && ! CGAL::Polygon_mesh_processing::is_outward_oriented(*pRemesh)) + { + CGAL::Polygon_mesh_processing::reverse_face_orientations(*pRemesh); + } + + return pRemesh; + } + else + return nullptr; +} + +struct Mesher_thread:public QThread{ + Q_OBJECT + +private: + SMesh* sMesh; + Scene_polygon_soup_item* soup_item; + Scene_polylines_item* polylines_item; + const double offset_value; + const double angle; + const double sizing; + const double approx; + const double edge_size; + int tag_index; +public: + Mesher_thread( SMesh* tm_ptr, + Scene_polygon_soup_item* soup_item, + Scene_polylines_item* polylines_item, + const double offset_value, + const double angle, + const double sizing, + const double approx, + const double edge_size, + int tag) + :sMesh(tm_ptr), soup_item(soup_item), polylines_item(polylines_item), + offset_value(offset_value), angle(angle), + sizing(sizing), approx(approx), edge_size(edge_size), tag_index(tag){ + } + void run() override { + SMesh* new_mesh= nullptr; + if(soup_item) + new_mesh = cgal_off_meshing(CGAL::Three::Three::mainWindow(), + soup_item, + polylines_item, + offset_value, + angle, + sizing, + approx, + edge_size, + tag_index); + else + new_mesh = cgal_off_meshing(CGAL::Three::Three::mainWindow(), + sMesh, + polylines_item, + offset_value, + angle, + sizing, + approx, + edge_size, + tag_index); + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::getWaitCondition()->wakeAll(); + CGAL::Three::Three::getMutex()->unlock(); + Q_EMIT resultReady(new_mesh); + } +Q_SIGNALS: + void resultReady(SMesh *new_mesh); +}; + +using namespace CGAL::Three; +class Polyhedron_demo_offset_meshing_plugin : + public QObject, + protected Polyhedron_demo_plugin_interface +{ + Q_OBJECT + Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) + Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") + +public: + void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*) { + this->scene = scene_interface; + this->mw = mainWindow; + actionOffsetMeshing = new QAction(tr("Offset Meshing"), mw); + actionOffsetMeshing->setProperty("subMenuName", "3D Surface Mesh Generation"); + if(actionOffsetMeshing) { + connect(actionOffsetMeshing, SIGNAL(triggered()), + this, SLOT(offset_meshing())); + } + + actionInflateMesh= new QAction(tr("Inflate Mesh"), mw); + actionInflateMesh->setProperty("subMenuName", "Operations on Polyhedra"); + if(actionInflateMesh) { + connect(actionInflateMesh, SIGNAL(triggered()), + this, SLOT(inflate_mesh())); + } + } + + bool applicable(QAction*) const { + if ( scene->selectionIndices().size() != 1 && + scene->selectionIndices().size() != 2 ) + { + return false; + } + + Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()) + { + if ( qobject_cast(scene->item(index)) || + qobject_cast(scene->item(index)) ) + return true; + } + return false; + } + + QList actions() const { + return QList() << actionOffsetMeshing + << actionInflateMesh; + } +public Q_SLOTS: + void offset_meshing(); + void inflate_mesh(); + +private: + QAction* actionOffsetMeshing; + QAction* actionInflateMesh; + Scene_interface *scene; + QMainWindow *mw; +}; // end class Polyhedron_demo_offset_meshing_plugin + +void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() +{ + const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); + Scene_item* item = scene->item(index); + if(item == nullptr){ + return; + } + + Scene_surface_mesh_item* sm_item = + qobject_cast(item); + + if(sm_item == nullptr){ + return; + } + + SMesh* sMesh = sm_item->face_graph(); + + if(sMesh == nullptr){ + return; + } + + double diag = sm_item->diagonalBbox(); + double offset_value = QInputDialog::getDouble(mw, + QString("Choose Inflate Distance"), + QString("Inflate Distance (use negative number for deflate)"), + 0.1*diag, + -(std::numeric_limits::max)(), + (std::numeric_limits::max)(), 10); + + auto vpm = get(CGAL::vertex_point,*sMesh); + auto vnm = + sMesh->property_map("v:normal").first; + + for(const auto& v : vertices(*sMesh)) + { + Point_3 p = get(vpm, v); + EPICK::Vector_3 n = get(vnm, v); + n/=(CGAL::sqrt(n.squared_length())); + put(vpm, v, p + offset_value*n); + } + sm_item->invalidateOpenGLBuffers(); +} + +void Polyhedron_demo_offset_meshing_plugin::offset_meshing() +{ + Scene_surface_mesh_item* sm_item = nullptr; + Scene_polygon_soup_item* soup_item = nullptr; + Scene_polylines_item* polylines_item = nullptr; + Scene_item* item = nullptr; + + bool mesh_or_soup_item_found = false; + + Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()) + { + if (!mesh_or_soup_item_found) + { + sm_item = qobject_cast(scene->item(index)); + if (sm_item == nullptr) + { + soup_item = qobject_cast(item); + if (soup_item != nullptr) + { + item=scene->item(index); + mesh_or_soup_item_found = true; + continue; + } + } + else + { + item=scene->item(index); + mesh_or_soup_item_found = true; + continue; + } + } + polylines_item = qobject_cast(scene->item(index)); + } + + SMesh* sMesh = nullptr; + double diag = 0; + Scene_item::Bbox box; + if(sm_item) + { + sMesh = sm_item->face_graph(); + if(!sMesh) + return; + box = bbox(sMesh); + } + else if(soup_item != nullptr) + { + box = bbox(soup_item); + } + else if(soup_item == nullptr) + return; + double X=(box.max)(0)-(box.min)(0), + Y = (box.max)(1)-(box.min)(1), + Z = (box.max)(2)-(box.min)(2); + diag = CGAL::sqrt(X*X+Y*Y+Z*Z); + double offset_value = QInputDialog::getDouble(mw, + QString("Choose Offset Value"), + QString("Offset Value (use negative number for inset)"), + 0.1*diag, + -(std::numeric_limits::max)(), + (std::numeric_limits::max)(), 10); + + QDialog dialog(mw); + Ui::Remeshing_dialog ui; + ui.setupUi(&dialog); + ui.angle->setRange(1.0, 30.0); + connect(ui.buttonBox, SIGNAL(accepted()), + &dialog, SLOT(accept())); + connect(ui.buttonBox, SIGNAL(rejected()), + &dialog, SLOT(reject())); + + ui.sizing->setRange(diag * 10e-6, // min + diag); // max + ui.sizing->setValue(diag * 0.05); // default value + + ui.approx->setRange(diag * 10e-7, // min + diag); // max + ui.approx->setValue(diag * 0.005); + + if (polylines_item!=nullptr) + { + ui.edge_sizing->setRange(diag * 10e-6, // min + diag); // max + ui.edge_sizing->setValue(diag * 0.05); // default value + } + else + ui.edge_sizing->setEnabled(false); + + int i = dialog.exec(); + if(i == QDialog::Rejected) + return; + + const double angle = ui.angle->value(); + const double approx = ui.approx->value(); + const double sizing = ui.sizing->value(); + const double edge_size=polylines_item!=nullptr?ui.edge_sizing->value():0; + const int tag_index = ui.tags->currentIndex(); + + if(tag_index < 0) return; + + QApplication::setOverrideCursor(Qt::WaitCursor); + + std::cerr << "mesh with:" + << "\n angle=" << angle + << "\n sizing=" << sizing + << "\n approx=" << approx + << "\n tag=" << tag_index + << std::boolalpha + << std::endl; + Mesher_thread* worker = nullptr; + if(soup_item) + worker = new Mesher_thread(nullptr, + soup_item, + polylines_item, + offset_value, + angle, + sizing, + approx, + edge_size, + tag_index); + else + worker = new Mesher_thread(sMesh, + nullptr, + polylines_item, + offset_value, + angle, + sizing, + approx, + edge_size, + tag_index); + connect(worker, &QThread::finished, worker, &QObject::deleteLater); + connect(worker, &Mesher_thread::resultReady, this, + [item, angle, sizing, approx, offset_value/* , index */] + (SMesh *new_mesh){ + QApplication::restoreOverrideCursor(); + if(!new_mesh){ + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::isLocked() = false; + CGAL::Three::Three::getMutex()->unlock(); + return; + } + Scene_surface_mesh_item* new_item = new Scene_surface_mesh_item(new_mesh); + new_item->setName(tr("%1 offset %5 (%2 %3 %4)") + .arg(item->name()) + .arg(angle) + .arg(sizing) + .arg(approx) + .arg(offset_value)); + new_item->setColor(Qt::magenta); + new_item->setWireframeMode(); + CGAL::Three::Three::scene()->addItem(new_item); +// CGAL::Three::Three::scene()->itemChanged(index); + QApplication::restoreOverrideCursor(); + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::isLocked() = false; + CGAL::Three::Three::getMutex()->unlock(); + }); + QMessageBox* message_box = new QMessageBox(QMessageBox::NoIcon, + "Meshing", + "Offset meshing in progress...", + QMessageBox::Cancel, + mw); + message_box->setDefaultButton(QMessageBox::Cancel); + QAbstractButton* cancelButton = message_box->button(QMessageBox::Cancel); + cancelButton->setText(tr("Stop")); + + connect(cancelButton, &QAbstractButton::clicked, + this, [worker](){ + worker->terminate(); + QApplication::restoreOverrideCursor();//waitcursor + QApplication::restoreOverrideCursor();//busycursor + }); + connect(worker, &Mesher_thread::finished, + message_box, &QMessageBox::close); + message_box->open(); + + QApplication::setOverrideCursor(Qt::BusyCursor); + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::isLocked() = true; + CGAL::Three::Three::getMutex()->unlock(); + worker->start(); +} + +#include "Offset_meshing_plugin.moc" + +#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER diff --git a/Polyhedron/demo/Polyhedron/SMesh_type.h b/Polyhedron/demo/Polyhedron/SMesh_type.h index f79a819cb9a..fad279a8993 100644 --- a/Polyhedron/demo/Polyhedron/SMesh_type.h +++ b/Polyhedron/demo/Polyhedron/SMesh_type.h @@ -51,7 +51,7 @@ struct Get_pmap_of_surface_mesh_ { #define CGAL_PROPERTY_SURFACE_MESH_RETURN_TYPE(Tag) \ typename boost::lazy_disable_if< \ - boost::is_const

      , \ + std::is_const

      , \ Get_pmap_of_surface_mesh_ \ >::type diff --git a/Polyhedron/demo/Polyhedron/Scene_image_item.cpp b/Polyhedron/demo/Polyhedron/Scene_image_item.cpp index dcc28a79b08..d98a21abba0 100644 --- a/Polyhedron/demo/Polyhedron/Scene_image_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_image_item.cpp @@ -583,11 +583,11 @@ template const char* whatType(T) { return "unknown"; } // defaul template <> const char* whatType(float) { return "float"; } template <> const char* whatType(double) { return "double"; } template <> const char* whatType(char) { return "int8_t (char)"; } -template <> const char* whatType(boost::uint8_t) { return "uint8_t (unsigned char)"; } -template <> const char* whatType(boost::int16_t) { return "int16_t (short)"; } -template <> const char* whatType(boost::uint16_t) { return "uint16_t (unsigned short)"; } -template <> const char* whatType(boost::int32_t) { return "int32_t (int)"; } -template <> const char* whatType(boost::uint32_t) { return "uint32_t (unsigned int)"; } +template <> const char* whatType(std::uint8_t) { return "uint8_t (unsigned char)"; } +template <> const char* whatType(std::int16_t) { return "int16_t (short)"; } +template <> const char* whatType(std::uint16_t) { return "uint16_t (unsigned short)"; } +template <> const char* whatType(std::int32_t) { return "int32_t (int)"; } +template <> const char* whatType(std::uint32_t) { return "uint32_t (unsigned int)"; } template QString explicitWordType() diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h index eeb51d0ca3a..5d87338bd15 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h @@ -4,8 +4,6 @@ #include #include "SMesh_type.h" -#include - #include struct Scene_polygon_soup_item_priv; @@ -19,7 +17,7 @@ struct Polygon_soup //vector containing a pair of indices of points in Points and a set of indices of Polygons //containing the edge. typedef std::map, std::set > Edges_map; - typedef boost::array Edge; + typedef std::array Edge; typedef std::vector Polygons; typedef std::vector Colors; typedef std::set Edges; diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index 561f3f7c8fb..0a012a64293 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -1076,9 +1076,9 @@ bool Scene_polyhedron_selection_item:: treat_selection(const std::settempInstructions("Edge not selected: the incident facets must have a degree of at least 4.", "Select the edge with extremities you want to join."); @@ -1177,9 +1177,9 @@ bool Scene_polyhedron_selection_item:: treat_selection(const std::set(&(closest->first)); for(Intersections::iterator - it = boost::next(intersections.begin()), + it = std::next(intersections.begin()), end = intersections.end(); it != end; ++it) { @@ -1417,7 +1417,7 @@ bool Scene_surface_mesh_item::intersect_face(double orig_x, const EPICK::Point_3* closest_point = CGAL::object_cast(&closest->first); for(Intersections::iterator - it = boost::next(intersections.begin()), + it = std::next(intersections.begin()), end = intersections.end(); it != end; ++it) { @@ -1911,7 +1911,7 @@ void Scene_surface_mesh_item::zoomToPosition(const QPoint &point, CGAL::Three::V const EPICK::Point_3* closest_point = boost::get(&closest->first); for(Intersections::iterator - it = boost::next(intersections.begin()), + it = std::next(intersections.begin()), end = intersections.end(); it != end; ++it) { diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h index 59ac5537a6e..a4d655d1748 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h @@ -21,7 +21,6 @@ #ifndef Q_MOC_RUN #include #include -#include #endif #include diff --git a/Polyhedron/demo/Polyhedron/include/id_printing.h b/Polyhedron/demo/Polyhedron/include/id_printing.h index 46d142a24bb..5676f1129df 100644 --- a/Polyhedron/demo/Polyhedron/include/id_printing.h +++ b/Polyhedron/demo/Polyhedron/include/id_printing.h @@ -155,7 +155,7 @@ bool find_primitive_id(const QPoint& point, const Point* closest_point = boost::get(&closest->first); for(typename Intersections::iterator - it = boost::next(intersections.begin()), + it = std::next(intersections.begin()), end = intersections.end(); it != end; ++it) { diff --git a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h index f2657fda3f1..9671bb46277 100644 --- a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h +++ b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h @@ -111,7 +111,7 @@ void run_with_qprogressdialog (Functor& functor, signal_callback->signaler.get(), SLOT(cancel())); #ifdef CGAL_HAS_STD_THREADS - if (boost::is_convertible::value) + if (std::is_convertible::value) { std::thread thread (functor); diff --git a/Polyhedron/doc/Polyhedron/Concepts/PolyhedronItems_3.h b/Polyhedron/doc/Polyhedron/Concepts/PolyhedronItems_3.h index 62c23598c49..2b6150c70a1 100644 --- a/Polyhedron/doc/Polyhedron/Concepts/PolyhedronItems_3.h +++ b/Polyhedron/doc/Polyhedron/Concepts/PolyhedronItems_3.h @@ -15,6 +15,7 @@ polyhedral surface renames faces to facets. \cgalHasModel `CGAL::Polyhedron_items_3` \cgalHasModel `CGAL::Polyhedron_min_items_3` +\cgalHasModel `CGAL::Polyhedron_items_with_id_3` \sa `CGAL::Polyhedron_3` \sa `HalfedgeDSItems` diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h index d7f169997b7..fd1e9ccc0de 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h @@ -65,8 +65,8 @@ public: Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h index 53ecf34cc6f..8a697736461 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h @@ -61,8 +61,8 @@ public: Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h index 08ca152ddd0..4110a771821 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h @@ -66,8 +66,8 @@ public: Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h index d5497788a02..85404f86c2d 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h @@ -154,11 +154,11 @@ public: (*it)->set_removable(false); ++it; for(; it != ite; ++it){ - if((boost::next(it) != ite) && (boost::prior(it)== boost::next(it))){ + if((std::next(it) != ite) && (std::prev(it)== std::next(it))){ (*it)->set_removable(false); } } - it = boost::prior(it); + it = std::prev(it); (*it)->set_removable(false); } @@ -245,9 +245,9 @@ public: } Vertex_handle vh = *it; - Vertices_in_constraint_iterator u = boost::prior(it); + Vertices_in_constraint_iterator u = std::prev(it); Vertex_handle uh = *u; - Vertices_in_constraint_iterator w = boost::next(it); + Vertices_in_constraint_iterator w = std::next(it); Vertex_handle wh = *w; typename Geom_traits::Orientation_2 orientation_2 = pct.geom_traits().orientation_2_object(); @@ -322,7 +322,7 @@ operator()() Vertices_in_constraint_iterator vit = vertex_to_iterator[v].front(); if(is_removable(vit)){ - Vertices_in_constraint_iterator u = boost::prior(vit), w = boost::next(vit); + Vertices_in_constraint_iterator u = std::prev(vit), w = std::next(vit); pct.simplify(vit); if((*u)->is_removable()){ diff --git a/Property_map/include/CGAL/property_map.h b/Property_map/include/CGAL/property_map.h index 0da2528a3da..12fd06503fe 100644 --- a/Property_map/include/CGAL/property_map.h +++ b/Property_map/include/CGAL/property_map.h @@ -73,9 +73,7 @@ class OR_property_map { typedef typename PM1::reference reference; typedef boost::read_write_property_map_tag category; - OR_property_map() {} // required by boost::connected_components - - OR_property_map(PM1 pm1, PM2 pm2) + OR_property_map(PM1 pm1 = PM1(), PM2 pm2 = PM2()) : pm1(pm1),pm2(pm2) {} diff --git a/QP_solver/doc/QP_solver/QP_solver.txt b/QP_solver/doc/QP_solver/QP_solver.txt index 56c6a0aa44e..5328a563dee 100644 --- a/QP_solver/doc/QP_solver/QP_solver.txt +++ b/QP_solver/doc/QP_solver/QP_solver.txt @@ -351,7 +351,7 @@ Similarly, if the solver knows that the program is nonnegative, it will be more efficient than under the general bounds \f$ \qpl\leq \qpx \leq \qpu\f$. You can argue that nonnegativity is something that could easily -be checked in time \f$ O(n)\f$ beforehand, but then again nonnegative +be checked in time \cgalBigO{n} beforehand, but then again nonnegative programs are so frequent that the syntactic sugar aspect becomes somewhat important. After all, we can save four iterators in specifying a nonnegative linear program in terms of the concept diff --git a/Random_numbers/include/CGAL/Random_impl.h b/Random_numbers/include/CGAL/Random_impl.h index 89ca7057fe5..3c66dc5d31c 100644 --- a/Random_numbers/include/CGAL/Random_impl.h +++ b/Random_numbers/include/CGAL/Random_impl.h @@ -23,6 +23,7 @@ #include #include #include +#include namespace CGAL { @@ -40,7 +41,7 @@ Random() std::time( &s); seed = (unsigned int)s; // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } @@ -55,7 +56,7 @@ Random(internal::Random_print_seed) seed = (unsigned int)s; std::cerr << "CGAL::Random()::get_seed() = " << seed << std::endl; // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } @@ -65,7 +66,7 @@ Random( unsigned int seed) : val(0), seed(seed) { // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } diff --git a/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h b/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h index b11ee290e95..9fb98710126 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h @@ -82,7 +82,7 @@ container. The iterator does not have constant amortized time complexity for the increment and decrement operations in all cases, only when not too many elements have not been freed (i.e.\ when the `size()` is close to the `capacity()`). Iterating from `begin()` to `end()` takes -`O(capacity())` time, not `size()`. In the case where the container +\cgalBigO{capacity()} time, not `size()`. In the case where the container has a small `size()` compared to its `capacity()`, we advise to "defragment the memory" by copying the container if the iterator performance is needed. @@ -661,7 +661,7 @@ void clear(); /// \name Ownership testing /// The following functions are mostly helpful for efficient debugging, since -/// their complexity is \f$ O(\sqrt{\mathrm{c.capacity()}})\f$. +/// their complexity is \cgalBigO{\sqrt{\mathrm{c.capacity()}}}. /// @{ /*! @@ -681,7 +681,7 @@ bool owns_dereferenceable(const_iterator pos); /// @{ /*! adds the items of `cc2` to the end of `cc` and `cc2` becomes empty. -The time complexity is O(`cc`.`capacity()`-`cc`.`size()`). +The time complexity is \cgalBigO{cc.capacity()-cc.size()}. \pre `cc2` must not be the same as `cc`, and the allocators of `cc` and `cc2` must be compatible: `cc.get_allocator() == cc2.get_allocator()`. */ void merge(Compact_container &cc); diff --git a/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h b/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h index dd7f392daf2..4ce97a3e702 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h @@ -92,7 +92,7 @@ container. The iterator does not have constant amortized time complexity for the increment and decrement operations in all cases, only when not too many elements have not been freed (i.e.\ when the `size()` is close to the `capacity()`). Iterating from `begin()` to `end()` takes -`O(capacity())` time, not `size()`. In the case where the container +\cgalBigO{capacity()} time, not `size()`. In the case where the container has a small `size()` compared to its `capacity()`, we advise to \"defragment the memory\" by copying the container if the iterator performance is needed. @@ -289,7 +289,7 @@ complexity. No exception is thrown. /// \name Ownership testing /// The following functions are mostly helpful for efficient debugging, since -/// their complexity is \f$ O(\sqrt{\mathrm{c.capacity()}})\f$. +/// their complexity is \cgalBigO{\sqrt{\mathrm{c.capacity()}}}. /// @{ /// returns whether `pos` is in the range `[ccc.begin(), ccc.end()]` (`ccc.end()` included). bool owns(const_iterator pos); @@ -302,7 +302,7 @@ complexity. No exception is thrown. /// @{ /*! adds the items of `ccc2` to the end of `ccc` and `ccc2` becomes empty. -The time complexity is O(`ccc`.`capacity()`-`ccc`.`size()`). +The time complexity is \cgalBigO{ccc.capacity()-ccc.size()}. \pre `ccc2` must not be the same as `ccc`, and the allocators of `ccc` and `ccc2` must be compatible: `ccc.get_allocator() == ccc2.get_allocator()`. */ void merge(Concurrent_compact_container &ccc2); diff --git a/STL_Extension/doc/STL_Extension/CGAL/In_place_list.h b/STL_Extension/doc/STL_Extension/CGAL/In_place_list.h index d5dc49c9d13..faf647e4804 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/In_place_list.h +++ b/STL_Extension/doc/STL_Extension/CGAL/In_place_list.h @@ -749,7 +749,7 @@ void reverse(); /// @{ /*! sorts the list `ipl` according to the -`operator<` in time \f$ O(n \log n)\f$ where `n = size()`. +`operator<` in time \cgalBigO{n \log n} where `n = size()`. It is stable. \pre a suitable `operator<` for the type `T`. */ diff --git a/STL_Extension/doc/STL_Extension/CGAL/Multiset.h b/STL_Extension/doc/STL_Extension/CGAL/Multiset.h index a81cabb29ea..f9d8715a1de 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Multiset.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Multiset.h @@ -73,12 +73,12 @@ less-than operator (`operator<`). `Multiset` uses a proprietary implementation of a red-black tree data-structure. The red-black tree invariants guarantee that the height of a -tree containing \f$ n\f$ elements is \f$ O(\log{n})\f$ (more precisely, it is bounded by +tree containing \f$ n\f$ elements is \cgalBigO{\log{n}} (more precisely, it is bounded by \f$ 2 \log_{2}{n}\f$). As a consequence, all methods that accept an element and need to locate it in the tree (namely `insert(x)`, `erase(x)`, `find(x)`, `count(x)`, `lower_bound(x)` , `upper_bound(x)`, -`find_lower(x)` and `equal_range(x)`) take \f$ O(\log{n})\f$ time and -perform \f$ O(\log{n})\f$ comparison operations. +`find_lower(x)` and `equal_range(x)`) take \cgalBigO{\log{n}} time and +perform \cgalBigO{\log{n}} comparison operations. On the other hand, the set operations that accept a position iterator (namely `insert_before(pos, x)`, `insert_after(pos, x)` and `erase(pos)`) @@ -87,12 +87,12 @@ cost (see \cgalCite{gs-dfbt-78} and \cgalCite{t-dsna-83} for more details). More important, these set operations require no comparison operations. Therefore, it is highly recommended to maintain the set via iterators to the stored elements, whenever possible. The function `insert(pos, x)` -is safer to use, but it takes amortized \f$ O(\min\{d,\log{n}\})\f$ time, where \f$ d\f$ +is safer to use, but it takes amortized \cgalBigO{\min\{d,\log{n}\}} time, where \f$ d\f$ is the distance between the given position and the true position of `x`. In addition, it always performs at least two comparison operations. The `catenate()` and `split()` functions are also very efficient, and -can be performed in \f$ O(\log{n})\f$ time, where \f$ n\f$ is the total number of +can be performed in \cgalBigO{\log{n}} time, where \f$ n\f$ is the total number of elements in the sets, and without performing any comparison operations (see \cgalCite{t-dsna-83} for the details). Note however that the size of two sets resulting from a split operation is diff --git a/STL_Extension/include/CGAL/Iterator_range.h b/STL_Extension/include/CGAL/Iterator_range.h index e1d41818d5a..e42441e9858 100644 --- a/STL_Extension/include/CGAL/Iterator_range.h +++ b/STL_Extension/include/CGAL/Iterator_range.h @@ -78,6 +78,13 @@ namespace CGAL { { return std::tuple{this->first, this->second}; } + + template class Container> + auto to() const + { + using V = std::remove_cv_t>; + return Container(begin(), end()); + } }; template diff --git a/STL_Extension/include/CGAL/Multiset.h b/STL_Extension/include/CGAL/Multiset.h index e0193fb4b9a..e043627ec15 100644 --- a/STL_Extension/include/CGAL/Multiset.h +++ b/STL_Extension/include/CGAL/Multiset.h @@ -544,25 +544,25 @@ public: //@{ /*! - * Default constructor. [takes O(1) operations] + * Default constructor. [takes \cgalBigO{1} operations] */ Multiset (); /*! - * Constructor with a comparison object. [takes O(1) operations] + * Constructor with a comparison object. [takes \cgalBigO{1} operations] * \param comp A comparison object to be used by the tree. */ Multiset (const Compare& comp); /*! - * Copy constructor. [takes O(n) operations] + * Copy constructor. [takes \cgalBigO{n} operations] * \param tree The copied tree. */ Multiset (const Self& tree); /*! * Construct a tree that contains all objects in the given range. - * [takes O(n log n) operations] + * [takes \cgalBigO{n log n} operations] * \param first An iterator for the first object in the range. * \param last A past-the-end iterator for the range. */ @@ -587,18 +587,18 @@ public: } /*! - * Destructor. [takes O(n) operations] + * Destructor. [takes \cgalBigO{n} operations] */ virtual ~Multiset () noexcept(!CGAL_ASSERTIONS_ENABLED); /*! - * Assignment operator. [takes O(n) operations] + * Assignment operator. [takes \cgalBigO{n} operations] * \param tree The copied tree. */ Self& operator= (const Self& tree); /*! - * Swap two trees. [takes O(1) operations] + * Swap two trees. [takes \cgalBigO{1} operations] * \param tree The copied tree. */ void swap (Self& tree); @@ -608,13 +608,13 @@ public: //@{ /*! - * Test two trees for equality. [takes O(n) operations] + * Test two trees for equality. [takes \cgalBigO{n} operations] * \param tree The compared tree. */ bool operator== (const Self& tree) const; /*! - * Check if our tree is lexicographically smaller. [takes O(n) operations] + * Check if our tree is lexicographically smaller. [takes \cgalBigO{n} operations] * \param tree The compared tree. */ bool operator< (const Self& tree) const; @@ -707,8 +707,8 @@ public: } /*! - * Get the size of the tree. [takes O(1) operations, unless the tree - * was involved in a split operation, then it may take O(n) time.] + * Get the size of the tree. [takes \cgalBigO{1} operations, unless the tree + * was involved in a split operation, then it may take \cgalBigO{n} time.] * \return The number of objects stored in the tree. */ size_t size () const; @@ -725,14 +725,14 @@ public: /// \name Insertion functions. /*! - * Insert an object into the tree. [takes O(log n) operations] + * Insert an object into the tree. [takes \cgalBigO{log n} operations] * \param object The object to be inserted. * \return An iterator pointing to the inserted object. */ iterator insert (const Type& object); /*! - * Insert a range of k objects into the tree. [takes O(k log n) operations] + * Insert a range of k objects into the tree. [takes \cgalBigO{k log n} operations] * \param first An iterator for the first object in the range. * \param last A past-the-end iterator for the range. */ @@ -751,7 +751,7 @@ public: /*! * Insert an object to the tree, with a given hint to its position. - * [takes O(log n) operations at worst-case, but only O(1) amortized] + * [takes \cgalBigO{log n} operations at worst-case, but only \cgalBigO{1} amortized] * \param position A hint for the position of the object. * \param object The object to be inserted. * \return An iterator pointing to the inserted object. @@ -761,7 +761,7 @@ public: /*! * Insert an object to the tree, as the successor the given object. - * [takes O(log n) operations at worst-case, but only O(1) amortized] + * [takes \cgalBigO{log n} operations at worst-case, but only \cgalBigO{1} amortized] * \param position Points to the object after which the new object should * be inserted (or an invalid iterator to insert the object * as the tree minimum). @@ -774,7 +774,7 @@ public: /*! * Insert an object to the tree, as the predecessor the given object. - * [takes O(log n) operations at worst-case, but only O(1) amortized] + * [takes \cgalBigO{log n} operations at worst-case, but only \cgalBigO{1} amortized] * \param position Points to the object before which the new object should * be inserted (or an invalid iterator to insert the object * as the tree maximum). @@ -789,7 +789,7 @@ public: //@{ /*! - * Erase objects from the tree. [takes O(log n) operations] + * Erase objects from the tree. [takes \cgalBigO{log n} operations] * \param object The object to be removed. * \return The number of objects removed from the tree. * Note that all iterators to the erased objects become invalid. @@ -798,7 +798,7 @@ public: /*! * Remove the object pointed by the given iterator. - * [takes O(log n) operations at worst-case, but only O(1) amortized] + * [takes \cgalBigO{log n} operations at worst-case, but only \cgalBigO{1} amortized] * \param position An iterator pointing the object to be erased. * \pre The iterator must be a valid. * Note that all iterators to the erased object become invalid. @@ -806,7 +806,7 @@ public: void erase (iterator position); /*! - * Clear the contents of the tree. [takes O(n) operations] + * Clear the contents of the tree. [takes \cgalBigO{n} operations] */ void clear (); @@ -817,7 +817,7 @@ public: /*! * Search the tree for the given key (non-const version). - * [takes O(log n) operations] + * [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return A iterator pointing to the first equivalent object in the tree, @@ -843,7 +843,7 @@ public: /*! * Search the tree for the given key (const version). - * [takes O(log n) operations] + * [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return A iterator pointing to the first equivalent object in the tree, @@ -869,7 +869,7 @@ public: /*! * Count the number of object in the tree equivalent to a given key. - * [takes O(log n + d) operations] + * [takes \cgalBigO{log n + d} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The number of equivalent objects. @@ -905,7 +905,7 @@ public: /*! * Get the first element whose key is not less than a given key - * (non-const version). [takes O(log n) operations] + * (non-const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The lower bound of the key, or end() if the key is not found @@ -931,7 +931,7 @@ public: /*! * Get the first element whose key is not less than a given key - * (non-const version). [takes O(log n) operations] + * (non-const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The lower bound of the key, along with a flag indicating whether @@ -957,7 +957,7 @@ public: /*! * Get the first element whose key is greater than a given key - * (non-const version). [takes O(log n) operations] + * (non-const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The upper bound of the key, or end() if the key is not found @@ -983,7 +983,7 @@ public: /*! * Get the first element whose key is not less than a given key - * (const version). [takes O(log n) operations] + * (const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The lower bound of the key, or end() if the key is not found @@ -1009,7 +1009,7 @@ public: /*! * Get the first element whose key is not less than a given key - * (const version). [takes O(log n) operations] + * (const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The lower bound of the key, along with a flag indicating whether @@ -1035,7 +1035,7 @@ public: /*! * Get the first element whose key is greater than a given key - * (const version). [takes O(log n) operations] + * (const version). [takes \cgalBigO{log n} operations] * \param object The query object. * \return The upper bound of the key, or end() if the key is not found * in the tree. @@ -1060,7 +1060,7 @@ public: /*! * Get the range of objects in the tree that are equivalent to a given key - * (non-const version). [takes O(log n + d) operations] + * (non-const version). [takes \cgalBigO{log n + d} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return A pair of (lower_bound(key), upper_bound(key)). @@ -1108,7 +1108,7 @@ public: /*! * Get the range of objects in the tree that are equivalent to a given key - * (const version). [takes O(log n + d) operations] + * (const version). [takes \cgalBigO{log n + d} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return A pair of (lower_bound(key), upper_bound(key)). @@ -1163,7 +1163,7 @@ public: /*! * Replace the object pointed by a given iterator with another object. - * [takes O(1) operations] + * [takes \cgalBigO{1} operations] * \param position An iterator pointing the object to be replaced. * \param object The new object. * \pre The given iterator is valid. @@ -1174,7 +1174,7 @@ public: /*! * Swap the location two objects in the tree, given by their positions. - * [takes O(1) operations] + * [takes \cgalBigO{1} operations] * \param pos1 An iterator pointing to the first object. * \param pos1 An iterator pointing to the second object. * \pre The two iterators are valid. @@ -1184,7 +1184,7 @@ public: /*! * Catenate the tree with a given tree, whose minimal object is not less - * than the maximal object of this tree. [takes O(log n) operations] + * than the maximal object of this tree. [takes \cgalBigO{log n} operations] * The function clears the other given tree, but all its iterators remain * valid and can be used with the catenated tree. * \param tree The tree to catenate to out tree. @@ -1196,7 +1196,7 @@ public: /*! * Split the tree such that all remaining objects are less than a given * key, and all objects greater than (or equal to) this key form - * a new output tree. [takes O(log n) operations] + * a new output tree. [takes \cgalBigO{log n} operations] * \param key The split key. * \param comp_key A comparison functor for comparing keys and objects. * \param tree Output: The tree that will eventually contain all objects @@ -1220,7 +1220,7 @@ public: /*! * Split the tree at a given position, such that it contains all objects * in the range [begin, position) and all objects in the range - * [position, end) form a new output tree. [takes O(log n) operations] + * [position, end) form a new output tree. [takes \cgalBigO{log n} operations] * \param position An iterator pointing at the split position. * \param tree Output: The output tree. * \pre The output tree is initially empty. @@ -1240,13 +1240,13 @@ public: bool is_valid() const; /*! - * Get the height of the tree. [takes O(n) operations] + * Get the height of the tree. [takes \cgalBigO{n} operations] * \return The length of the longest path from the root to a leaf node. */ size_t height () const; /*! - * Get the black-height of the tree. [takes O(1) operations] + * Get the black-height of the tree. [takes \cgalBigO{1} operations] * \return The number of black nodes from the root to each leaf node. */ inline size_t black_height () const diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index ff234183f99..eb6d4c086e9 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -37,7 +37,7 @@ namespace CGAL { // NOTE : The above is actually untrue ! It is possible to do : // struct S2 { -// typedef boost::array Ar; +// typedef std::array Ar; // Ar m; // S2 (const M&a) : m ((Ar) { { a, a } }) {} // }; diff --git a/STL_Extension/include/CGAL/for_each.h b/STL_Extension/include/CGAL/for_each.h index 69a3e7dcdfe..663f62440b4 100644 --- a/STL_Extension/include/CGAL/for_each.h +++ b/STL_Extension/include/CGAL/for_each.h @@ -102,8 +102,8 @@ void for_each (const Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #endif internal::for_each @@ -118,8 +118,8 @@ void for_each (Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #endif internal::for_each diff --git a/STL_Extension/include/CGAL/is_convertible.h b/STL_Extension/include/CGAL/is_convertible.h index 8b9a6a36c93..1dfcda69745 100644 --- a/STL_Extension/include/CGAL/is_convertible.h +++ b/STL_Extension/include/CGAL/is_convertible.h @@ -17,8 +17,7 @@ #ifndef CGAL_IS_CONVERTIBLE_H #define CGAL_IS_CONVERTIBLE_H -#include -#include +#include #ifdef CGAL_USE_GMPXX #include #endif @@ -26,12 +25,12 @@ namespace CGAL { templatestruct is_implicit_convertible - : boost::is_convertible {}; + : std::is_convertible {}; #ifdef CGAL_USE_GMPXX // Work around a gmpxx misfeature templatestruct is_implicit_convertible<__gmp_expr,mpz_class> - : boost::false_type {}; + : std::false_type {}; #endif // TODO: add is_explicit_convertible (using boost::is_constructible?) diff --git a/STL_Extension/include/CGAL/is_streamable.h b/STL_Extension/include/CGAL/is_streamable.h index dabeb375728..bc0173931b6 100644 --- a/STL_Extension/include/CGAL/is_streamable.h +++ b/STL_Extension/include/CGAL/is_streamable.h @@ -10,8 +10,6 @@ #ifndef CGAL_IS_STREAMABLE_H #define CGAL_IS_STREAMABLE_H -#include -#include #include namespace CGAL { @@ -50,8 +48,8 @@ namespace is_streamable template struct is_streamable_impl { - static typename boost::remove_cv::type>::type const & x; - static typename boost::remove_cv::type>::type & y; + static std::remove_cv_t> const & x; + static std::remove_cv_t> & y; static const bool value = sizeof(is_streamable::check(std::cout << x)) == sizeof(is_streamable::yes) && diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 956cc88a8c2..0ac9fcf11ae 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -58,7 +58,7 @@ public: Prevent_deref(const I& i) : Base(i) {} private: friend class boost::iterator_core_access; - reference dereference() const { return const_cast::type&>(this->base_reference()); } + reference dereference() const { return const_cast&>(this->base_reference()); } }; template diff --git a/STL_Extension/include/CGAL/transforming_iterator.h b/STL_Extension/include/CGAL/transforming_iterator.h index 7caa2d3b1a2..bd94ad33c4f 100644 --- a/STL_Extension/include/CGAL/transforming_iterator.h +++ b/STL_Extension/include/CGAL/transforming_iterator.h @@ -12,9 +12,6 @@ #ifndef CGAL_TRANSFORMING_ITERATOR_H #define CGAL_TRANSFORMING_ITERATOR_H #include -#include -#include -#include #include #include #include @@ -27,7 +24,7 @@ namespace CGAL { namespace internal { // non-empty case -template::value> struct Functor_as_base { +template::value> struct Functor_as_base { Functor_as_base(){} Functor_as_base(T const& t):f(t){} //template Functor_as_base(Functor_as_base const&g):f(g.functor()){} @@ -55,12 +52,12 @@ class transforming_iterator_helper decltype(std::declval()(std::declval())) >::type reference_; - typedef typename Default::Get::type>::type>::type value_type; + typedef typename Default::Get>>::type value_type; // Crappy heuristic. If we have *it that returns a Weighted_point and F that returns a reference to the Point contained in the Weighted_point it takes as argument, we do NOT want the transformed iterator to return a reference to the temporary *it. On the other hand, if *it returns an int n, and F returns a reference to array[n] it is not so good to lose the reference. This probably should be done elsewhere and should at least be made optional... typedef typename boost::mpl::if_< - boost::mpl::or_, - boost::is_integral >, + boost::mpl::or_, + std::is_integral >, reference_, value_type>::type reference; public: @@ -93,8 +90,8 @@ private internal::Functor_as_base template transforming_iterator( transforming_iterator const&i, - std::enable_if_t::value>* = 0, - std::enable_if_t::value>* = 0) + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0) : Base(i.base()),Functor_base(i.functor()) {} }; diff --git a/STL_Extension/include/CGAL/transforming_pair_iterator.h b/STL_Extension/include/CGAL/transforming_pair_iterator.h index 020a0b6d7c7..421e9f8ebb8 100644 --- a/STL_Extension/include/CGAL/transforming_pair_iterator.h +++ b/STL_Extension/include/CGAL/transforming_pair_iterator.h @@ -16,14 +16,10 @@ #include #include -#include - - - namespace CGAL { namespace internal { -template ::value> +template ::value> struct Min_category { static_assert(std::is_convertible::value); typedef Cat1 type; @@ -47,7 +43,7 @@ class transforming_pair_iterator_helper decltype(std::declval()(std::declval::reference>(),std::declval::reference>())) >::type reference; - typedef typename Default::Get::type>::type>::type value_type; + typedef typename Default::Get>>::type value_type; public: typedef boost::iterator_facade< @@ -97,9 +93,9 @@ private internal::Functor_as_base template transforming_pair_iterator( transforming_pair_iterator const&i, - std::enable_if_t::value>* = 0, - std::enable_if_t::value>* = 0, - std::enable_if_t::value>* = 0) + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0) : Functor_base(i.functor()),iter1(i.iter1),iter2(i.iter2) {} }; diff --git a/STL_Extension/include/CGAL/type_traits/is_iterator.h b/STL_Extension/include/CGAL/type_traits/is_iterator.h index e1b43ac7a04..6630dd8ceb1 100644 --- a/STL_Extension/include/CGAL/type_traits/is_iterator.h +++ b/STL_Extension/include/CGAL/type_traits/is_iterator.h @@ -17,10 +17,6 @@ #ifndef CGAL_TYPE_TRAITS_IS_ITERATOR_H #define CGAL_TYPE_TRAITS_IS_ITERATOR_H -#include -#include -#include -#include #include #include @@ -46,7 +42,7 @@ struct is_iterator_ has_difference_type, has_pointer, has_reference >, - boost::is_pointer > + std::is_pointer > { }; template ::value> @@ -56,8 +52,8 @@ struct is_iterator_type_ template struct is_iterator_type_ - : public //boost::is_base_of::iterator_category> - boost::is_convertible::iterator_category, U> + : public //std::is_base_of::iterator_category> + std::is_convertible::iterator_category, U> { }; } // namespace internal @@ -65,7 +61,7 @@ struct is_iterator_type_ // NOTE: we don't want the real std::decay or functions are included template struct is_iterator - : public internal::is_iterator_::type>::type> + : public internal::is_iterator_>> { }; template @@ -73,7 +69,7 @@ inline constexpr bool is_iterator_v = is_iterator::value; template struct is_iterator_type - : public internal::is_iterator_type_::type>::type, Tag> + : public internal::is_iterator_type_>, Tag> { }; template @@ -87,7 +83,7 @@ struct is_iterator_to template struct is_iterator_to - : public boost::is_convertible::value_type, U> + : public std::is_convertible::value_type, U> { }; template diff --git a/STL_Extension/include/CGAL/vector.h b/STL_Extension/include/CGAL/vector.h index 192baedacdc..ebbc1f2872a 100644 --- a/STL_Extension/include/CGAL/vector.h +++ b/STL_Extension/include/CGAL/vector.h @@ -25,9 +25,6 @@ #include #include #include -#include -#include -#include namespace CGAL { @@ -118,19 +115,19 @@ public: bool operator>=( const Self& i) const { return !(*this < i); } vector_iterator< T, - typename boost::remove_const< - typename boost::remove_reference::type - >::type&, - typename boost::remove_const< - typename boost::remove_pointer::type - >::type* > + std::remove_const_t< + std::remove_reference_t + >&, + std::remove_const_t< + std::remove_pointer_t + >* > remove_const() const { - typedef typename boost::remove_const< - typename boost::remove_pointer::type - >::type* Ptr_no_c; + typedef std::remove_const_t< + std::remove_pointer_t + >* Ptr_no_c; return vector_iterator< T, - typename boost::remove_const::type>::type&, + std::remove_const_t>&, Ptr_no_c> ( const_cast(ptr) ); } diff --git a/STL_Extension/test/STL_Extension/test_Compact_container.cpp b/STL_Extension/test/STL_Extension/test_Compact_container.cpp index 566e15dddc2..60aa43db0e2 100644 --- a/STL_Extension/test/STL_Extension/test_Compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Compact_container.cpp @@ -12,8 +12,6 @@ #include #include -#include - #include template @@ -324,22 +322,22 @@ int main() test_time_stamps(); // Check the time stamper policies - if(! boost::is_base_of, + if(! std::is_base_of, C1::Time_stamper>::value) { std::cerr << "Error timestamper of C1\n"; return 1; } - if(! boost::is_base_of, + if(! std::is_base_of, C2::Time_stamper>::value) { std::cerr << "Error timestamper of C2\n"; return 1; } - if(! boost::is_base_of, + if(! std::is_base_of, C3::Time_stamper>::value) { std::cerr << "Error timestamper of C3\n"; return 1; } - if(! boost::is_base_of, + if(! std::is_base_of, C4::Time_stamper>::value) { std::cerr << "Error timestamper of C4\n"; return 1; diff --git a/STL_Extension/test/STL_Extension/test_skiplist.cpp b/STL_Extension/test/STL_Extension/test_skiplist.cpp index 54ee29a352b..fe7bb7f1334 100644 --- a/STL_Extension/test/STL_Extension/test_skiplist.cpp +++ b/STL_Extension/test/STL_Extension/test_skiplist.cpp @@ -60,9 +60,9 @@ BOOST_FIXTURE_TEST_CASE( test_insert, Fixture ) skips.begin(), skips.end()); // the same goes for inserting at an arbitrary position - l.insert(boost::next(l.all_begin(), 3) + l.insert(std::next(l.all_begin(), 3) , 20); - all.insert(boost::next(all.begin(), 3) + all.insert(std::next(all.begin(), 3) , 20); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); @@ -78,15 +78,15 @@ BOOST_FIXTURE_TEST_CASE( test_single_skip, Fixture ) // skip somewhere in between and at the end // skip 2 and 7 - l.skip(boost::next(l.all_begin())); - BOOST_CHECK(l.is_skipped(boost::next(l.all_begin()))); + l.skip(std::next(l.all_begin())); + BOOST_CHECK(l.is_skipped(std::next(l.all_begin()))); skips.erase(std::remove(skips.begin(), skips.end(), 2), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.all_begin(), l.all_end(), all.begin(), all.end()); - l.skip(boost::prior(l.all_end())); - BOOST_CHECK(l.is_skipped(boost::prior(l.all_end()))); + l.skip(std::prev(l.all_end())); + BOOST_CHECK(l.is_skipped(std::prev(l.all_end()))); skips.erase(std::remove(skips.begin(), skips.end(), 7), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); @@ -105,13 +105,13 @@ BOOST_FIXTURE_TEST_CASE( test_single_skip, Fixture ) BOOST_FIXTURE_TEST_CASE( test_range_skip, Fixture ) { // drop all from 2 up to 4 - l.skip(boost::next(l.all_begin()), boost::next(l.all_begin(), 3)); + l.skip(std::next(l.all_begin()), std::next(l.all_begin(), 3)); skips.erase(std::remove(skips.begin(), skips.end(), 2), skips.end()); skips.erase(std::remove(skips.begin(), skips.end(), 3), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); // drop 6 and 7 - l.skip(boost::prior(l.all_end(), 2), l.all_end()); + l.skip(std::prev(l.all_end(), 2), l.all_end()); skips.erase(std::remove(skips.begin(), skips.end(), 6), skips.end()); skips.erase(std::remove(skips.begin(), skips.end(), 7), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), @@ -136,20 +136,20 @@ BOOST_AUTO_TEST_CASE( test_continous_insert ) BOOST_FIXTURE_TEST_CASE( test_unskip, Fixture ) { // skip 2 and 3 - l.skip(boost::next(l.all_begin()), boost::next(l.all_begin(), 3)); + l.skip(std::next(l.all_begin()), std::next(l.all_begin(), 3)); skips.erase(std::remove(skips.begin(), skips.end(), 2), skips.end()); skips.erase(std::remove(skips.begin(), skips.end(), 3), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); // unskip 2 - l.unskip(boost::next(l.skip_begin()), boost::next(l.all_begin())); - skips.insert(boost::next(skips.begin()), 2); + l.unskip(std::next(l.skip_begin()), std::next(l.all_begin())); + skips.insert(std::next(skips.begin()), 2); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); // unskip 3 - l.unskip(boost::next(l.skip_begin(), 2), boost::next(l.all_begin(), 2)); - skips.insert(boost::next(skips.begin(), 2), 3); + l.unskip(std::next(l.skip_begin(), 2), std::next(l.all_begin(), 2)); + skips.insert(std::next(skips.begin(), 2), 3); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); @@ -180,8 +180,8 @@ BOOST_FIXTURE_TEST_CASE( test_push, Fixture ) all.begin(), all.end()); // check how it works with skipped elements - l.skip(l.all_begin(), boost::next(l.all_begin(), 4)); - skips.erase(skips.begin(), boost::next(skips.begin(), 4)); + l.skip(l.all_begin(), std::next(l.all_begin(), 4)); + skips.erase(skips.begin(), std::next(skips.begin(), 4)); l.push_front(20); l.push_front(21); skips.insert(skips.begin(), 20); @@ -205,7 +205,7 @@ BOOST_FIXTURE_TEST_CASE( test_implicit_conversion, Fixture ) BOOST_FIXTURE_TEST_CASE( test_erase, Fixture ) { // erase 3 - l.erase(boost::next(l.all_begin(), 2)); + l.erase(std::next(l.all_begin(), 2)); skips.erase(std::remove(skips.begin(), skips.end(), 3), skips.end()); all.erase(std::remove(all.begin(), all.end(), 3), all.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), @@ -214,10 +214,10 @@ BOOST_FIXTURE_TEST_CASE( test_erase, Fixture ) all.begin(), all.end()); // skip 2 first and then erase it - l.skip(boost::next(l.all_begin())); + l.skip(std::next(l.all_begin())); skips.erase(std::remove(skips.begin(), skips.end(), 2), skips.end()); all.erase(std::remove(all.begin(), all.end(), 2), all.end()); - l.erase(boost::next(l.all_begin())); + l.erase(std::next(l.all_begin())); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.all_begin(), l.all_end(), @@ -228,7 +228,7 @@ BOOST_AUTO_TEST_CASE( test_swap ) { using std::swap; Fixture a, b; - all_iterator it = boost::prior(b.l.all_end()); + all_iterator it = std::prev(b.l.all_end()); b.l.push_back(8); b.l.push_back(9); b.l.push_back(10); swap(a.l, b.l); @@ -243,16 +243,16 @@ BOOST_AUTO_TEST_CASE( test_swap ) a.all.begin(), a.all.end()); // this iterator should still be valid and now point into a BOOST_CHECK_EQUAL_COLLECTIONS(it, a.l.all_end(), - boost::prior(a.all.end(), 4), a.all.end()); + std::prev(a.all.end(), 4), a.all.end()); } BOOST_AUTO_TEST_CASE( test_splice ) { Fixture a, b; - a.all.insert(boost::next(a.all.begin()), b.all.begin(), b.all.end()); - a.skips.insert(boost::next(a.skips.begin()), b.skips.begin(), b.skips.end()); + a.all.insert(std::next(a.all.begin()), b.all.begin(), b.all.end()); + a.skips.insert(std::next(a.skips.begin()), b.skips.begin(), b.skips.end()); - a.l.splice(boost::next(a.l.skip_begin()), b.l, b.l.skip_begin(), b.l.skip_end()); + a.l.splice(std::next(a.l.skip_begin()), b.l, b.l.skip_begin(), b.l.skip_end()); BOOST_CHECK_EQUAL_COLLECTIONS(a.l.all_begin(), a.l.all_end(), a.all.begin(), a.all.end()); diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h index a32aacd681b..af9cda15c2d 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h @@ -198,10 +198,10 @@ private: void try_parallel (const F& func, std::size_t begin, std::size_t end) { #ifndef CGAL_LINKED_WITH_TBB - static_assert (!(boost::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else - if (boost::is_convertible::value) + if (std::is_convertible::value) tbb::parallel_for(tbb::blocked_range(begin, end), func); else #endif diff --git a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake index 1906d885e48..de8dcfa35d4 100644 --- a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake +++ b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake @@ -164,6 +164,9 @@ file(COPY ${GIT_REPO}/GraphicsView/demo/resources ${GIT_REPO}/GraphicsView/demo/ #copy data file(COPY ${GIT_REPO}/Data/data DESTINATION "${release_dir}/") +#copy LICENSES files +file(COPY ${GIT_REPO}/LICENSES DESTINATION "${release_dir}/" PATTERN "GPL-2.0-only.txt" EXCLUDE) + #create VERSION file(WRITE ${release_dir}/VERSION "${CGAL_VERSION}") diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index 8c93c47f074..723b3938d2c 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -116,7 +116,7 @@ build_platforms_list() # ---------------------------------------------------------------------------------------- # Sets up the variables indicating the directories to use. -# Crates all platform directories under the current release binary folder. +# Creates all platform directories under the current release binary folder. # ---------------------------------------------------------------------------------------- setup_dirs() { @@ -179,6 +179,13 @@ setup_dirs() for PLATFORM in ${PLATFORMS}; do + # MSVC2015 does not support C++17 + if [ "${CGAL_RELEASE_ID}" \> "CGAL-6.0" ]; then + if [ "${PLATFORM}" = "MSVC2015-Release-64bits" ]; then + continue + fi + fi + CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} if [ ! -d "${CGAL_BINARY_DIR}" ]; then @@ -214,17 +221,17 @@ put_demos_on_web() collect_demos_binaries() { PLATFORM=${1} - + cd "${CGAL_TEST_DIR}" echo "COLLECT_DEMOS_BINARIES=$COLLECT_DEMOS_BINARIES" if [ -n "$COLLECT_DEMOS_BINARIES" ]; then echo 'COLLECTING DEMOS BINARIES' - + DEMOS_TEST_DIR="${CGAL_DIR}/cmake/platforms/${PLATFORM}/test" cp "${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh" "${DEMOS_TEST_DIR}" - + cd ${DEMOS_TEST_DIR} for demo_dir in *_Demo; do diff --git a/SearchStructures/doc/SearchStructures/CGAL/Range_tree_d.h b/SearchStructures/doc/SearchStructures/CGAL/Range_tree_d.h index 74f308e00c7..03b3bbb1c3b 100644 --- a/SearchStructures/doc/SearchStructures/CGAL/Range_tree_d.h +++ b/SearchStructures/doc/SearchStructures/CGAL/Range_tree_d.h @@ -9,11 +9,11 @@ points that lie inside a given \f$ d\f$-dimensional interval. \cgalHeading{Implementation} -The construction of a \f$ d\f$-dimensional range tree takes \f$ {O}(n\log n^{d-1})\f$ +The construction of a \f$ d\f$-dimensional range tree takes \cgalBigO{n\log n^{d-1}} time. The points in -the query window are reported in time \f$ {O}(k+{\log}^d n )\f$, where \f$ k\f$ +the query window are reported in time \cgalBigO{k+{\log}^d n }, where \f$ k\f$ is the number of reported points. -The tree uses \f$ {O}(n\log n^{d-1})\f$ storage. +The tree uses \cgalBigO{n\log n^{d-1}} storage. */ template< typename Data, typename Window, typename Traits > diff --git a/SearchStructures/doc/SearchStructures/CGAL/Segment_tree_d.h b/SearchStructures/doc/SearchStructures/CGAL/Segment_tree_d.h index 21986c30679..f440ab4dc29 100644 --- a/SearchStructures/doc/SearchStructures/CGAL/Segment_tree_d.h +++ b/SearchStructures/doc/SearchStructures/CGAL/Segment_tree_d.h @@ -8,10 +8,10 @@ namespace CGAL { \cgalHeading{Implementation} -A \f$ d\f$-dimensional segment tree is constructed in \f$ {O}(n\log n^d)\f$ time. -An inverse range query is performed in time \f$ {O}(k+{\log}^d n )\f$, where \f$ k\f$ +A \f$ d\f$-dimensional segment tree is constructed in \cgalBigO{n\log n^d} time. +An inverse range query is performed in time \cgalBigO{k+{\log}^d n }, where \f$ k\f$ is the number of reported intervals. -The tree uses \f$ {O}(n\log n^d)\f$ storage. +The tree uses \cgalBigO{n\log n^d} storage. */ template< typename Data, typename Window, typename Traits > diff --git a/SearchStructures/doc/SearchStructures/SearchStructures.txt b/SearchStructures/doc/SearchStructures/SearchStructures.txt index fd27bfc4fec..e0eb1a4289b 100644 --- a/SearchStructures/doc/SearchStructures/SearchStructures.txt +++ b/SearchStructures/doc/SearchStructures/SearchStructures.txt @@ -299,9 +299,9 @@ The 2-dimensional tree is a binary search tree on the first dimension. Each subl For the d-dimensional range tree, the figure shows one sublayer tree for each layer of the tree. -The tree can be built in \f$ O(n\log^{d-1} n)\f$ time and -needs \f$ O(n\log^{d-1} n)\f$ space. The ` d`-dimensional points that lie in the -` d`-dimensional query interval can be reported in \f$ O(\log^dn+k)\f$ time, +The tree can be built in \cgalBigO{n\log^{d-1} n} time and +needs \cgalBigO{n\log^{d-1} n} space. The ` d`-dimensional points that lie in the +` d`-dimensional query interval can be reported in \cgalBigO{\log^dn+k} time, where ` n` is the total number of points and ` k` is the number of reported points. @@ -437,11 +437,11 @@ sublayer tree of a vertex `v` is a segment tree according to the second dimension of all data items of `v`. -The tree can be built in \f$ O(n\log^{d} n)\f$ time and -needs \f$ O(n\log^{d} n)\f$ space. +The tree can be built in \cgalBigO{n\log^{d} n} time and +needs \cgalBigO{n\log^{d} n} space. The processing time for inverse range -queries in an ` d`-dimensional segment tree is \f$ O(\log^d n -+k)\f$ time, where ` n` is the total number of intervals and ` k` is +queries in an ` d`-dimensional segment tree is \cgalBigO{\log^d n ++k} time, where ` n` is the total number of intervals and ` k` is the number of reported intervals. One possible application of a two-dimensional segment tree is the diff --git a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2.txt b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2.txt index 306fa9e2a91..db694f9de60 100644 --- a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2.txt +++ b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2.txt @@ -276,7 +276,7 @@ homogeneous coordinates of bit size at most \f$ 3b+O(1)\f$. The supporting lines of the segments (they are needed in some of the predicates) have coefficients which are always of bit size \f$ 2b+O(1)\f$. As a result, the bit size of the expressions involved in -our predicates will always be \f$ O(b)\f$, independently of the +our predicates will always be \cgalBigO{b}, independently of the size of the input. The `SegmentDelaunayGraphSite_2` concept encapsulates the ideas presented above. A site is represented in this concept by up to four @@ -348,7 +348,7 @@ intersecting sites represented in homogeneous coordinates of bit size \f$ b\f$, the maximum bit size of the algebraic expressions involved in the predicates is \f$ 40 b+O(1)\f$. Given our site representation given above we can guarantee that even in the case of strongly intersecting sites, -the algebraic degree of the predicates remains \f$ O(b)\f$, independently +the algebraic degree of the predicates remains \cgalBigO{b}, independently of the size of the input. What we want to focus in the remainder of this section are the different kinds of filtering techniques that we have employed in our implementation. diff --git a/Set_movable_separability_2/doc/Set_movable_separability_2/Set_movable_separability_2.txt b/Set_movable_separability_2/doc/Set_movable_separability_2/Set_movable_separability_2.txt index c21ee4bd0f0..1fe21f70345 100644 --- a/Set_movable_separability_2/doc/Set_movable_separability_2/Set_movable_separability_2.txt +++ b/Set_movable_separability_2/doc/Set_movable_separability_2/Set_movable_separability_2.txt @@ -82,8 +82,8 @@ ill-condition. The implementation is based on an algorithm developed by Shamai and Halperin; see \cgalCite{cgal:ss-spfis-16} for the generalization of -the algorithm to 3D. The time and space complexities are in \f$O(n)\f$ -and \f$O(1)\f$, respectively. In order to ensure robustness and +the algorithm to 3D. The time and space complexities are in \cgalBigO{n} +and \cgalBigO{1}, respectively. In order to ensure robustness and correctness you must use a kernel that guarantees exact constructions as well as exact predicates, e,g,. `Exact_predicates_exact_constructions_kernel`. diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index f7894c74eb5..a070f1522d3 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -26,8 +26,6 @@ #include #include -#include - #include #include #include @@ -107,7 +105,7 @@ public: template class Multiple_kd_tree { - static_assert(boost::is_pointer::value, "SAVED_OBJECT is not a pointer."); + static_assert(std::is_pointer::value, "SAVED_OBJECT is not a pointer."); private: typedef Traits_ Traits; typedef typename Traits::FT NT; diff --git a/Solver_interface/include/CGAL/Eigen_sparse_matrix.h b/Solver_interface/include/CGAL/Eigen_sparse_matrix.h index 20e8962bb15..8e123deeb52 100644 --- a/Solver_interface/include/CGAL/Eigen_sparse_matrix.h +++ b/Solver_interface/include/CGAL/Eigen_sparse_matrix.h @@ -202,8 +202,8 @@ public: /// Read access to a matrix coefficient. /// /// \warning Complexity: - /// - O(log(n)) if the matrix is already built. - /// - O(n) if the matrix is not built. + /// - \cgalBigO{log(n)} if the matrix is already built. + /// - \cgalBigO{n} if the matrix is not built. /// `n` being the number of entries in the matrix. /// /// \pre 0 <= i < row_dimension(). diff --git a/Spatial_searching/include/CGAL/Fuzzy_iso_box.h b/Spatial_searching/include/CGAL/Fuzzy_iso_box.h index 3aeaeb550e8..0b34898eff9 100644 --- a/Spatial_searching/include/CGAL/Fuzzy_iso_box.h +++ b/Spatial_searching/include/CGAL/Fuzzy_iso_box.h @@ -23,8 +23,6 @@ #include #include -#include -#include #include @@ -63,9 +61,9 @@ namespace CGAL { private: - typename boost::remove_cv< - typename boost::remove_reference< typename Construct_min_vertex_d::result_type >::type - >::type min, max; + std::remove_cv_t< + std::remove_reference_t< typename Construct_min_vertex_d::result_type > + > min, max; Cartesian_const_iterator_d min_begin, max_begin; FT eps; unsigned int dim; diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 317f6a78bad..4ee61cb9214 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -335,7 +335,7 @@ public: } #ifndef CGAL_TBB_STRUCTURE_IN_KD_TREE - static_assert (!(boost::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif diff --git a/Spatial_searching/include/CGAL/Kd_tree_node.h b/Spatial_searching/include/CGAL/Kd_tree_node.h index 02af0663d6a..c6af70495a2 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_node.h +++ b/Spatial_searching/include/CGAL/Kd_tree_node.h @@ -435,7 +435,7 @@ namespace CGAL { private: // private variables for leaf nodes - boost::int32_t n; // denotes number of items in a leaf node + std::int32_t n; // denotes number of items in a leaf node iterator data; // iterator to data in leaf node @@ -503,7 +503,7 @@ namespace CGAL { private: // private variables for internal nodes - boost::int32_t cut_dim; + std::int32_t cut_dim; FT cut_val; Node_handle lower_ch, upper_ch; @@ -653,7 +653,7 @@ namespace CGAL { private: // private variables for internal nodes - boost::uint8_t cut_dim; + std::uint8_t cut_dim; FT cut_val; Node_handle lower_ch, upper_ch; @@ -714,7 +714,7 @@ namespace CGAL { inline void set_separator(Separator& sep){ - cut_dim = static_cast(sep.cutting_dimension()); + cut_dim = static_cast(sep.cutting_dimension()); cut_val = sep.cutting_value(); } diff --git a/Spatial_searching/include/CGAL/Search_traits_adapter.h b/Spatial_searching/include/CGAL/Search_traits_adapter.h index f93fc340b7a..ff640dc639a 100644 --- a/Spatial_searching/include/CGAL/Search_traits_adapter.h +++ b/Spatial_searching/include/CGAL/Search_traits_adapter.h @@ -225,13 +225,13 @@ public: // Select type of iterator + construct class depending on whether // point map is lvalue or not typedef typename boost::mpl::if_< - boost::is_reference::reference>, + std::is_reference::reference>, typename Base::Cartesian_const_iterator_d, No_lvalue_iterator>::type Cartesian_const_iterator_d; typedef typename boost::mpl::if_< - boost::is_reference::reference>, + std::is_reference::reference>, Construct_cartesian_const_iterator_d_lvalue, Construct_cartesian_const_iterator_d_no_lvalue>::type Construct_cartesian_const_iterator_d; diff --git a/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h b/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h index 4ef263f5916..bd3e9f0b8ff 100644 --- a/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h +++ b/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h @@ -22,7 +22,6 @@ #include #include #include -#include namespace CGAL { namespace internal{ @@ -124,7 +123,7 @@ public: void sort() { -std::sort(m_data.begin(), boost::next(m_data.begin(),m_count), m_comp); +std::sort(m_data.begin(), std::next(m_data.begin(),m_count), m_comp); } protected: diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h index 59df305b5c4..1f1cedc6eb3 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h @@ -17,8 +17,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB #include #endif @@ -157,8 +155,8 @@ public: #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 2; if (std::distance(begin,end) <= _limit) diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h index 6fc128cd61a..3fb4a3120ae 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h @@ -18,8 +18,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB #include #endif @@ -180,8 +178,8 @@ public: #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 3, z = (x + 2) % 3; if ((end - begin) <= _limit) return; diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h index f9fc7ca78c4..4ff69066a3a 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h @@ -344,7 +344,7 @@ void Straight_skeleton_builder_2::CollectNewEvents( Vertex_handle aNode // or vertex events (or edge events of course). // // Each vertex wavefront (reflex or not) results in one and only one event from a set of possible events. - // It can result in a edge event against the vertex wavefronts emerging from the adjacent vertices (in the current polygon, not + // It can result in an edge event against the vertex wavefronts emerging from the adjacent vertices (in the current polygon, not // in the input polygon); or it can result in a split event (or vertex event) against any other wavefront in the rest of // current polygon. diff --git a/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h b/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h index 1ecff298f55..87994e60aa9 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h +++ b/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h @@ -348,7 +348,7 @@ std::istream& operator>>( std::istream& in, File_header_OFF& h) { // Read remaining size value(s). int n_h; if ( h.binary()) { - boost::int32_t a, b, c; + std::int32_t a, b, c; I_Binary_read_big_endian_integer32( in, a); if ( h.n_dimensional()) { h.set_dimension( a); diff --git a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h index 80629599818..8ec2d14334b 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h @@ -656,7 +656,7 @@ public: if(has_colors()) { - boost::int32_t k; + std::int32_t k; I_Binary_read_big_endian_integer32(m_in, k); if(k<0 || k>4) { @@ -688,7 +688,7 @@ public: CGAL_assertion(current_facet < size_of_facets()); if(binary()) { - boost::int32_t i32; + std::int32_t i32; I_Binary_read_big_endian_integer32(m_in, i32); size = i32; } @@ -735,7 +735,7 @@ public: std::size_t current_facet) { if(binary()){ - boost::int32_t i32; + std::int32_t i32; I_Binary_read_big_endian_integer32(m_in, i32); index = i32; } @@ -793,7 +793,7 @@ public: // Take care of trailing information like color triples. if(binary()) { - boost::int32_t k; + std::int32_t k; I_Binary_read_big_endian_integer32(m_in, k); if(k<0 || k>4) { diff --git a/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h b/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h index 91860254f47..d608a7e38f4 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h @@ -129,7 +129,7 @@ public: void write_facet_begin(std::size_t no) { if(m_header.binary()) - I_Binary_write_big_endian_integer32(out(), static_cast(no)); + I_Binary_write_big_endian_integer32(out(), static_cast(no)); else out() << no << ' '; } @@ -137,7 +137,7 @@ public: void write_facet_vertex_index(std::size_t index) { if(m_header.binary()) - I_Binary_write_big_endian_integer32(out(), static_cast(index)); + I_Binary_write_big_endian_integer32(out(), static_cast(index)); else out() << ' ' << index; } diff --git a/Stream_support/include/CGAL/IO/PLY.h b/Stream_support/include/CGAL/IO/PLY.h index 34dfd1ddba6..7f72b37a3f5 100644 --- a/Stream_support/include/CGAL/IO/PLY.h +++ b/Stream_support/include/CGAL/IO/PLY.h @@ -81,13 +81,13 @@ bool read_PLY(std::istream& is, bool has_colors = false; std::string rtag = "r", gtag = "g", btag = "b"; - if((element.has_property("red") || element.has_property("r")) && - (element.has_property("green") || element.has_property("g")) && - (element.has_property("blue") || element.has_property("b"))) + if((element.has_property("red") || element.has_property("r")) && + (element.has_property("green") || element.has_property("g")) && + (element.has_property("blue") || element.has_property("b"))) { has_colors = true; - if(element.has_property("red")) + if(element.has_property("red")) { rtag = "red"; gtag = "green"; @@ -106,17 +106,17 @@ bool read_PLY(std::istream& is, return false; } - std::tuple new_vertex; + std::tuple new_vertex; if(has_colors) { internal::process_properties(element, new_vertex, make_ply_point_reader(CGAL::make_nth_of_tuple_property_map<0>(new_vertex)), std::make_pair(CGAL::make_nth_of_tuple_property_map<1>(new_vertex), - PLY_property(rtag.c_str())), + PLY_property(rtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<2>(new_vertex), - PLY_property(gtag.c_str())), + PLY_property(gtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<3>(new_vertex), - PLY_property(btag.c_str()))); + PLY_property(btag.c_str()))); *vc_out++ = Color_rgb(get<1>(new_vertex), get<2>(new_vertex), get<3>(new_vertex)); } @@ -131,21 +131,21 @@ bool read_PLY(std::istream& is, } else if(element.name() == "face" || element.name() == "faces") { - if(element.has_property >("vertex_indices")) + if(element.has_property >("vertex_indices")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); } - else if(element.has_property >("vertex_indices")) + else if(element.has_property >("vertex_indices")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); } - else if(element.has_property >("vertex_index")) + else if(element.has_property >("vertex_index")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); } - else if(element.has_property >("vertex_index")) + else if(element.has_property >("vertex_index")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); } else { diff --git a/Stream_support/include/CGAL/IO/PLY/PLY_reader.h b/Stream_support/include/CGAL/IO/PLY/PLY_reader.h index ddbb1835054..a4a50bd36c8 100644 --- a/Stream_support/include/CGAL/IO/PLY/PLY_reader.h +++ b/Stream_support/include/CGAL/IO/PLY/PLY_reader.h @@ -37,12 +37,12 @@ m_elements.back().add_property(new PLY_read_typed_list_with_typed_size< SIZE_TYPE , INDEX_TYPE >(name, format)) #define TRY_TO_GENERATE_LIST_PROPERTY(STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) \ - TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uchar", "uint8", boost::uint8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("char", "int8", boost::int8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("ushort", "uint16", boost::uint16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("short", "int16", boost::int16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uint", "uint32", boost::uint32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("int", "int32", boost::int32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) + TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uchar", "uint8", std::uint8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("char", "int8", std::int8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("ushort", "uint16", std::uint16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("short", "int16", std::int16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uint", "uint32", std::uint32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("int", "int32", std::int32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) namespace CGAL { @@ -529,23 +529,23 @@ public: return false; } - TRY_TO_GENERATE_LIST_PROPERTY("char", "int8", boost::int8_t); - else TRY_TO_GENERATE_LIST_PROPERTY("uchar", "uint8", boost::uint8_t); - else TRY_TO_GENERATE_LIST_PROPERTY("short", "int16", boost::int16_t); - else TRY_TO_GENERATE_LIST_PROPERTY("ushort", "uint16", boost::uint16_t); - else TRY_TO_GENERATE_LIST_PROPERTY("int", "int32", boost::int32_t); - else TRY_TO_GENERATE_LIST_PROPERTY("uint", "uint32", boost::uint32_t); + TRY_TO_GENERATE_LIST_PROPERTY("char", "int8", std::int8_t); + else TRY_TO_GENERATE_LIST_PROPERTY("uchar", "uint8", std::uint8_t); + else TRY_TO_GENERATE_LIST_PROPERTY("short", "int16", std::int16_t); + else TRY_TO_GENERATE_LIST_PROPERTY("ushort", "uint16", std::uint16_t); + else TRY_TO_GENERATE_LIST_PROPERTY("int", "int32", std::int32_t); + else TRY_TO_GENERATE_LIST_PROPERTY("uint", "uint32", std::uint32_t); else TRY_TO_GENERATE_LIST_PROPERTY("float", "float32", float); else TRY_TO_GENERATE_LIST_PROPERTY("double", "float64", double); } else { - TRY_TO_GENERATE_PROPERTY("char", "int8", boost::int8_t); - else TRY_TO_GENERATE_PROPERTY("uchar", "uint8", boost::uint8_t); - else TRY_TO_GENERATE_PROPERTY("short", "int16", boost::int16_t); - else TRY_TO_GENERATE_PROPERTY("ushort", "uint16", boost::uint16_t); - else TRY_TO_GENERATE_PROPERTY("int", "int32", boost::int32_t); - else TRY_TO_GENERATE_PROPERTY("uint", "uint32", boost::uint32_t); + TRY_TO_GENERATE_PROPERTY("char", "int8", std::int8_t); + else TRY_TO_GENERATE_PROPERTY("uchar", "uint8", std::uint8_t); + else TRY_TO_GENERATE_PROPERTY("short", "int16", std::int16_t); + else TRY_TO_GENERATE_PROPERTY("ushort", "uint16", std::uint16_t); + else TRY_TO_GENERATE_PROPERTY("int", "int32", std::int32_t); + else TRY_TO_GENERATE_PROPERTY("uint", "uint32", std::uint32_t); else TRY_TO_GENERATE_PROPERTY("float", "float32", float); else TRY_TO_GENERATE_PROPERTY("double", "float64", double); } @@ -711,12 +711,12 @@ bool read_PLY_faces(std::istream& in, bool has_colors = false; std::string rtag = "r", gtag = "g", btag = "b"; - if((element.has_property("red") || element.has_property("r")) && - (element.has_property("green") || element.has_property("g")) && - (element.has_property("blue") || element.has_property("b"))) + if((element.has_property("red") || element.has_property("r")) && + (element.has_property("green") || element.has_property("g")) && + (element.has_property("blue") || element.has_property("b"))) { has_colors = true; - if(element.has_property("red")) + if(element.has_property("red")) { rtag = "red"; gtag = "green"; @@ -735,7 +735,7 @@ bool read_PLY_faces(std::istream& in, return false; } - std::tuple, boost::uint8_t, boost::uint8_t, boost::uint8_t> new_face; + std::tuple, std::uint8_t, std::uint8_t, std::uint8_t> new_face; if(has_colors) { @@ -743,11 +743,11 @@ bool read_PLY_faces(std::istream& in, std::make_pair(CGAL::make_nth_of_tuple_property_map<0>(new_face), PLY_property >(vertex_indices_tag)), std::make_pair(CGAL::make_nth_of_tuple_property_map<1>(new_face), - PLY_property(rtag.c_str())), + PLY_property(rtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<2>(new_face), - PLY_property(gtag.c_str())), + PLY_property(gtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<3>(new_face), - PLY_property(btag.c_str()))); + PLY_property(btag.c_str()))); *fc_out++ = Color_rgb(get<1>(new_face), get<2>(new_face), get<3>(new_face)); } diff --git a/Stream_support/include/CGAL/IO/STL.h b/Stream_support/include/CGAL/IO/STL.h index d2c31b00cf8..dfa3ecded7e 100644 --- a/Stream_support/include/CGAL/IO/STL.h +++ b/Stream_support/include/CGAL/IO/STL.h @@ -308,7 +308,7 @@ bool write_STL(std::ostream& os, if(get_mode(os) == BINARY) { os << "FileType: Binary "; - const boost::uint32_t N32 = static_cast(facets.size()); + const std::uint32_t N32 = static_cast(facets.size()); os.write(reinterpret_cast(&N32), sizeof(N32)); for(const Triangle& face : facets) diff --git a/Stream_support/include/CGAL/IO/STL/STL_reader.h b/Stream_support/include/CGAL/IO/STL/STL_reader.h index 919ceeddd56..16970596d09 100644 --- a/Stream_support/include/CGAL/IO/STL/STL_reader.h +++ b/Stream_support/include/CGAL/IO/STL/STL_reader.h @@ -209,7 +209,7 @@ bool parse_binary_STL(std::istream& is, int index = 0; std::map index_map; - boost::uint32_t N32; + std::uint32_t N32; if(!(is.read(reinterpret_cast(&N32), sizeof(N32)))) { if(verbose) diff --git a/Stream_support/include/CGAL/IO/helpers.h b/Stream_support/include/CGAL/IO/helpers.h index 175f95b189d..bba12aa85a7 100644 --- a/Stream_support/include/CGAL/IO/helpers.h +++ b/Stream_support/include/CGAL/IO/helpers.h @@ -80,7 +80,7 @@ struct is_Range : public boost::mpl::and_< boost::has_range_const_iterator, // should be a range boost::mpl::not_ >, // but not a Point_set_3 - boost::mpl::not_ > > // or a std::string / char [x] + boost::mpl::not_ > > // or a std::string / char [x] { }; template diff --git a/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt b/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt index 82555e4488c..e7a521eaaab 100644 --- a/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt +++ b/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt @@ -398,7 +398,7 @@ Result of the run of the draw_surface_mesh program. A window shows the surface m \section sectionSurfaceMeshImplementation Implementation Details -As integer type for the indices we have chosen `boost::uint32_t`. On 64 bit operating systems they +As integer type for the indices we have chosen `std::uint32_t`. On 64 bit operating systems they take only half the size of a pointer. They still allow to have meshes with 2 billion elements. We use `std::vector` for storing properties. So by accessing the address diff --git a/Surface_mesh/examples/Surface_mesh/sm_iterators.cpp b/Surface_mesh/examples/Surface_mesh/sm_iterators.cpp index 6f5270b76cf..6fe9d48402e 100644 --- a/Surface_mesh/examples/Surface_mesh/sm_iterators.cpp +++ b/Surface_mesh/examples/Surface_mesh/sm_iterators.cpp @@ -41,8 +41,8 @@ int main() vb = r.begin(); ve = r.end(); // or the boost Range API - vb = boost::begin(r); - ve = boost::end(r); + vb = std::begin(r); + ve = std::end(r); // or with boost::tie, as the CGAL range derives from std::pair for(boost::tie(vb, ve) = m.vertices(); vb != ve; ++vb){ diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 47232cbabd5..c109f002a3a 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -34,7 +34,6 @@ #include #include -#include #include #include @@ -60,7 +59,7 @@ namespace CGAL { class SM_Index { public: - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; /// Constructor. %Default construction creates an invalid index. /// We write -1, which is /// (std::numeric_limits::max)() @@ -239,7 +238,7 @@ namespace CGAL { class SM_Edge_index { public: - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; SM_Edge_index() : halfedge_((std::numeric_limits::max)()) { } @@ -364,7 +363,7 @@ public: typedef P Point; /// The type used to represent an index. - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; ///@} @@ -1084,7 +1083,7 @@ public: /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added. Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2) { - boost::array + std::array v = {{v0, v1, v2}}; return add_face(v); } @@ -1093,7 +1092,7 @@ public: /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added. Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2, Vertex_index v3) { - boost::array + std::array v = {{v0, v1, v2, v3}}; return add_face(v); } diff --git a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h index 5bff49ebab5..281c2b37093 100644 --- a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h +++ b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h @@ -71,8 +71,8 @@ class SM_index_pmap { public: typedef boost::readable_property_map_tag category; - typedef boost::uint32_t value_type; - typedef boost::uint32_t reference; + typedef std::uint32_t value_type; + typedef std::uint32_t reference; typedef VEF key_type; value_type operator[](const key_type& vd) const @@ -238,7 +238,7 @@ template typename boost::lazy_disable_if < - boost::is_const, + std::is_const, internal::Get_vertex_point_map_for_Surface_mesh_return_type >::type get(CGAL::vertex_point_t, const CGAL::Surface_mesh& g) { @@ -260,13 +260,13 @@ namespace internal { const TYPE& x) \ { return get(get(p, sm), x); } \ -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::vertex_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::vertex_index_t, SM_Vertex_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::edge_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::edge_index_t, SM_Edge_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::halfedge_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::halfedge_index_t, SM_Halfedge_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::face_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::face_index_t, SM_Face_index) CGAL_SM_INTRINSIC_PROPERTY(Point&, CGAL::vertex_point_t, SM_Vertex_index) diff --git a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h index b3881cb789e..b6fbb66f968 100644 --- a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h +++ b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h @@ -79,7 +79,7 @@ namespace CGAL { template typename boost::lazy_disable_if< - boost::is_const

      , + std::is_const

      , Get_pmap_of_surface_mesh > >::type inline get(CGAL::face_patch_id_t, Surface_mesh

      & smesh) @@ -91,7 +91,7 @@ inline get(CGAL::face_patch_id_t, Surface_mesh

      & smesh) template typename boost::lazy_disable_if< - boost::is_const

      , + std::is_const

      , Get_pmap_of_surface_mesh > >::type inline get(CGAL::face_patch_id_t, const Surface_mesh

      & smesh) @@ -103,7 +103,7 @@ inline get(CGAL::face_patch_id_t, const Surface_mesh

      & smesh) #define CGAL_PROPERTY_SURFACE_MESH_RETURN_TYPE(Tag) \ typename boost::lazy_disable_if< \ - boost::is_const

      , \ + std::is_const

      , \ Get_pmap_of_surface_mesh \ >::type @@ -153,7 +153,7 @@ inline get(CGAL::vertex_feature_degree_t, const Surface_mesh

      & smesh) template typename boost::lazy_disable_if< - boost::is_const

      , + std::is_const

      , Get_pmap_of_surface_mesh > >::type inline get(CGAL::vertex_incident_patches_t, Surface_mesh

      & smesh) @@ -164,7 +164,7 @@ typename boost::lazy_disable_if< template typename boost::lazy_disable_if< - boost::is_const

      , + std::is_const

      , Get_pmap_of_surface_mesh > >::type inline get(CGAL::vertex_incident_patches_t, const Surface_mesh

      & smesh) diff --git a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h index 23f4f074bf3..d1df35ed90f 100644 --- a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h +++ b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h @@ -59,7 +59,7 @@ namespace CGAL { #define CGAL_PROPERTY_SURFACE_MESH_RETURN_TYPE(Tag) \ typename boost::lazy_disable_if< \ - boost::is_const

      , \ + std::is_const

      , \ Get_pmap_of_surface_mesh \ >::type diff --git a/Surface_mesh/test/Surface_mesh/sm_circulator_test.cpp b/Surface_mesh/test/Surface_mesh/sm_circulator_test.cpp index bf446b30959..5e932869a44 100644 --- a/Surface_mesh/test/Surface_mesh/sm_circulator_test.cpp +++ b/Surface_mesh/test/Surface_mesh/sm_circulator_test.cpp @@ -64,20 +64,20 @@ struct test_emptiness : public Surface_fixture assert(m.is_isolated(iv)); Sm::Vertex_around_target_range vr = m.vertices_around_target(m.halfedge(iv)); - assert(is_empty_range(boost::begin(vr), boost::end(vr))); + assert(is_empty_range(std::begin(vr), std::end(vr))); Sm::Face_around_target_range fr = m.faces_around_target(m.halfedge(iv)); - assert(is_empty_range(boost::begin(fr), boost::end(fr))); + assert(is_empty_range(std::begin(fr), std::end(fr))); Sm::Halfedge_around_target_range hr = m.halfedges_around_target(m.halfedge(iv)); - assert(is_empty_range(boost::begin(hr), boost::end(hr))); + assert(is_empty_range(std::begin(hr), std::end(hr))); // not true for everything else m.remove_vertex(iv); assert(m.is_removed(iv)); Sm::Vertex_iterator vb, ve; for(boost::tie(vb, ve) = m.vertices(); vb != ve; ++vb) { Sm::Vertex_around_target_range vr = m.vertices_around_target(m.halfedge(*vb)); - assert(!is_empty_range(boost::begin(vr), boost::end(vr))); + assert(!is_empty_range(std::begin(vr), std::end(vr))); } } }; diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 566aec602d7..222a99f77e7 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -1959,7 +1959,7 @@ private: /*! * @brief checks if a vertex is attached with an anchor. * @tparam VertexAnchorIndexMap `ReadablePropertyMap` - * with `boost::graph_traights::vertex_descriptor` as key and `std::size_t` as value type + * with `boost::graph_traits::vertex_descriptor` as key and `std::size_t` as value type * @param vtx a vertex descriptor * @param vanchor_map vertex anchor index map */ diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp index 5784d3a1fdb..09f644dd47d 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp @@ -10,8 +10,6 @@ #include #include -#include - #include #include #include @@ -28,7 +26,7 @@ typedef boost::graph_traits::face_descriptor face_descriptor typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::array Vd_array; +typedef std::array Vd_array; typedef CGAL::Unique_hash_map UV_uhm; typedef boost::associative_property_map UV_pmap; diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h index 2e0f32ed7fd..252f0864a1e 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h @@ -38,7 +38,6 @@ #endif #endif -#include #include #include diff --git a/Surface_mesh_segmentation/doc/Surface_mesh_segmentation/Surface_Mesh_Segmentation.txt b/Surface_mesh_segmentation/doc/Surface_mesh_segmentation/Surface_Mesh_Segmentation.txt index c947aac7dd7..ca138cd3e89 100644 --- a/Surface_mesh_segmentation/doc/Surface_mesh_segmentation/Surface_Mesh_Segmentation.txt +++ b/Surface_mesh_segmentation/doc/Surface_mesh_segmentation/Surface_Mesh_Segmentation.txt @@ -102,12 +102,12 @@ The energy function minimized using alpha-expansion graph cut algorithm \cgalCit \f$ E(\bar{x}) = \sum\limits_{f \in F} e_1(f, x_f) + \lambda \sum\limits_{ \{f,g\} \in N} e_2(x_f, x_g) \f$ - \f$ e_1(f, x_f) = -log(max(P(f|x_f), \epsilon)) \f$ + \f$ e_1(f, x_f) = -\log(\max(P(f|x_f), \epsilon_1)) \f$ \f$ e_2(x_f, x_g) = \left \{ \begin{array}{rl} - -log(\theta(f,g)/\pi) &\mbox{ $x_f \ne x_g$} \\ + -\log(w\max(1 - |\theta(f,g)|/\pi, \epsilon_2)) &\mbox{ $x_f \ne x_g$} \\ 0 &\mbox{ $x_f = x_g$} \end{array} \right \} \f$ @@ -119,8 +119,8 @@ where: - \f$x_f\f$ denotes the cluster assigned to facet \f$f\f$, - \f$P(f|x_p)\f$ denotes the probability of assigning facet \f$f\f$ to cluster \f$x_p\f$, - \f$\theta(f,g)\f$ denotes the dihedral angle between neighboring facets \f$f\f$ and \f$g\f$: - concave angles and convex angles are weighted by 1 and 0.1 respectively, - - \f$\epsilon\f$ denotes the minimal probability threshold, + convex angles, \f$[-\pi, 0]\f$, and concave angles, \f$]0, \pi]\f$, are weighted by \f$w=0.08\f$ and \f$w=1\f$, respectively, + - \f$\epsilon_1, \epsilon_2\f$ denote minimal probability and angle thresholds, respectively, - \f$\lambda \in [0,1]\f$ denotes a smoothness parameter. @@ -128,7 +128,7 @@ where: Note both terms of the energy function, \f$ e_1 \f$ and \f$ e_2 \f$, are always non-negative. The first term of the energy function provides the contribution of the soft clustering probabilities. -The second term of the energy function is a geometric criterion that is larger when two adjacent facets sharing a sharp and concave edge are not in the same cluster. +The second term of the energy function is a geometric criterion that is larger the closer to \f$\pm\pi\f$ the dihedral angle between two adjacent facets not in the same cluster is. The smoothness parameter makes this geometric criterion more or less prevalent. Assigning a high value to the smoothness parameter results in a small number of segments (since constructing a segment boundary would be expensive). diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h index c6528a2b403..ae2a6de7ae0 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h @@ -47,7 +47,7 @@ public: // activate functions below if K::FT is floating point and fast_bbox_intersection = true template std::enable_if_t< - boost::is_floating_point::value && fast_bbox_intersection, + std::is_floating_point::value && fast_bbox_intersection, bool > operator()(const CGAL::Segment_3& segment, const Bounding_box& bbox) const { const Point_3& p = segment.source(); @@ -65,7 +65,7 @@ public: template std::enable_if_t< - boost::is_floating_point::value && fast_bbox_intersection, + std::is_floating_point::value && fast_bbox_intersection, bool > operator()(const CGAL::Ray_3& ray, const Bounding_box& bbox) const { const Point_3& p = ray.source(); diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h index 60892a3a56a..35ec3e2d345 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h @@ -48,7 +48,7 @@ public: * T2 should be constructable by T1 * * Implementation note: it is a variant of Floyd generator, and has uniform distribution - * where k = number of centers = complexity is O(k log k), and mem overhead is O(k) + * where k = number of centers = complexity is \cgalBigO{k log k}, and mem overhead is \cgalBigO{k} * * I also left previous implementation below, it might be useful where number of centers close to number of points */ @@ -78,7 +78,7 @@ public: // To future reference, I also left prev implementation which is a variant of Fisher–Yates shuffle, however to keep `points` intact I use another vector to // store and swap indices. - // where n = number of points; complexity = O(n), memory overhead = O(n) + // where n = number of points; complexity = \cgalBigO{n}, memory overhead = \cgalBigO{n} /* template void forgy_initialization(std::size_t number_of_centers, const std::vector& points, std::vector& centers) diff --git a/Surface_mesh_shortest_path/doc/Surface_mesh_shortest_path/Surface_mesh_shortest_path.txt b/Surface_mesh_shortest_path/doc/Surface_mesh_shortest_path/Surface_mesh_shortest_path.txt index cce82b0061f..9ea81028369 100644 --- a/Surface_mesh_shortest_path/doc/Surface_mesh_shortest_path/Surface_mesh_shortest_path.txt +++ b/Surface_mesh_shortest_path/doc/Surface_mesh_shortest_path/Surface_mesh_shortest_path.txt @@ -46,7 +46,7 @@ type the property map must provide an index between 0 and the number of simplice the class `CGAL::Surface_mesh` as model of `FaceListGraph`. If you use the class `CGAL::Polyhedron_3`, you should use it with the item class `CGAL::Polyhedron_items_with_id_3`, for which default property maps are provided. -This item class associates to each simplex an index that provides a \f$O(1)\f$ time access to the indices. +This item class associates to each simplex an index that provides a \cgalBigO{1} time access to the indices. Note that the initialization of the property maps requires a call to `set_halfedgeds_items_id()`. The access to the embedding of each vertex is done using a point vertex property map associating to each vertex a 3D point. @@ -111,7 +111,7 @@ the kernel's number type to `double`, using the `std::sqrt`, and converting it b with directly supports square roots to get the most precision of the shortest path computations. Using a kernel such as `CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt` with this package will indeed provide the exact shortest paths, -but it will be extremely slow. Indeed, in order to compute the distance along the surface, it is necessary to unfold sequences of faces, edge-to-edge, out into a common plane. The functor `SurfaceMeshShortestPathTraits::Construct_triangle_3_to_triangle_2_projection` provides an initial layout of the first face in a sequence, by rotating a given face into the `xy`-plane. `SurfaceMeshShortestPathTraits::Construct_triangle_3_along_segment_2_flattening` unfolds a triangle into the plane, using a specified segment as a base. Since this results in a chain of constructed triangles in the plane, the exact representation types used with this kernel (either `CORE::Expr` or `leda_real`) will process extremely slow, even on very simple inputs. This is because the exact representations will effectively add an \f$O(n)\f$ factor to every computation. +but it will be extremely slow. Indeed, in order to compute the distance along the surface, it is necessary to unfold sequences of faces, edge-to-edge, out into a common plane. The functor `SurfaceMeshShortestPathTraits::Construct_triangle_3_to_triangle_2_projection` provides an initial layout of the first face in a sequence, by rotating a given face into the `xy`-plane. `SurfaceMeshShortestPathTraits::Construct_triangle_3_along_segment_2_flattening` unfolds a triangle into the plane, using a specified segment as a base. Since this results in a chain of constructed triangles in the plane, the exact representation types used with this kernel (either `CORE::Expr` or `leda_real`) will process extremely slow, even on very simple inputs. This is because the exact representations will effectively add an \cgalBigO{n} factor to every computation. \section Surface_mesh_shortest_pathExamples Examples diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index 0b94bf1d71c..189bf48e16d 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -45,7 +45,7 @@ namespace CGAL { \brief Computes shortest surface paths from one or more source points on a surface mesh. -\details Uses an optimized variation of Chen and Han's \f$ O(n^2) \f$ algorithm by Xin and Wang. +\details Uses an optimized variation of Chen and Han's \cgalBigO{n^2} algorithm by Xin and Wang. Refer to those respective papers for the details of the implementation. \tparam Traits a model of `SurfaceMeshShortestPathTraits`. diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h index 8a67d99a1d2..5e2955124f5 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h @@ -22,8 +22,6 @@ #include #include -#include - namespace CGAL { /*! diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h index a662b4c24c0..612b9182046 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h @@ -697,7 +697,7 @@ is_constrained(const vertex_descriptor v) const } // Some edges are NOT collapsible: doing so would break the topological consistency of the mesh. -// This function returns true if a edge 'p->q' can be collapsed. +// This function returns true if an edge 'p->q' can be collapsed. // // An edge p->q can be collapsed iff it satisfies the "link condition" // (as described in the "Mesh Optimization" article of Hoppe et al (1993)) diff --git a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h index 121bbfc3b54..44b422ac0c9 100644 --- a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h +++ b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h @@ -234,6 +234,10 @@ public: typedef typename boost::graph_traits::edge_descriptor edge_descriptor; typedef typename boost::graph_traits::edge_iterator edge_iterator; + struct Less_id { + bool operator()(const edge_descriptor& x, const edge_descriptor& y) const { return x.id() < y.id(); } + }; + // Get weight from the weight interface. typedef CGAL::Weights::Cotangent_weight Weight_calculator; @@ -1425,7 +1429,7 @@ std::size_t Mean_curvature_flow_skeletonization edges_to_collapse, non_topologically_valid_collapses; + std::set edges_to_collapse, non_topologically_valid_collapses; for(edge_descriptor ed : edges(m_tmesh)) if ( edge_should_be_collapsed(ed) ) diff --git a/Surface_mesh_topology/doc/Surface_mesh_topology/Surface_mesh_topology.txt b/Surface_mesh_topology/doc/Surface_mesh_topology/Surface_mesh_topology.txt index c77e981af71..4ce425fb91f 100644 --- a/Surface_mesh_topology/doc/Surface_mesh_topology/Surface_mesh_topology.txt +++ b/Surface_mesh_topology/doc/Surface_mesh_topology/Surface_mesh_topology.txt @@ -53,7 +53,7 @@ Given a cycle drawn on a surface one can ask if the cycle can be continuously de The algorithm implemented in this package builds a data structure to efficiently answer queries of the following forms: - Given a combinatorial surface \f$\cal{M}\f$ and a closed combinatorial curve specified as a sequence of edges of \f$\cal{M}\f$, decide if the curve is homotopic to a simple one on \f$\cal{M}\f$. -The algorithm used is based on a paper by Despré and Lazarus \cgalCite{cgal:dl-cginc-19}, providing a \f$O(n + l\log{l})\f$-time algorithm where \f$n\f$ is the complexity of \f$\cal{M}\f$ and \f$l\f$ is the length of the path. +The algorithm used is based on a paper by Despré and Lazarus \cgalCite{cgal:dl-cginc-19}, providing a \cgalBigO{n + l\log{l}}-time algorithm where \f$n\f$ is the complexity of \f$\cal{M}\f$ and \f$l\f$ is the length of the path. \section SMTopology_HowToUse API Description @@ -322,7 +322,7 @@ As the algorithm inductively builds orderings, it has to determine a relative or The red edge is being processed and is compared against the pink edge which is the first edge of the path. The blue and green edges are the first diverging pair when tracing backward. The dashed line means that edges have not been processed yet. Since the green edge lies to the right of the blue edge around the vertex, the red edge must be to the right of the pink edge in the ordering. \cgalFigureEnd -The transverse orderings are stored in red-black trees, one for each edge of the quadrangulation. So each insertion or search takes \f$O(\log{l})\f$ time, where \f$l\f$ is the length of the closed curve. +The transverse orderings are stored in red-black trees, one for each edge of the quadrangulation. So each insertion or search takes \cgalBigO{\log{l}} time, where \f$l\f$ is the length of the closed curve. \subsubsection SMTopology_Simplicity_Test_Verification Verify Ordering After computing a tentative ordering within the edges of the path, we have to verify that such an ordering could result in an intersection free arrangement. Since there is no intersection within an edge, we only need to verify this for each vertex in the quadrangulation. Each vertex is naturally associated with a circular ordering of the incident path edges by concatenating clockwise the orderings computed for every incident edge in the quadrangulation. We consider the two consecutive edges composing a turn (one going in the vertex, one going out of the vertex) at the vertex being verified as a pair. The ordering at the vertex is intersection free if and only if there is no two pairs crossing each other according to the clockwise ordering around the vertex. In other words, for any two pairs \f$(a, a')\f$ and \f$(b, b')\f$, none of the subsequences \f$a, b, a', b'\f$ or \f$a, b', a', b\f$ should appear in the clockwise ordering. This is very similar to verifying balanced parentheses in a string. We traverse clockwise at each vertex and use a stack-based algorithm to verify in linear time that the ordering produces a cycle without self-intersection. diff --git a/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h b/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h index b44c70ef305..661b69eb94d 100644 --- a/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h +++ b/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h @@ -40,7 +40,7 @@ class Face_graph_wrapper public: typedef HEG_ HEG; typedef Face_graph_wrapper Self; - typedef boost::uint32_t /*std::size_t*/ size_type; + typedef std::uint32_t /*std::size_t*/ size_type; typedef Self Refs; struct Dart_container diff --git a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h index ea5b79e2bfb..200ffb82937 100644 --- a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h +++ b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h @@ -71,7 +71,7 @@ struct Get_beta template struct Index_from_halfedge_descriptor { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -88,7 +88,7 @@ template struct Index_from_halfedge_descriptor > { using Mesh=CGAL::Surface_mesh

      ; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -99,7 +99,7 @@ struct Index_from_halfedge_descriptor > template struct Halfedge_descriptor_from_index { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -115,7 +115,7 @@ template struct Halfedge_descriptor_from_index > { using Mesh=CGAL::Surface_mesh

      ; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -126,7 +126,7 @@ struct Halfedge_descriptor_from_index > template struct Is_index_used { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; static bool run(const Mesh& m, size_type i) { return i struct Is_index_used > { using Mesh=CGAL::Surface_mesh

      ; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; static bool run(const Mesh& m, size_type i) { return i<(m.number_of_halfedges()+m.number_of_removed_halfedges()) && diff --git a/Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt b/Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt index 05eba3e9757..097490409ba 100644 --- a/Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt +++ b/Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt @@ -13,7 +13,7 @@ namespace CGAL { Let \f$ {\mathcal C} = \{C_1, C_2, \ldots, C_n\}\f$ be a set of curves. We wish to compute all intersection points between two curves in the set in an output-sensitive manner, without having to go over -all \f$ O(n^2)\f$ curve pairs. To this end, we sweep an imaginary line +all \cgalBigO{n^2} curve pairs. To this end, we sweep an imaginary line \f$ l\f$ from \f$ x = -\infty\f$ to \f$ x = \infty\f$ over the plane. While sweeping the plane, we keep track of the order of curves intersecting it. This order changes at a finite number of event @@ -36,8 +36,8 @@ employs certified computations. This traits class must be a model of the `ArrangementTraits_2` concept - see the Chapter \ref chapterArrangement_on_surface_2 "2D Arrangements" for more details. -The complexity of the surface-sweep algorithm is \f$ O((n + -k)\log{n})\f$ where \f$ n\f$ is the number of the input curves and \f$ +The complexity of the surface-sweep algorithm is \cgalBigO{(n + +k)\log{n}} where \f$ n\f$ is the number of the input curves and \f$ k\f$ is the number of intersection points induced by these curves. \section Surface_sweep_2Example Example diff --git a/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h b/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h index d710a027cf2..9b5f303250d 100644 --- a/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h +++ b/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h @@ -285,7 +285,7 @@ public: namespace std { -// workaround a bug detected on at least g++ 4.4 where boost::next(Iterator) +// workaround a bug detected on at least g++ 4.4 where std::next(Iterator) // is picked as a candidate for next(h,g) template struct iterator_traits< CGAL::internal::TDS2_halfedge_descriptor > diff --git a/TDS_3/include/CGAL/Triangulation_simplex_3.h b/TDS_3/include/CGAL/Triangulation_simplex_3.h index aa2109b89ce..0754fb021c5 100644 --- a/TDS_3/include/CGAL/Triangulation_simplex_3.h +++ b/TDS_3/include/CGAL/Triangulation_simplex_3.h @@ -96,8 +96,10 @@ public: // returns the dimension of the simplex int dimension () const { - return (ref & 3); + if(ref == -1) return -1; + else return (ref & 3); } + // returns an incident cell: Cell_handle incident_cell() { return ch; @@ -161,6 +163,7 @@ operator==(Triangulation_simplex_3 s0, typename Sim::Cell_handle neighbor; switch (s0.dimension()) { + case -1: return s1.dimension() == -1; case (0): // Vertex return (s0.ch->vertex(s0.index(0)) == s1.ch->vertex(s1.index(0))); case (1): // Edge @@ -180,7 +183,7 @@ operator==(Triangulation_simplex_3 s0, } return false; case (3): - return (&(*s0.ch) == &(*s1.ch)); + return s0.ch.operator->() == s1.ch.operator->(); } CGAL_error(); return false; diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h index 77caca7318f..d2ababd2779 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -453,7 +452,7 @@ bool is_valid_collapse(const typename C3t3::Edge& edge, if (!ch->has_vertex(v1)) { //check orientation - boost::array pts = { ch->vertex(0)->point(), + std::array pts = { ch->vertex(0)->point(), ch->vertex(1)->point(), ch->vertex(2)->point(), ch->vertex(3)->point()}; @@ -486,7 +485,7 @@ bool is_valid_collapse(const typename C3t3::Edge& edge, if (!ch->has_vertex(v0)) { //check orientation - boost::array pts = { ch->vertex(0)->point(), + std::array pts = { ch->vertex(0)->point(), ch->vertex(1)->point(), ch->vertex(2)->point(), ch->vertex(3)->point() }; diff --git a/Triangulation/doc/Triangulation/Triangulation.txt b/Triangulation/doc/Triangulation/Triangulation.txt index ef305af708a..452891fa415 100644 --- a/Triangulation/doc/Triangulation/Triangulation.txt +++ b/Triangulation/doc/Triangulation/Triangulation.txt @@ -513,11 +513,11 @@ Then, for each point to insert, it locates it by walking in the triangulation, using the previously inserted vertex as a "hint". Finally, the point is inserted. In the worst case scenario, without spatial sort, the expected complexity is -\f$ O(n^{\lceil\frac{d}{2}\rceil+1}) \f$. +\cgalBigO{(n^{\lceil\frac{d}{2}\rceil+1}}$. When the algorithm is run on uniformly distributed points, the localization complexity is -\f$ O(n^{\frac{1}{d}}) \f$ and the size of the triangulation is \f$ O(n) \f$, which gives -a complexity of \f$ O(n^{1+\frac{1}{d}}) \f$ for the insertion. -With spatial sort and random points, one can expect a complexity of \f$ O(n\log n) \f$. +\cgalBigO{(n^{\frac{1}{d}}}$ and the size of the triangulation is \cgalBigO{(n}$, which gives +a complexity of \cgalBigO{(n^{1+\frac{1}{d}}}$ for the insertion. +With spatial sort and random points, one can expect a complexity of \cgalBigO{(n\log n}$. Please refer to \cgalCite{boissonnat2009Delaunay} for more details. We provide below (\cgalFigureRef{Triangulationfigbenchmarks100}, diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Delaunay_triangulation_2.h index 45a4fe12c20..ec43542e73f 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Delaunay_triangulation_2.h @@ -54,20 +54,20 @@ All the types defined in `Triangulation_2` are inherited. \cgalHeading{Implementation} Insertion is implemented by inserting in the triangulation, then -performing a sequence of Delaunay flips. The number of flips is \f$ O(d)\f$ +performing a sequence of Delaunay flips. The number of flips is \cgalBigO{d} if the new vertex is of degree \f$ d\f$ in the new triangulation. For -points distributed uniformly at random, insertion takes time \f$ O(1)\f$ on +points distributed uniformly at random, insertion takes time \cgalBigO{1} on average. Removal calls the removal in the triangulation and then re-triangulates the hole in such a way that the Delaunay criterion is satisfied. Removal of a -vertex of degree \f$ d\f$ takes time \f$ O(d^2)\f$. -The degree \f$ d\f$ is \f$ O(1)\f$ for a random +vertex of degree \f$ d\f$ takes time \cgalBigO{d^2}. +The degree \f$ d\f$ is \cgalBigO{1} for a random vertex in the triangulation. After a point location step, the nearest neighbor -is found in time \f$ O(n)\f$ in the -worst case, but in time \f$ O(1)\f$ +is found in time \cgalBigO{n} in the +worst case, but in time \cgalBigO{1} for vertices distributed uniformly at random and any query point. \sa `CGAL::Triangulation_2` diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h index f892df6a10c..570114a5b99 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h @@ -137,20 +137,20 @@ for faces of maximal dimension instead of faces. Locate is implemented by a line walk from a vertex of the face given as optional parameter (or from a finite vertex of `infinite_face()` if no optional parameter is given). It takes -time \f$ O(n)\f$ in the worst case, but only \f$ O(\sqrt{n})\f$ +time \cgalBigO{n} in the worst case, but only \cgalBigO{\sqrt{n}} on average if the vertices are distributed uniformly at random. Insertion of a point is done by locating a face that contains the point, and then splitting this face. If the point falls outside the convex hull, the triangulation is restored by flips. Apart from the location, insertion takes a time -time \f$ O(1)\f$. This bound is only an amortized bound +time \cgalBigO{1}. This bound is only an amortized bound for points located outside the convex hull. Removal of a vertex is done by removing all adjacent triangles, and -re-triangulating the hole. Removal takes time \f$ O(d^2)\f$ in the worst +re-triangulating the hole. Removal takes time \cgalBigO{d^2} in the worst case, if \f$ d\f$ is the degree of the removed vertex, -which is \f$ O(1)\f$ for a random vertex. +which is \cgalBigO{1} for a random vertex. The face, edge, and vertex iterators on finite features are derived from their counterparts visiting all (finite and infinite) diff --git a/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt b/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt index 1c9dc8781e2..249c5a0117d 100644 --- a/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt +++ b/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt @@ -412,7 +412,7 @@ The walk begins at a vertex of the face which is given as an optional argument or at an arbitrary vertex of the triangulation if no optional argument is given. It takes -time \f$ O(n)\f$ in the worst case for Delaunay Triangulations, but only \f$ O(\sqrt{n})\f$ +time \cgalBigO{n} in the worst case for Delaunay Triangulations, but only \cgalBigO{\sqrt{n}} on average if the vertices are distributed uniformly at random. The class `Triangulation_hierarchy_2`, described in section \ref Section_2D_Triangulations_Hierarchy, @@ -423,14 +423,14 @@ Insertion of a point is done by locating a face that contains the point, and splitting this face into three new faces. If the point falls outside the convex hull, the triangulation is restored by flips. Apart from the location, insertion takes a -time \f$ O(1)\f$. This bound is only an amortized bound +time \cgalBigO{1}. This bound is only an amortized bound for points located outside the convex hull. Removal of a vertex is done by removing all adjacent triangles, and re-triangulating the hole. Removal takes a time at most proportional to \f$ d^2\f$, where \f$ d\f$ is the degree of the removed vertex, -which is \f$ O(1)\f$ for a random vertex. +which is \cgalBigO{1} for a random vertex. Displacement of a vertex is done by: first, verifying if the triangulation embedding remains planar after the displacement; if yes the vertex is directly placed at the new location; otherwise, a point is inserted at the new location @@ -592,18 +592,18 @@ The insertion of a new point in the Delaunay triangulation is performed using first the insertion member function of the basic triangulation and second performing a sequence of flips to restore the Delaunay property. -The number of flips that have to be performed is \f$ O(d)\f$ +The number of flips that have to be performed is \cgalBigO{d} if the new vertex has degree \f$ d\f$ in the updated Delaunay triangulation. For points distributed uniformly at random, -each insertion takes time \f$ O(1)\f$ on +each insertion takes time \cgalBigO{1} on average, once the point has been located in the triangulation. Removal calls the removal in the triangulation and then re-triangulates the hole created in such a way that the Delaunay criterion is satisfied. Removal of a -vertex of degree \f$ d\f$ takes time \f$ O(d^2)\f$. -The degree \f$ d\f$ is \f$ O(1)\f$ for a random +vertex of degree \f$ d\f$ takes time \cgalBigO{d^2}. +The degree \f$ d\f$ is \cgalBigO{1} for a random vertex in the triangulation. When the degree of the removed vertex is small (\f$ \leq7\f$) a special procedure is used that allows to decrease global removal time by a factor of 2 @@ -611,14 +611,14 @@ for random points \cgalCite{d-vrtdd-09}. The displacement of a vertex \f$ v\f$ at a point \f$ p\f$ to a new location \f$ p'\f$, first checks whether the triangulation embedding remains planar or not after moving \f$ v\f$ to \f$ p'\f$. If yes, it moves \f$ v\f$ to \f$ p'\f$ and simply performs a sequence of flips -to restore the Delaunay property, which is \f$ O(d)\f$ where \f$ d\f$ is the degree of the vertex after the displacement. +to restore the Delaunay property, which is \cgalBigO{d} where \f$ d\f$ is the degree of the vertex after the displacement. Otherwise, the displacement is done by inserting a vertex at the new location, and removing the obsolete vertex. -The complexity is \f$ O(n)\f$ in the worst case, but only \f$ O(1 + \delta \sqrt{n})\f$ for evenly distributed vertices in the unit square, where \f$ \delta\f$ is the Euclidean distance between the new and old locations. +The complexity is \cgalBigO{n} in the worst case, but only \cgalBigO{1 + \delta \sqrt{n}} for evenly distributed vertices in the unit square, where \f$ \delta\f$ is the Euclidean distance between the new and old locations. After having performed a point location, the -nearest neighbor of a point is found in time \f$ O(n)\f$ in the -worst case, but in time \f$ O(1)\f$ +nearest neighbor of a point is found in time \cgalBigO{n} in the +worst case, but in time \cgalBigO{1} for vertices distributed uniformly at random and any query point. \subsection Subsection_2D_Triangulations_Delaunay_Terrain Example: a Delaunay Terrain diff --git a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index 3c5ee85b923..a96be0e6d76 100644 --- a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -316,7 +316,7 @@ public: std::ptrdiff_t insert( InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename internal::Get_iterator_value_type< InputIterator >::type, Point >::value @@ -398,7 +398,7 @@ public: insert( InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename internal::Get_iterator_value_type< InputIterator >::type, std::pair::type> >::value @@ -414,8 +414,8 @@ public: boost::zip_iterator< boost::tuple > last, std::enable_if_t< boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + std::is_convertible< typename std::iterator_traits::value_type, Point >, + std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* =nullptr ) diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h index 63e07c51dcf..c3cd6d187de 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h @@ -582,7 +582,7 @@ public: insert_incident_faces(vcit, out); } //AF vertices_in_constraint_begin(ca)->fixed() = true; - // Vertices_in_constraint_iterator end = boost::prior(vertices_in_constraint_end(ca)); + // Vertices_in_constraint_iterator end = std::prev(vertices_in_constraint_end(ca)); // end->fixed() = true; fc.write_faces(out); @@ -753,8 +753,8 @@ public: void simplify(Vertices_in_constraint_iterator v) { - Vertices_in_constraint_iterator u = boost::prior(v); - Vertices_in_constraint_iterator w = boost::next(v); + Vertices_in_constraint_iterator u = std::prev(v); + Vertices_in_constraint_iterator w = std::next(v); bool unew = (*u != *w); hierarchy.simplify(u,v,w); diff --git a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h index fa001fd490e..34a282b9162 100644 --- a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h @@ -301,7 +301,7 @@ public: std::ptrdiff_t insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, Point >::value @@ -372,7 +372,7 @@ public: insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> >::value >* = nullptr) @@ -386,8 +386,8 @@ public: boost::zip_iterator< boost::tuple > last, std::enable_if_t< boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + std::is_convertible< typename std::iterator_traits::value_type, Point >, + std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* = nullptr) { diff --git a/Triangulation_2/include/CGAL/Regular_triangulation_2.h b/Triangulation_2/include/CGAL/Regular_triangulation_2.h index 145b387263f..f7e4a653060 100644 --- a/Triangulation_2/include/CGAL/Regular_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Regular_triangulation_2.h @@ -395,7 +395,7 @@ public: std::ptrdiff_t insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, Weighted_point >::value @@ -516,7 +516,7 @@ public: insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> >::value @@ -530,8 +530,8 @@ public: boost::zip_iterator< boost::tuple > last, std::enable_if_t< boost::mpl::and_< - typename boost::is_convertible< typename std::iterator_traits::value_type, Weighted_point >, - typename boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + typename std::is_convertible< typename std::iterator_traits::value_type, Weighted_point >, + typename std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* =nullptr ) diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index 6b1de4b4f19..c79aa0128d2 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -632,7 +632,7 @@ public: template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, Point >::value @@ -697,7 +697,7 @@ public: insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> >::value >* = NULL) @@ -711,8 +711,8 @@ public: boost::zip_iterator< boost::tuple > last, std::enable_if_t< boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + std::is_convertible< typename std::iterator_traits::value_type, Point >, + std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* = NULL) { diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index 8154e26251c..b8bcaac8f18 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h @@ -68,7 +68,7 @@ public: : public boost::iterator_adaptor< Point_it , typename Vertex_list::all_iterator - , const Point + , const Point& > { public: @@ -85,7 +85,7 @@ public: Vertex_it , typename Vertex_list::skip_iterator , Vertex_handle - , boost::use_default + , std::bidirectional_iterator_tag , Vertex_handle> { public: @@ -612,7 +612,7 @@ void Polyline_constraint_hierarchy_2::simplify(Vertex_it uc, // Remove the list item which points to v Vertex_list* vertex_list = it->id().vl_ptr(); Vertex_it vc_in_context = it->current(); - vc_in_context = boost::next(vc_in_context); + vc_in_context = std::next(vc_in_context); vertex_list->skip(vc_in_context.base()); ++it; } @@ -625,7 +625,7 @@ void Polyline_constraint_hierarchy_2::simplify(Vertex_it uc, // Remove the list item which points to v Vertex_list* vertex_list = it->id().vl_ptr(); Vertex_it vc_in_context = it->current(); - vc_in_context = boost::next(vc_in_context); + vc_in_context = std::next(vc_in_context); vertex_list->skip(vc_in_context.base()); ++it; } diff --git a/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h b/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h index 8585bc33db1..0c2904243c5 100644 --- a/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h +++ b/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h @@ -156,7 +156,7 @@ struct Dereference_to_handle_enforcer Dereference_to_handle_enforcer, Iterator /*base*/, Handle /*value*/, - boost::use_default, + typename std::iterator_traits::iterator_category, Handle /*reference*/ > { @@ -166,7 +166,8 @@ public: private: typedef Dereference_to_handle_enforcer Self; typedef Iterator I; - typedef boost::iterator_adaptor Base; + typedef typename std::iterator_traits::iterator_category Category; + typedef boost::iterator_adaptor Base; public: Dereference_to_handle_enforcer() { } diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h index 1b185f5383f..ba49e83c87a 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h @@ -19,14 +19,14 @@ respectively. \tparam LP is a tag which must be a `Location_policy`: either `CGAL::Fast_location` or `CGAL::Compact_location`. -`CGAL::Fast_location` offers faster (\f$ O(\log n)\f$ time) point +`CGAL::Fast_location` offers faster (\cgalBigO{\log n} time) point location, which can be beneficial when performing point locations or random point insertions (with no good location hint) in large data sets. It is currently implemented using an additional triangulation hierarchy data structure \cgalCite{cgal:d-dh-02}. The default is `CGAL::Compact_location`, which saves memory (3-5%) by avoiding the need for this separate data structure, and point location is then performed roughly in -\f$ O(n^{1/3})\f$ time. +\cgalBigO{n^{1/3}} time. If the triangulation is parallel (see user manual), the default compact location policy must be used. Note that this argument can also come in second position, which can be useful when diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/link_to_face_graph.h b/Triangulation_3/doc/Triangulation_3/CGAL/link_to_face_graph.h index 0ca74d3f6ba..484ae1296c0 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/link_to_face_graph.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/link_to_face_graph.h @@ -26,7 +26,7 @@ fills the face graph `tm` with the time_stamp() << "=(" << v->point() << ")"; + } + return os.str(); + }; + + static auto display_lt(Locate_type lt) { + std::stringstream os; + switch(lt) { + case Locate_type::VERTEX: os << " VERTEX"; break; + case Locate_type::EDGE: os << " EDGE"; break; + case Locate_type::FACET: os << " FACET"; break; + case Locate_type::CELL: os << " CELL"; break; + case Locate_type::OUTSIDE_CONVEX_HULL: os << " OUTSIDE_CONVEX_HULL"; break; + case Locate_type::OUTSIDE_AFFINE_HULL: os << " OUTSIDE_AFFINE_HULL"; break; + } + return os.str(); + } + + static auto debug_simplex(Simplex s) { + std::stringstream os; + os.precision(17); + const auto [c, lt, i, j] = s; + if(c == Cell_handle{}) { + os << "end()"; + } else { + os << display_vert(c->vertex(0)) << " - " << display_vert(c->vertex(1)) << " - " + << display_vert(c->vertex(2)) << " - " << display_vert(c->vertex(3)); + os << display_lt(lt) << " " << i << " " << j; + } + return os.str(); + } + + auto debug_iterator() const + { + std::stringstream os; + os.precision(17); + os << " prev: " << debug_simplex(_prev) << "\n cur: " << debug_simplex(_cur); + return os.str(); + } +#endif // CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + private: typedef Segment_cell_iterator SCI; @@ -228,15 +283,17 @@ public: */ const Point& target() const { return _target; } + Vertex_handle target_vertex() const { return _t_vertex; } + // gives a handle to the current cell. /* By invariance, this cell is intersected by the segment * between `source()` and `target()`. * \return a handle to the current cell. * \sa `cell()`. */ - Cell_handle handle() + Cell_handle handle() const { - return std::get<0>(_cur); + return _cur.cell; } // gives the previous cell. @@ -257,7 +314,7 @@ public: */ Cell* operator->() { - return &*std::get<0>(_cur); + return &*(_cur.cell); } // provides an indirection operator. @@ -265,7 +322,7 @@ public: */ Cell& operator*() { - return *std::get<0>(_cur); + return *(_cur.cell); } // provides a conversion operator. @@ -273,7 +330,7 @@ public: */ operator Cell_handle() const { - return std::get<0>(_cur); + return _cur.cell; } // provides a conversion operator. @@ -299,6 +356,10 @@ public: { lt = this->lt(); li = this->li(); lj = this->lj(); } + std::tuple entry() const + { + return { lt(), li(), lj() }; + } // gives the simplex through which the previous cell was exited. /* \pre the current cell is not the initial cell. */ @@ -306,6 +367,10 @@ public: { lt = prev_lt(); li = prev_li(); lj = prev_lj(); } + std::tuple exit() const + { + return { prev_lt(), prev_li(), prev_lj() }; + } // gives the past-the-end iterator associated with this iterator. SCI end() const; @@ -364,7 +429,7 @@ public: */ bool operator==( const Cell_handle& ch ) const { - return ch == std::get<0>(_cur); + return ch == _cur.cell; } // compares the current cell with `ch`. @@ -375,7 +440,7 @@ public: */ bool operator!=( const Cell_handle& ch ) const { - return ch != std::get<0>(_cur); + return ch != _cur.cell; } // \} @@ -439,32 +504,33 @@ private: Edge opposite_edge(Cell_handle c, int li, int lj) const; Edge opposite_edge(const Edge& e) const; +protected: // ref-accessors to the simplex, for use in internal code // access _cur - Cell_handle& cell() { return std::get<0>(_cur); } - Cell_handle const& cell() const { return std::get<0>(_cur); } + Cell_handle& cell() { return _cur.cell; } + Cell_handle const& cell() const { return _cur.cell; } - Locate_type& lt() { return std::get<1>(_cur); } - Locate_type const& lt() const { return std::get<1>(_cur); } + Locate_type& lt() { return _cur.lt; } + Locate_type const& lt() const { return _cur.lt; } - int& li() { return std::get<2>(_cur); } - int const& li() const { return std::get<2>(_cur); } + int& li() { return _cur.li; } + int const& li() const { return _cur.li; } - int& lj() { return std::get<3>(_cur); } - int const& lj() const { return std::get<3>(_cur); } + int& lj() { return _cur.lj; } + int const& lj() const { return _cur.lj; } // access _prev - Cell_handle& prev_cell() { return std::get<0>(_prev); } - Cell_handle const& prev_cell() const { return std::get<0>(_prev); } + Cell_handle& prev_cell() { return _prev.cell; } + Cell_handle const& prev_cell() const { return _prev.cell; } - Locate_type& prev_lt() { return std::get<1>(_prev); } - Locate_type const& prev_lt() const { return std::get<1>(_prev); } + Locate_type& prev_lt() { return _prev.lt; } + Locate_type const& prev_lt() const { return _prev.lt; } - int& prev_li() { return std::get<2>(_prev); } - int const& prev_li() const { return std::get<2>(_prev); } + int& prev_li() { return _prev.li; } + int const& prev_li() const { return _prev.li; } - int& prev_lj() { return std::get<3>(_prev); } - int const& prev_lj() const { return std::get<3>(_prev); } + int& prev_lj() { return _prev.lj; } + int const& prev_lj() const { return _prev.lj; } }; // class Triangulation_segment_cell_iterator_3 @@ -572,7 +638,7 @@ public: const Point& source() const { return _cell_iterator.source(); } const Point& target() const { return _cell_iterator.target(); } - const Tr* triangulation() const { return _cell_iterator.triangulation(); } + const Tr& triangulation() const { return *_cell_iterator.triangulation(); } private: Triangulation_segment_simplex_iterator_3 @@ -584,20 +650,23 @@ private: private: void set_curr_simplex_to_entry() { +#if CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + std::cerr << "cell iterator is:\n" << _cell_iterator.debug_iterator() << std::endl; +#endif // #if CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + Locate_type lt; int li, lj; - Cell_handle cell; + Cell_handle cell = Cell_handle(_cell_iterator); //check what is the entry type of _cell_iterator - if (Cell_handle(_cell_iterator) == Cell_handle()) + if (cell == Cell_handle()) { - //where did the segment std::get out from previous cell + //where did the segment get out from previous cell cell = _cell_iterator.previous(); _cell_iterator.exit(lt, li, lj); } else { - cell = Cell_handle(_cell_iterator); _cell_iterator.entry(lt, li, lj); } @@ -623,7 +692,7 @@ private: _curr_simplex = cell; break; default: - CGAL_assertion(false); + CGAL_unreachable(); }; } @@ -637,282 +706,145 @@ public: // provides the increment postfix operator. Simplex_iterator& operator++() { + auto increment_cell_iterator = [&]() { + ++_cell_iterator; +#if CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + std::cerr << "increment cell iterator to:\n" << _cell_iterator.debug_iterator() << '\n'; +#endif + }; CGAL_assertion(_curr_simplex.incident_cell() != Cell_handle()); - switch(_curr_simplex.dimension()) - { - case 3 :/*Cell_handle*/ - { - Cell_handle ch = Cell_handle(_cell_iterator); - if (ch == Cell_handle()) - { - if(!triangulation()->is_infinite(Cell_handle(_curr_simplex))) - set_curr_simplex_to_entry(); - else - _curr_simplex = Simplex_3(); - break; - } - else - { - if (!cell_iterator_is_ahead()) - ++_cell_iterator; - set_curr_simplex_to_entry(); - } - break; + if(!cell_iterator_is_ahead()) { + increment_cell_iterator(); // cell_iterator needs to be ahead } - case 2 :/*Facet*/ + + Cell_handle ch_next = Cell_handle(_cell_iterator); + Cell_handle ch_prev = _cell_iterator.previous(); + Locate_type lt_prev; + int li_prev, lj_prev; + _cell_iterator.exit(lt_prev, li_prev, lj_prev); + + if(_curr_simplex.dimension() == 3) { + set_curr_simplex_to_entry(); + return *this; + } + if(lt_prev == Locate_type::CELL || + lt_prev == Locate_type::OUTSIDE_CONVEX_HULL || + lt_prev == Locate_type::OUTSIDE_AFFINE_HULL) { - Cell_handle ch = Cell_handle(_cell_iterator); - if (!cell_iterator_is_ahead()) - { - //cell_iterator is not ahead. get_facet() is part of cell_iterator - //we cannot be in any of the degenerate cases, only detected by - //taking cell_iterator one step forward - CGAL_assertion(cell_has_facet(Cell_handle(_cell_iterator), get_facet())); - ++_cell_iterator; - if (Cell_handle(_cell_iterator) == Cell_handle()) - { - _curr_simplex = _cell_iterator.previous(); - break; - } - } - else - ch = _cell_iterator.previous(); + CGAL_assertion(ch_next == Cell_handle()); + _curr_simplex = ch_prev; + return *this; + } - Cell_handle chnext = Cell_handle(_cell_iterator); - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - switch (ltnext)//entry simplex in next cell - { - case Locate_type::VERTEX: - { - if (_cell_iterator == _cell_iterator.end()) - { - _curr_simplex = Simplex_3(); - break; - } - //if the entry vertex is a vertex of current facet - int i; - if (triangulation()->has_vertex(get_facet(), chnext->vertex(linext), i)) - set_curr_simplex_to_entry(); + switch(_curr_simplex.dimension()) { + case 2: { /*Facet*/ + CGAL_assertion((ch_next == Cell_handle()) == (_cell_iterator == _cell_iterator.end())); + + switch(lt_prev) { + case Locate_type::VERTEX: { // facet-cell?-vertex-outside + Vertex_handle v_prev{ch_prev->vertex(li_prev)}; + if(facet_has_vertex(get_facet(), v_prev)) + _curr_simplex = v_prev; else - _curr_simplex = ch; - break; - } - - case Locate_type::EDGE: - if (facet_has_edge(get_facet(), Edge(chnext, linext, ljnext))) - set_curr_simplex_to_entry(); + _curr_simplex = ch_prev; + } break; + case Locate_type::EDGE: { // facet-cell?-edge-outside + Edge edge_prev{ch_prev, li_prev, lj_prev}; + if(facet_has_edge(get_facet(), edge_prev)) + _curr_simplex = edge_prev; else - _curr_simplex = ch; - break; - - case Locate_type::FACET: - _curr_simplex = ch; - break; - - case Locate_type::OUTSIDE_AFFINE_HULL: - _curr_simplex = Simplex_3(); - break; - + _curr_simplex = ch_prev; + } break; + case Locate_type::FACET: { // facet-cell-facet-outside + Facet f_prev{ch_prev, li_prev}; + if(is_same_facet(f_prev, get_facet())) { + if(ch_next == Cell_handle()) + _curr_simplex = Simplex_3(); + else + _curr_simplex = ch_next; + } else + _curr_simplex = ch_prev; + } break; default: - CGAL_assertion(false); - }; - break; - } - case 1:/*Edge*/ - { - Cell_handle ch = Cell_handle(_cell_iterator); - if (ch == _cell_iterator.previous()) - { - _curr_simplex = Simplex_3(); - break; + CGAL_unreachable(); } - Locate_type lt; - int li, lj; - _cell_iterator.entry(lt, li, lj); - - if (!cell_iterator_is_ahead()) - { - ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies - if (Cell_handle(_cell_iterator) == Cell_handle()) - { - _curr_simplex = _cell_iterator.previous(); - break; + } break; + case 1: {/*Edge*/ + switch(lt_prev) { + case Locate_type::VERTEX: { //edge-vertex-outside + Vertex_handle v_prev{ch_prev->vertex(li_prev)}; + if(edge_has_vertex(get_edge(), v_prev)) + _curr_simplex = v_prev; + else + _curr_simplex = shared_facet(get_edge(), v_prev); + } break; + case Locate_type::EDGE: { //edge-outside or edge-cell-edge-outside + const Edge e_prev(ch_prev, li_prev, lj_prev); + if(is_same_edge(get_edge(), e_prev)) { + if(ch_next == Cell_handle()) { + _curr_simplex = Simplex_3(); + } else { + _curr_simplex = ch_next; + } + } else { + auto facet_opt = shared_facet(get_edge(), e_prev); + if(static_cast(facet_opt)) { + _curr_simplex = *facet_opt; + } + else { + _curr_simplex = shared_cell(get_edge(), e_prev); + } } - } - - Cell_handle chnext = Cell_handle(_cell_iterator); - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - switch (ltnext)//entry simplex in next cell - { - case Locate_type::VERTEX: - if (edge_has_vertex(get_edge(), chnext->vertex(linext))) - _curr_simplex = chnext->vertex(linext); + } break; + case Locate_type::FACET: { + Facet f_prev{ch_prev, li_prev}; + if(facet_has_edge(f_prev, get_edge())) + _curr_simplex = f_prev; //edge-facet-outside else - _curr_simplex = shared_facet(get_edge(), chnext->vertex(linext)); - break; - - case Locate_type::EDGE: - { - CGAL_assertion(_cell_iterator == _cell_iterator.end() - || triangulation()->is_infinite(chnext) - || _curr_simplex != Simplex_3(Edge(chnext, linext, ljnext))); - - if (_cell_iterator == _cell_iterator.end()) - _curr_simplex = Simplex_3(); - else if (triangulation()->is_infinite(chnext) - && _curr_simplex == Simplex_3(Edge(chnext, linext, ljnext))) - _curr_simplex = chnext; - else - _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); - break; - } - - case Locate_type::FACET: - _curr_simplex = Cell_handle(_cell_iterator);//query goes through the cell - break; - - case Locate_type::OUTSIDE_AFFINE_HULL: - { - Cell_handle chprev = _cell_iterator.previous(); - Locate_type ltprev; - int liprev, ljprev; - _cell_iterator.exit(ltprev, liprev, ljprev); - - if (ltprev == Locate_type::VERTEX) //edge-vertex-outside - _curr_simplex = chprev->vertex(liprev); - else - _curr_simplex = Simplex_3(); //edge-outside - break; - } + _curr_simplex = ch_prev; //query goes through the cell + } break; default: - CGAL_assertion(false);//should not happen - }; - break; - } + CGAL_unreachable(); + } + } break; case 0 :/*Vertex_handle*/ { - Cell_handle ch = Cell_handle(_cell_iterator); - if (ch == _cell_iterator.previous()) - { - _curr_simplex = Simplex_3(); - break; - } - if (!cell_iterator_is_ahead()) //_curr_simplex does contain v - { - ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies - } - else - ch = _cell_iterator.previous(); - - Cell_handle chnext = Cell_handle(_cell_iterator); - //_cell_iterator is one step forward _curr_simplex - CGAL_assertion(ch != chnext); - - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - - Cell_handle prev; - Locate_type ltprev; - int liprev, ljprev; - prev = _cell_iterator.previous(); - _cell_iterator.exit(ltprev, liprev, ljprev); - - switch (ltnext) - { - case Locate_type::VERTEX: - { - CGAL_assertion(_cell_iterator == _cell_iterator.end() - || get_vertex() != chnext->vertex(linext) - || triangulation()->is_infinite(chnext)); - if (_cell_iterator == _cell_iterator.end()) - { - if (prev == ch && ltprev == Locate_type::VERTEX) - { - CGAL_assertion(prev->vertex(liprev) == get_vertex()); - _curr_simplex = ch; - } - else - { - if(ltprev == Locate_type::FACET) - _curr_simplex = Facet(prev, liprev); - else if(ltprev == Locate_type::EDGE) - _curr_simplex = Edge(prev, liprev, ljprev); - else - CGAL_assertion(false); - } - } - else - { - if (triangulation()->is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) - _curr_simplex = chnext; - else - { - Cell_handle ec; - int ei = -1, ej = -1; - if (!triangulation()->is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) - CGAL_assertion(false); - _curr_simplex = Edge(ec, ei, ej); - } - } - break; - } - - case Locate_type::EDGE: - { - //facet shared by get_vertex() and the edge - //none of ch and chnext is certainly shared by both endpoints - _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); - break; - } - - case Locate_type::OUTSIDE_AFFINE_HULL: - { - CGAL_assertion(_cell_iterator == _cell_iterator.end()); - if (ltprev == Locate_type::VERTEX) //vertex-edge-vertex-outside - { - if(prev->vertex(liprev) != get_vertex())//avoid infinite loop edge-vertex-same edge-... - _curr_simplex = Edge(prev, liprev, prev->index(get_vertex())); - else + switch(lt_prev) { + case Locate_type::VERTEX: { + if(ch_prev->vertex(li_prev) != get_vertex()) // avoid infinite loop edge-vertex-same edge-... + _curr_simplex = Edge(ch_prev, li_prev, ch_prev->index(get_vertex())); + else { + if(ch_next == Cell_handle()) { _curr_simplex = Simplex_3(); + } else { + _curr_simplex = ch_next; + } } - else if (ltprev == Locate_type::EDGE)//vertex-facet-edge-outside - _curr_simplex = Facet(prev, prev->index(get_vertex())); - else if (ltprev == Locate_type::FACET) //vertex-facet-outside - { - if(prev->vertex(liprev) != get_vertex()) //vertex-facet-outside - _curr_simplex = Facet(prev, liprev); - else //vertex-cell-facet-outside - _curr_simplex = prev; - } + } break; + case Locate_type::EDGE: { + const Edge e_prev(ch_prev, li_prev, lj_prev); + if(edge_has_vertex(e_prev, get_vertex())) + _curr_simplex = e_prev; else - { - CGAL_assertion(ltprev == Locate_type::CELL);//vertex-cell-outside - _curr_simplex = prev; - } - break; + _curr_simplex = shared_facet(Edge(ch_prev, li_prev, lj_prev), get_vertex()); + } break; + case Locate_type::FACET: { + if(ch_prev->vertex(li_prev) != get_vertex()) // vertex-facet-outside + _curr_simplex = Facet(ch_prev, li_prev); + else // vertex-cell-facet-outside + _curr_simplex = ch_prev; + } break; + default: + CGAL_unreachable(); } - - default://FACET - if (chnext == Cell_handle()) - _curr_simplex = Simplex_3(); - else - _curr_simplex = shared_cell(Facet(chnext, linext), get_vertex()); - break; - }; - } - break; - + } break; default: - CGAL_assertion(false); + CGAL_unreachable(); }; return *this; } + // provides the increment prefix operator. Simplex_iterator operator++(int) { @@ -1010,10 +942,10 @@ private: case 3 ://cell return ch != get_cell(); default: - CGAL_assertion(false); + CGAL_unreachable(); } //should not be reached - CGAL_assertion(false); + CGAL_unreachable(); return false; } @@ -1048,13 +980,29 @@ private: return false; } + bool facet_has_vertex(const Facet& f, const Vertex_handle v) const + { + return triangulation().tds().has_vertex(f, v); + } + bool edge_has_vertex(const Edge& e, const Vertex_handle v) const { return e.first->vertex(e.second) == v || e.first->vertex(e.third) == v; } - Vertex_handle shared_vertex(const Edge& e1, const Edge& e2) const + bool is_same_edge(const Edge& e1, const Edge& e2) const + { + return edge_has_vertex(e1, e2.first->vertex(e2.second)) + && edge_has_vertex(e1, e2.first->vertex(e2.third)); + } + + bool is_same_facet(const Facet& f1, const Facet& f2) const + { + return f1 == f2 || triangulation().mirror_facet(f1) == f2; + } + + boost::optional shared_vertex(const Edge& e1, const Edge& e2) const { Vertex_handle v1a = e1.first->vertex(e1.second); Vertex_handle v1b = e1.first->vertex(e1.third); @@ -1065,22 +1013,22 @@ private: return v1a; else if (v1b == v2a || v1b == v2b) return v1b; - - std::cerr << "There is no vertex shared by e1 and e2" << std::endl; - CGAL_assertion(false); - return Vertex_handle(); + else + return {}; } - Facet shared_facet(const Edge& e1, const Edge& e2) const + boost::optional shared_facet(const Edge& e1, const Edge& e2) const { Vertex_handle v2a = e2.first->vertex(e2.second); Vertex_handle v2b = e2.first->vertex(e2.third); - Vertex_handle sv = shared_vertex(e1, e2); + auto sv_opt = shared_vertex(e1, e2); + if(!sv_opt) return {}; + Vertex_handle sv = *sv_opt; Vertex_handle nsv2 = (sv == v2a) ? v2b : v2a; typename Tr::Facet_circulator circ - = triangulation()->incident_facets(e1); + = triangulation().incident_facets(e1); typename Tr::Facet_circulator end = circ; do { @@ -1092,33 +1040,30 @@ private: } } while (++circ != end); - std::cerr << "There is no facet shared by e1 and e2" << std::endl; - CGAL_assertion(false); - return Facet(Cell_handle(), 0); + return {}; } Facet shared_facet(const Edge& e, const Vertex_handle v) const { typename Tr::Facet_circulator circ - = triangulation()->incident_facets(e); + = triangulation().incident_facets(e); typename Tr::Facet_circulator end = circ; do { Facet f = *circ; - int i; - if (triangulation()->has_vertex(f, v, i)) + if (facet_has_vertex(f, v)) return f; } while (++circ != end); std::cerr << "There is no facet shared by e and v" << std::endl; - CGAL_assertion(false); + CGAL_unreachable(); return Facet(Cell_handle(), 0); } Cell_handle shared_cell(const Edge& e, const Vertex_handle v) const { typename Tr::Cell_circulator circ - = triangulation()->incident_cells(e); + = triangulation().incident_cells(e); typename Tr::Cell_circulator end = circ; do { @@ -1128,7 +1073,7 @@ private: } while (++circ != end); std::cerr << "There is no cell shared by e and v" << std::endl; - CGAL_assertion(false); + CGAL_unreachable(); return Cell_handle(); } @@ -1145,6 +1090,11 @@ private: } } + Cell_handle shared_cell(const Edge e1, const Edge e2) const { + auto facet = shared_facet(e1, e2.first->vertex(e2.second)); + return shared_cell(facet, e2.first->vertex(e2.third)); + } + };//class Triangulation_segment_simplex_iterator_3 } // namespace CGAL diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index f6da43d10ce..b9ec640410c 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -25,6 +25,14 @@ create_single_source_cgal_program("test_simplex_3.cpp") create_single_source_cgal_program("test_simplex_iterator_3.cpp" ) create_single_source_cgal_program("test_segment_cell_traverser_3.cpp" ) create_single_source_cgal_program("test_segment_simplex_traverser_3.cpp" ) +if(cxx_std_17 IN_LIST CMAKE_CXX_COMPILE_FEATURES) + target_compile_features(test_segment_simplex_traverser_3 PRIVATE cxx_std_17) +else() + message( + STATUS + "NOTICE: test_segment_simplex_traverser_3.cpp requires C++17 and will not be compiled." + ) +endif() create_single_source_cgal_program("test_static_filters.cpp") create_single_source_cgal_program("test_triangulation_3.cpp") create_single_source_cgal_program("test_io_triangulation_3.cpp") diff --git a/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp b/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp index 675380a0684..e4f80d9149f 100644 --- a/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp +++ b/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp @@ -38,7 +38,7 @@ struct Tester { typedef std::vector > Container; typedef typename boost::mpl::if_, - typename boost::add_const::type, + std::add_const_t, Container>::type Cast_type; Container points; @@ -91,7 +91,7 @@ struct Tester { typedef std::vector Container; typedef typename boost::mpl::if_, - typename boost::add_const::type, + std::add_const_t, Container >::type Cast_type; Container points; @@ -157,7 +157,7 @@ struct Tester { typedef std::vector< Weighted_point > Container; typedef typename boost::mpl::if_, - typename boost::add_const::type, + std::add_const_t, Container >::type Cast_type; Container points; diff --git a/Triangulation_3/test/Triangulation_3/test_regular_remove_3.cpp b/Triangulation_3/test/Triangulation_3/test_regular_remove_3.cpp index f37bb096413..9252598776c 100644 --- a/Triangulation_3/test/Triangulation_3/test_regular_remove_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_regular_remove_3.cpp @@ -329,7 +329,7 @@ int main(int argc, char **argv) } // Hardcoded seeds so that the test-suite is deterministic. - boost::int32_t seed0 = 42, seed1 = 43, seed2 = 42, seed3 = 42; + std::int32_t seed0 = 42, seed1 = 43, seed2 = 42, seed3 = 42; // You can also pass seeds on the command line. if (argc > 1) { std::istringstream iss(argv[1]); iss >>seed0; } diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index eb1fa780be4..45e4f46c318 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -1,5 +1,8 @@ +//#define CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 1 #include #include +#include +#include #include #include @@ -15,18 +18,400 @@ // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; +typedef Kernel::Segment_3 Segment_3; +typedef Kernel::Triangle_3 Triangle_3; +typedef Kernel::Tetrahedron_3 Tetrahedron_3; // Define the structure. -typedef CGAL::Delaunay_triangulation_3 DT; +typedef CGAL::Base_with_time_stamp> Vb; +typedef CGAL::Delaunay_triangulation_cell_base_3 Cb; +typedef CGAL::Triangulation_data_structure_3 Tds; +typedef CGAL::Delaunay_triangulation_3 DT; typedef DT::Cell_handle Cell_handle; +typedef DT::Edge Edge; +typedef DT::Facet Facet; +typedef DT::Vertex_handle Vertex_handle; +typedef DT::Simplex Simplex; typedef DT::Segment_simplex_iterator Segment_simplex_iterator; +#include "test_triangulation_simplex_3_debug.h" + +// a function to insert without spatial sorting +template +void insert(DT& dt, Point_it first, Point_it end) { + for(; first != end; ++first) { + dt.insert(*first); + } +} + +static const std::vector bbox_points = +{ + { -10.1, -10, -10.08 }, + { -10.2, 10, -10.07 }, + { 10.3, 10, -10.06 }, + { 10.4, -10, -10.05 }, + { -10.5, -10, 10.04 }, + { -10.6, 10, 10.03 }, + { 10.7, 10, 10.02 }, + { 10.8, -10, 10.01 }, + }; + +DT dt; +std::string result_string; + +bool reverse_sort_vertex_handles(Vertex_handle v1, Vertex_handle v2) { + return v1.operator->() > v2.operator->(); +}; + +auto vertices_of_simplex(Simplex simplex) -> std::array { + std::array vertices = { Vertex_handle{}, Vertex_handle{}, Vertex_handle{}, Vertex_handle{} }; + switch(simplex.dimension()) { + case 0: { + vertices[0] = static_cast(simplex); + break; + } + case 1: { + const auto [c, index1, index2] = static_cast(simplex); + vertices[0] = c->vertex(index1); + vertices[1] = c->vertex(index2); + break; + } + case 2: { + const auto [c, index] = static_cast(simplex); + vertices[0] = c->vertex(DT::vertex_triple_index(index, 0)); + vertices[1] = c->vertex(DT::vertex_triple_index(index, 1)); + vertices[2] = c->vertex(DT::vertex_triple_index(index, 2)); + break; + } + case 3: { + const auto c = static_cast(simplex); + vertices[0] = c->vertex(0); + vertices[1] = c->vertex(1); + vertices[2] = c->vertex(2); + vertices[3] = c->vertex(3); + break; + } + default: CGAL_unreachable(); + } + std::sort(vertices.begin(), vertices.end(), reverse_sort_vertex_handles); + for(int i = 0; i < 4; ++i) { + assert((i <= simplex.dimension()) == (vertices[i] != Vertex_handle{})); + } + return vertices; +} + +std::variant get_simplex_geometry(Simplex simplex) { + switch(simplex.dimension()) { + case 0: { + return static_cast(simplex)->point(); + } + case 1: { + const auto [c, index1, index2] = static_cast(simplex); + return Segment_3(c->vertex(index1)->point(), c->vertex(index2)->point()); + } + case 2: { + const auto [c, index] = static_cast(simplex); + return Triangle_3(c->vertex(DT::vertex_triple_index(index, 0))->point(), + c->vertex(DT::vertex_triple_index(index, 1))->point(), + c->vertex(DT::vertex_triple_index(index, 2))->point()); + } + case 3: { + const auto c = static_cast(simplex); + return Tetrahedron_3(c->vertex(0)->point(), + c->vertex(1)->point(), + c->vertex(2)->point(), + c->vertex(3)->point()); + } + default: CGAL_unreachable(); + } +} + +void visit_simplex(Point_3 a, Point_3 b, Simplex s, std::optional previous_simplex_optional) { + auto d = s.dimension(); + if(3 == d && dt.is_infinite(static_cast(s))) { + result_string += 'I'; + } else { + result_string += std::to_string(d); + } + std::clog << debug_simplex(s) << '\n'; + const bool does_intersect_ab = (3 == d && dt.is_infinite(static_cast(s))) || + std::visit( + [&](auto geometry) { return CGAL::do_intersect(Segment_3(a, b), geometry); }, + get_simplex_geometry(s)); + if(!does_intersect_ab) { + CGAL_error_msg("the simplex does not intersect the query segment"); + } + if(previous_simplex_optional) { + // this block checks that consecutive simplices are incident + using Set = std::array; + Set prev_vertices = vertices_of_simplex(*previous_simplex_optional); + Set s_vertices = vertices_of_simplex(s); + if(previous_simplex_optional->dimension() < s.dimension()) { + std::swap(prev_vertices, s_vertices); + std::swap(*previous_simplex_optional, s); + } + if(!std::includes( + prev_vertices.begin(), prev_vertices.begin() + 1 + previous_simplex_optional->dimension(), + s_vertices.begin(), s_vertices.begin() + 1 + s.dimension(), + reverse_sort_vertex_handles)) + { + CGAL_error_msg("consecutive simplices are not incident"); + } + } +}; + +bool test_vfefv(bool with_bbox = false) +{ + std::cerr << "## test_vfefv(" << std::boolalpha << with_bbox << ")\n"; + result_string.clear(); + static const std::vector points = + { + { -1, 0, 0 }, + { 0, 1, 0 }, + { 0, -1, 0 }, + { 5, 0, 0 }, + { 6, 2, 2 }, + { 6, -2, -2 }, + }; + + dt.clear(); + insert(dt, points.begin(), points.end()); + if(with_bbox) insert(dt, bbox_points.begin(), bbox_points.end()); + + const auto v = dt.finite_vertex_handles().to(); + + Cell_handle c; int i, j, k; + assert(dt.is_facet(v[0], v[1], v[2], c, i, j, k)); + assert(dt.is_facet(v[1], v[2], v[3], c, i, j, k)); + assert(dt.is_cell (v[1], v[2], v[3], v[4], c)); + assert(dt.is_cell (v[1], v[2], v[3], v[5], c)); + + std::optional previous{}; + for(auto s: dt.segment_traverser_simplices(v[0], v[3])) { + visit_simplex(points[0], points[3], s, previous); + previous = s; + } + static const std::string expected_result_string = "02120"; + bool ok = (result_string == expected_result_string); + if(!ok) { + std::cerr << "test_vfefv failed\n"; + std::cerr << " result_string is " << result_string << " instead of " + << expected_result_string << '\n'; + } + return ok; +} + +bool test_a_simple_tetrahedron(const std::vector& points) { + + DT dt2; + for(const auto& p: points) dt2.insert(p); + + bool ok = true; + auto test = [&](Point_3 a, Point_3 b, std::string expected_result) { + // This test function calls `do_test` with four configurations: + // - with [ab] and [ba], + // - and with or without a bbox around the central tetrahedron. + dt = dt2; + auto do_with_or_without_bbox = [&](Point_3 a, Point_3 b, bool with_bbox, std::string expected_result) { + auto do_it = [&](auto from, auto to) { + bool exception_thrown = false; + result_string.clear(); + try { + std::optional previous_simplex; + for(auto s: dt.segment_traverser_simplices(from, to)) { + visit_simplex(a, b, s, previous_simplex); + previous_simplex = s; + } + } catch(const CGAL::Assertion_exception& e) { + CGAL::get_static_warning_handler()("Assertion", e.expression().c_str(), + e.filename().c_str(), + e.line_number(), + e.message().c_str()); + exception_thrown = true; + } + if(result_string != expected_result || exception_thrown) { + std::cerr << "test_a_simple_tetrahedron failed on case " << expected_result + << (with_bbox ? " with bbox\n" : "\n"); + ok = false; + } + if(result_string != expected_result) { + std::cerr << " result_string is " << result_string << " instead of " + << expected_result << '\n'; + } + if(exception_thrown) { + std::cerr << " exception thrown\n"; + } + }; // end do_it + + std::clog << "### Case " << expected_result; + if(with_bbox) std::clog << " with bbox"; + std::clog << '\n'; + std::clog << "from (" << a << ") to (" << b << ")\n"; + do_it(a, b); + + // then re-test using vertex handles, if possible + Vertex_handle va{}; + Vertex_handle vb{}; + DT::Locate_type lt; + int i, j; + auto c = dt.locate(a, lt, i, j); + if(lt == DT::VERTEX) va = c->vertex(i); + c = dt.locate(b, lt, i, j); + if(lt == DT::VERTEX) vb = c->vertex(i); + if(va != Vertex_handle{} && vb != Vertex_handle{}) { + std::clog << "from vertex" << display_vert(va) << " to vertex" << display_vert(vb) << ")\n"; + do_it(va, vb); + }; + }; // end do_with_or_without_bbox + std::string expected_result_reversed{expected_result.rbegin(), expected_result.rend()}; + do_with_or_without_bbox(a, b, false, expected_result); + do_with_or_without_bbox(b, a, false, expected_result_reversed); + std::replace(expected_result.begin(), expected_result.end(), 'I', '3'); + std::replace(expected_result_reversed.begin(), expected_result_reversed.end(), 'I', '3'); + insert(dt, bbox_points.begin(), bbox_points.end()); + do_with_or_without_bbox(a, b, true, expected_result); + do_with_or_without_bbox(b, a, true, expected_result_reversed); + }; // end test() lambda + + // [010] queries entering by a vertex and exiting by the other vertex of an incident edge, + // on the line (x,0,0) + test({ 0, 0, 0}, {.5, 0, 0}, "01"); + test({ 0, 0, 0}, { 1, 0, 0}, "010"); + test({ 0, 0, 0}, { 2, 0, 0}, "010I"); + test({-1, 0, 0}, { 2, 0, 0}, "I010I"); + test({-1, 0, 0}, { 1, 0, 0}, "I010"); + test({-1, 0, 0}, {.5, 0, 0}, "I01"); + + // x [020] is not possible, because that would have passed through the edge -> see [010] + + // [021] queries entering by a vertex and exiting by the opposite edge of a same face, + // on the line (x,x,0) (y==x) + test({ 0, 0, 0}, {.2, .2, 0}, "02"); + test({ 0, 0, 0}, {.5, .5, 0}, "021"); + test({ 0, 0, 0}, { 1, 1, 0}, "021I"); + test({-1, -1, 0}, { 1, 1, 0}, "I021I"); + test({-1, -1, 0}, {.5, .5, 0}, "I021"); + test({-1, -1, 0}, {.2, .2, 0}, "I02"); + + // x [030] (entering by a vertex and exiting by a non-adjacent vertex) is not possible + // because that would have passed by the common edge -> see [010] + + // x [031] (entering by a vertex and exiting by a non-incident edge), is not possible + // because that would have passed by the face -> see [021] + + // [032] queries entering by a vertex and exiting by the opposite facet, + // on the line x==y==0.25-0.25z + test({ 0, 0, 1}, { .25, .25, .25 }, "03"); + test({ 0, 0, 1}, { .25, .25, 0 }, "032"); + test({ 0, 0, 1}, { .5, .5, -.1 }, "032I"); + test({-.25,-.25, 2}, { .28125, .28125, -.125}, "I032I"); + test({-.25,-.25, 2}, { .25, .25, 0 }, "I032"); + test({-.25,-.25, 2}, { .125, .125, .5 }, "I03"); + + // [121] queries entering by an edge and exiting by an edge of the same face, + // on the line (x,.5,0) + test({0, .5, 0}, {.2, .5, 0}, "12"); + test({0, .5, 0}, {.5 , .5, 0}, "121"); + test({0, .5, 0}, {.6 , .5, 0}, "121I"); + test({-.1, .5, 0}, {.6 , .5, 0}, "I121I"); + test({-.1, .5, 0}, {.5 , .5, 0}, "I121"); + test({-.1, .5, 0}, {.25, .5, 0}, "I12"); + + // x [130] (entering by an edge and exiting by a non-incident vertex) is not possible + // because that would have passed by the common face -> see [120] ([021] in reverse) + + // [131] entering by an edge and exiting by the opposite edge in the cell, + // on the line x==y==0.5-z, also known as (.5-z, .5-z, z) + test({ 0, 0, .5 }, { .25, .25, .25 }, "13"); + test({ 0, 0, .5 }, { .5, .5, 0 }, "131"); + test({ 0, 0, .5 }, { .625, .625, -.125}, "131I"); + test({ -.125, -.125, .625}, { .625, .625, -.125}, "I131I"); + test({ -.125, -.125, .625}, { .5 , .5 , 0 }, "I131"); + test({ -.125, -.125, .625}, { .25, .25, .25 }, "I13"); + + // [132] queries entering by an edge and exiting by a facet, on the line (x, .25-x, x) + test({ 0, .25, 0}, { .20, .05, .20}, "13"); + test({ 0, .25, 0}, { .25, 0, .25}, "132"); + test({ 0, .25, 0}, { .5 ,-.25, .5 }, "132I"); + test({-.5, .75,-.5}, { .5 ,-.25, .5 }, "I132I"); + test({-.5, .75,-.5}, { .25, 0, .25}, "I132"); + test({-.5, .75,-.5}, { .20, .05, .20}, "I13"); + + // [232] queries entering by a facet and exiting by a facet, on the line (x,.5-x,.2) + test({ 0, .5, .2}, {.2, .3, .2}, "23"); + test({ 0, .5, .2}, {.5, 0, .2}, "232"); + test({ 0, .5, .2}, {.55, -.05, .2}, "232I"); + test({-.05, .45, .2}, {.55, -.05, .2}, "I232I"); + test({-.05, .45, .2}, {.5, 0, .2}, "I232"); + test({-.05, .45, .2}, {.2, .3, .2}, "I23"); + + // special case: queries stay in a single simplex + test({ -.125, -.125, .625}, { -.125, -.125, .6251}, "I"); + test({ .25, .25, .25}, { .20, .25, .25}, "3"); + test({ 0, .5, .2}, { 0, .4, .2}, "2"); + test({ 0, .5, .0}, { 0, .6, .0}, "1"); + + return ok; +} + +bool test_a_simple_tetrahedron() { + bool ok = true; + std::cout << "## test_a_simple_tetrahedron()\n" + << R"#( +This test uses with a trivial tetrahedron, and is launched with all the +24 permutations of the four vertices. There are 7 test cases, and for each of +them 6 different segments are tested: +- The segment starts at the incoming boundary of the tetrahedron and ends + inside. +- The segment starts at the incoming boundary of the tetrahedron and ends + at the outgoing boundary. +- The segment starts at the incoming boundary of the tetrahedron, goes out + and beyond. +- The segment starts before the tetrahedron, goes through it, and comes out. +- The segment starts before the tetrahedron and ends at the outgoing boundary. +- The segment starts before the tetrahedron and ends inside. + +For each of those query segments, 4 tests are performed: + - with/without 8 extra vertices in the triangulation, forming a bounding + box, + - and in the direct and reverse direction. + +In total, 4032 tests are performed... + + +)#"; + std::cout.flush(); + std::vector points = { + {0., 0., 0.}, + {1., 0., 0.}, + {0., 1., 0.}, + {0., 0., 1.}, + }; + std::sort(points.begin(), points.end()); + do { + std::cout << "### new permutation of the four points\n"; + for(const auto& p: points) std::cout << " " << p << '\n'; + std::cout << std::endl; + ok = test_a_simple_tetrahedron(points) && ok; + } + while (std::next_permutation(points.begin(), points.end())); + return ok; +} + bool test(const DT& dt, const std::pair& query, const std::array& expected_result); + int main(int, char* []) { + std::cerr.precision(17); + std::clog.precision(17); + std::cout.precision(17); + + bool ok = true; + ok = test_a_simple_tetrahedron() && ok; + const std::vector points = { { -2, 0, 0 }, { 2, 0, 0 }, { 0, 1, -1 }, @@ -43,15 +428,13 @@ int main(int, char* []) }; std::vector vertices; vertices.reserve(points.size()); - DT dt; + dt.clear(); for(auto p: points) vertices.push_back(dt.insert(p)); Cell_handle c; assert(dt.is_valid()); assert(dt.is_cell(vertices[0], vertices[2], vertices[3], vertices[4], c)); assert(dt.is_cell(vertices[1], vertices[2], vertices[3], vertices[4], c)); - std::cerr << dt.number_of_finite_cells() << '\n'; - const std::vector < std::pair> queries = { {{-1, 0, 0}, { 1, 0, 0}}, // CFC {{-1, 0, 0}, { 2, 0, 0}}, // CFCV @@ -74,12 +457,20 @@ int main(int, char* []) {2, 1, 1, 0} // reverse case: FVEV }; - bool ok = true; for(std::size_t i=0; i previous; for (; st != stend; ++st) { if (st->dimension() == 3 @@ -108,46 +500,18 @@ bool test(const DT& dt, else { ++fin; + visit_simplex(p1, p2, *st, previous); + previous = *st; + switch (st->dimension()) { - case 2: { - ++nb_facets; - std::cout << "facet " << std::endl; - DT::Facet f = *st; - std::cout << " ( " << f.first->vertex((f.second + 1) & 3)->point() - << " " << f.first->vertex((f.second + 2) & 3)->point() - << " " << f.first->vertex((f.second + 3) & 3)->point() - << " )\n"; - break; + case 2: ++nb_facets; break; + case 1: ++nb_edges; break; + case 0: ++nb_vertex; break; + case 3: ++nb_cells; break; + default: CGAL_unreachable(); } - case 1: { - ++nb_edges; - std::cout << "edge " << std::endl; - DT::Edge e = *st; - std::cout << " ( " << e.first->vertex(e.second)->point() << " " - << e.first->vertex(e.third)->point() << " )\n"; - break; - } - case 0: { - ++nb_vertex; - std::cout << "vertex " << std::endl; - DT::Vertex_handle v = *st; - std::cout << " ( " << v->point() << " )\n"; - break; - } - case 3: { - ++nb_cells; - std::cout << "cell \n ( "; - DT::Cell_handle ch = *st; - for (int i = 0; i < 4; ++i) - std::cout << ch->vertex(i)->point() << " "; - std::cout << " )\n"; - break; - } - default: - CGAL_unreachable(); - } // end switch + } } -} #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "While traversing from " << st.source() diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 048581c0d90..506fd81022c 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -1,5 +1,7 @@ +// #define CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 1 #include #include +#include #include #include @@ -17,14 +19,20 @@ typedef Kernel::Vector_3 Vector_3; typedef Kernel::Segment_3 Segment_3; // Define the structure. -typedef CGAL::Delaunay_triangulation_3< Kernel > DT; +typedef CGAL::Base_with_time_stamp> Vb; +typedef CGAL::Delaunay_triangulation_cell_base_3 Cb; +typedef CGAL::Triangulation_data_structure_3 Tds; +typedef CGAL::Delaunay_triangulation_3< Kernel, Tds > DT; typedef DT::Vertex_handle Vertex_handle; typedef DT::Cell_handle Cell_handle; typedef DT::Edge Edge; typedef DT::Facet Facet; +typedef DT::Simplex Simplex; typedef DT::Segment_simplex_iterator Segment_simplex_iterator; +#include "test_triangulation_simplex_3_debug.h" + void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) { std::cout << "* test_vertex_edge_vertex *" << std::endl; @@ -299,8 +307,8 @@ void test_triangulation_on_a_grid() unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; for (; st != st.end(); ++st) { - std::cout << st->dimension() << " "; - std::cout.flush(); + std::cerr << st->dimension() << " "; + std::cerr << debug_simplex(*st) <<'\n'; if (st->dimension() == 3) { if (dt.is_infinite(Cell_handle(*st))) ++inf; diff --git a/Triangulation_3/test/Triangulation_3/test_triangulation_simplex_3_debug.h b/Triangulation_3/test/Triangulation_3/test_triangulation_simplex_3_debug.h new file mode 100644 index 00000000000..5ea79279b1c --- /dev/null +++ b/Triangulation_3/test/Triangulation_3/test_triangulation_simplex_3_debug.h @@ -0,0 +1,68 @@ +template +auto display_vert(Vertex_handle v) { + std::stringstream os; + os.precision(17); + if(v->time_stamp() == 0) { + os << "inf"; + } else { + os << '#' << v->time_stamp() << "=(" << v->point() << ")"; + } + return os.str(); +}; + +template +struct Debug_simplex { + using Cell_handle = typename DT::Cell_handle; + using Edge = typename DT::Edge; + using Facet = typename DT::Facet; + using Vertex_handle = typename DT::Vertex_handle; + using Simplex = typename DT::Simplex; + + Simplex simplex; + + template + friend + std::basic_ostream& + operator<<(std::basic_ostream& os, const Debug_simplex

      & d) { + auto&& simplex = d.simplex; + switch(simplex.dimension()) { + case 0: { + os << "- vertex " << display_vert(static_cast(simplex)); + break; + } + case 1: { + const auto [c, index1, index2] = static_cast(simplex); + os << "- edge " + << display_vert(c->vertex(index1)) << " - " + << display_vert(c->vertex(index2)); + break; + } + case 2: { + const auto [c, index] = static_cast(simplex); + os << "- facet " + << display_vert(c->vertex(DT::vertex_triple_index(index, 0))) << " - " + << display_vert(c->vertex(DT::vertex_triple_index(index, 1))) << " - " + << display_vert(c->vertex(DT::vertex_triple_index(index, 2))); + break; + } + case 3: { + const auto c = static_cast(simplex); + os << "- cell " + << display_vert(c->vertex(0)) << " - " + << display_vert(c->vertex(1)) << " - " + << display_vert(c->vertex(2)) << " - " + << display_vert(c->vertex(3)); + break; + } + default: CGAL_assume(false); + } + return os; + }; +}; + +#include + +template +auto debug_simplex(CGAL::Triangulation_simplex_3 simplex) { + return Debug_simplex{simplex}; +} diff --git a/Visibility_2/doc/Visibility_2/CGAL/Rotational_sweep_visibility_2.h b/Visibility_2/doc/Visibility_2/CGAL/Rotational_sweep_visibility_2.h index 3ad8ae61144..fcaf29e1a7c 100644 --- a/Visibility_2/doc/Visibility_2/CGAL/Rotational_sweep_visibility_2.h +++ b/Visibility_2/doc/Visibility_2/CGAL/Rotational_sweep_visibility_2.h @@ -5,7 +5,7 @@ namespace CGAL { \brief This class is a model of the concept `Visibility_2` can answer visibility queries within a polygon that may have holes. -\details The algorithm does not require preprocessing. It relies on the algorithm of T. Asano \cite ta-aeafvpprh-85 based on angular plane sweep, with a time complexity of \f$O (n \log n)\f$ in the number of vertices. +\details The algorithm does not require preprocessing. It relies on the algorithm of T. Asano \cite ta-aeafvpprh-85 based on angular plane sweep, with a time complexity of \cgalBigO{n \log n} in the number of vertices. \tparam Arrangement_2_ is the type used to represent the input environment. @@ -63,7 +63,7 @@ public: /*! Attaches the given arrangement to the visibility object. -This operation takes \f$O(1)\f$ as the class does no pre-processing. +This operation takes \cgalBigO{1} as the class does no pre-processing. In case the object is already attached to another arrangement, the visibility object gets detached before being attached to `arr`. diff --git a/Visibility_2/doc/Visibility_2/CGAL/Simple_polygon_visibility_2.h b/Visibility_2/doc/Visibility_2/CGAL/Simple_polygon_visibility_2.h index f073ea8cc24..daa988c11b2 100644 --- a/Visibility_2/doc/Visibility_2/CGAL/Simple_polygon_visibility_2.h +++ b/Visibility_2/doc/Visibility_2/CGAL/Simple_polygon_visibility_2.h @@ -12,7 +12,7 @@ It computes the visibility region from a viewpoint that is in the interior or on While scanning the boundary the algorithm uses a stack to manipulate the vertices, and ultimately yields the visibility region. For each scanned edge, at most 2 points are pushed onto the stack. Overall, at most 2\f$ n \f$ points are pushed or popped. Thus, the time and space complexities of the -algorithm are \f$ O(n) \f$ even in case of degeneracies such as needles, where \f$ n \f$ +algorithm are \cgalBigO{n}$ even in case of degeneracies such as needles, where \f$ n \f$ is the number of the vertices of the polygon. \tparam Arrangement_2_ is the type used to represent the input environment. @@ -67,7 +67,7 @@ public: /*! Attaches the given arrangement to the visibility object. -This operation takes \f$O(1)\f$ as the class does no pre-processing. +This operation takes \cgalBigO{1} as the class does no pre-processing. In case the object is already attached to another arrangement, the visibility object gets detached before being attached to `arr`. diff --git a/Visibility_2/doc/Visibility_2/CGAL/Triangular_expansion_visibility_2.h b/Visibility_2/doc/Visibility_2/CGAL/Triangular_expansion_visibility_2.h index 178a812957d..6606de87dfa 100644 --- a/Visibility_2/doc/Visibility_2/CGAL/Triangular_expansion_visibility_2.h +++ b/Visibility_2/doc/Visibility_2/CGAL/Triangular_expansion_visibility_2.h @@ -6,8 +6,8 @@ namespace CGAL { \details The algorithm obtains a constrained triangulation from the input arrangement, then computes visibility by expanding the triangle that contains the query point. -Preprocessing takes \f$ O(n)\f$ time and \f$ O(n) \f$ space, where \f$ n \f$ is the number of vertices of input polygon. -The query time is \f$ O(nh)\f$, where \f$ h \f$ is the number of holes+1 of input polygon. Thus, for simple polygons (or a polygon with a constant number of holes) the algorithm complexity is linear, but it is \f$ O(n^2)\f$ in the worst case, as the number of holes can be linear in \f$ n \f$. +Preprocessing takes \cgalBigO{n} time and \cgalBigO{n}$ space, where \f$ n \f$ is the number of vertices of input polygon. +The query time is \cgalBigO{nh}, where \f$ h \f$ is the number of holes+1 of input polygon. Thus, for simple polygons (or a polygon with a constant number of holes) the algorithm complexity is linear, but it is \cgalBigO{n^2} in the worst case, as the number of holes can be linear in \f$ n \f$. \tparam Arrangement_2_ is the type used to represent the input environment. @@ -63,7 +63,7 @@ public: /*! Attaches the given arrangement to the visibility object and computes the restricted triangulation. -This takes \f$ O(n) \f$ time, where \f$ n \f$ is the number of vertices. +This takes \cgalBigO{n}$ time, where \f$ n \f$ is the number of vertices. From this moment on the class observes changes in the arrangement. If the arrangement changes a new restricted triangulation is computed. Re-attaching forces re-computation. diff --git a/Visibility_2/doc/Visibility_2/visibility_2.txt b/Visibility_2/doc/Visibility_2/visibility_2.txt index 891d813009f..d0dcdc09c49 100644 --- a/Visibility_2/doc/Visibility_2/visibility_2.txt +++ b/Visibility_2/doc/Visibility_2/visibility_2.txt @@ -74,9 +74,9 @@ The following models of the `Visibility_2` concept are provided:
      Class | Function | Preprocessing | Query |Algorithm -------------------------------|-----------------------------------------------------|-------------------------------|-----------------------------------|------------------------------- - `Simple_polygon_visibility_2` | simple polygons | No |\f$ O(n) \f$ time and \f$ O(n) \f$ space | B. Joe and R. B. Simpson \cite bjrb-clvpa-87 - `Rotational_sweep_visibility_2` | polygons with holes | No | \f$ O(n\log n) \f$ time and \f$ O(n) \f$ space | T. Asano \cite ta-aeafvpprh-85 -`Triangular_expansion_visibility_2` | polygons with holes | \f$ O(n) \f$ time and \f$ O(n) \f$ space | \f$ O(nh) \f$ time and \f$ O(n) \f$ space. | Bungiu et al. \cite ecvp-bhhhk-14 + `Simple_polygon_visibility_2` | simple polygons | No |\cgalBigO{n}$ time and \cgalBigO{n}$ space | B. Joe and R. B. Simpson \cite bjrb-clvpa-87 + `Rotational_sweep_visibility_2` | polygons with holes | No | \cgalBigO{n\log n}$ time and \cgalBigO{n}$ space | T. Asano \cite ta-aeafvpprh-85 +`Triangular_expansion_visibility_2` | polygons with holes | \cgalBigO{n}$ time and \cgalBigO{n}$ space | \cgalBigO{nh}$ time and \cgalBigO{n}$ space. | Bungiu et al. \cite ecvp-bhhhk-14
      Where \f$ n \f$ denotes the number of vertices of \f$ f \f$ and \f$ h \f$ the number of holes+1. @@ -158,4 +158,4 @@ During Google Summer of Code 2014 Ning Xu fixed a bug in `CGAL::Simple_polygon_v } -// `Preprocessed_rotational_sweep_visibility_2` | polygons with holes | \f$ O(n^2) \f$ time and \f$ O(n^2) \f$ space | \f$ O(n) \f$ time and \f$ O(n) \f$ space | Takao Asano, Tetsuo Asano etc \cite aaghi-vpsesp-85 +// `Preprocessed_rotational_sweep_visibility_2` | polygons with holes | \cgalBigO{n^2}$ time and \cgalBigO{n^2}$ space | \cgalBigO{n}$ time and \cgalBigO{n}$ space | Takao Asano, Tetsuo Asano etc \cite aaghi-vpsesp-85 diff --git a/ccpp.yml b/ccpp.yml deleted file mode 100644 index 75bbbee4918..00000000000 --- a/ccpp.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: C/C++ CI - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: configure all - run: cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON .