diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml new file mode 100644 index 00000000000..8b0bba4260e --- /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@v2 + with: + args: --version + - name: REUSE lint + uses: fsfe/reuse-action@v2 + with: + args: --include-submodules lint + - name: REUSE SPDX SBOM + uses: fsfe/reuse-action@v2 + 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@v2 + 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/doc/AABB_tree/Concepts/AABBGeomTraits.h b/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h index 2f1fdc3e5c6..5c7a45edb67 100644 --- a/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h +++ b/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h @@ -47,7 +47,7 @@ Provides the operator: `return_type operator()(const Query& q, const Primitive::Datum& d)`, which computes the intersection between `q` and `d`. The type of the returned object -must be a `boost::optional` of a `boost::variant` of the possible intersection types. +must be a `std::optional` of a `std::variant` of the possible intersection types. */ typedef unspecified_type Intersect_3; diff --git a/AABB_tree/doc/AABB_tree/Concepts/AABBRayIntersectionTraits.h b/AABB_tree/doc/AABB_tree/Concepts/AABBRayIntersectionTraits.h index 215cbd65924..3b186c9ff22 100644 --- a/AABB_tree/doc/AABB_tree/Concepts/AABBRayIntersectionTraits.h +++ b/AABB_tree/doc/AABB_tree/Concepts/AABBRayIntersectionTraits.h @@ -25,15 +25,15 @@ public: /*! A functor object to compute the distance between the source of a ray and its closest intersection point between the ray and a primitive or a bounding box. - An empty `boost::optional` is returned, if there is no intersection. + An empty `std::optional` is returned, if there is no intersection. When there is an intersection, an object of type `FT` is returned such that if `i1` and `i2` are two intersection points, then `i1` is closer to the source of the ray than `i2` iff `n1 < n2`, `n1` and `n2` being the numbers returned for `i1` and `i2` respectively. Provides the operators: - `boost::optional operator()(const Ray_3& r, const Bounding_box& bbox)`. - `boost::optional::%Type > > + `std::optional operator()(const Ray_3& r, const Bounding_box& bbox)`. + `std::optional::%Type > > operator()(const Ray_3& r, const Primitive& primitive)`. A common algorithm to compute the intersection between a bounding box and a ray is ::%Type > operator()(const Query & q, const Primitive& primitive);` which returns the intersection as a pair composed of an object and a primitive id, iff the query intersects the primitive. +`std::optional::%Type > operator()(const Query & q, const Primitive& primitive);` which returns the intersection as a pair composed of an object and a primitive id, iff the query intersects the primitive. \cgalHeading{Note on Backward Compatibility} -Before the release 4.3 of \cgal, the return type of this function used to be `boost::optional`. +Before the release 4.3 of \cgal, the return type of this function used to be `std::optional`. */ typedef unspecified_type Intersection; diff --git a/AABB_tree/examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp b/AABB_tree/examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp index 4a4a1e61306..6ced34c0234 100644 --- a/AABB_tree/examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp +++ b/AABB_tree/examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp @@ -19,8 +19,8 @@ typedef CGAL::Polyhedron_3 Polyhedron; typedef CGAL::AABB_face_graph_triangle_primitive Primitive; typedef CGAL::AABB_traits Traits; typedef CGAL::AABB_tree Tree; -typedef boost::optional< Tree::Intersection_and_primitive_id::Type > Segment_intersection; -typedef boost::optional< Tree::Intersection_and_primitive_id::Type > Plane_intersection; +typedef std::optional< Tree::Intersection_and_primitive_id::Type > Segment_intersection; +typedef std::optional< Tree::Intersection_and_primitive_id::Type > Plane_intersection; typedef Tree::Primitive_id Primitive_id; int main() @@ -57,7 +57,7 @@ int main() if(intersection) { // gets intersection object - const Point* p = boost::get(&(intersection->first)); + const Point* p = std::get_if(&(intersection->first)); if(p) std::cout << "intersection object is a point " << *p << std::endl; @@ -81,7 +81,7 @@ int main() if(plane_intersection) { - if(boost::get(&(plane_intersection->first))) + if(std::get_if(&(plane_intersection->first))) std::cout << "intersection object is a segment" << std::endl; } diff --git a/AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp b/AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp index d3b2af45913..e9ed0fe87c5 100644 --- a/AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp +++ b/AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp @@ -23,7 +23,7 @@ typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef CGAL::AABB_face_graph_triangle_primitive Primitive; typedef CGAL::AABB_traits Traits; typedef CGAL::AABB_tree Tree; -typedef boost::optional::Type> Ray_intersection; +typedef std::optional::Type> Ray_intersection; struct Skip { @@ -70,8 +70,8 @@ int main(int argc, char* argv[]) Ray_intersection intersection = tree.first_intersection(ray, skip); if(intersection) { - if(boost::get(&(intersection->first))){ - const Point* p = boost::get(&(intersection->first) ); + if(std::get_if(&(intersection->first))){ + const Point* p = std::get_if(&(intersection->first) ); std::cout << *p << std::endl; } } 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 fe85c35d366..62484d59653 100644 --- a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h +++ b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h @@ -33,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_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index b2eb87dc8f6..f5c1c1240a1 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -27,7 +27,7 @@ #include -#include +#include /// \file AABB_traits.h @@ -39,7 +39,7 @@ template struct Remove_optional { typedef T type; }; template -struct Remove_optional< ::boost::optional > { typedef T type; }; +struct Remove_optional< ::std::optional > { typedef T type; }; //helper controlling whether extra data should be stored in the AABB_tree traits class template ::value> @@ -85,7 +85,7 @@ struct AABB_traits_base_2{ typedef typename CGAL::Bbox_3 Bounding_box; struct Intersection_distance { - boost::optional operator()(const Ray_3& ray, const Bounding_box& bbox) const { + std::optional operator()(const Ray_3& ray, const Bounding_box& bbox) const { FT t_near = -DBL_MAX; // std::numeric_limits::lowest(); C++1903 FT t_far = DBL_MAX; @@ -101,7 +101,7 @@ struct AABB_traits_base_2{ for(int i = 0; i < 3; ++i, ++source_iter, ++direction_iter) { if(*direction_iter == 0) { if((*source_iter < (bbox.min)(i)) || (*source_iter > (bbox.max)(i))) { - return boost::none; + return std::nullopt; } } else { FT t1 = ((bbox.min)(i) - *source_iter) / *direction_iter; @@ -118,7 +118,7 @@ struct AABB_traits_base_2{ // t_far = t2; if(t_near > t_far || t_far < FT(0.)) - return boost::none; + return std::nullopt; } } @@ -193,7 +193,7 @@ public: /// `Intersection_and_primitive_id::%Type::first_type` is found according to /// the result type of `GeomTraits::Intersect_3::operator()`. If it is - /// `boost::optional` then it is `T`, and the result type otherwise. + /// `std::optional` then it is `T`, and the result type otherwise. template struct Intersection_and_primitive_id { typedef decltype( @@ -364,12 +364,12 @@ public: Intersection(const AABB_traits& traits) :m_traits(traits) {} template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > operator()(const Query& query, const typename AT::Primitive& primitive) const { auto inter_res = GeomTraits().intersect_3_object()(query, internal::Primitive_helper::get_datum(primitive,m_traits)); if (!inter_res) - return boost::none; - return boost::make_optional( std::make_pair(*inter_res, primitive.id()) ); + return std::nullopt; + return std::make_optional( std::make_pair(*inter_res, primitive.id()) ); } }; diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 3f49779b6ac..16c39099b38 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #ifdef CGAL_HAS_THREADS #include @@ -142,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&& ...); @@ -270,7 +270,7 @@ public: /// \tparam Query must be a type for which `Do_intersect` operators are /// defined in the traits class `AABBTraits`. template - boost::optional any_intersected_primitive(const Query& query) const; + std::optional any_intersected_primitive(const Query& query) const; ///@} /// \name Intersections @@ -293,7 +293,7 @@ public: /// \tparam Query must be a type for which `Do_intersect` and `Intersection` operators are /// defined in the traits class `AABBTraits`. template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > any_intersection(const Query& query) const; @@ -317,12 +317,12 @@ public: /// `AABBTraits` must be a model of `AABBRayIntersectionTraits` to /// call this member function. template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > first_intersection(const Ray& query, const SkipFunctor& skip) const; /// \cond template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > first_intersection(const Ray& query) const { return first_intersection(query, [](Primitive_id){ return false; }); @@ -342,12 +342,12 @@ public: /// `AABBTraits` must be a model of `AABBRayIntersectionTraits` to /// call this member function. template - boost::optional + std::optional first_intersected_primitive(const Ray& query, const SkipFunctor& skip) const; /// \cond template - boost::optional + std::optional first_intersected_primitive(const Ray& query) const { return first_intersected_primitive(query, [](Primitive_id){ return false; }); @@ -963,7 +963,7 @@ public: template template - boost::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > AABB_tree::any_intersection(const Query& query) const { using namespace CGAL::internal::AABB_tree; @@ -975,7 +975,7 @@ public: template template - boost::optional::Primitive_id> + std::optional::Primitive_id> AABB_tree::any_intersected_primitive(const Query& query) const { using namespace CGAL::internal::AABB_tree; diff --git a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h index 87ebbe012ab..fd11f41492c 100644 --- a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h +++ b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h @@ -19,8 +19,7 @@ #include #include -#include -#include +#include # if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable: 4996) @@ -43,7 +42,7 @@ class AABB_ray_intersection { public: AABB_ray_intersection(const AABBTree& tree) : tree_(tree) {} - boost::optional< Ray_intersection_and_primitive_id > + std::optional< Ray_intersection_and_primitive_id > ray_intersection(const Ray& query, SkipFunctor skip) const { // We hit the root, now continue on the children. Keep track of // nb_primitives through a variable in each Node on the stack. In @@ -63,7 +62,7 @@ public: Heap_type pq; // pq.reserve(tree_.size() / 2); - boost::optional< Ray_intersection_and_primitive_id > + std::optional< Ray_intersection_and_primitive_id > intersection, /* the temporary for calculating the result */ p; /* the current best intersection */ @@ -84,7 +83,7 @@ public: if(!skip(current.node->left_data().id()) /* && do_intersect_obj(query, current.node->left_data()) */) { intersection = intersection_obj(query, current.node->left_data()); if(intersection) { - FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); + FT ray_distance = std::visit(param_visitor, intersection->first); if(ray_distance < t) { t = ray_distance; p = intersection; @@ -96,7 +95,7 @@ public: if(!skip(current.node->right_data().id()) /* && do_intersect_obj(query, current.node->right_data()) */) { intersection = intersection_obj(query, current.node->right_data()); if(intersection) { - FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); + FT ray_distance = std::visit(param_visitor, intersection->first); if(ray_distance < t) { t = ray_distance; p = intersection; @@ -111,7 +110,7 @@ public: if(!skip(current.node->left_data().id()) /* && do_intersect_obj(query, current.node->left_data()) */) { intersection = intersection_obj(query, current.node->left_data()); if(intersection) { - FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); + FT ray_distance = std::visit(param_visitor, intersection->first); if(ray_distance < t) { t = ray_distance; p = intersection; @@ -121,7 +120,7 @@ public: // right child const Node* child = &(current.node->right_child()); - boost::optional< FT > dist = intersection_distance_obj(query, child->bbox()); + std::optional< FT > dist = intersection_distance_obj(query, child->bbox()); if(dist) pq.push(Node_ptr_with_ft(child, *dist, 2)); @@ -130,7 +129,7 @@ public: default: // Children both inner nodes { const Node* child = &(current.node->left_child()); - boost::optional dist = intersection_distance_obj(query, child->bbox()); + std::optional dist = intersection_distance_obj(query, child->bbox()); if(dist) pq.push(Node_ptr_with_ft(child, *dist, current.nb_primitives/2)); @@ -198,7 +197,7 @@ private: template template -boost::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > +std::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > AABB_tree::first_intersection(const Ray& query, const SkipFunctor& skip) const { static_assert(std::is_same::value, @@ -219,22 +218,22 @@ AABB_tree::first_intersection(const Ray& query, break; } } - return boost::none; + return std::nullopt; } template template -boost::optional::Primitive_id> +std::optional::Primitive_id> AABB_tree::first_intersected_primitive(const Ray& query, const SkipFunctor& skip) const { - boost::optional< + std::optional< typename AABB_tree:: template Intersection_and_primitive_id::Type > res = first_intersection(query, skip); if ( (bool) res ) - return boost::make_optional( res->second ); - return boost::none; + return std::make_optional( res->second ); + return std::nullopt; } } diff --git a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h index fe7e85effdd..645ce1347cb 100644 --- a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h +++ b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h @@ -17,7 +17,7 @@ #include -#include +#include namespace CGAL { @@ -69,7 +69,7 @@ class First_intersection_traits public: typedef - boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > + std::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > Result; public: First_intersection_traits(const AABBTraits& traits) @@ -124,7 +124,7 @@ public: void intersection(const Query& query, const Primitive& primitive) { - boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > + std::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > intersection = m_traits.intersection_object()(query, primitive); if(intersection) @@ -211,7 +211,7 @@ public: { if( m_traits.do_intersect_object()(query, primitive) ) { - m_result = boost::optional(primitive.id()); + m_result = std::optional(primitive.id()); m_is_found = true; } } @@ -221,12 +221,12 @@ public: return m_traits.do_intersect_object()(query, node.bbox()); } - boost::optional result() const { return m_result; } + std::optional result() const { return m_result; } bool is_intersection_found() const { return m_is_found; } private: bool m_is_found; - boost::optional m_result; + std::optional m_result; const AABBTraits& m_traits; }; diff --git a/AABB_tree/test/AABB_tree/AABB_test_util.h b/AABB_tree/test/AABB_tree/AABB_test_util.h index 5b73a20f9f2..fae5abfe17c 100644 --- a/AABB_tree/test/AABB_tree/AABB_test_util.h +++ b/AABB_tree/test/AABB_tree/AABB_test_util.h @@ -95,20 +95,23 @@ void test_all_intersection_query_types(Tree& tree) tree.all_intersected_primitives(segment,std::back_inserter(primitives)); // any_intersection - boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > r = tree.any_intersection(ray); - boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > l = tree.any_intersection(line); - boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > s = tree.any_intersection(segment); + std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > r = tree.any_intersection(ray); + std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > l = tree.any_intersection(line); + std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > s = tree.any_intersection(segment); + CGAL_USE(r); + CGAL_USE(l); + CGAL_USE(s); // any_intersected_primitive - boost::optional optional_primitive; + std::optional optional_primitive; optional_primitive = tree.any_intersected_primitive(ray); optional_primitive = tree.any_intersected_primitive(line); optional_primitive = tree.any_intersected_primitive(segment); // all_intersections - std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_r; - std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_l; - std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_s; + std::list< std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_r; + std::list< std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_l; + std::list< std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_s; tree.all_intersections(ray,std::back_inserter(intersections_r)); tree.all_intersections(line,std::back_inserter(intersections_l)); tree.all_intersections(segment,std::back_inserter(intersections_s)); @@ -322,7 +325,7 @@ class Naive_implementations typedef typename Traits::Point_3 Point; typedef typename Traits::Point_and_primitive_id Point_and_primitive_id; - typedef boost::optional Intersection_result; + typedef std::optional Intersection_result; const Traits& m_traits; public: @@ -380,7 +383,7 @@ public: Polyhedron_primitive_iterator it = Pr_generator().begin(p); for ( ; it != Pr_generator().end(p) ; ++it ) { - boost::optional< typename Traits::template Intersection_and_primitive_id::Type > + std::optional< typename Traits::template Intersection_and_primitive_id::Type > intersection = m_traits.intersection_object()(query, Pr(it,p)); if ( intersection ) *out++ = *intersection; @@ -653,7 +656,7 @@ private: } // any_intersected_primitive test (do not count time here) - typedef boost::optional Any_primitive; + typedef std::optional Any_primitive; Any_primitive primitive = tree.any_intersected_primitive(query); // Check: verify we do get the result by naive method @@ -723,7 +726,7 @@ private: } // Any intersection test (do not count time here) - boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > + std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > intersection = tree.any_intersection(query); // Check: verify we do get the result by naive method diff --git a/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp b/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp index 5e09d6c2291..eb6fef9082a 100644 --- a/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp +++ b/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp @@ -46,7 +46,7 @@ std::size_t intersect(ForwardIterator b, ForwardIterator e, const Tree& tree, lo v.reserve(elements); for(; b != e; ++b) { tree.all_intersections(*b, std::back_inserter(v)); - boost::optional o = tree.any_intersection(*b); + std::optional o = tree.any_intersection(*b); if(o) ++counter; } diff --git a/AABB_tree/test/AABB_tree/aabb_correctness_triangle_test.cpp b/AABB_tree/test/AABB_tree/aabb_correctness_triangle_test.cpp index 13eb303b771..54ef4c600f6 100644 --- a/AABB_tree/test/AABB_tree/aabb_correctness_triangle_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_correctness_triangle_test.cpp @@ -65,7 +65,7 @@ int test() return EXIT_FAILURE; } - boost::optional any; + std::optional any; any = tree.any_intersection(pq); if(!any) { 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 649f594d7e9..8ca781ff114 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp @@ -35,7 +35,7 @@ FT point_on_ray_dist(const Ray& ray, const Point& point) { std::size_t accum = 0; -boost::optional< +std::optional< Tree::Intersection_and_primitive_id::Type > min_intersection(const Tree& tree, const Ray& ray) { @@ -45,12 +45,12 @@ min_intersection(const Tree& tree, const Ray& ray) { tree.all_intersections(ray, std::back_inserter(all_intersections)); accum += all_intersections.size(); Tree::FT min_distance = DBL_MAX; - boost::optional< + std::optional< Tree::Intersection_and_primitive_id::Type - > mini = boost::none; + > mini = std::nullopt; for(IntersectionVector::iterator it2 = all_intersections.begin(); it2 != all_intersections.end(); ++it2) { - if(Point* point = boost::get(&(it2->first))) { + if(Point* point = std::get_if(&(it2->first))) { Vector i_ray(*point, ray.source()); Tree::FT new_distance = i_ray.squared_length(); if(new_distance < min_distance) { @@ -124,7 +124,7 @@ int main() rays.reserve(NB_RAYS); std::transform(v1.begin(), v1.end(), v2.begin(), std::back_inserter(rays), boost::value_factory()); - std::vector< boost::optional::Type > > primitives1, primitives2; + std::vector< std::optional::Type > > primitives1, primitives2; primitives1.reserve(NB_RAYS); primitives2.reserve(NB_RAYS); @@ -139,7 +139,7 @@ int main() } assert(primitives1.size() == primitives2.size()); // Different amount of primitives intersected assert(std::equal(primitives1.begin(), primitives1.end(), primitives2.begin())); // Primitives mismatch - std::size_t c = primitives1.size() - std::count(primitives1.begin(), primitives1.end(), boost::none); + std::size_t c = primitives1.size() - std::count(primitives1.begin(), primitives1.end(), std::nullopt); std::cout << "Intersected " << c << " primitives with " << NB_RAYS << " rays" << std::endl; std::cout << "Primitive method had to sort " << accum/NB_RAYS << " intersections on average." << std::endl; diff --git a/Algebraic_foundations/doc/Algebraic_foundations/Concepts/EuclideanRing.h b/Algebraic_foundations/doc/Algebraic_foundations/Concepts/EuclideanRing.h index 69421885198..a1ea3df6e96 100644 --- a/Algebraic_foundations/doc/Algebraic_foundations/Concepts/EuclideanRing.h +++ b/Algebraic_foundations/doc/Algebraic_foundations/Concepts/EuclideanRing.h @@ -3,7 +3,7 @@ \ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts \cgalConcept -A model of `EuclideanRing` represents an euclidean ring (or Euclidean domain). +A model of `EuclideanRing` represents a Euclidean ring (or Euclidean domain). It is an `UniqueFactorizationDomain` that affords a suitable notion of minimality of remainders such that given \f$ x\f$ and \f$ y \neq 0\f$ we obtain an (almost) unique solution to \f$ x = qy + r \f$ by demanding that a solution \f$ (q,r)\f$ is chosen to minimize \f$ r\f$. diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index e92e01e0669..bc35601fc5e 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include @@ -359,7 +359,7 @@ public: Unary_compose(const Unary_compose& other) = default; Unary_compose& operator=(const Unary_compose& other) = default; - Unary_compose() : _inner(::boost::none),_outer(::boost::none) {} + Unary_compose() : _inner(::std::nullopt),_outer(::std::nullopt) {} typedef typename InnerFunctor::argument_type argument_type; typedef typename OuterFunctor::result_type result_type; @@ -368,11 +368,11 @@ public: result_type operator() (const argument_type& arg) const { CGAL_assertion(bool(_inner)); CGAL_assertion(bool(_outer)); - return _outer.get()(_inner.get()(arg)); + return _outer.value()(_inner.value()(arg)); } private: - ::boost::optional _inner; - ::boost::optional _outer; + ::std::optional _inner; + ::std::optional _outer; }; template diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h index 2b5a30867ce..9c23acc6bd0 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h @@ -174,7 +174,7 @@ public: long old_precision = get_precision( BFI() ); set_precision( BFI(), 53 ); std::pair interval = CGAL::to_interval( convert_to_bfi( (*this))); - this->ptr()->interval_option = boost::optional< std::pair >(interval); + this->ptr()->interval_option = std::optional< std::pair >(interval); set_precision( BFI(), old_precision ); return *(this->ptr()->interval_option); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h index b7e686d4203..06effd6b5dd 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h @@ -86,10 +86,10 @@ private: CGAL::Polynomial_traits_d::template Rebind ::Other::Type BFI_polynomial; - mutable boost::optional + mutable std::optional < BFI_polynomial > f_bfi_; - mutable boost::optional low_bfi_, f_low_bfi_, + mutable std::optional low_bfi_, f_low_bfi_, high_bfi_, f_high_bfi_; mutable long N; @@ -113,8 +113,8 @@ private: low_bfi_ = CGAL::convert_to_bfi(this->low()); high_bfi_ = CGAL::convert_to_bfi(this->high()); - f_low_bfi_ = f_bfi_.get().evaluate(low_bfi_.get()); - f_high_bfi_ = f_bfi_.get().evaluate(high_bfi_.get()); + f_low_bfi_ = f_bfi_.value().evaluate(low_bfi_.value()); + f_high_bfi_ = f_bfi_.value().evaluate(high_bfi_.value()); } @@ -125,7 +125,7 @@ private: } m_bfi = CGAL::convert_to_bfi(m); - f_m_bfi = f_bfi_.get().evaluate(m_bfi); + f_m_bfi = f_bfi_.value().evaluate(m_bfi); if(CGAL::zero_in(f_m_bfi)) { @@ -229,21 +229,21 @@ protected: bool poly_changed = (P!=this->polynomial()); if(poly_changed) { - f_bfi_ = boost::none; + f_bfi_ = std::nullopt; } if(poly_changed || LOW != this->low()) { - f_low_bfi_ = low_bfi_ = boost::none; + f_low_bfi_ = low_bfi_ = std::nullopt; } if(poly_changed || HIGH != this->high()) { - f_high_bfi_ = high_bfi_ = boost::none; + f_high_bfi_ = high_bfi_ = std::nullopt; } Base::set_implicit_rep(P,LOW,HIGH,dummy_bool); } virtual void set_explicit_rep(const Field& m) const { - f_bfi_ = boost::none; - f_low_bfi_ = low_bfi_ = boost::none; - f_high_bfi_ = high_bfi_ = boost::none; + f_bfi_ = std::nullopt; + f_low_bfi_ = low_bfi_ = std::nullopt; + f_high_bfi_ = high_bfi_ = std::nullopt; Base::set_explicit_rep(m); } @@ -256,13 +256,13 @@ public: if(this->is_rational()) return; if(old_low_!=this->low_) { - f_low_bfi_ = low_bfi_ = boost::none; + f_low_bfi_ = low_bfi_ = std::nullopt; } if(old_high_!=this->high_) { - f_high_bfi_ = high_bfi_ = boost::none; + f_high_bfi_ = high_bfi_ = std::nullopt; } if(old_pol != this->polynomial()) { - f_bfi_ = boost::none; + f_bfi_ = std::nullopt; } } @@ -329,25 +329,25 @@ private: low_bfi_ = CGAL::convert_to_bfi(this->low()); } if(! f_low_bfi_) { - f_low_bfi_ = f_bfi_.get().evaluate(low_bfi_.get()); + f_low_bfi_ = f_bfi_.value().evaluate(low_bfi_.value()); } if(! high_bfi_) { high_bfi_ = CGAL::convert_to_bfi(this->high()); } if(! f_high_bfi_) { - f_high_bfi_ = f_bfi_.get().evaluate(high_bfi_.get()); + f_high_bfi_ = f_bfi_.value().evaluate(high_bfi_.value()); } Integer i; while(true) { - if(CGAL::zero_in(f_low_bfi_.get() - f_high_bfi_.get())) { + if(CGAL::zero_in(f_low_bfi_.value() - f_high_bfi_.value())) { _set_prec(2*prec_); continue; } - BFI denom = f_low_bfi_.get()-f_high_bfi_.get(); + BFI denom = f_low_bfi_.value()-f_high_bfi_.value(); - BFI z = f_low_bfi_.get() / denom; + BFI z = f_low_bfi_.value() / denom; std::pair int_pair = _to_integer_interval(z,N); Integer i_low = int_pair.first; @@ -458,7 +458,7 @@ protected: f_bfi_ = _convert_polynomial_to_bfi(this->polynomial()); } - BFI eval = f_bfi_.get().evaluate(convert_to_bfi(m)); + BFI eval = f_bfi_.value().evaluate(convert_to_bfi(m)); CGAL::Sign s = CGAL::sign(CGAL::lower(eval)); @@ -490,7 +490,7 @@ public: Poly f_old = this->polynomial(); Base::simplify(); if(f_old != this->polynomial()) { - f_bfi_ = boost::none; + f_bfi_ = std::nullopt; } } }; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h index cecfb57c971..95e8907ad55 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include namespace CGAL { @@ -56,7 +56,7 @@ private: typedef Algebraic_real_rep Self; public: - typedef boost::optional< std::pair > Interval_option; + typedef std::optional< std::pair > Interval_option; mutable Poly polynomial_; //!< square free polynomial mutable Rational low_; //!< lower endpoint of interval diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index 2f7719bb362..bf607e75f15 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -31,7 +31,7 @@ #include #include -#include +#include /* * AUXILIARY CLASSES AND FUNCTIONS 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 70db25837e9..6fecb592a12 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 @@ -196,7 +196,7 @@ private: size_type index_of_content_root; size_type mult_of_prim_lcoeff_root; size_type index_of_prim_lcoeff_root; - boost::optional stack; + std::optional stack; }; // Functor to get the X_coordinate of an Event_coordinate @@ -210,14 +210,14 @@ private: //! The object holding the information about events, as an optional - mutable boost::optional > + mutable std::optional > event_coordinates; //! The algebraic kernel to use Algebraic_kernel_with_analysis_2* _m_kernel; //! The polynomial defining the curve - boost::optional f; + std::optional f; //! How degenerate situations are handled CGAL::Degeneracy_strategy degeneracy_strategy; @@ -230,24 +230,24 @@ private: * \c f/cont(f). The corresponding curve is equal to the curve of \c f, * only without vertical line components. */ - mutable boost::optional f_primitive; + mutable std::optional f_primitive; //! the polynomial containing all roots of the resultant of the primitive //! part of f and its y-derivative - mutable boost::optional + mutable std::optional resultant_of_primitive_and_derivative_y; //! the polynomial containing all roots of the resultant of the primitive //! part of f and its x-derivative - mutable boost::optional + mutable std::optional resultant_of_primitive_and_derivative_x; //! The Sturm-Habicht polynomials of f - mutable boost::optional > + mutable std::optional > sturm_habicht_of_primitive; //! The content of f - mutable boost::optional content; + mutable std::optional content; //! The non-working shear factors, as far as known mutable std::set bad_shears; @@ -256,10 +256,10 @@ private: mutable std::map sheared_curves; //! Has the curve vertical line components - mutable boost::optional has_vertical_component; + mutable std::optional has_vertical_component; //! The intermediate values - mutable boost::optional > > + mutable std::optional > > intermediate_values; //! stores Y_values at rational coordinate @@ -272,7 +272,7 @@ private: * are asymptotic to y=beta, * or go to +/- infty also in y-direction */ - mutable boost::optional > + mutable std::optional > horizontal_asymptotes_left, horizontal_asymptotes_right; //! friends @@ -546,7 +546,7 @@ private: if(! this->ptr()->intermediate_values) { this->ptr()->intermediate_values - = std::vector > + = std::vector > (number_of_status_lines_with_event()+1); } @@ -583,7 +583,7 @@ public: */ void set_f(Polynomial_2 f) { CGAL_precondition(! has_defining_polynomial()); - if((! this->ptr()->f) || f!=this->ptr()->f.get()) { + if((! this->ptr()->f) || f!=this->ptr()->f.value()) { this->copy_on_write(); this->ptr()->f=f; } @@ -630,7 +630,7 @@ public: event_coordinates(); CGAL_assertion(this->ptr()->has_vertical_component); } - return this->ptr()->has_vertical_component.get(); + return this->ptr()->has_vertical_component.value(); } public: @@ -638,7 +638,7 @@ public: //! Returns the defining polynomial Polynomial_2 polynomial_2() const { CGAL_precondition(bool(this->ptr()->f)); - return this->ptr()->f.get(); + return this->ptr()->f.value(); } public: @@ -713,8 +713,8 @@ public: = event_line; event_coordinates()[i].stack = event_line; } - CGAL_postcondition(event_coordinates()[i].stack.get().is_event()); - return event_coordinates()[i].stack.get(); + CGAL_postcondition(event_coordinates()[i].stack.value().is_event()); + return event_coordinates()[i].stack.value(); } public: @@ -1348,7 +1348,7 @@ public: } } } - return intermediate_values()[i].get(); + return intermediate_values()[i].value(); } @@ -1369,7 +1369,7 @@ public: if(! this->ptr()->content) { compute_content_and_primitive_part(); } - return this->ptr()->content.get(); + return this->ptr()->content.value(); } public: @@ -1388,7 +1388,7 @@ public: if(! this->ptr()->f_primitive) { compute_content_and_primitive_part(); } - return this->ptr()->f_primitive.get(); + return this->ptr()->f_primitive.value(); } Algebraic_kernel_with_analysis_2* kernel() const { @@ -1436,7 +1436,7 @@ private: if(! this->ptr()->sturm_habicht_of_primitive) { compute_sturm_habicht_of_primitive(); } - return this->ptr()->sturm_habicht_of_primitive.get(); + return this->ptr()->sturm_habicht_of_primitive.value(); } public: @@ -1557,7 +1557,7 @@ private: if(! this->ptr()->resultant_of_primitive_and_derivative_y) { this->ptr()->resultant_of_primitive_and_derivative_y = stha[0][0]; if(this->ptr()->resultant_of_primitive_and_derivative_y. - get().is_zero()) { + value().is_zero()) { throw internal::Zero_resultant_exception (polynomial_2()); } @@ -1581,7 +1581,7 @@ private: if(! this->ptr()->resultant_of_primitive_and_derivative_y) { compute_resultant_of_primitive_and_derivative_y(); } - return this->ptr()->resultant_of_primitive_and_derivative_y.get(); + return this->ptr()->resultant_of_primitive_and_derivative_y.value(); } private: @@ -1592,7 +1592,7 @@ private: if(! this->ptr()->resultant_of_primitive_and_derivative_x) { compute_resultant_of_primitive_and_derivative_x(); } - return this->ptr()->resultant_of_primitive_and_derivative_x.get(); + return this->ptr()->resultant_of_primitive_and_derivative_x.value(); } private: @@ -1713,20 +1713,20 @@ private: if(! this->ptr()->event_coordinates) { compute_event_coordinates(); } - return this->ptr()->event_coordinates.get(); + return this->ptr()->event_coordinates.value(); } private: // Returns the intermediate values for intervals between events - std::vector >& intermediate_values() const + std::vector >& intermediate_values() const { if(! this->ptr()->intermediate_values) { // This is created during event_coordiantes() event_coordinates(); CGAL_assertion(bool(this->ptr()->intermediate_values)); } - return this->ptr()->intermediate_values.get(); + return this->ptr()->intermediate_values.value(); } @@ -1915,7 +1915,7 @@ private: static_cast(content_roots.size())); this->ptr()->intermediate_values - = std::vector > + = std::vector > (event_coordinate_vector.size()+1); this->ptr()->event_coordinates = event_coordinate_vector; @@ -2110,7 +2110,7 @@ public: compute_horizontal_asymptotes(); } std::vector& asym_info - = this->ptr()->horizontal_asymptotes_left.get(); + = this->ptr()->horizontal_asymptotes_left.value(); CGAL_precondition(arcno>=0 && arcno(asym_info.size())); return asym_info[arcno]; @@ -2120,7 +2120,7 @@ public: compute_horizontal_asymptotes(); } std::vector& asym_info - = this->ptr()->horizontal_asymptotes_right.get(); + = this->ptr()->horizontal_asymptotes_right.value(); CGAL_precondition(arcno>=0 && arcno(asym_info.size())); return asym_info[arcno]; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index 05b97af9bcd..868da2d3c9a 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -136,9 +136,9 @@ public: typedef std::vector Slice_info; - typedef boost::optional Lazy_slice_info; + typedef std::optional Lazy_slice_info; - typedef boost::optional Lazy_bound; + typedef std::optional Lazy_bound; typedef CGAL::internal::Event_indices Event_indices; @@ -151,11 +151,11 @@ public: typedef std::vector > Intersection_info_container; - typedef boost::optional + typedef std::optional Lazy_intersection_info_container; // For lazy evaluation of Status_line_CPA_1s. - typedef boost::optional Lazy_status_line_CPA_1; + typedef std::optional Lazy_status_line_CPA_1; //! @} @@ -191,31 +191,31 @@ private: Polynomial_2 g; - mutable boost::optional > subresultants; + mutable std::optional > subresultants; - mutable boost::optional > + mutable std::optional > principal_subresultants; - mutable boost::optional > + mutable std::optional > coprincipal_subresultants; - mutable boost::optional resultant; + mutable std::optional resultant; - mutable boost::optional > resultant_roots; - mutable boost::optional > + mutable std::optional > resultant_roots; + mutable std::optional > event_x_coordinates; - mutable boost::optional > + mutable std::optional > multiplicities_of_resultant_roots; - mutable boost::optional > stripe_values; + mutable std::optional > stripe_values; mutable std::vector< Lazy_status_line_CPA_1 > event_slices; - mutable boost::optional > intermediate_values; + mutable std::optional > intermediate_values; - mutable boost::optional< std::vector< Lazy_status_line_CPA_1 > > + mutable std::optional< std::vector< Lazy_status_line_CPA_1 > > intermediate_slices; - mutable boost::optional > event_indices; + mutable std::optional > event_indices; mutable Lazy_intersection_info_container intersection_info_container; @@ -530,7 +530,7 @@ private: /* * \brief Computes the intermediate x-coordinates and their status lines * - * In fact, it only fills the data fields with boost::none instances, + * In fact, it only fills the data fields with std::nullopt instances, * according to the lazy philosophy of the whole class. */ void compute_intermediate_values_and_slices() const; @@ -547,7 +547,7 @@ public: compute_resultant(); } CGAL_assertion(bool(this->ptr()->resultant)); - return this->ptr()->resultant.get(); + return this->ptr()->resultant.value(); } std::vector& resultant_roots() const { @@ -555,7 +555,7 @@ public: compute_resultant_roots_with_multiplicities(); } CGAL_assertion(bool(this->ptr()->resultant_roots)); - return this->ptr()->resultant_roots.get(); + return this->ptr()->resultant_roots.value(); } Algebraic_real_1& resultant_roots(size_type i) const { @@ -569,7 +569,7 @@ public: compute_resultant_roots_with_multiplicities(); } CGAL_assertion(bool(this->ptr()->multiplicities_of_resultant_roots)); - return this->ptr()->multiplicities_of_resultant_roots.get(); + return this->ptr()->multiplicities_of_resultant_roots.value(); } size_type multiplicities_of_resultant_roots(size_type i) const { @@ -586,10 +586,10 @@ public: (kernel(), resultant_roots().begin(), resultant_roots().end(), - std::back_inserter(this->ptr()->stripe_values.get())); + std::back_inserter(this->ptr()->stripe_values.value())); } CGAL_assertion(bool(this->ptr()->stripe_values)); - return this->ptr()->stripe_values.get(); + return this->ptr()->stripe_values.value(); } std::vector& event_x_coordinates() const { @@ -597,7 +597,7 @@ public: compute_event_x_coordinates_with_event_indices(); } CGAL_assertion(bool(this->ptr()->event_x_coordinates)); - return this->ptr()->event_x_coordinates.get(); + return this->ptr()->event_x_coordinates.value(); } std::vector& event_indices() const { @@ -605,7 +605,7 @@ public: compute_event_x_coordinates_with_event_indices(); } CGAL_assertion(bool(this->ptr()->event_indices)); - return this->ptr()->event_indices.get(); + return this->ptr()->event_indices.value(); } public: @@ -613,7 +613,7 @@ public: /* * \brief returns the indices of the ith event value * - * Returns a Event_indices (fg,ffy,ggy) such that + * Returns an `Event_indices` (fg,ffy,ggy) such that * the ith event root is the fgth root of the * resultant of \c f and \c g, the ffyth root of the * discriminant of \c f, and the ggyth root of the @@ -633,7 +633,7 @@ private: compute_intermediate_values_and_slices(); } CGAL_assertion(bool(this->ptr()->intermediate_values)); - return this->ptr()->intermediate_values.get(); + return this->ptr()->intermediate_values.value(); } std::vector& intermediate_slices() const { @@ -641,7 +641,7 @@ private: compute_intermediate_values_and_slices(); } CGAL_assertion(bool(this->ptr()->intermediate_slices)); - return this->ptr()->intermediate_slices.get(); + return this->ptr()->intermediate_slices.value(); } @@ -652,7 +652,7 @@ private: compute_subresultants(); } CGAL_assertion(bool(this->ptr()->subresultants)); - return this->ptr()->subresultants.get(); + return this->ptr()->subresultants.value(); } Polynomial_2& subresultants(size_type i) const { @@ -666,7 +666,7 @@ private: compute_subresultants(); } CGAL_assertion(bool(this->ptr()->principal_subresultants)); - return this->ptr()->principal_subresultants.get(); + return this->ptr()->principal_subresultants.value(); } Polynomial_1& principal_subresultants(size_type i) const { @@ -681,7 +681,7 @@ private: compute_subresultants(); } CGAL_assertion(bool(this->ptr()->coprincipal_subresultants)); - return this->ptr()->coprincipal_subresultants.get(); + return this->ptr()->coprincipal_subresultants.value(); } Polynomial_1& coprincipal_subresultants(size_type i) const { @@ -1030,7 +1030,7 @@ public: this->ptr()->event_slices[i] = create_event_slice(i); } CGAL_assertion(bool(this->ptr()->event_slices[i])); - return this->ptr()->event_slices[i].get(); + return this->ptr()->event_slices[i].value(); } @@ -1045,7 +1045,7 @@ public: } - return intermediate_slices()[i].get(); + return intermediate_slices()[i].value(); } //! Returns bound representative value at the ith interval @@ -1074,7 +1074,7 @@ public: } } CGAL_assertion(bool(intermediate_values()[i])); - return intermediate_values()[i].get(); + return intermediate_values()[i].value(); } @@ -1312,11 +1312,11 @@ void Curve_pair_analysis_2::compute_resultant() compute_subresultants(); this->ptr()->resultant - = this->ptr()->principal_subresultants.get()[0]; + = this->ptr()->principal_subresultants.value()[0]; } - if(this->ptr()->resultant.get().is_zero()) { + if(this->ptr()->resultant.value().is_zero()) { throw CGAL::internal::Zero_resultant_exception (this->ptr()->f, this->ptr()->g); @@ -1345,8 +1345,8 @@ compute_resultant_roots_with_multiplicities() const { solve_1(resultant(), std::back_inserter(res_pairs)); for(int i=0; i < static_cast(res_pairs.size()); i++ ) { - this->ptr()->resultant_roots.get().push_back(res_pairs[i].first); - this->ptr()->multiplicities_of_resultant_roots.get() + this->ptr()->resultant_roots.value().push_back(res_pairs[i].first); + this->ptr()->multiplicities_of_resultant_roots.value() .push_back(res_pairs[i].second); } @@ -1357,13 +1357,13 @@ compute_resultant_roots_with_multiplicities() const { #if CGAL_ACK_DEBUG_FLAG for(size_type i = 0; i - (this->ptr()->resultant_roots.get().size()); + (this->ptr()->resultant_roots.value().size()); i++) { CGAL_ACK_DEBUG_PRINT << "Root at " - << CGAL::to_double(this->ptr()->resultant_roots.get()[i]) + << CGAL::to_double(this->ptr()->resultant_roots.value()[i]) << " with multiplicity " - << this->ptr()->multiplicities_of_resultant_roots.get()[i] + << this->ptr()->multiplicities_of_resultant_roots.value()[i] << std::endl; } #endif @@ -1401,18 +1401,18 @@ compute_event_x_coordinates_with_event_indices() const { one_curve_events.end(), resultant_roots().begin(), resultant_roots().end(), - std::back_inserter(this->ptr()->event_x_coordinates.get()), + std::back_inserter(this->ptr()->event_x_coordinates.value()), std::back_inserter(events_type), compare); std::vector& events - = this->ptr()->event_x_coordinates.get(); + = this->ptr()->event_x_coordinates.value(); typename std::vector::iterator one_curve_it =one_curve_events_type.begin(); size_type inter_count=0, f_count=0,g_count=0; this->ptr()->event_indices = std::vector(); std::vector& event_indices - = this->ptr()->event_indices.get(); + = this->ptr()->event_indices.value(); for(size_type i=0;i(events.size());i++) { /* #if CGAL_ACK_DEBUG_FLAG @@ -1519,8 +1519,8 @@ compute_intermediate_values_and_slices() const { std::size_t size = event_x_coordinates().size()+1; this->ptr()->intermediate_values=std::vector(); this->ptr()->intermediate_slices=std::vector(); - this->ptr()->intermediate_values.get().resize(size); - this->ptr()->intermediate_slices.get().resize(size); + this->ptr()->intermediate_values.value().resize(size); + this->ptr()->intermediate_slices.value().resize(size); #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << "done" << std::endl; #endif @@ -1539,25 +1539,25 @@ compute_subresultants() const { if(CGAL::degree(f,1)ptr()->subresultants.get())); + (g,f,std::back_inserter(this->ptr()->subresultants.value())); #else typename CGAL::Polynomial_traits_d ::Polynomial_subresultants() - (g,f,std::back_inserter(this->ptr()->subresultants.get())); + (g,f,std::back_inserter(this->ptr()->subresultants.value())); #endif } else { #if CGAL_ACK_USE_BEZOUT_MATRIX_FOR_SUBRESULTANTS CGAL::internal::bezout_polynomial_subresultants - (f,g,std::back_inserter(this->ptr()->subresultants.get())); + (f,g,std::back_inserter(this->ptr()->subresultants.value())); #else typename CGAL::Polynomial_traits_d ::Polynomial_subresultants() - (f,g,std::back_inserter(this->ptr()->subresultants.get())); + (f,g,std::back_inserter(this->ptr()->subresultants.value())); #endif } std::vector& subresultants - = this->ptr()->subresultants.get(); + = this->ptr()->subresultants.value(); size_type n = static_cast(subresultants.size()); @@ -1584,11 +1584,11 @@ compute_subresultants() const { // This must be corrected, if f and g have same degree: if(CGAL::degree(f,1) == CGAL::degree(g,1)) { if(n>=1) { - this->ptr()->principal_subresultants.get()[n-1] + this->ptr()->principal_subresultants.value()[n-1] = Polynomial_1(CGAL::leading_coefficient(g)); } if(n>=2) { - this->ptr()->coprincipal_subresultants.get()[n-2] + this->ptr()->coprincipal_subresultants.value()[n-2] = Polynomial_1(g[CGAL::degree(g,1)-1]); } } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h index 2bd1c6515c1..a8ecf22eac1 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h @@ -127,7 +127,7 @@ public: //Arc_pair _m_num_arcs; //! sequence of arcs crossing this status line (valid only event lines) - mutable boost::optional _m_arcs; + mutable std::optional _m_arcs; //! number of arcs intersecting this status line mutable int _m_total_arcs; @@ -160,10 +160,10 @@ public: std::vector< int > multiplicities_;*/ // stores algebraic real over the vertical line - mutable std::vector >_m_xy_coords; + mutable std::vector >_m_xy_coords; // stores the isolator instance - mutable boost::optional isolator; + mutable std::optional isolator; // befriending the handle friend class Status_line_CA_1; @@ -555,7 +555,7 @@ public: //! Returns the isolator instance Bitstream_descartes& isolator() const { CGAL_assertion(bool(this->ptr()->isolator)); - return this->ptr()->isolator.get(); + return this->ptr()->isolator.value(); } //! Returns whether an isolator has been given for that status line diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h index 26fb94416d1..c3fb08048e7 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h @@ -75,7 +75,7 @@ public: // represents x-coordinate of event of rational value over interval // computed only by demand - mutable boost::optional _m_x; + mutable std::optional _m_x; // for each event point stores a pair of arcnos of the 1st and 2nd curve // or -1 if respective curve is not involved diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h index 81a74c56c38..77afa52cd80 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h @@ -81,10 +81,10 @@ public: mutable int _m_arcno; // y-coordinate - mutable boost::optional< Algebraic_real_1 > _m_y; + mutable std::optional< Algebraic_real_1 > _m_y; //! A bounding box for the given point - mutable boost::optional< std::pair > _m_bbox_2_pair; + mutable std::optional< std::pair > _m_bbox_2_pair; }; @@ -254,7 +254,7 @@ public: /*! * \brief y-coordinate of this point * - * Note: In general, this method results in a extremely large polynomial + * Note: In general, this method results in an extremely large polynomial * for the y-coordinate. It is recommended to use it carefully, * and using get_approximation_y() instead whenever approximations suffice. */ 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 728cb446934..6d77e38f904 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 @@ -167,7 +167,7 @@ class Lazy_alpha_nt_2 //members //the members can be updated when calling method exact() - mutable boost::optional exact_; + mutable std::optional exact_; mutable NT_approx approx_; //private functions @@ -235,7 +235,7 @@ public: const NT_exact& exact() const { - if (exact_ == boost::none) { + if (exact_ == std::nullopt) { update_exact(); approx_=to_interval(*exact_); } 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 d753b2457cb..219c307815a 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 @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -158,7 +158,7 @@ class Lazy_alpha_nt_3{ //members //the members can be updated when calling method exact() - mutable boost::optional exact_; + mutable std::optional exact_; mutable NT_approx approx_; //private functions @@ -229,7 +229,7 @@ public: } const NT_exact& exact() const { - if (exact_ == boost::none){ + if (exact_ == std::nullopt){ update_exact(); approx_=to_interval(*exact_); } diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_2.h index bf41824e4a4..13d9c23d806 100644 --- a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_2.h +++ b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_2.h @@ -608,24 +608,22 @@ Vertex_handle nearest_neighbor(const Point_2& p, Vertex_handle vnear) const; /*! Returns the dual corresponding to the face handle `f`. The returned object can -be assignable to one of the following: `Site_2`, `Gt::Line_2`. +be assigned to one of the following: `Site_2`, `Gt::Line_2`. */ Gt::Object_2 dual(Face_handle f) const; /*! Returns the dual of the face to which `it` points to. The returned object can -be assignable to one of the following: `Site_2`, `Gt::Line_2`. +be assigned to one of the following: `Site_2`, `Gt::Line_2`. */ Gt::Object_2 dual(All_faces_iterator it) const; /*! Returns -the dual of the face to which `it` points to. The returned -object can be assignable to one of the following: `Site_2`, -`Gt::Line_2`. +the dual of the face to which `it` points to. */ -Gt::Object_2 dual(Finite_faces_iterator it) const; +Site dual(Finite_faces_iterator it) const; /// @} diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_vertex_base_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_vertex_base_2.h index ae9eca3dc6e..3bf702d3afd 100644 --- a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_vertex_base_2.h +++ b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_vertex_base_2.h @@ -7,9 +7,12 @@ namespace CGAL { The class `Apollonius_graph_vertex_base_2` provides a model for the `ApolloniusGraphVertexBase_2` concept which is the vertex base required by the `ApolloniusGraphDataStructure_2` concept. The -class `Apollonius_graph_vertex_base_2` has two template arguments, the first being the -geometric traits of the Apollonius graph and should be a model of the -concept `ApolloniusGraphTraits_2`. The second is a Boolean which +class `Apollonius_graph_vertex_base_2` has three template arguments. + +\tparam Gt is the geometric traits of the Apollonius graph and must be a model of the +concept `ApolloniusGraphTraits_2`. + +\tparam StoreHidden is a Boolean which controls whether hidden sites are actually stored. Such a control is important if the user is not interested in hidden sites and/or if only insertions are made, in which case no hidden @@ -17,13 +20,17 @@ site can become visible. If `StoreHidden` is set to `true`, hidden sites are stored, otherwise they are discarded. By default `StoreHidden` is set to `true`. +\tparam Vb must be a model of the concept `TriangulationDSVertexBase_2` +By default this parameter is +instantiated by `Triangulation_ds_vertex_base_2<>`. + \cgalModels `ApolloniusGraphVertexBase_2` \sa `CGAL::Triangulation_data_structure_2` \sa `CGAL::Apollonius_graph_hierarchy_vertex_base_2` */ -template< typename Gt, typename StoreHidden > -class Apollonius_graph_vertex_base_2 { +template< typename Gt, typename StoreHidden, typename Vb > +class Apollonius_graph_vertex_base_2 : public Vb { public: /// \name Creation diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt index 08d054ea54c..d23762f811e 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt +++ b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt @@ -39,6 +39,7 @@ if(GMP_FOUND) create_single_source_cgal_program("Arithmetic_kernel.cpp") create_single_source_cgal_program("LEDA_arithmetic_kernel.cpp") create_single_source_cgal_program("CORE_arithmetic_kernel.cpp") + create_single_source_cgal_program("GMPXX_arithmetic_kernel.cpp") create_single_source_cgal_program("Get_arithmetic_kernel.cpp") else() diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp index 8a2bb5dd03c..a1032551da2 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp @@ -18,7 +18,7 @@ char * Option_parser::s_strategy_opts[] = { }; template -void Option_parser::my_validate(boost::any & v, +void Option_parser::my_validate(std::any & v, const std::vector & values) { typedef std::vector Vector_id; @@ -28,11 +28,11 @@ void Option_parser::my_validate(boost::any & v, if (v.empty()) { Vector_id vec; vec.push_back(MyId(i)); - v = boost::any(vec); + v = std::any(vec); } else { - Vector_id vec = boost::any_cast(v); + Vector_id vec = std::any_cast(v); vec.push_back(MyId(i)); - v = boost::any(vec); + v = std::any(vec); } return; } @@ -41,14 +41,14 @@ void Option_parser::my_validate(boost::any & v, } /* Overload the 'validate' function for the user-defined class */ -void validate(boost::any & v, const std::vector & values, +void validate(std::any & v, const std::vector & values, Option_parser::Vector_type_id * target_type, int) { Option_parser::my_validate(v, values); } /* Overload the 'validate' function for the user-defined class */ -void validate(boost::any & v, const std::vector & values, +void validate(std::any & v, const std::vector & values, Option_parser::Vector_strategy_id * target_type, int) { Option_parser::my_validate(v, values); diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp index 4fcfc0aafd6..a20f3b804c2 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp @@ -124,7 +124,7 @@ public: unsigned int get_height() const { return m_win_height; } template - static void my_validate(boost::any & v, + static void my_validate(std::any & v, const std::vector & values); protected: 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..357a0ba88e3 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 @@ -135,7 +135,7 @@ static inline bool hasValidChars(const std::string& expression, int dimension) } template -boost::optional +std::optional AlgebraicCurveParser::operator()(const std::string& expression) { using Traits = CGAL::Polynomial_traits_d; 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..b282d228516 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 @@ -22,12 +22,12 @@ #include #include -#include +#include template struct AlgebraicCurveParser { - boost::optional operator()(const std::string& expression); + std::optional operator()(const std::string& expression); }; #endif //ARRANGEMENT_ON_SURFACE_2_DEMO_ALGEBRAICCURVEPARSERNEW_H diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp index 86ad76fe086..d8573dfa0cb 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp @@ -961,15 +961,16 @@ findOtherInterestingPoints const CGAL::Bbox_2& allowable_range) { using Traits = demo_types::DemoTypes::Alg_seg_traits; CGAL::Bbox_2 bb = {}; - std::vector intersections; + typedef std::pair Pt_m; + std::vector intersections; for (auto it = arr->edges_begin(); it != arr->edges_end(); ++it) { for (auto& arc : getXyCurves(arr->traits())) + { if (arc.is_vertical() != it->curve().is_vertical()) - it->curve().intersections(arc, std::back_inserter(intersections)); + it->curve().intersections(arc, CGAL::dispatch_or_drop_output(std::back_inserter(intersections))); + } } - for (auto it = intersections.begin(); it != intersections.end(); it++) { - std::pair point_multiplicity; - CGAL::assign(point_multiplicity, *it); + for (auto point_multiplicity :intersections) { auto& point = point_multiplicity.first; if (point.location() == CGAL::ARR_INTERIOR) { auto xy = point.to_double(); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/EnvelopeCallback.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/EnvelopeCallback.cpp index 4e3cf4cd47a..4a23e6a3e45 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/EnvelopeCallback.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/EnvelopeCallback.cpp @@ -227,7 +227,7 @@ void EnvelopeCallback< Arr_>::updateEnvelope( bool lower ) { if (!e->is_empty()) { - boost::optional leftPoint, rightPoint; + std::optional leftPoint, rightPoint; if (e->left()) leftPoint = e->left()->point(); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.cpp index 9505c6161e7..47729a77ef3 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.cpp @@ -123,7 +123,7 @@ void GraphicsViewCurveInput::generate(CGAL::Object o) { template void GraphicsViewCurveInput:: curveInputDoneEvent(const std::vector& clickedPoints, CurveType type) { - boost::optional cv = + std::optional cv = this->curveGenerator.generate(clickedPoints, type); if (cv) { Insert_curve{}(this->arrangement, *cv); @@ -135,9 +135,9 @@ curveInputDoneEvent(const std::vector& clickedPoints, CurveType type) { template auto CurveGeneratorBase:: generate(const std::vector& clickedPoints, CurveType type) - -> boost::optional + -> std::optional { - boost::optional res; + std::optional res; switch (type) { case CurveType::Segment: res = generateSegment(clickedPoints); @@ -180,7 +180,7 @@ void CurveGeneratorBase::setTraits(const ArrTraits* traits_) template auto CurveGenerator>:: generateSegment(const std::vector& clickedPoints) - -> boost::optional + -> std::optional { Curve_2 res{clickedPoints[0], clickedPoints[1]}; return res; @@ -190,7 +190,7 @@ generateSegment(const std::vector& clickedPoints) template auto CurveGenerator>:: generatePolyline(const std::vector& clickedPoints) - -> boost::optional + -> std::optional { if (clickedPoints.size() < 2) return {}; @@ -202,7 +202,7 @@ auto CurveGenerator>:: // Curve Generator Linear Traits template auto CurveGenerator>:: -generateSegment(const std::vector& points) -> boost::optional +generateSegment(const std::vector& points) -> std::optional { Curve_2 res = Curve_2(Segment_2(points[0], points[1])); return res; @@ -211,7 +211,7 @@ generateSegment(const std::vector& points) -> boost::optional // template auto CurveGenerator>:: -generateRay(const std::vector& points) -> boost::optional { +generateRay(const std::vector& points) -> std::optional { Curve_2 res = Curve_2(Ray_2(points[0], points[1])); return res; } @@ -219,7 +219,7 @@ generateRay(const std::vector& points) -> boost::optional { // template auto CurveGenerator>:: -generateLine(const std::vector& points) -> boost::optional { +generateLine(const std::vector& points) -> std::optional { Curve_2 res = Curve_2(Line_2(points[0], points[1])); return res; } @@ -228,7 +228,7 @@ generateLine(const std::vector& points) -> boost::optional { template auto CurveGenerator>:: generateSegment(const std::vector& points) - -> boost::optional + -> std::optional { auto ctr_cv = this->traits->construct_curve_2_object(); Curve_2 res = ctr_cv(Rat_segment_2(points[0], points[1])); @@ -238,7 +238,7 @@ generateSegment(const std::vector& points) // template auto CurveGenerator>:: -generateCircle(const std::vector& points) -> boost::optional { +generateCircle(const std::vector& points) -> std::optional { auto sq_rad = (points[0].x() - points[1].x()) * (points[0].x() - points[1].x()) + (points[0].y() - points[1].y()) * (points[0].y() - points[1].y()); @@ -251,7 +251,7 @@ generateCircle(const std::vector& points) -> boost::optional { template auto CurveGenerator>:: generateEllipse(const std::vector& points) - -> boost::optional + -> std::optional { auto x1 = (CGAL::min)(points[0].x(), points[1].x()); auto y1 = (CGAL::min)(points[0].y(), points[1].y()); @@ -281,7 +281,7 @@ generateEllipse(const std::vector& points) template auto CurveGenerator>:: generateThreePointCircularArc(const std::vector& points) - -> boost::optional + -> std::optional { auto& qp1 = points[0]; auto& qp2 = points[1]; @@ -305,7 +305,7 @@ generateThreePointCircularArc(const std::vector& points) template auto CurveGenerator>:: generateFivePointConicArc(const std::vector& points) - -> boost::optional + -> std::optional { auto& qp0 = points[0]; auto& qp1 = points[1]; @@ -333,7 +333,7 @@ generateFivePointConicArc(const std::vector& points) // CurveGenerator Algebraic Traits template auto CurveGenerator>:: -generateLine(const std::vector& points) -> boost::optional { +generateLine(const std::vector& points) -> std::optional { RationalTraits ratTraits; Rational dx = points[1].x() - points[0].x(); @@ -369,7 +369,7 @@ generateLine(const std::vector& points) -> boost::optional { // template auto CurveGenerator>:: -generateCircle(const std::vector& points) -> boost::optional { +generateCircle(const std::vector& points) -> std::optional { auto sq_rad = (points[0].x() - points[1].x()) * (points[0].x() - points[1].x()) + (points[0].y() - points[1].y()) * (points[0].y() - points[1].y()); @@ -379,7 +379,7 @@ generateCircle(const std::vector& points) -> boost::optional { template auto CurveGenerator>:: generateEllipse(const std::vector& points) - -> boost::optional + -> std::optional { auto rx = (points[0].x() - points[1].x()) * (points[0].x() - points[1].x()) / 4.; @@ -394,7 +394,7 @@ generateEllipse(const std::vector& points) template auto CurveGenerator>:: generateEllipse_(const Point_2& center, Rational rxRat, Rational ryRat) - -> boost::optional + -> std::optional { RationalTraits ratTraits; @@ -428,7 +428,7 @@ template >:: generateBezier(const std::vector& clickedPoints) - -> boost::optional + -> std::optional { if (clickedPoints.size() < 2) return {}; return Curve_2{clickedPoints.begin(), clickedPoints.end()}; diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsViewCurveInputTyped.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsViewCurveInputTyped.h index 2b4a68457f8..91f9cfd8109 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsViewCurveInputTyped.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsViewCurveInputTyped.h @@ -42,34 +42,34 @@ public: void setTraits(const ArrTraits* traits_); - boost::optional + std::optional generate(const std::vector& clickedPoints, CurveType type); - virtual boost::optional + virtual std::optional generateSegment(const std::vector&) { return {}; } - virtual boost::optional + virtual std::optional generateRay(const std::vector&) { return {}; } - virtual boost::optional + virtual std::optional generateLine(const std::vector&) { return {}; } - virtual boost::optional + virtual std::optional generatePolyline(const std::vector&) { return {}; } - virtual boost::optional + virtual std::optional generateCircle(const std::vector&) { return {}; } - virtual boost::optional + virtual std::optional generateEllipse(const std::vector&) { return {}; } - virtual boost::optional + virtual std::optional generateThreePointCircularArc(const std::vector&) { return {}; } - virtual boost::optional + virtual std::optional generateFivePointConicArc(const std::vector&) { return {}; } - virtual boost::optional + virtual std::optional generateBezier(const std::vector&) { return {}; } const ArrTraits* traits; @@ -91,7 +91,7 @@ struct CurveGenerator> : using Super = CurveGeneratorBase; using Point_2 = typename Super::Point_2; - boost::optional + std::optional generateSegment(const std::vector&) override; }; @@ -105,7 +105,7 @@ struct CurveGenerator> : using Super = CurveGeneratorBase; using Point_2 = typename Super::Point_2; - boost::optional + std::optional generatePolyline(const std::vector&) override; }; @@ -125,18 +125,18 @@ struct CurveGenerator> : using Super = CurveGeneratorBase; using Point_2 = typename Super::Point_2; - boost::optional + std::optional generateSegment(const std::vector&) override; - boost::optional generateCircle(const std::vector&) override; + std::optional generateCircle(const std::vector&) override; - boost::optional + std::optional generateEllipse(const std::vector&) override; - boost::optional + std::optional generateThreePointCircularArc(const std::vector&) override; - boost::optional + std::optional generateFivePointConicArc(const std::vector&) override; }; @@ -154,10 +154,10 @@ struct CurveGenerator> : using Super = CurveGeneratorBase; using Point_2 = typename Super::Point_2; - boost::optional + std::optional generateSegment(const std::vector&) override; - boost::optional generateRay(const std::vector&) override; - boost::optional generateLine(const std::vector&) override; + std::optional generateRay(const std::vector&) override; + std::optional generateLine(const std::vector&) override; }; template @@ -176,13 +176,13 @@ struct CurveGenerator> : using Super = CurveGeneratorBase; using Point_2 = typename Super::Point_2; - boost::optional generateLine(const std::vector&) override; - boost::optional generateCircle(const std::vector&) override; - boost::optional + std::optional generateLine(const std::vector&) override; + std::optional generateCircle(const std::vector&) override; + std::optional generateEllipse(const std::vector&) override; private: - boost::optional generateEllipse_(const Point_2&, Rational, Rational); + std::optional generateEllipse_(const Point_2&, Rational, Rational); }; template < @@ -199,7 +199,7 @@ struct CurveGenerator< using Point_2 = typename Super::Point_2; using Curve_2 = typename ArrTraits::Curve_2; - boost::optional generateBezier(const std::vector&) override; + std::optional generateBezier(const std::vector&) override; }; template diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/PointSnapper.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/PointSnapper.cpp index 9194c35a749..cefb4e8e5c0 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/PointSnapper.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/PointSnapper.cpp @@ -16,7 +16,7 @@ #include "ArrangementTypesUtils.h" #include "PointSnapper.h" -#include +#include template class PointSnapper : public PointSnapperBase @@ -26,7 +26,7 @@ class PointSnapper : public PointSnapperBase public: PointSnapper(QGraphicsScene*, GridGraphicsItem*, Arrangement*); - boost::optional snapToArrangement(const QPointF& qpt) override; + std::optional snapToArrangement(const QPointF& qpt) override; private: Arrangement* arr; @@ -170,7 +170,7 @@ PointSnapper::PointSnapper( } template -inline boost::optional snapToArrangement( +inline std::optional snapToArrangement( const QPointF& qpt, const QTransform& worldTransform, Arrangement* arr) { using Point_2 = PointSnapperBase::Point_2; @@ -215,7 +215,7 @@ struct SnapToArrangement { using Point_2 = PointSnapperBase::Point_2; template - boost::optional + std::optional operator()(const QPointF& qpt, const QTransform&, Arrangement*) { return Point_2{qpt.x(), qpt.y()}; @@ -226,7 +226,7 @@ struct SnapToArrangement> { using Point_2 = PointSnapperBase::Point_2; template - boost::optional operator()( + std::optional operator()( const QPointF& qpt, const QTransform& worldTransform, Arrangement* arr) { return snapToArrangement(qpt, worldTransform, arr); @@ -237,7 +237,7 @@ struct SnapToArrangement> { using Point_2 = PointSnapperBase::Point_2; template - boost::optional operator()( + std::optional operator()( const QPointF& qpt, const QTransform& worldTransform, Arrangement* arr) { return snapToArrangement(qpt, worldTransform, arr); @@ -248,7 +248,7 @@ struct SnapToArrangement> { using Point_2 = PointSnapperBase::Point_2; template - boost::optional operator()( + std::optional operator()( const QPointF& qpt, const QTransform& worldTransform, Arrangement* arr) { return snapToArrangement(qpt, worldTransform, arr); @@ -257,7 +257,7 @@ struct SnapToArrangement> template auto PointSnapper::snapToArrangement(const QPointF& qpt) - -> boost::optional + -> std::optional { using Traits = typename Arrangement::Geometry_traits_2; auto view = getView(); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/PointSnapper.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/PointSnapper.h index 9829f831f5d..2d2a186235e 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/PointSnapper.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/PointSnapper.h @@ -50,7 +50,7 @@ public: protected: PointSnapperBase(QGraphicsScene* scene, GridGraphicsItem* grid); Point_2 snapToGrid(const QPointF& qpt); - virtual boost::optional snapToArrangement(const QPointF& qpt) = 0; + virtual std::optional snapToArrangement(const QPointF& qpt) = 0; GridGraphicsItem* gridGraphicsItem; bool snapToGridEnabled; diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/IntersectCurves.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/IntersectCurves.cpp index f2d154c4eac..5e98113dabc 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/IntersectCurves.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/IntersectCurves.cpp @@ -11,6 +11,8 @@ #include "IntersectCurves.h" #include "ArrangementTypes.h" +#include + template Intersect_curves::Intersect_curves(const Traits* traits) : @@ -18,12 +20,26 @@ Intersect_curves::Intersect_curves(const Traits* traits) : { } +struct Object_putter +{ + std::reference_wrapper> v; + Object_putter(std::vector& v_) + : v(std::ref(v_)) + {} + + template + void operator()(const T& t) + { + v.get().push_back(make_object(t)); + } +}; + template void Intersect_curves::operator()( const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, std::vector& output) { - this->intersect(cv1, cv2, std::back_inserter(output)); + this->intersect(cv1, cv2, boost::make_function_output_iterator(Object_putter(output))); } ARRANGEMENT_DEMO_SPECIALIZE_TRAITS(Intersect_curves) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.cpp index 5a397f53bde..df21f6699ab 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.cpp @@ -391,8 +391,8 @@ Construct_x_monotone_subcurve_2::Construct_x_monotone_subcurve_2( // template auto Construct_x_monotone_subcurve_2::operator()( - const X_monotone_curve_2& curve, const boost::optional& pLeft, - const boost::optional& pRight) -> X_monotone_curve_2 + const X_monotone_curve_2& curve, const std::optional& pLeft, + const std::optional& pRight) -> X_monotone_curve_2 { Point_2 pMin, pMax; bool unbounded_min = false; @@ -442,8 +442,8 @@ template auto Construct_x_monotone_subcurve_2 >:: operator()(const X_monotone_curve_2& curve, - const boost::optional& pLeft, - const boost::optional& pRight) -> X_monotone_curve_2 + const std::optional& pLeft, + const std::optional& pRight) -> X_monotone_curve_2 { // TODO: handle when pLeft or pRight is null @@ -486,8 +486,8 @@ template >:: operator()( - const X_monotone_curve_2& curve, const boost::optional& pLeft, - const boost::optional& pRight) -> X_monotone_curve_2 + const X_monotone_curve_2& curve, const std::optional& pLeft, + const std::optional& pRight) -> X_monotone_curve_2 { auto pMin = this->construct_min_vertex_2(curve); auto pMax = this->construct_max_vertex_2(curve); @@ -545,8 +545,8 @@ template auto Construct_x_monotone_subcurve_2< CGAL::Arr_rational_function_traits_2>:: operator()( - const X_monotone_curve_2& curve, const boost::optional& pLeft, - const boost::optional& pRight) -> X_monotone_curve_2 + const X_monotone_curve_2& curve, const std::optional& pLeft, + const std::optional& pRight) -> X_monotone_curve_2 { Point_2 pMin, pMax; bool unbounded_min = false; @@ -625,14 +625,14 @@ operator()(const X_monotone_curve_2& curve, const CoordinateType& x, Point_2 p2c1(x, CoordinateType(clipRect.ymax() + 1)); const X_monotone_curve_2 verticalLine = ctr_xcv(p1c1, p2c1); - CGAL::Object o; - CGAL::Oneset_iterator oi(o); + std::vector pairs; - this->intersectCurves(curve, verticalLine, oi); + this->intersectCurves(curve, verticalLine, + CGAL::dispatch_or_drop_output(std::back_inserter(pairs))); IntersectionResult pair; - if (CGAL::assign(pair, o)) { - Point_2 pt = pair.first; + if (!pairs.empty()) { + Point_2 pt = pairs[0].first; res = pt.y(); } return res; @@ -654,14 +654,13 @@ operator()(const X_monotone_curve_2& curve, const CoordinateType& x, Point_2 p2c1(x, CoordinateType(10000000)); // upper bounding box const X_monotone_curve_2 verticalLine = ctr_xcv(p1c1, p2c1); - CGAL::Object o; - CGAL::Oneset_iterator oi(o); + std::vector pairs; - this->intersectCurves(curve, verticalLine, oi); + this->intersectCurves(curve, verticalLine, + CGAL::dispatch_or_drop_output(std::back_inserter(pairs))); - IntersectionResult pair; - if (CGAL::assign(pair, o)) { - Point_2 pt = pair.first; + if (!pairs.empty()) { + Point_2 pt = pairs[0].first; res = pt.y(); } return res; @@ -681,15 +680,15 @@ operator()(const X_monotone_curve_2& curve, const Coordinate_type& x) Point_2 p2c1(x, Coordinate_type(clip_rect.ymax() + 1)); const X_monotone_curve_2 vertical_line = ctr_xcv(p1c1, p2c1); - CGAL::Object o; - CGAL::Oneset_iterator oi(o); - this->intersect_curves(curve, vertical_line, oi); + std::vector pairs; + + this->intersect_curves(curve, vertical_line, + CGAL::dispatch_or_drop_output(std::back_inserter(pairs))); Coordinate_type res(0); - IntersectionResult pair; - if (CGAL::assign(pair, o)) { - Point_2 pt = pair.first; + if (!pairs.empty()) { + Point_2 pt = pairs[0].first; res = pt.y(); } return res; @@ -708,15 +707,15 @@ auto Arr_compute_y_at_x_2>:: operator()(const X_monotone_curve_2& curve, const CoordinateType& x) -> CoordinateType { - CGAL::Object o; - CGAL::Oneset_iterator oi(o); Intersect_2 intersect = traits->intersect_2_object(); X_monotone_curve_2 c2 = this->makeVerticalLine(x); - intersect(curve, c2, oi); - std::pair res; - if (CGAL::assign(res, o)) { + typedef std::pair PtM; + + std::vector res; + intersect(curve, c2, CGAL::dispatch_or_drop_output(std::back_inserter(res))); + if (!res.empty()) { // TODO: handle failure case - const Point_2& p = res.first; + const Point_2& p = res[0].first; CoordinateType coord = p.y(); return coord; } diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.h index b0905210094..c0971f9d8ef 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.h @@ -479,8 +479,8 @@ public: * projection. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& curve, - const boost::optional& pLeft, - const boost::optional& pRight); + const std::optional& pLeft, + const std::optional& pRight); protected: const ArrTraits* traits; @@ -524,8 +524,8 @@ public: /* Return the subcurve of curve bracketed by pLeft and pRight. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& curve, - const boost::optional& pLeft, - const boost::optional& pRight ); + const std::optional& pLeft, + const std::optional& pRight ); private: const Traits& m_traits; @@ -558,8 +558,8 @@ public: Return the subcurve of curve bracketed by pLeft and pRight. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& curve, - const boost::optional& pLeft, - const boost::optional& pRight); + const std::optional& pLeft, + const std::optional& pRight); protected: const ArrTraits* traits; @@ -600,8 +600,8 @@ public: * projection. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& curve, - const boost::optional& pLeft, - const boost::optional& pRight); + const std::optional& pLeft, + const std::optional& pRight); protected: const Traits* traits; 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..5254543120c 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, @@ -1320,7 +1320,7 @@ Arrangement_on_surface_2::Face_const_handle `Face_const_handle`\endlink. Depending on whether the query point is located inside a face, lies on an edge, or coincides with a vertex, the appropriate handle can be obtained with value retrieval -by `boost::get` as demonstrated in the example below. +by `std::get` as demonstrated in the example below. Note that the handles returned by the \link ArrangementPointLocation_2::locate() `locate()`\endlink functions are @@ -1361,7 +1361,7 @@ The function template `locate_point()` calls an instance of the function template `print_point_location()`, which inserts the result of the query into the standard output-stream. It is listed below, and defined in the header file `point_location_utils.h`. -Observe how the function `boost::get()` is used to cast the +Observe how the function `std::get()` is used to cast the resulting object into a handle to an arrangement feature. The point-location object `pl` is assumed to be already attached to an arrangement. @@ -1383,13 +1383,13 @@ void print_point_location const Face_const_handle* f; std::cout << "The point (" << q << ") is located "; - if (f = boost::get(&obj)) // located inside a face + if (f = std::get_if(&obj)) // located inside a face std::cout << "inside " << (((*f)->is_unbounded()) ? "the unbounded" : "a bounded") << " face.\n"; - else if (e = boost::get(&obj)) // located on an edge + else if (e = std::get_if(&obj)) // located on an edge std::cout << "on an edge: " << (*e)->curve() << std::endl; - else if (v = boost::get(&obj)) // located on a vertex + else if (v = std::get_if(&obj)) // located on a vertex std::cout << "on " << (((*v)->is_isolated()) ? "an isolated" : "a") << " vertex: " << (*v)->point() << std::endl; else CGAL_error_msg("Invalid object."); @@ -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 @@ -1603,12 +1603,12 @@ void shoot_vertical_ray(const RayShoot& vrs, const Face_const_handle* f; std::cout << "Shooting up from (" << q << ") : "; - if (v = boost::get(&obj)) // we hit a vertex + if (v = std::get_if(&obj)) // we hit a vertex std::cout << "hit " << (((*v)->is_isolated()) ? "an isolated" : "a") << " vertex: " << (*v)->point() << std::endl; - else if (e = boost::get(&obj)) // we hit an edge + else if (e = std::get_if(&obj)) // we hit an edge std::cout << "hit an edge: " << (*e)->curve() << std::endl; - else if (f = boost::get(&obj)) { // we hit nothing + else if (f = std::get_if(&obj)) { // we hit nothing CGAL_assertion((*f)->is_unbounded()); std::cout << "hit nothing.\n"; } @@ -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_batched_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_batched_point_location.h index 82c932fca8b..bafb54b7db7 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_batched_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_batched_point_location.h @@ -22,19 +22,7 @@ the output sequence. `std::pair::%Type>`. -\cgalHeading{A Note on Backwards Compatibility} -This function used to return `CGAL::Object` up to -\cgal version 4.2. Starting with \cgal version 4.3 the return type -is determined by the metafunction `CGAL::Arr_point_location_result`. -To preserve backwards compatibility -`CGAL::Object` can be constructed from the new return type -implicitly, but switching to the new style is recommended. To enable -the old style without any overhead, the macro -`::CGAL_ARR_POINT_LOCATION_VERSION` can be defined to 1 before any -\cgal header is included. - \sa `CGAL::Arr_point_location_result` -\sa `CGAL_ARR_POINT_LOCATION_VERSION` */ template` or `CGAL::Circular_arc_2`. -It uses the boost::variant. +It uses the std::variant. \cgalModels `ArrangementTraits_2` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_landmarks_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_landmarks_point_location.h index 92490f47f2a..96796cf5213 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_landmarks_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_landmarks_point_location.h @@ -53,7 +53,6 @@ insertions of curves and not deletions of them. \sa `ArrangementPointLocation_2` \sa `ArrangementVerticalRayShoot_2` \sa `CGAL::Arr_point_location_result` -\sa `CGAL_ARR_POINT_LOCATION_VERSION` */ template< typename Arrangement, typename Generator > diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_naive_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_naive_point_location.h index 1ef49902c8c..b79e948e3e7 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_naive_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_naive_point_location.h @@ -19,7 +19,6 @@ time-consuming process when applied to dense arrangements. \sa `ArrangementPointLocation_2` \sa `ArrangementVerticalRayShoot_2` \sa `CGAL::Arr_point_location_result` -\sa `CGAL_ARR_POINT_LOCATION_VERSION` */ template< typename Arrangement > diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h index 20a6787d7e5..2a48e35b399 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h @@ -1,26 +1,3 @@ -/*! -\ingroup PkgArrangementOnSurface2PointLocation - -The macro `CGAL_ARR_POINT_LOCATION_VERSION` can be used to configure -the point-location query API. In particular, it determines which version -of the result type of the point-location and vertical ray-shooting queries -should be used by models of the concepts `ArrangementPointLocation_2` -and `ArrangementVerticalRayShoot_2`, and by the free function -`locate`. The `CGAL_ARR_POINT_LOCATION_VERSION` should be defined before any \cgal header -is included. - -- `CGAL_ARR_POINT_LOCATION_VERSION` == 1, the result type is set to be `CGAL::Object`. -- `CGAL_ARR_POINT_LOCATION_VERSION` == 2, the result type is set to be -`boost::variant`, where `Vertex_const_handle`, `Halfedge_const_handle`, and -`Face_const_handle` are the corresponding nested types in a `CGAL::Arrangement_2` instance. - - -\sa `ArrangementPointLocation_2` -\sa `ArrangementVerticalRayShoot_2` -\sa `CGAL::Arr_point_location_result` -*/ -#define CGAL_ARR_POINT_LOCATION_VERSION - namespace CGAL { /*! @@ -37,16 +14,13 @@ or vertical ray-shoot query. \sa `CGAL::Arr_walk_along_line_point_location` \sa `CGAL::Arr_landmarks_point_location` \sa `CGAL::Arr_trapezoid_ric_point_location` -\sa `CGAL_ARR_POINT_LOCATION_VERSION` */ template struct Arr_point_location_result { /*! The type of the arrangement feature that is the result of a * point-location query or a vertical ray-shoot query, namely, - * `boost::variant` - * if `::CGAL_ARR_POINT_LOCATION_VERSION` == 2, which is the default, otherwise - * `CGAL::Object`. + * `std::variant` */ typedef unspecified_type Type; }; /* end Arr_point_location_result */ 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..b8187252b1c 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 @@ -32,7 +32,6 @@ This strategy supports arbitrary subdivisions, including unbounded ones. \sa `ArrangementPointLocation_2` \sa `ArrangementVerticalRayShoot_2` \sa `CGAL::Arr_point_location_result` -\sa `CGAL_ARR_POINT_LOCATION_VERSION` */ template< typename Arrangement > diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h index ed9c1e12e3d..4ad6dfeb8eb 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h @@ -21,7 +21,6 @@ namespace CGAL { * \sa `ArrangementPointLocation_2` * \sa `ArrangementVerticalRayShoot_2` * \sa `CGAL::Arr_point_location_result` - * \sa `CGAL_ARR_POINT_LOCATION_VERSION` */ template diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_walk_along_line_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_walk_along_line_point_location.h index ed5df33be96..e6141a6779d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_walk_along_line_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_walk_along_line_point_location.h @@ -29,7 +29,6 @@ of issued queries is not large. \sa `ArrangementPointLocation_2` \sa `ArrangementVerticalRayShoot_2` \sa `CGAL::Arr_point_location_result` -\sa `CGAL_ARR_POINT_LOCATION_VERSION` */ template< typename Arrangement > diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Intersect_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Intersect_2.h index 5e11e857548..bdf32267331 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Intersect_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Intersect_2.h @@ -17,7 +17,7 @@ public: /*! computes the intersections of `xc1` and `xc2` and writes them in an * ascending lexicographic \f$xy\f$-order into a range beginning at * `oi`. The type `OutputIterator` must dereference a polymorphic object of - * type `boost::variant` that wraps objects of type either type + * type `std::variant` that wraps objects of type either type * `pair` or * `ArrTraits::X_monotone_curve_2`. An object of the former type represents an * intersection point with its multiplicity (in case the multiplicity is diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--MakeXMonotone_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--MakeXMonotone_2.h index db0df3c8cc8..32c5efccb0b 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--MakeXMonotone_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--MakeXMonotone_2.h @@ -16,7 +16,7 @@ public: /*! subdivides the input curve `c` into \f$x\f$-monotone subcurves and * isolated points, and inserts the results into a range beginning at the given * output iterator `oi`. The type `OutputIterator` dereferences a - * `boost::variant` that wraps either an `ArrTraits::Point_2` object or an + * `std::variant` that wraps either an `ArrTraits::Point_2` object or an * `ArrTraits::X_monotone_curve_2` object. The operator returns a past-the-end * iterator for the output sequence. */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementPointLocation_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementPointLocation_2.h index c2f6a0437f2..b2fa1c3aae4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementPointLocation_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementPointLocation_2.h @@ -10,16 +10,6 @@ containing it. In the general case, the query point is contained inside an arrangement face, but in degenerate situations it may lie on an edge or coincide with an arrangement vertex. -\cgalHeading{A note on Backwards compatibility} -The `locate` member function used to return `CGAL::Object` up to -\cgal version 4.2. Starting with \cgal version 4.3 the return type -is determined by a metafunction. To preserve backwards compatibility -`CGAL::Object` can be constructed from the new return types -implicitly, but switching to the new style is recommended. To enable -the old style without any overhead, the macro -`CGAL_ARR_POINT_LOCATION_VERSION` can be defined to 1 before any -\cgal header is included. - \cgalHasModel `CGAL::Arr_naive_point_location` \cgalHasModel `CGAL::Arr_walk_along_line_point_location` \cgalHasModel `CGAL::Arr_trapezoid_ric_point_location` @@ -30,7 +20,6 @@ the old style without any overhead, the macro \sa `CGAL::Arr_trapezoid_ric_point_location` \sa `CGAL::Arr_landmarks_point_location` \sa `CGAL::Arr_point_location_result` -\sa `CGAL_ARR_POINT_LOCATION_VERSION` */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalRayShoot_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalRayShoot_2.h index 4a1febdc2d2..e676fefcf16 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalRayShoot_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalRayShoot_2.h @@ -18,16 +18,6 @@ emanating from the query point goes to infinity without hitting any arrangement feature on its way. In this case the unbounded face is returned. -\cgalHeading{A Note on Backwards Compatibility} -The `ray_shoot_up` and `ray_shoot_down` member functions used -to return `CGAL::Object` up to \cgal version 4.2. Starting with -\cgal version 4.3 the return type is determined by a metafunction. To -preserve backwards compatibility `CGAL::Object` can be constructed -from the new return types implicitly, but switching to the new style -is recommended. To enable the old style without any overhead, the macro -`CGAL_ARR_POINT_LOCATION_VERSION` can be defined to 1 before any -\cgal header is included. - \cgalHasModel `CGAL::Arr_naive_point_location` \cgalHasModel `CGAL::Arr_walk_along_line_point_location` \cgalHasModel `CGAL::Arr_trapezoid_ric_point_location` @@ -38,7 +28,6 @@ is recommended. To enable the old style without any overhead, the macro \sa `CGAL::Arr_trapezoid_ric_point_location` \sa `CGAL::Arr_landmarks_point_location` \sa `CGAL::Arr_point_location_result` -\sa `CGAL_ARR_POINT_LOCATION_VERSION` */ class ArrangementVerticalRayShoot_2 { diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt index 04ce3c47c28..4427a20e151 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt @@ -239,9 +239,6 @@ implemented as peripheral classes or as free (global) functions. - `CGAL::Arr_unb_planar_topology_traits_2` - `CGAL::Arr_spherical_topology_traits_2` -\cgalCRPSection{Macros} -- \link CGAL_ARR_POINT_LOCATION_VERSION `CGAL_ARR_POINT_LOCATION_VERSION` \endlink - \cgalCRPSection{Functions} - `CGAL::is_valid()` diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments.cpp index 95eb729bb66..69c4a66ea68 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments.cpp @@ -29,7 +29,7 @@ typedef Traits::Algebraic_real_1 Algebraic_real; typedef Traits::X_monotone_curve_2 X_monotone_curve; typedef Traits::Point_2 Point; -typedef boost::variant Make_x_monotone_result; +typedef std::variant Make_x_monotone_result; int main() { Traits traits; @@ -52,7 +52,7 @@ int main() { // but not in this case). std::vector segs; for(size_t i = 0; i < pre_segs.size(); ++i) { - auto* curr_p = boost::get(&pre_segs[i]); + auto* curr_p = std::get_if(&pre_segs[i]); assert(curr_p); segs.push_back(*curr_p); } diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs.cpp index 1e7854b7482..750986dda1e 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include @@ -25,7 +25,7 @@ typedef Circular_k::Circle_2 Circle_2; typedef Circular_k::Circular_arc_2 Circular_arc_2; typedef Circular_k::Line_arc_2 Line_arc_2; -typedef boost::variant< Circular_arc_2, Line_arc_2> Arc_2; +typedef std::variant< Circular_arc_2, Line_arc_2> Arc_2; typedef std::vector< Arc_2> ArcContainer; typedef CGAL::Arr_circular_line_arc_traits_2 Traits; @@ -52,7 +52,7 @@ int main() { } while((x1 == x2) && (y1 == y2)); std::cout << x1 << " " << y1 << " " << x2 << " " << y2 << std::endl; - boost::variant< Circular_arc_2, Line_arc_2 > v = + std::variant< Circular_arc_2, Line_arc_2 > v = Line_arc_2(Point_2(x1,y1), Point_2(x2,y2)); ac.push_back( v); } @@ -63,7 +63,7 @@ int main() { y1 = theRandom.get_int(random_min,random_max); } while(x1==0 && y1==0); - boost::variant< Circular_arc_2, Line_arc_2 > v = + std::variant< Circular_arc_2, Line_arc_2 > v = Circle_2( Point_2(x1,y1), x1*x1 + y1*y1); ac.push_back(v); } @@ -72,7 +72,8 @@ int main() { Point_location _pl(arr); for (ArcContainer::const_iterator it = ac.begin(); it != ac.end(); ++it) { //insert(arr,_pl,*it); - insert(arr, *it, _pl); + //DONOTCOMMIT + //~ insert(arr, *it, _pl); }; return 0; diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp index e89d8b57d89..bd636bc94fe 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp @@ -45,7 +45,7 @@ int main() { Point_location pl(arr); const Point q{_7_halves, 7}; Point_location::result_type obj = pl.locate(q); - auto* e = boost::get(&obj); + auto* e = std::get_if(&obj); // Split the edge e to two edges e1 and e2; auto e1 = arr.split_edge(arr.non_const_handle(*e), q); diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion.cpp index 51112be6c50..59a0203a4b4 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion.cpp @@ -32,7 +32,7 @@ int main() { // the boundary of the face that contains it. Point q(4, 1); auto obj = pl.locate(q); - auto* f = boost::get(&obj); + auto* f = std::get_if(&obj); std::cout << "The query point (" << q << ") is located in: "; print_face(*f); diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_utils.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_utils.h index 70bc38bce3f..d5a729edc6d 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_utils.h +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_utils.h @@ -4,33 +4,6 @@ //----------------------------------------------------------------------------- // Print the result of a point-location query. // -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 -template -void print_point_location(const typename Arrangement_::Point_2& q, - CGAL::Object obj) -{ - typedef Arrangement_ Arrangement_2; - typename Arrangement_2::Vertex_const_handle v; - typename Arrangement_2::Halfedge_const_handle e; - typename Arrangement_2::Face_const_handle f; - - std::cout << "The point (" << q << ") is located "; - if (CGAL::assign(f, obj)) { // q is located inside a face - if (f->is_unbounded()) - std::cout << "inside the unbounded face." << std::endl; - else std::cout << "inside a bounded face." << std::endl; - } - else if (CGAL::assign(e, obj)) { // q is located on an edge - std::cout << "on an edge: " << e->curve() << std::endl; - } - else if (CGAL::assign(v, obj)) { // q is located on a vertex - if (v->is_isolated()) - std::cout << "on an isolated vertex: " << v->point() << std::endl; - else std::cout << "on a vertex: " << v->point() << std::endl; - } - else CGAL_error_msg( "Invalid object."); -} -#else template void print_point_location (const typename Arrangement_::Point_2& q, @@ -46,18 +19,17 @@ void print_point_location const Face_const_handle* f; std::cout << "The point (" << q << ") is located "; - if ((f = boost::get(&obj))) // inside a face + if ((f = std::get_if(&obj))) // inside a face std::cout << "inside " << (((*f)->is_unbounded()) ? "the unbounded" : "a bounded") << " face." << std::endl; - else if ((e = boost::get(&obj))) // on an edge + else if ((e = std::get_if(&obj))) // on an edge std::cout << "on an edge: " << (*e)->curve() << std::endl; - else if ((v = boost::get(&obj))) // on a vertex + else if ((v = std::get_if(&obj))) // on a vertex std::cout << "on " << (((*v)->is_isolated()) ? "an isolated" : "a") << " vertex: " << (*v)->point() << std::endl; else CGAL_error_msg("Invalid object."); } -#endif //----------------------------------------------------------------------------- // Perform a point-location query and print the result. @@ -101,12 +73,12 @@ void shoot_vertical_ray(const VerticalRayShooting& vrs, std::cout << "Shooting up from (" << q << ") : hit "; - if ((v = boost::get(&obj))) // hit a vertex + if ((v = std::get_if(&obj))) // hit a vertex std::cout << (((*v)->is_isolated()) ? "an isolated" : "a") << " vertex: " << (*v)->point() << std::endl; - else if ((e = boost::get(&obj)) ) // hit an edge + else if ((e = std::get_if(&obj)) ) // hit an edge std::cout << "an edge: " << (*e)->curve() << std::endl; - else if ((f = boost::get(&obj))) { // hit nothing + else if ((f = std::get_if(&obj))) { // hit nothing assert((*f)->is_unbounded()); std::cout << "nothing." << std::endl; } diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_bezier.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_bezier.cpp index 287fd51786a..70184f7f4bb 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_bezier.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_bezier.cpp @@ -24,7 +24,7 @@ typedef Polycurve_bezier_traits::Point_2 Point; typedef Polycurve_bezier_traits::X_monotone_curve_2 X_mono_polycurve; typedef CGAL::Arrangement_2 Arrangement_2; -typedef boost::variant Make_x_monotone_result; +typedef std::variant Make_x_monotone_result; int main() { Polycurve_bezier_traits pc_traits; @@ -58,7 +58,7 @@ int main() { // convert it into x-monotone bezier curve. std::vector obj_vector; bezier_traits.make_x_monotone_2_object()(B, std::back_inserter(obj_vector)); - auto* x_seg_p = boost::get(&obj_vector[0]); + auto* x_seg_p = std::get_if(&obj_vector[0]); x_curves.push_back(*x_seg_p); } diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp index 1ba6d9b5232..98515d5d0c9 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp @@ -99,15 +99,15 @@ protected: for (auto it = results.begin(); it != results.end(); ++it) { std::cout << "The point (" << it->first << ") is located "; if (const Face_const_handle* f = - boost::get(&(it->second))) // inside a face + std::get_if(&(it->second))) // inside a face std::cout << "inside " << (((*f)->is_unbounded()) ? "the unbounded" : "a bounded") << " face.\n"; else if (const Halfedge_const_handle* e = - boost::get(&(it->second))) // on an edge + std::get_if(&(it->second))) // on an edge std::cout << "on an edge: " << (*e)->curve() << std::endl; else if (const Vertex_const_handle* v = - boost::get(&(it->second))) // on a vertex + std::get_if(&(it->second))) // on a vertex std::cout << "on " << (((*v)->is_isolated()) ? "an isolated" : "a") << " vertex: " << (*v)->point() << std::endl; diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp index 831e0e44395..0b31dc9655b 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp @@ -8,9 +8,9 @@ #include "arr_linear.h" -typedef boost::variant Cell_type; -typedef boost::optional Vert_decomp_type; +typedef std::optional Vert_decomp_type; typedef std::pair Vert_decomp_pair; typedef std::pair Vert_decomp_entry; typedef std::list Vert_decomp_list; @@ -41,10 +41,10 @@ int main() { std::cout << " feature below: "; if (! curr.first) std::cout << "EMPTY"; else { - auto* vh = boost::get(&*(curr.first));; + auto* vh = std::get_if(&*(curr.first));; if (vh) std::cout << '(' << (*vh)->point() << ')'; else { - auto* hh = boost::get(&*(curr.first)); + auto* hh = std::get_if(&*(curr.first)); if (! (*hh)->is_fictitious()) std::cout << '[' << (*hh)->curve() << ']'; else std::cout << "NONE"; @@ -54,10 +54,10 @@ int main() { std::cout << " feature above: "; if (! curr.second) std::cout << "EMPTY\n"; else { - auto* vh = boost::get(&*(curr.second));; + auto* vh = std::get_if(&*(curr.second));; if (vh) std::cout << '(' << (*vh)->point() << ")\n"; else { - auto* hh = boost::get(&*(curr.second)); + auto* hh = std::get_if(&*(curr.second)); if (! (*hh)->is_fictitious()) std::cout << '[' << (*hh)->curve() << "]\n"; else std::cout << "NONE\n"; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h index 7aedff1530d..461cadf34a1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h @@ -499,7 +499,7 @@ public: template OutputIterator operator() (const Curve_2& B, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; typedef typename Bounding_traits::Vertical_tangency_point Vertical_tangency_point; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h index 90ae69d90ca..bb60e54d224 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h @@ -114,13 +114,13 @@ public: auto obj = p_arr->topology_traits()->locate_curve_end(cv, ind, ps_x, ps_y); // Return a handle to the DCEL feature. - DFace** f_p = boost::get(&obj); + DFace** f_p = std::get_if(&obj); if (f_p) return (Pl_result::make_result(p_arr->_const_handle_for(*f_p))); - DHalfedge** he_p = boost::get(&obj); + DHalfedge** he_p = std::get_if(&obj); if (he_p) return (Pl_result::make_result(p_arr->_const_handle_for(*he_p))); - DVertex** v_p = boost::get(&obj); + DVertex** v_p = std::get_if(&obj); if (v_p) return (Pl_result::make_result(p_arr->_const_handle_for(*v_p))); // We should never reach here: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h index 85f1b7c5acf..af9b28db6f2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h @@ -25,7 +25,7 @@ #include -#include +#include #include namespace CGAL { @@ -267,11 +267,11 @@ public: template OutputIterator x_monotone_segment(Curve_2 cv, Point_2 p, - boost::optional start, - boost::optional end, + std::optional start, + std::optional end, OutputIterator out) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; //CGAL_assertion(is_one_one(cv,p)); @@ -286,46 +286,46 @@ public: this->_ckva()->make_x_monotone_2_object()(cv, std::back_inserter(arcs)); auto it = arcs.begin(); auto helper = it; - const auto* it_seg_p = boost::get(&(*it)); + const auto* it_seg_p = std::get_if(&(*it)); while (it != arcs.end()) { if ( on_arc(p, *it_seg_p) ) break; it++; - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); } - bool left_on_arc = start && on_arc(start.get(), *it_seg_p); - bool right_on_arc = end && on_arc(end.get(), *it_seg_p); + bool left_on_arc = start && on_arc(start.value(), *it_seg_p); + bool right_on_arc = end && on_arc(end.value(), *it_seg_p); if ( left_on_arc && right_on_arc ) { - segs.push_back(it_seg_p->trim(start.get(),end.get())); + segs.push_back(it_seg_p->trim(start.value(),end.value())); } if (left_on_arc && (!right_on_arc)) { if (!it_seg_p->is_finite(CGAL::ARR_MAX_END) || - !equal(start.get(),right(*it_seg_p))) { + !equal(start.value(),right(*it_seg_p))) { if (it_seg_p->is_finite(CGAL::ARR_MIN_END) && - equal(start.get(),left(*it_seg_p))) + equal(start.value(),left(*it_seg_p))) { segs.push_back(*it_seg_p); } else { X_monotone_curve_2 split1,split2; - it_seg_p->split(start.get(),split1,split2); + it_seg_p->split(start.value(),split1,split2); segs.push_back(split2); } } } if ((!left_on_arc) && right_on_arc) { if (!it_seg_p->is_finite(CGAL::ARR_MIN_END) || - ! equal(left(*it_seg_p), end.get())) + ! equal(left(*it_seg_p), end.value())) { if (it_seg_p->is_finite(CGAL::ARR_MAX_END) && - equal(end.get(), right(*it_seg_p))) + equal(end.value(), right(*it_seg_p))) { segs.push_back(*it_seg_p); } else { X_monotone_curve_2 split1,split2; - it_seg_p->split(end.get(), split1, split2); + it_seg_p->split(end.value(), split1, split2); segs.push_back(split1); } } @@ -348,14 +348,14 @@ public: } CGAL_assertion(it != arcs.begin()); it--; - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); while (! on_arc(point_it, *it_seg_p)) { CGAL_assertion(it != arcs.begin()); it--; - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); } - if (start && on_arc(start.get(),*it_seg_p)) { - segs.push_front(it_seg_p->trim(start.get(), right(*it_seg_p))); + if (start && on_arc(start.value(),*it_seg_p)) { + segs.push_front(it_seg_p->trim(start.value(), right(*it_seg_p))); break; } else { @@ -365,7 +365,7 @@ public: } if (! right_on_arc) { it = helper; // reset - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); Point_2 point_it; while (true) { if (it_seg_p->is_finite(CGAL::ARR_MAX_END) && @@ -378,14 +378,14 @@ public: } it++; CGAL_assertion(it != arcs.end()); - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); while(! on_arc(point_it, *it_seg_p)) { it++; CGAL_assertion(it != arcs.end()); - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); } - if(end && on_arc(end.get(),*it_seg_p)) { - segs.push_back(it_seg_p->trim(left(*it_seg_p),end.get())); + if(end && on_arc(end.value(),*it_seg_p)) { + segs.push_back(it_seg_p->trim(left(*it_seg_p),end.value())); break; } else { @@ -407,19 +407,19 @@ public: Site_of_point site_of_p, OutputIterator out) const { if(site_of_p==POINT_IN_INTERIOR) { - return x_monotone_segment(cv,p,boost::none, boost::none,out); + return x_monotone_segment(cv,p,std::nullopt, std::nullopt,out); } else if(site_of_p==MIN_ENDPOINT) { return x_monotone_segment(cv, p, - boost::optional(p), - boost::none, + std::optional(p), + std::nullopt, out); } CGAL_assertion(site_of_p==MAX_ENDPOINT); return x_monotone_segment(cv, p, - boost::none, - boost::optional(p), + std::nullopt, + std::optional(p), out); } @@ -468,15 +468,15 @@ public: return x_monotone_segment (cv, end_left, - boost::optional(end_left), - boost::optional(end_right), + std::optional(end_left), + std::optional(end_right), out); } else { return x_monotone_segment (cv, end_right, - boost::optional(end_left), - boost::optional(end_right), + std::optional(end_left), + std::optional(end_right), out); } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h index af58c261240..42715621e4b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h @@ -41,7 +41,7 @@ namespace Ss2 = Surface_sweep_2; * \param oi Output: An output iterator for the query results. * \pre The value-type of PointsIterator is Arrangement::Point_2, * and the value-type of OutputIterator is is pair, - * where Result is boost::optional >. * It represents the arrangement feature containing the point. @@ -105,7 +105,7 @@ locate(const Arrangement_on_surface_2& arr, } } - // Obtain a extended traits-class object. + // Obtain an extended traits-class object. const Gt2* geom_traits = arr.geometry_traits(); /* We would like to avoid copy construction of the geometry traits class. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h index 8686132cc41..4d0d46c8de1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -14,7 +14,7 @@ #ifndef CGAL_ARR_BOUNDED_PLANAR_TOPOLOGY_TRAITS_2_H #define CGAL_ARR_BOUNDED_PLANAR_TOPOLOGY_TRAITS_2_H -#include +#include #include @@ -305,7 +305,7 @@ public: * \pre The curve has a boundary condition in either x or y. * \return An object that wraps the curve end. */ - boost::optional > + std::optional > place_boundary_vertex(Face*, const X_monotone_curve_2&, Arr_curve_end, @@ -314,7 +314,7 @@ public: { // This function should never be called: CGAL_error(); - return boost::none; + return std::nullopt; } /*! Locate the predecessor halfedge for the given curve around a given @@ -347,13 +347,13 @@ public: * \pre The curve end is incident to the boundary. * \return An object that contains the curve end. */ - boost::variant + std::variant locate_curve_end(const X_monotone_curve_2&, Arr_curve_end, Arr_parameter_space /* ps_x */, Arr_parameter_space /* ps_y */) { - typedef boost::variant Result; + typedef std::variant Result; // This function should never be called: CGAL_error(); Vertex* v(nullptr); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h index 64f7cd6dea9..f6fbe621739 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h @@ -584,9 +584,6 @@ public: template OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { - typedef boost::variant - Make_x_monotone_result; - // Increment the serial number of the curve cv, which will serve as its // unique identifier. unsigned int index = 0; @@ -594,10 +591,10 @@ public: if (cv.orientation() == COLLINEAR) { // The curve is a line segment. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv.supporting_line(), - cv.source(), - cv.target(), - index)); + *oi++ = X_monotone_curve_2(cv.supporting_line(), + cv.source(), + cv.target(), + index); return oi; } @@ -608,8 +605,8 @@ public: if (sign_rad == ZERO) { // Create an isolated point. - *oi++ = Make_x_monotone_result(Point_2(circ.center().x(), - circ.center().y())); + *oi++ = Point_2(circ.center().x(), + circ.center().y()); return oi; } @@ -622,59 +619,59 @@ public: CGAL_assertion (n_vpts == 2); // Subdivide the circle into two arcs (an upper and a lower half). - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[0], vpts[1], - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + vpts[0], vpts[1], + cv.orientation(), + index); - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[1], vpts[0], - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + vpts[1], vpts[0], + cv.orientation(), + index); } else { // Act according to the number of vertical tangency points. if (n_vpts == 2) { // Subdivide the circular arc into three x-monotone arcs. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - cv.source(), vpts[0], - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + cv.source(), vpts[0], + cv.orientation(), + index); - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[0], vpts[1], - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + vpts[0], vpts[1], + cv.orientation(), + index); - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[1], - cv.target(), - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + vpts[1], + cv.target(), + cv.orientation(), + index); } else if (n_vpts == 1) { // Subdivide the circular arc into two x-monotone arcs. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - cv.source(), - vpts[0], - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + cv.source(), + vpts[0], + cv.orientation(), + index); - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[0], - cv.target(), - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + vpts[0], + cv.target(), + cv.orientation(), + index); } else { CGAL_assertion(n_vpts == 0); // The arc is already x-monotone: - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - cv.source(), - cv.target(), - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + cv.source(), + cv.target(), + cv.orientation(), + index); } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h index 6827889a4f1..151bcf5644a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h @@ -178,17 +178,17 @@ public: template OutputIterator operator()(const Curve_2& arc, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; - std::vector objs; + std::vector objs; CircularKernel().make_x_monotone_2_object()(arc, std::back_inserter(objs)); for (const auto& obj : objs) { - if (const auto* p = CGAL::object_cast(&obj)) { + if (const auto* p = std::get_if(&obj)) { *oi++ = Make_x_monotone_result(*p); continue; } - if (const auto* xcv = CGAL::object_cast(&obj)) { + if (const auto* xcv = std::get_if(&obj)) { *oi++ = Make_x_monotone_result(*xcv); continue; } 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 4d5c07d46ea..b1783f8c3ec 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 @@ -35,7 +35,7 @@ #include -#include +#include #include #include @@ -51,17 +51,17 @@ namespace CGAL { OutputIterator res2) { typedef typename CK::Circular_arc_point_2 Point_2; - typedef boost::variant X_monotone_curve_2; - typedef boost::variant + typedef std::variant X_monotone_curve_2; + typedef std::variant Make_x_monotone_result; for (auto it = res1.begin(); it != res1.end(); ++it) { if (const Arc1* arc = CGAL::object_cast(&*it)) { - boost::variant v = *arc; + std::variant v = *arc; *res2++ = Make_x_monotone_result(v); } else if (const Arc2* line = CGAL::object_cast(&*it)) { - boost::variant v = *line; + std::variant v = *line; *res2++ = Make_x_monotone_result(v); } else if (const Point_2* p = CGAL::object_cast(&*it)) { @@ -81,27 +81,27 @@ namespace CGAL { Circular_arc_point_2; result_type - operator()(const boost::variant< Arc1, Arc2 > &a1, - const boost::variant< Arc1, Arc2 > &a2, + operator()(const std::variant< Arc1, Arc2 > &a1, + const std::variant< Arc1, Arc2 > &a2, const Circular_arc_point_2 &p) const { - if ( const Arc1* arc1 = boost::get( &a1 ) ){ - if ( const Arc1* arc2 = boost::get( &a2 ) ){ + if ( const Arc1* arc1 = std::get_if( &a1 ) ){ + if ( const Arc1* arc2 = std::get_if( &a2 ) ){ return CircularKernel() .compare_y_to_right_2_object()(*arc1, *arc2, p); } else { - const Arc2* arc2e = boost::get( &a2 ); + const Arc2* arc2e = std::get_if( &a2 ); return CircularKernel() .compare_y_to_right_2_object()(*arc1, *arc2e, p); } } - const Arc2* arc1 = boost::get( &a1 ); - if ( const Arc1* arc2 = boost::get( &a2 ) ){ + const Arc2* arc1 = std::get_if( &a1 ); + if ( const Arc1* arc2 = std::get_if( &a2 ) ){ return CircularKernel() .compare_y_to_right_2_object()(*arc1, *arc2, p); } - const Arc2* arc2e = boost::get( &a2 ); + const Arc2* arc2e = std::get_if( &a2 ); return CircularKernel() .compare_y_to_right_2_object()(*arc1, *arc2e, p); } @@ -110,7 +110,6 @@ namespace CGAL { template class Variant_Equal_2 - : public boost::static_visitor { public : @@ -136,7 +135,7 @@ namespace CGAL { : public CircularKernel::Equal_2 { public: - typedef boost::variant< Arc1, Arc2 > Curve_2; + typedef std::variant< Arc1, Arc2 > Curve_2; typedef bool result_type; using CircularKernel::Equal_2::operator(); typedef typename CircularKernel::Circular_arc_point_2 @@ -169,7 +168,7 @@ namespace CGAL { result_type operator()(const Curve_2 &a0, const Curve_2 &a1) const { - return boost::apply_visitor + return std::visit ( Variant_Equal_2(), a0, a1 ); } @@ -188,20 +187,20 @@ namespace CGAL { result_type operator() (const Circular_arc_point_2 &p, - const boost::variant< Arc1, Arc2 > &A1) const + const std::variant< Arc1, Arc2 > &A1) const { - if ( const Arc1* arc1 = boost::get( &A1 ) ){ + if ( const Arc1* arc1 = std::get_if( &A1 ) ){ return CircularKernel().compare_y_at_x_2_object()(p, *arc1); } else { - const Arc2* arc2 = boost::get( &A1 ); + const Arc2* arc2 = std::get_if( &A1 ); return CircularKernel().compare_y_at_x_2_object()(p, *arc2); } } }; template - class Variant_Do_overlap_2 : public boost::static_visitor + class Variant_Do_overlap_2 { public: template < typename T > @@ -229,10 +228,10 @@ namespace CGAL { typedef bool result_type; result_type - operator()(const boost::variant< Arc1, Arc2 > &A0, - const boost::variant< Arc1, Arc2 > &A1) const + operator()(const std::variant< Arc1, Arc2 > &A0, + const std::variant< Arc1, Arc2 > &A1) const { - return boost::apply_visitor + return std::visit ( Variant_Do_overlap_2(), A0, A1 ); } }; @@ -248,23 +247,17 @@ namespace CGAL { template < class OutputIterator,class Not_X_Monotone > OutputIterator - operator()(const boost::variant &A, + operator()(const std::variant &A, OutputIterator res) const { - if ( const Arc1* arc1 = boost::get( &A ) ) { - std::vector container; - CircularKernel(). - make_x_monotone_2_object()(*arc1,std::back_inserter(container)); - return object_to_object_variant - (container, res); + if ( const Arc1* arc1 = std::get_if( &A ) ) { + return CircularKernel(). + make_x_monotone_2_object()(*arc1, res); } else { - const Arc2* arc2 = boost::get( &A ); - std::vector container; - CircularKernel(). - make_x_monotone_2_object()(*arc2,std::back_inserter(container)); - return object_to_object_variant - (container, res); + const Arc2* arc2 = std::get_if( &A ); + return CircularKernel(). + make_x_monotone_2_object()(*arc2, res); } } }; @@ -278,23 +271,23 @@ namespace CGAL { template < class OutputIterator > OutputIterator - operator()(const boost::variant< Arc1, Arc2 > &c1, - const boost::variant< Arc1, Arc2 > &c2, + operator()(const std::variant< Arc1, Arc2 > &c1, + const std::variant< Arc1, Arc2 > &c2, OutputIterator oi) const { - if ( const Arc1* arc1 = boost::get( &c1 ) ){ - if ( const Arc1* arc2 = boost::get( &c2 ) ){ + if ( const Arc1* arc1 = std::get_if( &c1 ) ){ + if ( const Arc1* arc2 = std::get_if( &c2 ) ){ return CircularKernel().intersect_2_object()(*arc1, *arc2, oi); } - const Arc2* arc2 = boost::get( &c2 ); + const Arc2* arc2 = std::get_if( &c2 ); return CircularKernel().intersect_2_object()(*arc1, *arc2, oi); } - const Arc2* arc1e = boost::get( &c1 ); - if ( const Arc1* arc2 = boost::get( &c2 ) ){ + const Arc2* arc1e = std::get_if( &c1 ); + if ( const Arc1* arc2 = std::get_if( &c2 ) ){ return CircularKernel().intersect_2_object()(*arc1e, *arc2, oi); } - const Arc2* arc2 = boost::get( &c2 ); + const Arc2* arc2 = std::get_if( &c2 ); return CircularKernel().intersect_2_object()(*arc1e, *arc2, oi); } @@ -309,13 +302,13 @@ namespace CGAL { Circular_arc_point_2; typedef void result_type; result_type - operator()(const boost::variant< Arc1, Arc2 > &A, + operator()(const std::variant< Arc1, Arc2 > &A, const Circular_arc_point_2 &p, - boost::variant< Arc1, Arc2 > &ca1, - boost::variant< Arc1, Arc2 > &ca2) const + std::variant< Arc1, Arc2 > &ca1, + std::variant< Arc1, Arc2 > &ca2) const { // TODO : optimize by extracting the references from the variants ? - if ( const Arc1* arc1 = boost::get( &A ) ){ + if ( const Arc1* arc1 = std::get_if( &A ) ){ Arc1 carc1; Arc1 carc2; CircularKernel().split_2_object()(*arc1, p, carc1, carc2); @@ -325,7 +318,7 @@ namespace CGAL { } else{ - const Arc2* arc2 = boost::get( &A ); + const Arc2* arc2 = std::get_if( &A ); Arc2 cline1; Arc2 cline2; CircularKernel().split_2_object()(*arc2, p, cline1, cline2); @@ -340,8 +333,6 @@ namespace CGAL { template class Variant_Construct_min_vertex_2 - : public boost::static_visitor - { typedef typename CircularKernel::Circular_arc_point_2 Circular_arc_point_2; @@ -372,9 +363,9 @@ namespace CGAL { //std::remove_reference_t result_type - operator() (const boost::variant< Arc1, Arc2 > & cv) const + operator() (const std::variant< Arc1, Arc2 > & cv) const { - return boost::apply_visitor + return std::visit ( Variant_Construct_min_vertex_2(), cv ); } }; @@ -385,8 +376,6 @@ namespace CGAL { template class Variant_Construct_max_vertex_2 - : public boost::static_visitor { typedef typename CircularKernel::Circular_arc_point_2 Circular_arc_point_2; @@ -422,16 +411,15 @@ namespace CGAL { //std::remove_reference result_type - operator() (const boost::variant< Arc1, Arc2 > & cv) const + operator() (const std::variant< Arc1, Arc2 > & cv) const { - return boost::apply_visitor + return std::visit ( Variant_Construct_max_vertex_2(), cv ); } }; template class Variant_Is_vertical_2 - : public boost::static_visitor { public : @@ -449,9 +437,9 @@ namespace CGAL { public: typedef bool result_type; - bool operator() (const boost::variant< Arc1, Arc2 >& cv) const + bool operator() (const std::variant< Arc1, Arc2 >& cv) const { - return boost::apply_visitor + return std::visit ( Variant_Is_vertical_2(), cv ); } }; @@ -459,7 +447,7 @@ namespace CGAL { } - // a empty class used to have different types between Curve_2 and X_monotone_curve_2 + // an empty class used to have different types between Curve_2 and X_monotone_curve_2 // in Arr_circular_line_arc_traits_2. namespace internal_Argt_traits{ struct Not_X_Monotone{}; @@ -499,8 +487,8 @@ namespace CGAL { typedef internal_Argt_traits::Not_X_Monotone Not_X_Monotone; - typedef boost::variant< Arc1, Arc2, Not_X_Monotone > Curve_2; - typedef boost::variant< Arc1, Arc2 > X_monotone_curve_2; + typedef std::variant< Arc1, Arc2, Not_X_Monotone > Curve_2; + typedef std::variant< Arc1, Arc2 > X_monotone_curve_2; private: CircularKernel ck; 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 f7b77c63a43..3576237f699 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 @@ -30,7 +30,6 @@ #include #include -#include #include #include @@ -863,8 +862,6 @@ public: */ template OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { - typedef boost::variant - Make_x_monotone_result; auto ctr_xcv = m_traits.construct_x_monotone_curve_2_object(); @@ -878,7 +875,7 @@ public: auto n_vtan_ps = m_traits.vertical_tangency_points(cv, vtan_ps); if (n_vtan_ps == 0) { // In case the given curve is already x-monotone: - *oi++ = Make_x_monotone_result(ctr_xcv(cv, conic_id)); + *oi++ = ctr_xcv(cv, conic_id); return oi; } @@ -890,19 +887,15 @@ public: // In case the curve is a full conic, split it into two x-monotone // arcs, one going from ps[0] to ps[1], and the other from ps[1] to // ps[0]. - *oi++ = Make_x_monotone_result(ctr_xcv(cv, vtan_ps[0], vtan_ps[1], - conic_id)); - *oi++ = Make_x_monotone_result(ctr_xcv(cv, vtan_ps[1], vtan_ps[0], - conic_id)); + *oi++ = ctr_xcv(cv, vtan_ps[0], vtan_ps[1], conic_id); + *oi++ = ctr_xcv(cv, vtan_ps[1], vtan_ps[0], conic_id); } else { if (n_vtan_ps == 1) { // Split the arc into two x-monotone sub-curves: one going from the // arc source to ps[0], and the other from ps[0] to the target. - *oi++ = Make_x_monotone_result(ctr_xcv(cv, cv.source(), vtan_ps[0], - conic_id)); - *oi++ = Make_x_monotone_result(ctr_xcv(cv, vtan_ps[0], cv.target(), - conic_id)); + *oi++ = ctr_xcv(cv, cv.source(), vtan_ps[0], conic_id); + *oi++ = ctr_xcv(cv, vtan_ps[0], cv.target(), conic_id); } else { CGAL_assertion(n_vtan_ps == 2); @@ -932,16 +925,16 @@ public: } // Split the arc into three x-monotone sub-curves. - *oi++ = Make_x_monotone_result(ctr_xcv(cv, cv.source(), - vtan_ps[ind_first], - conic_id)); + *oi++ = ctr_xcv(cv, cv.source(), + vtan_ps[ind_first], + conic_id); - *oi++ = Make_x_monotone_result(ctr_xcv(cv, vtan_ps[ind_first], - vtan_ps[ind_second], - conic_id)); + *oi++ = ctr_xcv(cv, vtan_ps[ind_first], + vtan_ps[ind_second], + conic_id); - *oi++ = Make_x_monotone_result(ctr_xcv(cv, vtan_ps[ind_second], - cv.target(), conic_id)); + *oi++ = ctr_xcv(cv, vtan_ps[ind_second], + cv.target(), conic_id); } } @@ -1315,17 +1308,15 @@ public: OutputIterator intersect(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, Intersection_map& inter_map, - OutputIterator oi) const { - typedef boost::variant - Intersection_result; - + OutputIterator oi) const + { if (m_traits.has_same_supporting_conic(xcv1, xcv2)) { // Check for overlaps between the two arcs. X_monotone_curve_2 overlap; if (compute_overlap(xcv1, xcv2, overlap)) { // There can be just a single overlap between two x-monotone arcs: - *oi++ = Intersection_result(overlap); + *oi++ = overlap; return oi; } @@ -1338,22 +1329,22 @@ public: auto eq = alg_kernel->equal_2_object(); if (eq(xcv1.left(), xcv2.left())) { Intersection_point ip(xcv1.left(), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } if (eq(xcv1.right(), xcv2.right())) { Intersection_point ip(xcv1.right(), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } if (eq(xcv1.left(), xcv2.right())) { Intersection_point ip(xcv1.left(), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } if (eq(xcv1.right(), xcv2.left())) { Intersection_point ip(xcv1.right(), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } return oi; @@ -1396,7 +1387,7 @@ public: if (m_traits.is_between_endpoints(xcv1, (*iter).first) && m_traits.is_between_endpoints(xcv2, (*iter).first)) { - *oi++ = Intersection_result(*iter); + *oi++ = *iter; } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h index 1455a276f6d..d0a68b2885b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h @@ -23,7 +23,7 @@ #include -#include +#include #include #include @@ -126,9 +126,9 @@ public: template OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Base_make_x_monotone_result; - typedef boost::variant + typedef std::variant Make_x_monotone_result; // Make the original curve x-monotone. @@ -138,12 +138,12 @@ public: // Attach the data to each of the resulting x-monotone curves. X_monotone_curve_data xdata = Convert()(cv.data()); for (const auto& base_obj : base_objects) { - if (const auto* bxcv = boost::get(&base_obj)) { + if (const auto* bxcv = std::get_if(&base_obj)) { *oi++ = Make_x_monotone_result(X_monotone_curve_2(*bxcv, xdata)); continue; } // Current object is an isolated point: Leave it as is. - const auto* bp = boost::get(&base_obj); + const auto* bp = std::get_if(&base_obj); CGAL_assertion(bp); *oi++ = Make_x_monotone_result(*bp); } @@ -208,9 +208,7 @@ public: OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; - typedef boost::variant + typedef std::variant Intersection_base_result; // Use the base functor to obtain all intersection objects. @@ -223,19 +221,19 @@ public: // Go over all intersection objects and prepare the output. for (const auto& item : base_objects) { const Base_x_monotone_curve_2* base_cv = - boost::get(&item); + std::get_if(&item); if (base_cv != nullptr) { // The current intersection object is an overlapping x-monotone // curve: Merge the data fields of both intersecting curves and // associate the result with the overlapping curve. X_monotone_curve_2 cv(*base_cv, Merge()(cv1.data(), cv2.data())); - *oi++ = Intersection_result(cv); + *oi++ = cv; continue; } // The current intersection object is an intersection point: // Copy it as is. - const Intersection_point* ip = boost::get(&item); - *oi++ = Intersection_result(*ip); + const Intersection_point* ip = std::get_if(&item); + *oi++ = *ip; } return oi; 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 7a0a2eaa3af..c4903e1c816 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 @@ -26,7 +26,7 @@ #include -#include +#include #include #include @@ -2063,7 +2063,7 @@ public: */ template OutputIterator operator()(const Curve_2& c, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; // std::cout << "full: " << c.is_full() << std::endl; // std::cout << "vert: " << c.is_vertical() << std::endl; @@ -2321,8 +2321,7 @@ public: OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; + const Kernel& kernel = m_traits; typename Kernel::Equal_2 equal = kernel.equal_2_object(); @@ -2337,14 +2336,14 @@ public: if (equal(l1, r1)) { bool is_full = equal(l2, r2); X_monotone_curve_2 xc(l2_3, r2_3, normal, vertical, true, is_full); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } if (equal(l2, r2)) { CGAL_assertion(! equal(l1, r1)); // already handled above X_monotone_curve_2 xc(l1_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2358,19 +2357,19 @@ public: // 5. l1 = r2 < r1 < l2 = l1 | One overlap (handled above) if (in_between(r1, r2, l2)) { // Case 1. - *oi++ = Intersection_result(Intersection_point(l1_3, 1)); + *oi++ = Intersection_point(l1_3, 1); return oi; } if (equal(r1, l2)) { // Case 2. - *oi++ = Intersection_result(Intersection_point(l1_3, 1)); - *oi++ = Intersection_result(Intersection_point(l2_3, 1)); + *oi++ = Intersection_point(l1_3, 1); + *oi++ = Intersection_point(l2_3, 1); return oi; } CGAL_assertion(in_between(r1, l2, r2)); // Case 3. X_monotone_curve_2 xc(l2_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2383,12 +2382,12 @@ public: // 5. l1 < l1 = r1 = l2 < r2 | One overlap (handled above) if (in_between(r2, r1, l1)) { // Case 1. - *oi++ = Intersection_result(Intersection_point(l2_3, 1)); + *oi++ = Intersection_point(l2_3, 1); return oi; } // Case 3. X_monotone_curve_2 xc(l1_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2400,13 +2399,13 @@ public: if (in_between(r1, l2, r2) || equal(r1, r2)) { // Cases 1 & 2 X_monotone_curve_2 xc(l1_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } // Case 3 CGAL_assertion(in_between(r2, l2, r1)); X_monotone_curve_2 xc(l2_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2418,13 +2417,13 @@ public: if (in_between(l1, r2, l2)) { // Cases 1 X_monotone_curve_2 xc(l2_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } // Case 3 CGAL_assertion(in_between(l1, l2, l2)); X_monotone_curve_2 xc(l1_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2442,12 +2441,12 @@ public: if (in_between(l2, r2, l1)) { // Case 2 X_monotone_curve_2 xc(l1_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } // Case 3 X_monotone_curve_2 xc(l2_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2457,12 +2456,12 @@ public: // Case 4 if (in_between(l1, r1, l2)) { X_monotone_curve_2 xc(l2_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } // Case 5 X_monotone_curve_2 xc(l1_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2560,8 +2559,6 @@ public: typedef typename Kernel::Equal_3 Equal_3; typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; const Kernel& kernel = m_traits; @@ -2584,9 +2581,9 @@ public: (res && (xc1.is_directed_right() != xc2.is_directed_right()))) { if (xc1.left().is_min_boundary() && xc2.left().is_min_boundary()) - *oi++ = Intersection_result(Intersection_point(xc1.left(), 1)); + *oi++ = Intersection_point(xc1.left(), 1); if (xc1.right().is_max_boundary() && xc2.right().is_max_boundary()) - *oi++ = Intersection_result(Intersection_point(xc1.right(), 1)); + *oi++ = Intersection_point(xc1.right(), 1); return oi; } @@ -2594,11 +2591,11 @@ public: * the other arc is completely overlapping. */ if (xc1.left().is_min_boundary() && xc1.right().is_max_boundary()) { - *oi++ = Intersection_result(xc2); + *oi++ = xc2; return oi; } if (xc2.left().is_min_boundary() && xc2.right().is_max_boundary()) { - *oi++ = Intersection_result(xc1); + *oi++ = xc1; return oi; } /*! Find an endpoint that does not coincide with a pole, and project @@ -2646,12 +2643,12 @@ public: // Observe that xc1 and xc2 may share two endpoints. Point_2 ed = m_traits.construct_point_2_object()(v.direction()); if (is_in_between(ed, xc1) && is_in_between(ed, xc2)) - *oi++ = Intersection_result(Intersection_point(ed, 1)); + *oi++ = Intersection_point(ed, 1); Vector_3 vo(kernel.construct_opposite_vector_3_object()(v)); Point_2 edo = m_traits.construct_point_2_object()(vo.direction()); if (is_in_between(edo, xc1) && is_in_between(edo, xc2)) - *oi++ = Intersection_result(Intersection_point(edo, 1)); + *oi++ = Intersection_point(edo, 1); return oi; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h index ba37b21f187..d966a52b41a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h @@ -201,7 +201,7 @@ public: * intersection or a plane in case plane1 and plane2 coincide. */ template -boost::variant > +std::variant > intersect(const Arr_plane_3 & plane1, const Arr_plane_3 & plane2) { @@ -209,7 +209,7 @@ intersect(const Arr_plane_3 & plane1, typedef typename Kernel::Direction_3 Direction_3; typedef typename Kernel::Line_3 Line_3; typedef typename Kernel::FT FT; - typedef boost::variant > Intersection_result; + typedef std::variant > Intersection_result; // We know that the plane goes through the origin const FT& a1 = plane1.a(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h index e287978f9e3..705682f05ca 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h @@ -1264,22 +1264,22 @@ private: Control_points aux_vec; auto res1 = f_intersect(skew1a, skew2a); - const Point_2* p1 = boost::get(&*res1); + const Point_2* p1 = std::get_if(&*res1); if (! p1) CGAL_error(); aux_vec.push_back(*p1); auto res2 = f_intersect(skew1a, skew2b); - const Point_2* p2 = boost::get(&*res2); + const Point_2* p2 = std::get_if(&*res2); if (! p2) CGAL_error(); aux_vec.push_back(*p2); auto res3 = f_intersect(skew1b, skew2a); - const Point_2* p3 = boost::get(&*res3); + const Point_2* p3 = std::get_if(&*res3); if (! p3) CGAL_error(); aux_vec.push_back(*p3); auto res4 = f_intersect (skew1b, skew2b); - const Point_2* p4 = boost::get(&*res4); + const Point_2* p4 = std::get_if(&*res4); if (! p4) CGAL_error(); aux_vec.push_back(*p4); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h index cf7d00135b0..f8589b2953b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h @@ -318,13 +318,11 @@ public: Bezier_cache& cache, OutputIterator oi) const { - typedef boost::variant Intersection_result; - // In case we have two x-monotone subcurves of the same Bezier curve, // check if they have a common left endpoint. if (_curve.is_same(cv._curve)) { if (left().is_same(cv.left()) || left().is_same(cv.right())) - *oi++ = Intersection_result(Intersection_point(left(), 0)); + *oi++ = Intersection_point(left(), 0); } // Compute the intersections of the two sucurves. Note that for caching @@ -341,7 +339,7 @@ public: // In case of overlap, just report the overlapping subcurve. if (do_ovlp) { - *oi++ = Intersection_result(ovlp_cv); + *oi++ = ovlp_cv; return oi; } @@ -349,14 +347,14 @@ public: // xy-lexicorgraphical order, and insert them to the output iterator. std::sort(ipts.begin(), ipts.end(), Less_intersection_point(cache)); for (auto ip_it = ipts.begin(); ip_it != ipts.end(); ++ip_it) { - *oi++ = Intersection_result(*ip_it); + *oi++ = *ip_it; } // In case we have two x-monotone subcurves of the same Bezier curve, // check if they have a common right endpoint. if (_curve.is_same(cv._curve)) { if (right().is_same(cv.left()) || right().is_same(cv.right())) { - *oi++ = Intersection_result(Intersection_point(right(), 0)); + *oi++ = Intersection_point(right(), 0); } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h index c6f11cc8a34..f46489ba969 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h @@ -995,9 +995,6 @@ public: OutputIterator intersect(const Self& cv, OutputIterator oi, Intersection_map* inter_map = nullptr) const { - typedef std::pair Intersection_point; - typedef boost::variant Intersection_result; - // First check whether the two arcs have the same supporting curve. if (has_same_supporting_curve(cv)) { // Check for overlaps between the two arcs. @@ -1005,7 +1002,7 @@ public: if (_compute_overlap(cv, overlap)) { // There can be just a single overlap between two x-monotone arcs: - *oi++ = Intersection_result(overlap); + *oi++ = overlap; return oi; } @@ -1016,11 +1013,11 @@ public: // intersection points we report. Multiplicity mult = 0; if (left().equals(cv.left()) || left().equals(cv.right())) { - *oi++ = Intersection_result(std::make_pair(left(), mult)); + *oi++ = std::make_pair(left(), mult); } if (right().equals(cv.right()) || right().equals(cv.left())) { - *oi++ = Intersection_result(std::make_pair(right(), mult)); + *oi++ = std::make_pair(right(), mult); } return oi; @@ -1072,7 +1069,7 @@ public: if (this->_is_between_endpoints (iter->first) && cv._is_between_endpoints (iter->first)) { - *oi++ = Intersection_result(*iter); + *oi++ = *iter; } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h index 20ccbe9c758..9c0cda934db 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h @@ -125,7 +125,7 @@ public: template OutputIterator operator()(const Curve_2& line, OutputIterator oi) const { - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(line); return oi; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h index b2354fe9895..f712190f0df 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h @@ -26,7 +26,7 @@ #include -#include +#include #include #include @@ -1249,7 +1249,7 @@ public: OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { // Wrap the segment with a variant. - typedef boost::variant + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(cv); return oi; @@ -1326,8 +1326,6 @@ public: OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; CGAL_precondition(! cv1.is_degenerate()); CGAL_precondition(! cv2.is_degenerate()); @@ -1340,7 +1338,7 @@ public: if (! res) return oi; // Check whether we have a single intersection point. - const Point_2* ip = boost::get(&*res); + const Point_2* ip = std::get_if(&*res); if (ip != nullptr) { // Check whether the intersection point ip lies on both segments. const bool ip_on_cv1 = cv1.is_vertical() ? @@ -1354,7 +1352,7 @@ public: // Create a pair representing the point with its multiplicity, // which is always 1 for line segments. Intersection_point ip_mult(*ip, 1); - *oi++ = Intersection_result(ip_mult); + *oi++ = ip_mult; } } return oi; @@ -1398,14 +1396,14 @@ public: if (cmp_res == SMALLER) { // We have discovered a true overlapping subcurve: - *oi++ = Intersection_result(ovlp); + *oi++ = ovlp; } else if (cmp_res == EQUAL) { // The two objects have the same supporting line, but they just share // a common endpoint. Thus we have an intersection point, but we leave // the multiplicity of this point undefined. Intersection_point ip_mult(ovlp.left(), 0); - *oi++ = Intersection_result(ip_mult); + *oi++ = ip_mult; } return oi; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h index 42d0457c32b..58acefda211 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h @@ -27,7 +27,7 @@ * functors required by the concept it models. */ -#include +#include #include #include @@ -131,7 +131,7 @@ public: OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { // Wrap the segment with a variant. - typedef boost::variant + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(cv); return oi; @@ -224,8 +224,6 @@ public: OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; const Kernel& kernel = m_traits; auto res = kernel.intersect_2_object()(cv1, cv2); @@ -234,19 +232,19 @@ public: if (! res) return oi; // Check if the intersection is a point: - const Point_2* p_p = boost::get(&*res); + const Point_2* p_p = std::get_if(&*res); if (p_p != nullptr) { // Create a pair representing the point with its multiplicity, // which is always 1 for line segments for all practical purposes. // If the two segments intersect at their endpoints, then the // multiplicity is undefined, but we deliberately ignore it for // efficiency reasons. - *oi++ = Intersection_result(Intersection_point(*p_p, 1)); + *oi++ = Intersection_point(*p_p, 1); return oi; } // The intersection is a segment. - const X_monotone_curve_2* cv_p = boost::get(&*res); + const X_monotone_curve_2* cv_p = std::get_if(&*res); CGAL_assertion(cv_p != nullptr); Comparison_result cmp1 = m_traits.compare_endpoints_xy_2_object()(cv1); @@ -257,11 +255,11 @@ public: // in the overlap segment if (m_traits.compare_endpoints_xy_2_object()(*cv_p) != cmp1) { auto ctr_opposite = kernel.construct_opposite_segment_2_object(); - *oi++ = Intersection_result(ctr_opposite(*cv_p)); + *oi++ = ctr_opposite(*cv_p); return oi; } } - *oi++ = Intersection_result(*cv_p); + *oi++ = *cv_p; return oi; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h index 19a95a662f6..2951b1983fe 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h @@ -24,7 +24,7 @@ */ #include -#include +#include #include #include #include @@ -231,7 +231,7 @@ overlay(const Arrangement_on_surface_2& arr1 xcvs_vec[i] = Ovl_x_monotone_curve_2(eit2->curve(), invalid_he1, he2); } - // Obtain a extended traits-class object and define the sweep-line visitor. + // Obtain an extended traits-class object and define the sweep-line visitor. const typename Arr_res::Traits_adaptor_2* traits_adaptor = arr.traits_adaptor(); @@ -284,8 +284,8 @@ overlay(const Arrangement_on_surface_2& arr1 if (vit1->is_isolated()) { typename Arr_a::Vertex_const_handle v1 = vit1; pts_vec[i++] = - Ovl_point_2(vit1->point(), boost::make_optional(Cell_handle_red(v1)), - boost::optional()); + Ovl_point_2(vit1->point(), std::make_optional(Cell_handle_red(v1)), + std::optional()); } } @@ -294,8 +294,8 @@ overlay(const Arrangement_on_surface_2& arr1 if (vit2->is_isolated()) { typename Arr_b::Vertex_const_handle v2 = vit2; pts_vec[i++] = - Ovl_point_2(vit2->point(), boost::optional(), - boost::make_optional(Cell_handle_blue(v2))); + Ovl_point_2(vit2->point(), std::optional(), + std::make_optional(Cell_handle_blue(v2))); } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h index ce95e1da07a..b83ca0189e2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h @@ -411,7 +411,7 @@ public: } }; - /*! Obtain a Equal_2 function object. */ + /*! Obtain an `Equal_2` function object. */ Equal_2 equal_2_object() const { return (Equal_2(m_base_traits->equal_2_object())); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h index 71059ab2be4..61fe87106b5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include namespace CGAL { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h index 8f28269f199..188343887bc 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h @@ -75,7 +75,7 @@ Arr_trapezoid_ric_point_location::locate(const Point_2& p) const case TD::POINT: { //p is interior so it should fall on Td_active_vertex - Td_active_vertex& v (boost::get(tr)); + Td_active_vertex& v (std::get(tr)); CGAL_TRAP_PRINT_DEBUG("POINT"); CGAL_assertion(!v.vertex()->is_at_open_boundary()); return make_result(v.vertex()); @@ -84,7 +84,7 @@ Arr_trapezoid_ric_point_location::locate(const Point_2& p) const case TD::CURVE: { - Td_active_edge& e (boost::get(tr)); + Td_active_edge& e (std::get(tr)); Halfedge_const_handle h = e.halfedge(); CGAL_TRAP_PRINT_DEBUG("CURVE"); if ( m_traits->is_in_x_range_2_object()(h->curve(),p) && @@ -100,7 +100,7 @@ Arr_trapezoid_ric_point_location::locate(const Point_2& p) const case TD::TRAPEZOID: { - Td_active_trapezoid t (boost::get(tr)); + Td_active_trapezoid t (std::get(tr)); Halfedge_const_handle h = t.top(); CGAL_TRAP_PRINT_DEBUG("TRAPEZOID"); bool is_p_above_h = (m_traits->is_in_x_range_2_object()(h->curve(),p)) @@ -160,7 +160,7 @@ Arr_trapezoid_ric_point_location:: _get_unbounded_face(const Td_map_item& item,const Point_2& p, Arr_not_all_sides_oblivious_tag) const { - Td_active_trapezoid tr (boost::get(item)); + Td_active_trapezoid tr (std::get(item)); // Halfedge_const_handle h = tr.top(); if (!tr.is_on_top_boundary() || !tr.is_on_bottom_boundary()) { //if one of top or bottom edges is defined @@ -184,13 +184,13 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p, Td_map_item& left_v_item = td.locate(tr.left(),td_lt); CGAL_assertion(td_lt == TD::POINT); Halfedge_const_handle he; - if (boost::get(&left_v_item) != nullptr) { - Td_active_vertex v(boost::get(left_v_item)); + if (std::get_if(&left_v_item) != nullptr) { + Td_active_vertex v(std::get(left_v_item)); he = v.cw_he(); } else { Td_active_fictitious_vertex - v(boost::get(left_v_item)); + v(std::get(left_v_item)); he = v.cw_he(); } //cw_he() holds the "smallest" curve clockwise starting from 12 o'clock @@ -216,13 +216,13 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p, Td_map_item& right_v_item = td.locate(tr.right(),td_lt); CGAL_assertion(td_lt == TD::POINT); Halfedge_const_handle he; - if (boost::get(&right_v_item)!= nullptr) { - Td_active_vertex v(boost::get(right_v_item)); + if (std::get_if(&right_v_item)!= nullptr) { + Td_active_vertex v(std::get(right_v_item)); he = v.cw_he(); } else { Td_active_fictitious_vertex - v(boost::get(right_v_item)); + v(std::get(right_v_item)); he = v.cw_he(); } //its cw_he() holds the "smallest" curve clockwise starting from @@ -270,13 +270,13 @@ _vertical_ray_shoot(const Point_2& p, bool shoot_up) const case TD::POINT: { //p fell on Td_active_vertex - Td_active_vertex& v (boost::get(item)); + Td_active_vertex& v (std::get(item)); return (make_result(v.vertex())); } break; case TD::CURVE: { - Td_active_edge& e (boost::get(item)); + Td_active_edge& e (std::get(item)); Halfedge_const_handle h = e.halfedge(); if ((shoot_up && h->direction() == ARR_LEFT_TO_RIGHT) || @@ -289,7 +289,7 @@ _vertical_ray_shoot(const Point_2& p, bool shoot_up) const break; case TD::TRAPEZOID: { - Td_active_trapezoid trpz (boost::get(item)); + Td_active_trapezoid trpz (std::get(item)); Halfedge_const_handle h = (shoot_up) ? trpz.top() : trpz.bottom(); bool is_p_above_h = (m_traits->is_in_x_range_2_object()(h->curve(),p)) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h index 169864e1de1..9904b170542 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h @@ -22,7 +22,7 @@ */ #include -#include +#include #include @@ -92,9 +92,9 @@ public: // type flag + on boundaries flags, // left-bottom neighbor trapezoid, left-top neighbor trapezoid, // right-bottom neighbor trapezoid, right-top neighbor trapezoid - typedef Td_ninetuple, - boost::variant, - boost::variant, + std::variant, + std::variant >, Halfedge_const_handle, unsigned char, @@ -239,7 +239,7 @@ public: Curve_end v_ce(left()->curve_end()); ptr()->e2 = (std::shared_ptr)(new X_monotone_curve_2(v_ce.cv())); - //CGAL_assertion(boost::get>( &(ptr()->e2)) != nullptr); + //CGAL_assertion(std::get>( &(ptr()->e2)) != nullptr); ptr()->e1 = (v_ce.ce() == ARR_MIN_END ) ? CGAL_TD_CV_MIN_END : CGAL_TD_CV_MAX_END; @@ -443,8 +443,8 @@ public: CGAL_TD_INLINE Vertex_const_handle left_unsafe() const { CGAL_precondition(is_active()); - CGAL_assertion(boost::get(&(ptr()->e0)) != nullptr); - return boost::get(ptr()->e0); + CGAL_assertion(std::get(&(ptr()->e0)) != nullptr); + return std::get(ptr()->e0); } /*! Access trapezoid left. @@ -466,8 +466,8 @@ public: CGAL_TD_INLINE Vertex_const_handle right_unsafe() const { CGAL_precondition(is_active()); - CGAL_assertion(boost::get(&(ptr()->e1)) != nullptr); - return boost::get(ptr()->e1); + CGAL_assertion(std::get(&(ptr()->e1)) != nullptr); + return std::get(ptr()->e1); } /*! Access trapezoid right. @@ -489,8 +489,8 @@ public: CGAL_TD_INLINE Halfedge_const_handle bottom_unsafe () const { CGAL_precondition(is_active()); - CGAL_assertion(boost::get(&(ptr()->e2)) != nullptr); - return boost::get(ptr()->e2); + CGAL_assertion(std::get(&(ptr()->e2)) != nullptr); + return std::get(ptr()->e2); } /*! Access trapezoid bottom. @@ -526,8 +526,8 @@ public: CGAL_precondition(type() == TD_VERTEX); CGAL_precondition(!is_on_boundaries()); - CGAL_assertion(boost::get( &(ptr()->e0)) != nullptr); - return boost::get( ptr()->e0 ); + CGAL_assertion(std::get( &(ptr()->e0)) != nullptr); + return std::get( ptr()->e0 ); } CGAL_TD_INLINE std::pair curve_end_pair_for_boundary_rem_vtx() const @@ -536,13 +536,13 @@ public: CGAL_precondition(type() == TD_VERTEX); CGAL_precondition(is_on_boundaries()); - CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr); - CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr); - X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get(); + CGAL_assertion(std::get( &(ptr()->e1)) != nullptr); + CGAL_assertion(std::get >(&(ptr()->e2)) != nullptr); + X_monotone_curve_2* cv_ptr = (std::get >(ptr()->e2)).get(); CGAL_assertion(cv_ptr != nullptr); Arr_curve_end ce = - (boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? + (std::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? ARR_MIN_END : ARR_MAX_END; return std::make_pair(cv_ptr, ce); @@ -554,13 +554,13 @@ public: CGAL_precondition(type() == TD_VERTEX); CGAL_precondition(is_on_boundaries()); - CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr); - CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr); - X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get(); + CGAL_assertion(std::get( &(ptr()->e1)) != nullptr); + CGAL_assertion(std::get >(&(ptr()->e2)) != nullptr); + X_monotone_curve_2* cv_ptr = (std::get >(ptr()->e2)).get(); CGAL_assertion(cv_ptr != nullptr); Arr_curve_end ce = - (boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? + (std::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? ARR_MIN_END : ARR_MAX_END; return Curve_end(*cv_ptr, ce); @@ -571,13 +571,13 @@ public: CGAL_precondition(!is_active()); CGAL_precondition(type() == TD_VERTEX); - CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr); - CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr); - X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get(); + CGAL_assertion(std::get( &(ptr()->e1)) != nullptr); + CGAL_assertion(std::get >(&(ptr()->e2)) != nullptr); + X_monotone_curve_2* cv_ptr = (std::get >(ptr()->e2)).get(); CGAL_assertion(cv_ptr != nullptr); Arr_curve_end ce = - (boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? + (std::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? ARR_MIN_END : ARR_MAX_END; return Curve_end(*cv_ptr, ce); @@ -587,8 +587,8 @@ public: { CGAL_precondition(!is_active() && type() == TD_EDGE); - CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr); - X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get(); + CGAL_assertion(std::get >(&(ptr()->e2)) != nullptr); + X_monotone_curve_2* cv_ptr = (std::get >(ptr()->e2)).get(); CGAL_assertion(cv_ptr != nullptr); return *cv_ptr; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h index f901bb72565..f08890e4623 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h @@ -21,7 +21,7 @@ */ #include -#include +#include #include @@ -145,13 +145,13 @@ public: //Dag_node* m_dag_node; //pointer to the search structure (DAG) node /*! Initialize the trapezoid's neighbors. */ - inline void init_neighbors(boost::optional next) + inline void init_neighbors(std::optional> next) { - set_next((next) ? *next : Td_map_item(0)); + set_next((next) ? next->get() : Td_map_item(0)); } /*! \copydoc init_neighbors * \deprecated please use #init_neighbors */ - CGAL_DEPRECATED inline void init_neighbours(boost::optional next) + CGAL_DEPRECATED inline void init_neighbours(std::optional> next) { init_neighbors(next); } /*! Set the DAG node. */ @@ -199,10 +199,10 @@ public: /*! Constructor given Vertex & Halfedge handles. */ Td_active_edge (Halfedge_const_handle he , Dag_node* node = 0, - boost::optional next = boost::none) + std::optional> next = std::nullopt) { - PTR = new Data(he, (next) ? *next : Td_map_item(0), node); + PTR = new Data(he, (next) ? next->get() : Td_map_item(0), node); //m_dag_node = node; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h index 06e13b29c24..f709a463bc1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h @@ -21,7 +21,7 @@ */ #include -#include +#include #include #ifdef CGAL_TD_DEBUG diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h index 06b384daed9..6b9486e4e60 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #ifdef CGAL_TD_DEBUG @@ -163,18 +163,18 @@ private: //Dag_node* m_dag_node; //pointer to the search structure (DAG) node /*! Initialize the trapezoid's neighbors. */ - inline void init_neighbors(boost::optional lb, boost::optional lt, - boost::optional rb, boost::optional rt) + inline void init_neighbors(std::optional> lb, std::optional> lt, + std::optional> rb, std::optional> rt) { - set_lb((lb) ? *lb : Td_map_item(0)); - set_lt((lt) ? *lt : Td_map_item(0)); - set_rb((rb) ? *rb : Td_map_item(0)); - set_rt((rt) ? *rt : Td_map_item(0)); + set_lb((lb) ? lb->get() : Td_map_item(0)); + set_lt((lt) ? lt->get() : Td_map_item(0)); + set_rb((rb) ? rb->get() : Td_map_item(0)); + set_rt((rt) ? rt->get() : Td_map_item(0)); } /*! \copydoc init_neighbors * \deprecated please use #init_neighbors */ - CGAL_DEPRECATED inline void init_neighbours(boost::optional lb, boost::optional lt, - boost::optional rb, boost::optional rt) + CGAL_DEPRECATED inline void init_neighbours(std::optional> lb, std::optional> lt, + std::optional> rb, std::optional> rt) { init_neighbors(lb, lt, rb, rt); } /*! Set the DAG node. */ @@ -267,14 +267,14 @@ private: /*! Constructor given Vertex & Halfedge handles. */ Td_active_trapezoid (Vertex_const_handle l, Vertex_const_handle r, Halfedge_const_handle b, Halfedge_const_handle t, - boost::optional lb = boost::none, - boost::optional lt = boost::none, - boost::optional rb = boost::none, - boost::optional rt = boost::none, + std::optional> lb = std::nullopt, + std::optional> lt = std::nullopt, + std::optional> rb = std::nullopt, + std::optional> rt = std::nullopt, Dag_node* node = 0) { - PTR = new Data (l, r, b, t, (lb) ? *lb : Td_map_item(0), (lt) ? *lt : Td_map_item(0), - (rb) ? *rb : Td_map_item(0), (rt) ? *rt : Td_map_item(0), node); + PTR = new Data (l, r, b, t, (lb) ? lb->get() : Td_map_item(0), (lt) ? lt->get() : Td_map_item(0), + (rb) ? rb->get() : Td_map_item(0), (rt) ? rt->get() : Td_map_item(0), node); //m_dag_node = node; } @@ -459,14 +459,14 @@ private: Td_map_item item (*this); - if (ptr()->rb.which() != 0) + if (ptr()->rb.index() != 0) { - Self tr(boost::get(rb())); + Self tr(std::get(rb())); tr.set_lb(item); } - if (ptr()->rt.which() != 0) + if (ptr()->rt.index() != 0) { - Self tr(boost::get(rt())); + Self tr(std::get(rt())); tr.set_lt(item); } CGAL_assertion(is_on_right_boundary() == right.is_on_right_boundary()); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h index 514686d303d..23cbc480c9b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h @@ -21,7 +21,7 @@ */ #include -#include +#include #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h index 72fd48526c8..340bb0b6d7a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h @@ -28,7 +28,7 @@ #include #include -#include +#include namespace CGAL { @@ -112,7 +112,7 @@ protected: public: - class clear_neighbors_visitor : public boost::static_visitor< void > + class clear_neighbors_visitor { public: void operator()(Td_active_trapezoid& t) const @@ -142,7 +142,7 @@ protected: //d'tor ~Node() { - boost::apply_visitor(clear_neighbors_visitor(), m_data); + std::visit(clear_neighbors_visitor(), m_data); } bool is_inner_node() const //MICHAL: a node with only left child (like removed node) will be considered as a leaf diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h index 55c8e5a457b..97de5cae60a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h @@ -21,7 +21,7 @@ */ #include -#include +#include #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h index db3019d46b7..eea96c8327f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h @@ -21,7 +21,7 @@ */ #include -#include +#include #ifdef CGAL_TD_DEBUG diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h index 908be87c078..312d7d8c506 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h @@ -21,7 +21,7 @@ */ #include -#include +#include #ifdef CGAL_TD_DEBUG diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h index e9cad94daf8..76640144604 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h @@ -21,7 +21,7 @@ */ #include -#include +#include #ifdef CGAL_TD_DEBUG diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h index 45ba665a1d5..391fb264658 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h @@ -113,7 +113,7 @@ public: Td_inactive_fictitious_vertex; //! type of td map item (Td_halfedge, Td_vertex or Td_trapezoid) - typedef boost::variant< Td_nothing, + typedef std::variant< Td_nothing, Td_active_trapezoid, Td_inactive_trapezoid, Td_active_edge, Td_inactive_edge, Td_active_vertex, Td_active_fictitious_vertex, @@ -895,8 +895,8 @@ public: CGAL_precondition(is_active(left_item) && is_active(right_item)); CGAL_precondition(is_td_trapezoid(left_item) && is_td_trapezoid(right_item)); - Td_active_trapezoid left (boost::get(left_item)); - Td_active_trapezoid right(boost::get(right_item)); + Td_active_trapezoid left (std::get(left_item)); + Td_active_trapezoid right(std::get(right_item)); if (left.is_on_bottom_boundary()) return (right.is_on_bottom_boundary()); @@ -915,8 +915,8 @@ public: CGAL_precondition(is_active(left_item) && is_active(right_item)); CGAL_precondition(is_td_trapezoid(left_item) && is_td_trapezoid(right_item)); - Td_active_trapezoid left (boost::get(left_item)); - Td_active_trapezoid right(boost::get(right_item)); + Td_active_trapezoid left (std::get(left_item)); + Td_active_trapezoid right(std::get(right_item)); if (left.is_on_top_boundary()) return (right.is_on_top_boundary()); @@ -957,13 +957,13 @@ public: //returns true if the trapezoid is a curve bool is_empty_item(const Td_map_item& tr) const { - return (tr.which() == 0); + return (tr.index() == 0); } //returns true if the trapezoid is a point or a curve bool is_trapezoid(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_TRAPEZOID: case TD_INACTIVE_TRAPEZOID: @@ -976,7 +976,7 @@ public: //returns true if the map item is a vertex bool is_td_vertex(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_VERTEX: case TD_ACTIVE_FICTITIOUS_VERTEX: @@ -991,7 +991,7 @@ public: //returns true if the map item is an edge bool is_td_edge(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_EDGE: case TD_INACTIVE_EDGE: @@ -1004,7 +1004,7 @@ public: //returns true if the map item is an edge bool is_td_trapezoid(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_TRAPEZOID: case TD_INACTIVE_TRAPEZOID: @@ -1017,7 +1017,7 @@ public: //returns true if the trapezoid is a curve bool is_fictitious_vertex(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_FICTITIOUS_VERTEX: case TD_INACTIVE_FICTITIOUS_VERTEX: @@ -1030,7 +1030,7 @@ public: //returns true if the trapezoid is a curve bool is_active(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_TRAPEZOID: case TD_ACTIVE_EDGE: @@ -1049,7 +1049,7 @@ public: CGAL_precondition(is_active(item)); //MICHAL: assumes item is of active edge item - also fails in case of a vertical asymptote //MICHAL: check when this is used exactly - Td_active_edge& e (boost::get(item)); + Td_active_edge& e (std::get(item)); Halfedge_const_handle he = e.halfedge(); return (this->compare_curve_end_x_2_object() (Curve_end(he,ARR_MIN_END), Curve_end(he,ARR_MAX_END))== EQUAL); @@ -1061,7 +1061,7 @@ public: { CGAL_precondition( is_active(item) ); CGAL_precondition( is_td_trapezoid(item) ); - Td_active_trapezoid tr (boost::get(item)); + Td_active_trapezoid tr (std::get(item)); return ( tr.is_on_left_boundary() || diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h index 097e12d0dcb..1a3549c0008 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -93,16 +93,16 @@ struct Non_recursive_td_map_item_destructor void operator()(Td_active_trapezoid& item) { - boost::apply_visitor(m_child_visitor, item.lb()); - boost::apply_visitor(m_child_visitor, item.lt()); - boost::apply_visitor(m_child_visitor, item.rb()); - boost::apply_visitor(m_child_visitor, item.rt()); + std::visit(m_child_visitor, item.lb()); + std::visit(m_child_visitor, item.lt()); + std::visit(m_child_visitor, item.rb()); + std::visit(m_child_visitor, item.rt()); item.clear_neighbors(); } void operator()(Td_active_edge& item) { - boost::apply_visitor(m_child_visitor, item.next()); + std::visit(m_child_visitor, item.next()); item.set_next(Td_map_item(0)); } @@ -124,7 +124,7 @@ struct Non_recursive_td_map_item_destructor { Td_map_item item = queue.back(); queue.pop_back(); - boost::apply_visitor(item_visitor, item); + std::visit(item_visitor, item); } } @@ -138,7 +138,7 @@ struct Non_recursive_td_map_item_destructor { Td_map_item item = queue.back(); queue.pop_back(); - boost::apply_visitor(item_visitor, item); + std::visit(item_visitor, item); } } }; @@ -272,7 +272,7 @@ public: Base_map_item_iterator() : traits(0), m_cur_item(Td_map_item(0)){ } Base_map_item_iterator(const Traits* traits_, - boost::optional curr = boost::none) + std::optional curr = std::nullopt) :traits(traits_), m_cur_item((curr) ? *curr : Td_map_item(0) ) { } Base_map_item_iterator(const Base_map_item_iterator &it) @@ -332,12 +332,12 @@ public: public: //constructors In_face_iterator(const Traits* traits_, Halfedge_const_handle sep, - boost::optional curr = boost::none) + std::optional> curr = std::nullopt) :Base_map_item_iterator(traits_,curr), m_sep(sep->curve()) { } In_face_iterator(const Traits* traits_, const X_monotone_curve_2& sep, - boost::optional curr = boost::none) + std::optional> curr = std::nullopt) :Base_map_item_iterator(traits_,curr), m_sep(sep) { } @@ -384,7 +384,7 @@ public: if (traits->is_td_trapezoid(m_cur_item)) { //if the map item is a trapezoid - Td_active_trapezoid tr (boost::get(m_cur_item)); + Td_active_trapezoid tr (std::get(m_cur_item)); #ifndef CGAL_TD_DEBUG CGAL_warning_code(Dag_node* tt = tr.dag_node();) @@ -436,7 +436,7 @@ public: { //if the map item is an edge - Td_active_edge e (boost::get(m_cur_item)); + Td_active_edge e (std::get(m_cur_item)); CGAL_assertion_code(Dag_node* tt = e.dag_node();) CGAL_assertion(tt != nullptr); CGAL_assertion(tt->is_inner_node()); @@ -453,7 +453,7 @@ public: while(traits->is_td_vertex(m_cur_item)) { Dag_node* node = - boost::apply_visitor(dag_node_visitor(),m_cur_item); + std::visit(dag_node_visitor(),m_cur_item); m_cur_item = node->left_child().get_data(); } @@ -481,7 +481,7 @@ public: CGAL_precondition (!traits->is_empty_item(m_cur_item)); CGAL_precondition (traits->is_active(m_cur_item) && traits->is_td_trapezoid(m_cur_item)); - return boost::get(m_cur_item); + return std::get(m_cur_item); } Td_active_edge& e() @@ -489,13 +489,13 @@ public: CGAL_precondition (!traits->is_empty_item(m_cur_item)); CGAL_precondition (traits->is_active(m_cur_item) && traits->is_td_edge(m_cur_item)); - return boost::get(m_cur_item); + return std::get(m_cur_item); } }; /*! Visitors for accessing td map items methods */ - class rb_visitor : public boost::static_visitor + class rb_visitor { public: Td_map_item operator()(Td_active_trapezoid& t) const @@ -511,7 +511,7 @@ public: } }; - class set_rb_visitor : public boost::static_visitor + class set_rb_visitor { public: set_rb_visitor (const Td_map_item& rb) : m_rb(rb) {} @@ -532,7 +532,7 @@ public: const Td_map_item& m_rb; }; - class rt_visitor : public boost::static_visitor + class rt_visitor { public: Td_map_item operator()(Td_active_trapezoid& t) const @@ -548,7 +548,7 @@ public: } }; - class set_rt_visitor : public boost::static_visitor + class set_rt_visitor { public: set_rt_visitor (const Td_map_item& rt) : m_rt(rt) {} @@ -568,7 +568,7 @@ public: const Td_map_item& m_rt; }; - class lb_visitor : public boost::static_visitor + class lb_visitor { public: Td_map_item operator()(Td_active_trapezoid& t) const @@ -584,7 +584,7 @@ public: } }; - class set_lb_visitor : public boost::static_visitor + class set_lb_visitor { public: set_lb_visitor (const Td_map_item& lb) : m_lb(lb) {} @@ -604,7 +604,7 @@ public: const Td_map_item& m_lb; }; - class set_lt_visitor : public boost::static_visitor + class set_lt_visitor { public: set_lt_visitor (const Td_map_item& lt) : m_lt(lt) {} @@ -624,7 +624,7 @@ public: const Td_map_item& m_lt; }; - class bottom_he_visitor : public boost::static_visitor + class bottom_he_visitor { public: Halfedge_const_handle operator()(Td_active_trapezoid& t) const @@ -640,7 +640,7 @@ public: } }; - class set_bottom_he_visitor : public boost::static_visitor< void > + class set_bottom_he_visitor { public: set_bottom_he_visitor (Halfedge_const_handle he) : m_bottom_he(he) {} @@ -659,7 +659,7 @@ public: Halfedge_const_handle m_bottom_he; }; - class top_he_visitor : public boost::static_visitor + class top_he_visitor { public: Halfedge_const_handle operator()(Td_active_trapezoid& t) const @@ -675,7 +675,7 @@ public: } }; - class set_top_he_visitor : public boost::static_visitor + class set_top_he_visitor { public: set_top_he_visitor (Halfedge_const_handle he) : m_top_he(he) {} @@ -694,7 +694,7 @@ public: Halfedge_const_handle m_top_he; }; - class cw_he_visitor : public boost::static_visitor< Halfedge_const_handle > + class cw_he_visitor { public: Halfedge_const_handle operator()(Td_active_vertex& t) const @@ -716,7 +716,8 @@ public: /*! A visitor to set the cw halfedge of a vertex node. */ - class set_cw_he_visitor : public boost::static_visitor { + class set_cw_he_visitor + { public: set_cw_he_visitor(Halfedge_const_handle he) : m_cw_he(he) {} @@ -734,7 +735,8 @@ public: /*! A visitor to reset the cw halfedge of a vertex node. */ - class reset_cw_he_visitor : public boost::static_visitor { + class reset_cw_he_visitor + { public: void operator()(Td_active_vertex& t) const { t.reset_cw_he(); } @@ -744,7 +746,7 @@ public: void operator()(T& /*t*/) const { CGAL_assertion(false); } }; - class dag_node_visitor : public boost::static_visitor + class dag_node_visitor { public: Dag_node* operator()(Td_nothing& /* t */) const @@ -765,7 +767,7 @@ public: } }; - class set_dag_node_visitor : public boost::static_visitor + class set_dag_node_visitor { public: set_dag_node_visitor(Dag_node* node):m_node(node) {} @@ -789,30 +791,29 @@ public: Dag_node* m_node; }; - class curve_end_for_fict_vertex_visitor : - public boost::static_visitor > + class curve_end_for_fict_vertex_visitor { public: - boost::optional operator()(Td_active_fictitious_vertex& t) const + std::optional operator()(Td_active_fictitious_vertex& t) const { return t.curve_end(); } - boost::optional + std::optional operator()(Td_inactive_fictitious_vertex& t) const { return t.curve_end(); } template < typename T > - boost::optional operator()(T& /* t */) const + std::optional operator()(T& /* t */) const { CGAL_assertion(false); - return boost::none; + return std::nullopt; } }; - class point_for_vertex_visitor : public boost::static_visitor< Point > + class point_for_vertex_visitor { public: Point operator()(Td_active_vertex& t) const @@ -833,30 +834,28 @@ public: } }; - class curve_end_for_active_vertex_visitor : - public boost::static_visitor > + class curve_end_for_active_vertex_visitor { public: - boost::optional operator()(Td_active_vertex& t) const + std::optional operator()(Td_active_vertex& t) const { return t.curve_end(); } - boost::optional operator()(Td_active_fictitious_vertex& t) const + std::optional operator()(Td_active_fictitious_vertex& t) const { return t.curve_end(); } template < typename T > - boost::optional operator()(T& /* t */) const + std::optional operator()(T& /* t */) const { CGAL_assertion(false); - return boost::none; + return std::nullopt; } }; - class vertex_for_active_vertex_visitor : - public boost::static_visitor + class vertex_for_active_vertex_visitor { public: Vertex_const_handle operator()(Td_active_vertex& t) const @@ -877,27 +876,26 @@ public: } }; - class cv_for_edge_visitor : - public boost::static_visitor > + class cv_for_edge_visitor { public: - boost::optional + std::optional> operator()(Td_active_edge& t) const { return t.halfedge()->curve(); } - boost::optional + std::optional> operator()(Td_inactive_edge& t) const { return t.curve(); } template - boost::optional operator()(T& /* t */) const + std::optional> operator()(T& /* t */) const { CGAL_assertion(false); - return boost::none; + return std::nullopt; } }; @@ -998,11 +996,11 @@ protected: bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item); if (is_fict_vtx) { return (compare(t, - *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(), + *(std::visit(curve_end_for_fict_vertex_visitor(), vtx_item))) == SMALLER); } else { - return (compare(t, boost::apply_visitor(point_for_vertex_visitor(), + return (compare(t, std::visit(point_for_vertex_visitor(), vtx_item)) == SMALLER); } } @@ -1039,12 +1037,12 @@ protected: bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item); if (is_fict_vtx) { return (compare(t, - *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(), + *(std::visit(curve_end_for_fict_vertex_visitor(), vtx_item))) == LARGER); } else { return (compare(t, - boost::apply_visitor(point_for_vertex_visitor(), + std::visit(point_for_vertex_visitor(), vtx_item)) == LARGER); } } @@ -1058,12 +1056,12 @@ protected: bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item); if (is_fict_vtx) { return equal(t, - *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(), + *(std::visit(curve_end_for_fict_vertex_visitor(), vtx_item))); } else { return equal(t, - boost::apply_visitor(point_for_vertex_visitor(), + std::visit(point_for_vertex_visitor(), vtx_item)); } } @@ -1090,24 +1088,24 @@ protected: //if ( traits->is_fictitious_vertex(item) ) //{ // CGAL_precondition(traits->equal_curve_end_2_object() - // (Curve_end(cv,ARR_MIN_END), *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item)))); + // (Curve_end(cv,ARR_MIN_END), *(std::visit(curve_end_for_fict_vertex_visitor(),item)))); //} //else //{ // CGAL_precondition(traits->equal_curve_end_2_object() - // (Curve_end(cv,ARR_MIN_END), boost::apply_visitor(point_for_vertex_visitor(), item))); + // (Curve_end(cv,ARR_MIN_END), std::visit(point_for_vertex_visitor(), item))); //} //find the node of the curve's leftmost trapezoid Dag_node cv_leftmost_node(left_cv_end_node.right_child()); if (traits->is_fictitious_vertex(item) ) { - Curve_end ce( *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(), + Curve_end ce( *(std::visit(curve_end_for_fict_vertex_visitor(), item))); search_using_dag_with_cv(cv_leftmost_node, traits, ce, &cv, cres); } else { - Point p( boost::apply_visitor(point_for_vertex_visitor(), item)); + Point p( std::visit(point_for_vertex_visitor(), item)); search_using_dag_with_cv(cv_leftmost_node, traits, p, &cv, cres); } return cv_leftmost_node; @@ -1159,8 +1157,8 @@ protected: if (traits->is_empty_item(left_item) || traits->is_empty_item(right_item)) return false; - Td_active_trapezoid& left (boost::get(left_item)); - Td_active_trapezoid& right (boost::get(right_item)); + Td_active_trapezoid& left (std::get(left_item)); + Td_active_trapezoid& right (std::get(right_item)); if (traits->is_trapezoids_top_equal(left,right) && traits->is_trapezoids_bottom_equal(left,right) && @@ -1966,7 +1964,7 @@ public: for (typename std::list::iterator it = representatives.begin(); it != representatives.end(); ++it) { - Td_active_edge e(boost::get(*it)); + Td_active_edge e(std::get(*it)); container.push_back(e.halfedge()); //it represents an active trapezoid } } @@ -2152,7 +2150,7 @@ private: // traits may be initialized later m_dag_root = new Dag_node(Td_active_trapezoid()); //(*m_dag_root)->set_dag_node(m_dag_root); - boost::apply_visitor(set_dag_node_visitor(m_dag_root), + std::visit(set_dag_node_visitor(m_dag_root), m_dag_root->get_data()); m_number_of_curves = 0; @@ -2200,11 +2198,11 @@ private: //{ // if ( traits->is_fictitious_vertex(item) ) // { - // res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))); + // res = traits->equal_curve_end_2_object()(ce, *(std::visit(curve_end_for_fict_vertex_visitor(),item))); // } // else // { - // res = traits->equal_curve_end_2_object()(ce, boost::apply_visitor(point_for_vertex_visitor(), item)); + // res = traits->equal_curve_end_2_object()(ce, std::visit(point_for_vertex_visitor(), item)); // } //} if (traits->is_td_trapezoid(item)) @@ -2218,11 +2216,11 @@ private: //{ // if ( traits->is_fictitious_vertex(item) ) // { - // res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))); + // res = traits->equal_curve_end_2_object()(ce, *(std::visit(curve_end_for_fict_vertex_visitor(),item))); // } // else // { - // res = traits->equal_curve_end_2_object()(ce, boost::apply_visitor(point_for_vertex_visitor(), item)); + // res = traits->equal_curve_end_2_object()(ce, std::visit(point_for_vertex_visitor(), item)); // } //} if (traits->is_td_trapezoid(item)) @@ -2234,7 +2232,7 @@ private: lt=POINT; else { - Td_active_trapezoid tr (boost::get(item)); + Td_active_trapezoid tr (std::get(item)); lt = tr.is_on_boundaries()? UNBOUNDED_TRAPEZOID : TRAPEZOID; } } @@ -2343,12 +2341,12 @@ private: // if the map item represents a fictitious vertex if (traits->is_fictitious_vertex(item)) { - const Curve_end left_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))); + const Curve_end left_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),item))); print_ce_data(left_ce.cv(), left_ce.ce(), out); } else // if the map item represents a vertex { - Point p = boost::apply_visitor(point_for_vertex_visitor(),item); + Point p = std::visit(point_for_vertex_visitor(),item); print_point_data(p, out); } out << " (void *)left_child: " << (void*)(&(curr.left_child())) @@ -2363,7 +2361,7 @@ private: { // bool is_active = traits->is_active(item); // if the map item represents an edge - const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), item)); + const X_monotone_curve_2& he_cv = *(std::visit(cv_for_edge_visitor(), item)); // so top() is a real Halfedge with a curve() if curr is active // or curr holds the curve if curr is not active diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h index 15c72e81945..9b0a7617114 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h @@ -52,7 +52,7 @@ split_trapezoid_by_vertex(Dag_node& split_node, Dag_node left_node, right_node; if (traits->is_td_trapezoid(curr_item)) { - Td_active_trapezoid& tr(boost::get(curr_item)); + Td_active_trapezoid& tr(std::get(curr_item)); CGAL_warning(traits->is_in_closure(tr, traits->vtx_to_ce(v))); @@ -63,9 +63,9 @@ split_trapezoid_by_vertex(Dag_node& split_node, (v, tr.right(), tr.bottom(), tr.top())); Td_active_trapezoid& - left_tr(boost::get(left_node.get_data())); + left_tr(std::get(left_node.get_data())); Td_active_trapezoid& - right_tr(boost::get(right_node.get_data())); + right_tr(std::get(right_node.get_data())); CGAL_warning(traits->is_trapezoids_top_equal(left_tr,right_tr)); CGAL_warning(traits->is_trapezoids_bottom_equal(left_tr,right_tr)); @@ -77,25 +77,25 @@ split_trapezoid_by_vertex(Dag_node& split_node, right_tr.init_neighbors(left_node.get_data(), left_node.get_data(), tr.rb(), tr.rt()); if (!traits->is_empty_item(tr.lb())) { - Td_active_trapezoid& lb(boost::get(tr.lb())); + Td_active_trapezoid& lb(std::get(tr.lb())); lb.set_rb(left_node.get_data()); } if (!traits->is_empty_item(tr.lt())) { - Td_active_trapezoid& lt(boost::get(tr.lt())); + Td_active_trapezoid& lt(std::get(tr.lt())); lt.set_rt(left_node.get_data()); } if (!traits->is_empty_item(tr.rb())) { - Td_active_trapezoid& rb(boost::get(tr.rb())); + Td_active_trapezoid& rb(std::get(tr.rb())); rb.set_lb(right_node.get_data()); } if (!traits->is_empty_item(tr.rt())) { - Td_active_trapezoid& rt(boost::get(tr.rt())); + Td_active_trapezoid& rt(std::get(tr.rt())); rt.set_lt(right_node.get_data()); } } else { // the curr_item is an edge - Td_active_edge& e(boost::get(curr_item)); + Td_active_edge& e(std::get(curr_item)); CGAL_warning(traits->is_in_closure(e, traits->vtx_to_ce(v))); @@ -103,13 +103,13 @@ split_trapezoid_by_vertex(Dag_node& split_node, right_node.set_data(Td_active_edge(e.halfedge())); - Td_active_edge& left_e(boost::get(left_node.get_data())); - Td_active_edge& right_e(boost::get(right_node.get_data())); + Td_active_edge& left_e(std::get(left_node.get_data())); + Td_active_edge& right_e(std::get(right_node.get_data())); //CGAL_warning(left_e.is_on_left_boundary() == e.is_on_left_boundary()); //CGAL_warning(right_e.is_on_right_boundary() == e.is_on_right_boundary()); - left_e.init_neighbors(boost::none); + left_e.init_neighbors(std::nullopt); //left_e.init_neighbors(e.lb(),e.lt(),Td_map_item(),right_node.get_data()); right_e.init_neighbors(e.next()); //right_e.init_neighbors(left_node.get_data(),left_node.get_data(),e.rb(),e.rt()); @@ -132,10 +132,10 @@ split_trapezoid_by_vertex(Dag_node& split_node, const Dag_node* left_ptr = &split_node.left_child(); const Dag_node* right_ptr = &split_node.right_child(); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)left_ptr), + std::visit(set_dag_node_visitor((Dag_node*)left_ptr), left_ptr->get_data()); //(*left_ptr)->set_dag_node((Dag_node*)left_ptr); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)right_ptr), + std::visit(set_dag_node_visitor((Dag_node*)right_ptr), right_ptr->get_data()); //(*right_ptr)->set_dag_node((Dag_node*)right_ptr); @@ -219,7 +219,7 @@ deactivate_trapezoid(Dag_node& trpz_node, Dag_node* active_node) const CGAL_precondition(traits->is_active(trpz_node.get_data())); CGAL_precondition(traits->is_td_trapezoid(trpz_node.get_data())); if (Td_active_trapezoid* trap = - boost::get(&trpz_node.get_data())) + std::get_if(&trpz_node.get_data())) trap->non_recursive_clear_neighbors(); trpz_node.set_data(Td_inactive_trapezoid()); if (active_node) trpz_node.set_left_child(*active_node); @@ -233,11 +233,11 @@ deactivate_vertex(Dag_node& vtx_node) const CGAL_precondition(traits->is_td_vertex(vtx_node.get_data())); if (traits->is_fictitious_vertex(vtx_node.get_data())) { Td_active_fictitious_vertex& - v(boost::get(vtx_node.get_data())); + v(std::get(vtx_node.get_data())); vtx_node.set_data(Td_inactive_fictitious_vertex(v.vertex(), &vtx_node)); } else { - Td_active_vertex& v(boost::get(vtx_node.get_data())); + Td_active_vertex& v(std::get(vtx_node.get_data())); vtx_node.set_data(Td_inactive_vertex(v.vertex(), &vtx_node)); } } @@ -274,7 +274,7 @@ split_trapezoid_by_halfedge(Dag_node& split_node, CGAL_precondition(traits->is_td_trapezoid(split_node.get_data())); Td_map_item curr_item(split_node.get_data()); - Td_active_trapezoid& split_tr = boost::get(curr_item); + Td_active_trapezoid& split_tr = std::get(curr_item); // sets left and right according to td_edge's source and target positions // sets bottom and top to Halfedge itself @@ -303,37 +303,37 @@ split_trapezoid_by_halfedge(Dag_node& split_node, // CGAL_TD_ON_BOTTOM_BOUNDARY ))); Td_active_trapezoid& bottom = - boost::get(bottom_node.get_data()); + std::get(bottom_node.get_data()); Td_active_trapezoid& top = - boost::get(top_node.get_data()); + std::get(top_node.get_data()); - top.init_neighbors(prev_top_tr, split_tr.lt(), boost::none , split_tr.rt()); + top.init_neighbors(prev_top_tr, split_tr.lt(), std::nullopt , split_tr.rt()); bottom.init_neighbors(split_tr.lb(), prev_bottom_tr, split_tr.rb(), - boost::none); + std::nullopt); if (!traits->is_empty_item(prev_bottom_tr)) { Td_active_trapezoid& - prev_btm(boost::get(prev_bottom_tr)); + prev_btm(std::get(prev_bottom_tr)); prev_btm.set_rt(bottom_node.get_data()); } if (!traits->is_empty_item(prev_top_tr)) { - Td_active_trapezoid& prev_top(boost::get(prev_top_tr)); + Td_active_trapezoid& prev_top(std::get(prev_top_tr)); prev_top.set_rb(top_node.get_data()); } if (!traits->is_empty_item(split_tr.lb())) { - Td_active_trapezoid& lb(boost::get(split_tr.lb())); + Td_active_trapezoid& lb(std::get(split_tr.lb())); lb.set_rb(bottom_node.get_data()); } if (!traits->is_empty_item(split_tr.lt())) { - Td_active_trapezoid& lt(boost::get(split_tr.lt())); + Td_active_trapezoid& lt(std::get(split_tr.lt())); lt.set_rt(top_node.get_data()); } if (!traits->is_empty_item(split_tr.rb())) { - Td_active_trapezoid& rb(boost::get(split_tr.rb())); + Td_active_trapezoid& rb(std::get(split_tr.rb())); rb.set_lb(bottom_node.get_data()); } if (!traits->is_empty_item(split_tr.rt())) { - Td_active_trapezoid& rt(boost::get(split_tr.rt())); + Td_active_trapezoid& rt(std::get(split_tr.rt())); rt.set_lt(top_node.get_data()); } split_node.replace(sep,bottom_node,top_node); //nodes depth are updated here @@ -348,14 +348,14 @@ split_trapezoid_by_halfedge(Dag_node& split_node, const Dag_node* bottomPtr = &split_node.left_child(); const Dag_node* topPtr = &split_node.right_child(); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)bottomPtr), + std::visit(set_dag_node_visitor((Dag_node*)bottomPtr), bottomPtr->get_data()); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)topPtr), + std::visit(set_dag_node_visitor((Dag_node*)topPtr), topPtr->get_data()); - // Td_active_edge& new_e = boost::get(split_node.get_data()); + // Td_active_edge& new_e = std::get(split_node.get_data()); if (!traits->is_empty_item(prev_e)) { - Td_active_edge& e( boost::get(prev_e)); + Td_active_edge& e( std::get(prev_e)); e.set_next(split_node.get_data()); } //update these trapezoids pointers. @@ -404,14 +404,14 @@ update_vtx_with_new_edge(Halfedge_const_handle he, //set cw to hold the halfedge whose source is p, // which is clockwise "smallest" starting from top (12 o'clock) - Halfedge_const_handle cw_he(boost::apply_visitor(cw_he_visitor(), vtx_item)); + Halfedge_const_handle cw_he(std::visit(cw_he_visitor(), vtx_item)); if (traits->compare_cw_around_point_2_object()(he->curve(), is_edge_to_right(he,p), cw_he->curve(), is_edge_to_right(cw_he,p), p) == SMALLER) { - boost::apply_visitor(set_cw_he_visitor(he),vtx_item);//v_tr->set_top(he); + std::visit(set_cw_he_visitor(he),vtx_item);//v_tr->set_top(he); } return vtx_item; @@ -430,7 +430,7 @@ insert_curve_at_vtx_using_dag(Halfedge_const_handle he, { CGAL_precondition(lt==TRAPEZOID || lt==UNBOUNDED_TRAPEZOID); - Dag_node* node = boost::apply_visitor(dag_node_visitor(), item); + Dag_node* node = std::visit(dag_node_visitor(), item); CGAL_assertion(node != nullptr); CGAL_assertion(he != m_empty_he_handle); @@ -458,13 +458,13 @@ insert_curve_at_vtx_using_dag(Halfedge_const_handle he, // CGAL_precondition(traits->is_td_vertex(vtx_item)); // CGAL_precondition(traits->is_active(vtx_item)); // -// Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), vtx_item)); +// Halfedge_const_handle cw_he (std::visit(cw_he_visitor(), vtx_item)); // // //make sure the cw_he is added in same direction as before // // such that vtx_item is the source (done inside the set methods) // if (cw_he == old_he || cw_he->twin() == old_he) // { -// boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item); +// std::visit(set_cw_he_visitor(new_he), vtx_item); // } //} @@ -479,12 +479,12 @@ update_vtx_cw_he_after_merge(const X_monotone_curve_2& old_cv, CGAL_precondition(traits->is_td_vertex(vtx_item)); CGAL_precondition(traits->is_active(vtx_item)); - Halfedge_const_handle cw_he(boost::apply_visitor(cw_he_visitor(), vtx_item)); + Halfedge_const_handle cw_he(std::visit(cw_he_visitor(), vtx_item)); //make sure the cw_he is added in same direction as before // such that v_tr is the source (done inside the set methods) if (traits->equal_2_object()(cw_he->curve(), old_cv)) - boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item); + std::visit(set_cw_he_visitor(new_he), vtx_item); } //----------------------------------------------------------------------------- @@ -499,12 +499,12 @@ update_vtx_cw_he_after_remove(Halfedge_const_handle old_he, CGAL_precondition(traits->is_td_vertex(vtx_item)); CGAL_precondition(traits->is_active(vtx_item)); - Halfedge_const_handle cw_he(boost::apply_visitor(cw_he_visitor(), vtx_item)); + Halfedge_const_handle cw_he(std::visit(cw_he_visitor(), vtx_item)); if ((old_he == cw_he) || (old_he->twin() == cw_he)) { Halfedge_const_handle new_he = cw_he->twin()->next(); if (new_he != cw_he) - boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item); - else boost::apply_visitor(reset_cw_he_visitor(), vtx_item); // dangling edge removed + std::visit(set_cw_he_visitor(new_he), vtx_item); + else std::visit(reset_cw_he_visitor(), vtx_item); // dangling edge removed } } @@ -520,20 +520,20 @@ update_vtx_cw_he_after_remove(Halfedge_const_handle old_he, // CGAL_precondition(traits->is_td_vertex(vtx_item)); // CGAL_precondition(traits->is_active(vtx_item)); // -// Halfedge_const_handle top_he (boost::apply_visitor(top_he_visitor(), vtx_item)); -// Halfedge_const_handle bottom_he (boost::apply_visitor(bottom_he_visitor(), vtx_item)); +// Halfedge_const_handle top_he (std::visit(top_he_visitor(), vtx_item)); +// Halfedge_const_handle bottom_he (std::visit(bottom_he_visitor(), vtx_item)); // // //make sure the top & bottom are added in same direction as before // // such that sep is the source (done inside the set methods) // if ((top_he == he1) || (top_he == he1->twin()) || // (top_he == he2) || (top_he == he2->twin()) ) // { -// boost::apply_visitor(set_top_he_visitor(new_he), vtx_item); //v_tr.set_top(new_he); +// std::visit(set_top_he_visitor(new_he), vtx_item); //v_tr.set_top(new_he); // } // if ((bottom_he == he1) || (bottom_he == he1->twin()) || // (bottom_he == he2) || (bottom_he == he2->twin()) ) // { -// boost::apply_visitor(set_bottom_he_visitor(new_he), vtx_item); //v_tr.set_bottom(new_he); +// std::visit(set_bottom_he_visitor(new_he), vtx_item); //v_tr.set_bottom(new_he); // } //} @@ -561,22 +561,22 @@ update_map_items_after_merge(In_face_iterator& it, CGAL_assertion(traits->is_active(curr_item)); if (traits->is_td_edge(curr_item)) { - Td_active_edge& e(boost::get(curr_item)); + Td_active_edge& e(std::get(curr_item)); if (e.halfedge() == old_he || e.halfedge() == old_he->twin()) e.set_halfedge(new_he); } else if (traits->is_td_trapezoid(curr_item)) { - Td_active_trapezoid& tr(boost::get(curr_item)); + Td_active_trapezoid& tr(std::get(curr_item)); if (tr.bottom() == old_he || tr.bottom() == old_he->twin()) tr.set_bottom(new_he); if (tr.top() == old_he || tr.top() == old_he->twin()) tr.set_top(new_he); } else { //if is_td_vertex - Halfedge_const_handle cw_he(boost::apply_visitor(cw_he_visitor(), + Halfedge_const_handle cw_he(std::visit(cw_he_visitor(), curr_item)); if (cw_he == old_he || cw_he == old_he->twin()) - boost::apply_visitor(set_cw_he_visitor(new_he), curr_item); + std::visit(set_cw_he_visitor(new_he), curr_item); } last_item = *it; @@ -615,20 +615,20 @@ search_using_dag(Dag_node& curr_node, if (traits->is_td_vertex(curr_item)) { // the curr_item represents a vertex //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item); - //if ((is_fict_vtx && is_end_point_left_low(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) || - // (!is_fict_vtx && is_end_point_left_low(p, boost::apply_visitor(point_for_vertex_visitor(), curr_item))) ) + //if ((is_fict_vtx && is_end_point_left_low(p, *(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)))) || + // (!is_fict_vtx && is_end_point_left_low(p, std::visit(point_for_vertex_visitor(), curr_item))) ) if (is_end_point_left_low(p, curr_node)) { curr_node = curr_node.left_child(); continue; } - //else if ((is_fict_vtx && is_end_point_right_top(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) || - // (!is_fict_vtx && is_end_point_right_top(p, boost::apply_visitor(point_for_vertex_visitor(), curr_item))) ) + //else if ((is_fict_vtx && is_end_point_right_top(p, *(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)))) || + // (!is_fict_vtx && is_end_point_right_top(p, std::visit(point_for_vertex_visitor(), curr_item))) ) else if (is_end_point_right_top(p, curr_node)) { curr_node = curr_node.right_child(); continue; } - //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || - // (!is_fict_vtx && traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) ) + //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || + // (!is_fict_vtx && traits->equal_2_object()(std::visit(point_for_vertex_visitor(), curr_item), p)) ) else if (are_equal_end_points(p, curr_node)) { if (he == m_empty_he_handle) { // he is the empty handle @@ -663,13 +663,13 @@ search_using_dag(Dag_node& curr_node, are_equal_end_points(p,curr_node)); //(is_fict_vtx && - // (is_end_point_left_low(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // is_end_point_right_top(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),p))) || + // (is_end_point_left_low(p,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // is_end_point_right_top(p,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)),p))) || // (!is_fict_vtx && - // (is_end_point_left_low(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // is_end_point_right_top(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),p)))); + // (is_end_point_left_low(p,std::visit(point_for_vertex_visitor(), curr_item)) || + // is_end_point_right_top(p,std::visit(point_for_vertex_visitor(), curr_item)) || + // traits->equal_2_object()(std::visit(point_for_vertex_visitor(), curr_item),p)))); return Locate_type(); } @@ -678,7 +678,7 @@ search_using_dag(Dag_node& curr_node, // curr_item represents an edge, // so top() is a real Halfedge with a curve() if curr_item is active // or curr_item holds the curve if it is not active - const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item)); + const X_monotone_curve_2& he_cv = *(std::visit(cv_for_edge_visitor(), curr_item)); Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv); if (cres == SMALLER) { @@ -753,7 +753,7 @@ search_using_dag(Dag_node& curr_node, else { // if is_degenerate() == 0, meaning: curr_item is a real trapezoid if (traits->is_active(curr_item)) { - Td_active_trapezoid& tr = boost::get(curr_item); + Td_active_trapezoid& tr = std::get(curr_item); return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID; } curr_node = curr_node.left_child(); @@ -810,30 +810,30 @@ search_using_dag(Dag_node& curr_node, // bool is_fict_vtx = traits->is_fictitious_vertex(curr_item); // if (is_fict_vtx) // { -// Curve_end vtx_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))); +// Curve_end vtx_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))); // print_ce_data(vtx_ce.cv(), vtx_ce.ce(), out); // } // else // { -// print_point_data(boost::apply_visitor(point_for_vertex_visitor(),curr_item), out); +// print_point_data(std::visit(point_for_vertex_visitor(),curr_item), out); // } // -// if ((is_fict_vtx && is_end_point_left_low(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) || -// (!is_fict_vtx && is_end_point_left_low(p, boost::apply_visitor(point_for_vertex_visitor(),curr_item))) ) +// if ((is_fict_vtx && is_end_point_left_low(p, *(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)))) || +// (!is_fict_vtx && is_end_point_left_low(p, std::visit(point_for_vertex_visitor(),curr_item))) ) // { // out << " Going left " << std::endl; // curr_node = curr_node.left_child(); // continue; // } -// else if ((is_fict_vtx && is_end_point_right_top(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) || -// (!is_fict_vtx && is_end_point_right_top(p, boost::apply_visitor(point_for_vertex_visitor(),curr_item))) ) +// else if ((is_fict_vtx && is_end_point_right_top(p, *(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)))) || +// (!is_fict_vtx && is_end_point_right_top(p, std::visit(point_for_vertex_visitor(),curr_item))) ) // { // out << " Going right " << std::endl; // curr_node = curr_node.right_child(); // continue; // } -// else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || -// (!is_fict_vtx && traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(),curr_item), p)) ) +// else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || +// (!is_fict_vtx && traits->equal_2_object()(std::visit(point_for_vertex_visitor(),curr_item), p)) ) // { // out << " Equal to query " << std::endl; // if (he == m_empty_he_handle) //if he is the empty handle @@ -876,7 +876,7 @@ search_using_dag(Dag_node& curr_node, // // if curr_item represents an edge, // // so top() is a real Halfedge with a curve() if curr_item is active // // or curr_item holds the curve if it is not active -// const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item)); +// const X_monotone_curve_2& he_cv = *(std::visit(cv_for_edge_visitor(), curr_item)); // // out << " EDGE : " ; // if (traits->is_active(curr_item)) @@ -951,7 +951,7 @@ search_using_dag(Dag_node& curr_node, // if (traits->is_active(curr_item)) // { // out << " (active) "; -// Td_active_trapezoid tr = boost::get(curr_item); +// Td_active_trapezoid tr = std::get(curr_item); // if (tr.is_on_boundaries()) // out << " UNBOUNDED! "; // else @@ -1023,20 +1023,20 @@ search_using_dag_with_cv(Dag_node& curr_node, if (traits->is_td_vertex(curr_item)) { // the curr_item represents a vertex //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item); - //if ((is_fict_vtx && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || - // (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) ) + //if ((is_fict_vtx && is_end_point_right_top(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || + // (!is_fict_vtx && is_end_point_right_top(std::visit(point_for_vertex_visitor(), curr_item), ce)) ) if (is_end_point_left_low(ce, curr_node)) { curr_node = curr_node.left_child(); continue; } - //else if ((is_fict_vtx && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || - // (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) ) + //else if ((is_fict_vtx && is_end_point_left_low(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || + // (!is_fict_vtx && is_end_point_left_low(std::visit(point_for_vertex_visitor(), curr_item), ce)) ) else if (is_end_point_right_top(ce, curr_node)) { curr_node = curr_node.right_child(); continue; } - //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || - // (!is_fict_vtx && traits->equal_curve_end_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) ) + //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || + // (!is_fict_vtx && traits->equal_curve_end_2_object()(std::visit(point_for_vertex_visitor(), curr_item), ce)) ) else if (are_equal_end_points(ce, curr_node)) { if (!p_cv) { // p_cv was not given @@ -1070,13 +1070,13 @@ search_using_dag_with_cv(Dag_node& curr_node, is_end_point_right_top(ce, curr_node) || are_equal_end_points(ce, curr_node)); //(is_fict_vtx && - // (is_end_point_left_low(ce,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // is_end_point_right_top(ce,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),ce))) || + // (is_end_point_left_low(ce,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // is_end_point_right_top(ce,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)),ce))) || // (!is_fict_vtx && - // (is_end_point_left_low(ce,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // is_end_point_right_top(ce,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // traits->equal_curve_end_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),ce)))); + // (is_end_point_left_low(ce,std::visit(point_for_vertex_visitor(), curr_item)) || + // is_end_point_right_top(ce,std::visit(point_for_vertex_visitor(), curr_item)) || + // traits->equal_curve_end_2_object()(std::visit(point_for_vertex_visitor(), curr_item),ce)))); return Locate_type(); } } @@ -1086,7 +1086,7 @@ search_using_dag_with_cv(Dag_node& curr_node, // or curr_item holds the curve if it is not active const X_monotone_curve_2& he_cv = - *(boost::apply_visitor(cv_for_edge_visitor(), curr_item)); + *(std::visit(cv_for_edge_visitor(), curr_item)); Comparison_result cres = traits->compare_curve_end_y_at_x_2_object()(ce, he_cv); if (cres == SMALLER) { @@ -1174,7 +1174,7 @@ search_using_dag_with_cv(Dag_node& curr_node, else { // if is_degenerate() == 0, meaning: curr_item is a real trapezoid if (traits->is_active(curr_item)) { - Td_active_trapezoid& tr = boost::get(curr_item); + Td_active_trapezoid& tr = std::get(curr_item); return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID; } curr_node = curr_node.left_child(); @@ -1213,20 +1213,20 @@ search_using_dag_with_cv(Dag_node& curr_node, if (traits->is_td_vertex(curr_item)) { // the curr_item represents a vertex //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item); - //if ((is_fict_vtx && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || - // (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) ) + //if ((is_fict_vtx && is_end_point_right_top(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || + // (!is_fict_vtx && is_end_point_right_top(std::visit(point_for_vertex_visitor(), curr_item), p)) ) if (is_end_point_left_low(p, curr_node)) { curr_node = curr_node.left_child(); continue; } - //else if ((is_fict_vtx && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || - // (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) ) + //else if ((is_fict_vtx && is_end_point_left_low(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || + // (!is_fict_vtx && is_end_point_left_low(std::visit(point_for_vertex_visitor(), curr_item), p)) ) else if (is_end_point_right_top(p, curr_node)) { curr_node = curr_node.right_child(); continue; } - //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || - // (!is_fict_vtx && traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) ) + //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || + // (!is_fict_vtx && traits->equal_2_object()(std::visit(point_for_vertex_visitor(), curr_item), p)) ) else if (are_equal_end_points(p, curr_node)) { if (!p_cv) { // p_cv was not given @@ -1260,13 +1260,13 @@ search_using_dag_with_cv(Dag_node& curr_node, is_end_point_right_top(p, curr_node) || are_equal_end_points(p, curr_node)); //CGAL_assertion((is_fict_vtx && - // (is_end_point_left_low(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // is_end_point_right_top(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),p))) || + // (is_end_point_left_low(p,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // is_end_point_right_top(p,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)),p))) || // (!is_fict_vtx && - // (is_end_point_left_low(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // is_end_point_right_top(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),p)))); + // (is_end_point_left_low(p,std::visit(point_for_vertex_visitor(), curr_item)) || + // is_end_point_right_top(p,std::visit(point_for_vertex_visitor(), curr_item)) || + // traits->equal_2_object()(std::visit(point_for_vertex_visitor(), curr_item),p)))); return Locate_type(); } } @@ -1275,7 +1275,7 @@ search_using_dag_with_cv(Dag_node& curr_node, // so top() is a real Halfedge with a curve() if curr_item is active // or curr_item holds the curve if it is not active const X_monotone_curve_2& he_cv = - *(boost::apply_visitor(cv_for_edge_visitor(), curr_item)); + *(std::visit(cv_for_edge_visitor(), curr_item)); Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv); if (cres == SMALLER) { curr_node = curr_node.left_child(); @@ -1351,7 +1351,7 @@ search_using_dag_with_cv(Dag_node& curr_node, else { // is_degenerate() == 0, meaning: curr_item is a real trapezoid if (traits->is_active(curr_item)) { - Td_active_trapezoid& tr = boost::get(curr_item); + Td_active_trapezoid& tr = std::get(curr_item); return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID; } curr_node = curr_node.left_child(); @@ -1377,7 +1377,7 @@ container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const CGAL_assertion(traits->is_active(item)); CGAL_assertion(traits->is_td_trapezoid(item)); Dag_node& tr_node( ar.find(d)->second); - Td_active_trapezoid& tr(boost::get(tr_node.get_data())); + Td_active_trapezoid& tr(std::get(tr_node.get_data())); Vertex_const_handle v = tr.right(); Curve_end ce(traits->vtx_to_ce(v)); @@ -1397,15 +1397,15 @@ container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const } num_of_new_nodes++; - boost::apply_visitor(set_dag_node_visitor((Dag_node*)&(curr_node.left_child())), curr_node.left_child().get_data()); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)&(curr_node.right_child())), curr_node.right_child().get_data()); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)&curr_node), + std::visit(set_dag_node_visitor((Dag_node*)&(curr_node.left_child())), curr_node.left_child().get_data()); + std::visit(set_dag_node_visitor((Dag_node*)&(curr_node.right_child())), curr_node.right_child().get_data()); + std::visit(set_dag_node_visitor((Dag_node*)&curr_node), curr_node.get_data()); //curr_node.left_child()->set_dag_node(&curr_node.left_child()); //curr_node.right_child()->set_dag_node(&curr_node.right_child()); //curr_node->set_dag_node(&curr_node);// fake temporary node deactivate_vertex(curr_node); //curr_node->remove(); // mark as deleted - boost::apply_visitor(set_dag_node_visitor((Dag_node*)nullptr), + std::visit(set_dag_node_visitor((Dag_node*)nullptr), curr_node.get_data());//curr_node->set_dag_node(0); return curr_node; @@ -1423,7 +1423,7 @@ is_last_edge(Halfedge_const_handle /* he */ , Td_map_item& vtx_item) CGAL_precondition(traits->is_active(vtx_item)); Vertex_const_handle - v(boost::apply_visitor(vertex_for_active_vertex_visitor(), vtx_item)); + v(std::visit(vertex_for_active_vertex_visitor(), vtx_item)); typename Arrangement_on_surface_2::Halfedge_around_vertex_const_circulator first, second; @@ -1518,13 +1518,13 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) // locate and insert end points of the input halfedge to the Td_map_item // Dag if needed - Dag_node p1_node(*(boost::apply_visitor(dag_node_visitor(), p1_item))); - //Dag_node p2_node(*(boost::apply_visitor(dag_node_visitor(), p2_item)));// Not in use + Dag_node p1_node(*(std::visit(dag_node_visitor(), p1_item))); + //Dag_node p2_node(*(std::visit(dag_node_visitor(), p2_item)));// Not in use // create the Td_map_item iterator for traveling along the Trapezoids that // intersect the input Halfedge, using left-low to right-high order In_face_iterator it = follow_curve(p1_node,he,LARGER); - boost::optional curr_trp = boost::none; + std::optional curr_trp = std::nullopt; Td_map_item prev = p1_item; Td_map_item prev_bottom_tr = Td_map_item(0); //active_tr Td_map_item prev_top_tr = Td_map_item(0); //active_tr @@ -1539,7 +1539,7 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) while(!!it) { //this means as long as the iterator is valid curr_trp = it.trp(); - CGAL_assertion(curr_trp != boost::none); + CGAL_assertion(curr_trp != std::nullopt); prev_bottom_tr = (*curr_trp).lb(); prev_top_tr = (*curr_trp).lt(); @@ -1568,7 +1568,7 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) traits->is_active(new_btm_item)); if (merge_if_possible(prev_bottom_tr, new_btm_item)) { Dag_node* left_child_node = - boost::apply_visitor(dag_node_visitor(),prev_bottom_tr); + std::visit(dag_node_visitor(),prev_bottom_tr); node->set_left_child(*left_child_node); old_bottom_tr = prev_bottom_tr; m_number_of_dag_nodes--; //update number of nodes in the DAG after merge @@ -1581,7 +1581,7 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) CGAL_assertion(traits->is_td_trapezoid(new_top_item) && traits->is_active(new_top_item)); if (merge_if_possible(prev_top_tr, new_top_item)) { - Dag_node* right_child_node = boost::apply_visitor(dag_node_visitor(), + Dag_node* right_child_node = std::visit(dag_node_visitor(), prev_top_tr); node->set_right_child(*right_child_node); old_top_tr = prev_top_tr; @@ -1654,12 +1654,12 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) if (lt1 != POINT || lt2 != POINT) return; - CGAL_warning(boost::apply_visitor(dag_node_visitor(), p1_item) != nullptr); - CGAL_warning(boost::apply_visitor(dag_node_visitor(), p2_item) != nullptr); + CGAL_warning(std::visit(dag_node_visitor(), p1_item) != nullptr); + CGAL_warning(std::visit(dag_node_visitor(), p2_item) != nullptr); //retrieve the Dag_nodes of the two point-degenerate trapezoid - Dag_node& p1_node = *(boost::apply_visitor(dag_node_visitor(), p1_item)); - Dag_node& p2_node = *(boost::apply_visitor(dag_node_visitor(), p2_item)); + Dag_node& p1_node = *(std::visit(dag_node_visitor(), p1_item)); + Dag_node& p2_node = *(std::visit(dag_node_visitor(), p2_item)); //calculate the immediate lower, central and upper neighborhood of // the curve in the data structure @@ -1725,7 +1725,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //copy trapezoid data from btm and top trapezoids Dag_node& new_node = (new_array.find(sz))->second; ++sz; - Td_active_trapezoid& tr(boost::get(new_node.get_data())); + Td_active_trapezoid& tr(std::get(new_node.get_data())); tr.set_dag_node(&new_node); tr.set_lb(btm_it_tr.lb()); tr.set_lt(top_it_tr.lt()); @@ -1741,13 +1741,13 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) } if (!traits->is_empty_item(tr.lb())) { Td_map_item lb_item = tr.lb(); - Td_active_trapezoid& lb_tr(boost::get(lb_item)); + Td_active_trapezoid& lb_tr(std::get(lb_item)); lb_tr.set_rb(new_node.get_data()); } if (!traits->is_empty_item(tr.lt())) { Td_map_item lt_item = tr.lt(); - Td_active_trapezoid& lt_tr(boost::get(lt_item)); + Td_active_trapezoid& lt_tr(std::get(lt_item)); lt_tr.set_rt(new_node.get_data()); } @@ -1769,23 +1769,23 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) if (!btm_it || (inc_btm && !traits->is_trpz_bottom_equal(old_tr_item, *curr_it))) { - Td_map_item rb(boost::apply_visitor(rb_visitor(), old_tr_item)); + Td_map_item rb(std::visit(rb_visitor(), old_tr_item)); if (!traits->is_empty_item(rb)) { - boost::apply_visitor(set_lb_visitor(last_new_tr_item), rb); + std::visit(set_lb_visitor(last_new_tr_item), rb); //rb->set_lb(last_new_tr); - boost::apply_visitor(set_rb_visitor(rb), last_new_tr_item); + std::visit(set_rb_visitor(rb), last_new_tr_item); //last_new_tr->set_rb(rb); } } if (!top_it || (!inc_btm && !traits->is_trpz_top_equal(old_tr_item,*curr_it))) { - Td_map_item rt(boost::apply_visitor(rt_visitor(), old_tr_item)); + Td_map_item rt(std::visit(rt_visitor(), old_tr_item)); if (!traits->is_empty_item(rt)) { - boost::apply_visitor(set_lt_visitor(last_new_tr_item), rt); + std::visit(set_lt_visitor(last_new_tr_item), rt); //rt->set_lt(last_new_tr); - boost::apply_visitor(set_rt_visitor(rt), last_new_tr_item); + std::visit(set_rt_visitor(rt), last_new_tr_item); //last_new_tr->set_rt(rt); } } @@ -1793,7 +1793,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //set the no longer relevant trapezoids as removed and add the new nodes // as their replacement - Dag_node* last_tr_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* last_tr_node(std::visit(dag_node_visitor(), last_tr_item)); if (prev_inc_btm != inc_btm) { @@ -1827,7 +1827,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) // update the dag node pointer in the trapezoid const Dag_node* real = &last_tr_node->left_child(); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real); + std::visit(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real); } while(!end_reached); @@ -1853,18 +1853,18 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) m_number_of_dag_nodes += num_of_new_nodes; //new node (tmp) was added const Dag_node* real = &tr.dag_node()->left_child(); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real); + std::visit(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real); if (!traits->is_empty_item(rb)) { - boost::apply_visitor(set_rb_visitor(rb),last_new_tr_item); + std::visit(set_rb_visitor(rb),last_new_tr_item); //last_new_tr->set_rb(rb); - boost::apply_visitor(set_lb_visitor(last_new_tr_item),rb); + std::visit(set_lb_visitor(last_new_tr_item),rb); //rb->set_lb(last_new_tr); } if (!traits->is_empty_item(rt)) { - boost::apply_visitor(set_rt_visitor(rt),last_new_tr_item); + std::visit(set_rt_visitor(rt),last_new_tr_item); //last_new_tr->set_rt(rt); - boost::apply_visitor(set_lt_visitor(last_new_tr_item),rt); + std::visit(set_lt_visitor(last_new_tr_item),rt); //rt->set_lt(last_new_tr); } @@ -1876,7 +1876,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //Base_trapezoid_iterator last_mid = mid_it; Dag_node* e_node = nullptr; while (!!++mid_it) { - e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it); + e_node = std::visit(dag_node_visitor(),*last_edge_fragment_it); deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove(); last_edge_fragment_it = mid_it; } @@ -1885,7 +1885,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //4. remove adjacency at right end point //remove the final trapezoid representing the removed halfedge - e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it); + e_node = std::visit(dag_node_visitor(),*last_edge_fragment_it); deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove(); //----------------------------------- @@ -1945,7 +1945,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, p x------x */ - Td_active_trapezoid& tr(boost::get(item)); + Td_active_trapezoid& tr(std::get(item)); if ((up_direction && !tr.is_on_right_boundary() && (traits->compare_curve_end_x_2_object() @@ -2637,9 +2637,9 @@ merge_edge(Halfedge_const_handle he1, Td_map_item mrgp_item = locate(ce, lt); //varifying that all trapezoids are not nullptr and are of type POINT - CGAL_warning(boost::apply_visitor(dag_node_visitor(), leftp_item) != nullptr); - CGAL_warning(boost::apply_visitor(dag_node_visitor(), rightp_item)!= nullptr); - CGAL_warning(boost::apply_visitor(dag_node_visitor(), mrgp_item) != nullptr); + CGAL_warning(std::visit(dag_node_visitor(), leftp_item) != nullptr); + CGAL_warning(std::visit(dag_node_visitor(), rightp_item)!= nullptr); + CGAL_warning(std::visit(dag_node_visitor(), mrgp_item) != nullptr); //define the left curve and the right curve, according // to the common point (that is merged) @@ -2679,8 +2679,8 @@ merge_edge(Halfedge_const_handle he1, #endif //get the nodes of leftmost point and merge point - Dag_node& leftp_node = *(boost::apply_visitor(dag_node_visitor(), leftp_item)); - Dag_node& mrgp_node = *(boost::apply_visitor(dag_node_visitor(), mrgp_item)); + Dag_node& leftp_node = *(std::visit(dag_node_visitor(), leftp_item)); + Dag_node& mrgp_node = *(std::visit(dag_node_visitor(), mrgp_item)); //set iterators for below left curve, on left curve & above left curve In_face_iterator @@ -2760,15 +2760,15 @@ merge_edge(Halfedge_const_handle he1, merge_if_possible(below_cv_left, below_cv_right); // mark older trapezoids as inactive - nodes depth are updated here - Dag_node* above_cv_right_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* above_cv_right_node(std::visit(dag_node_visitor(), above_cv_right)); - Dag_node* above_cv_left_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* above_cv_left_node(std::visit(dag_node_visitor(), above_cv_left)); deactivate_trapezoid( *above_cv_right_node, above_cv_left_node); //above_cv_right->remove(above_cv_left->dag_node()); - Dag_node* below_cv_right_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* below_cv_right_node(std::visit(dag_node_visitor(), below_cv_right)); - Dag_node* below_cv_left_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* below_cv_left_node(std::visit(dag_node_visitor(), below_cv_left)); deactivate_trapezoid( *below_cv_right_node, below_cv_left_node); //below_cv_right->remove(below_cv_left->dag_node()); @@ -2788,7 +2788,7 @@ merge_edge(Halfedge_const_handle he1, CGAL_assertion(traits->is_td_edge(on_cv_left) && traits->is_active(on_cv_left)); - Td_active_edge& e_left(boost::get(on_cv_left)); + Td_active_edge& e_left(std::get(on_cv_left)); e_left.set_next(on_cv_right); CGAL_assertion(traits->is_td_edge(on_cv_right) && @@ -2830,17 +2830,17 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node, if (!minus_inf && !plus_inf) { Td_map_item min_node_item(min_node.get_data()); if (traits->is_fictitious_vertex(min_node_item)) { - const Curve_end min_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),min_node_item))); + const Curve_end min_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),min_node_item))); Td_map_item max_node_item(max_node.get_data()); if (traits->is_fictitious_vertex(max_node_item)) { - const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item))); + const Curve_end max_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),max_node_item))); //min-fict, max-fict if (!is_end_point_left_low(min_ce, max_ce)) return 0; } else { - const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(), + const Point& max_p(std::visit(point_for_vertex_visitor(), max_node_item)); //min-fict, max-pt @@ -2849,18 +2849,18 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node, } } else { - const Point& min_p(boost::apply_visitor(point_for_vertex_visitor(), + const Point& min_p(std::visit(point_for_vertex_visitor(), min_node_item)); Td_map_item max_node_item(max_node.get_data()); if (traits->is_fictitious_vertex(max_node_item)) { - const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item))); + const Curve_end max_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),max_node_item))); //min-pt, max-fict if (!is_end_point_left_low(min_p, max_ce)) return 0; } else { - const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(), + const Point& max_p(std::visit(point_for_vertex_visitor(), max_node_item)); //min-pt, max-pt @@ -2893,19 +2893,19 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node, if (!minus_inf) { Td_map_item min_node_item(min_node.get_data()); if (traits->is_fictitious_vertex(min_node_item)) { - const Curve_end min_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),min_node_item))); + const Curve_end min_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),min_node_item))); //if smaller than the point represented by min_node - //if ((is_fict_vtx && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), min_ce)) || - // (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), min_ce) )) + //if ((is_fict_vtx && is_end_point_left_low(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), min_ce)) || + // (!is_fict_vtx && is_end_point_left_low(std::visit(point_for_vertex_visitor(), curr_item), min_ce) )) if (is_end_point_right_top(min_ce, node)) { new_min_node = min_node; } } else { - const Point& min_p(boost::apply_visitor(point_for_vertex_visitor(),min_node_item)); + const Point& min_p(std::visit(point_for_vertex_visitor(),min_node_item)); //if smaller than the point represented by min_node - //if ((is_fict_vtx && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), min_p)) || - // (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), min_p) )) + //if ((is_fict_vtx && is_end_point_left_low(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), min_p)) || + // (!is_fict_vtx && is_end_point_left_low(std::visit(point_for_vertex_visitor(), curr_item), min_p) )) if (is_end_point_right_top(min_p, node)) { new_min_node = min_node; } @@ -2917,21 +2917,21 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node, if (!plus_inf) { Td_map_item max_node_item(max_node.get_data()); if (traits->is_fictitious_vertex(max_node_item)) { - const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item))); + const Curve_end max_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),max_node_item))); //if larger than the point represented by max_node - //if ((is_fict_vtx && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), max_ce)) || - // (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), max_ce) )) + //if ((is_fict_vtx && is_end_point_right_top(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), max_ce)) || + // (!is_fict_vtx && is_end_point_right_top(std::visit(point_for_vertex_visitor(), curr_item), max_ce) )) if (is_end_point_left_low(max_ce, node)) { new_max_node = max_node; } } else { - const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(), + const Point& max_p(std::visit(point_for_vertex_visitor(), max_node_item)); //if smaller than the point represented by min_node - //if ((is_fict_vtx && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), max_p)) || - // (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), max_p) )) + //if ((is_fict_vtx && is_end_point_right_top(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), max_p)) || + // (!is_fict_vtx && is_end_point_right_top(std::visit(point_for_vertex_visitor(), curr_item), max_p) )) if (is_end_point_left_low(max_p, node)) { new_max_node = max_node; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location_result.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location_result.h index 1fae9de1d30..50aa748ba72 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location_result.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location_result.h @@ -15,41 +15,10 @@ #include #include +#include -// The macro CGAL_ARR_POINT_LOCATION_VERSION controls which version of the -// point location is used. Currently two values are supported: -// 1. Point location with CGAL::Object -// 2. Point location with boost::optional > -// The default value is 2. - -#if !defined(CGAL_ARR_POINT_LOCATION_VERSION) -#define CGAL_ARR_POINT_LOCATION_VERSION 2 -#endif - -#include - -#include -#include - -#ifdef CGAL_CFG_BOOST_VARIANT_SWAP_BUG -#if CGAL_ARR_POINT_LOCATION_VERSION > 1 -#include -// workaround for this bug: -// https://svn.boost.org/trac/boost/ticket/2839 -namespace boost{ namespace detail { namespace variant { - -template -inline void move_swap( - ::CGAL::I_Filtered_const_iterator& lhs, - ::CGAL::I_Filtered_const_iterator& rhs) -{ - ::CGAL::I_Filtered_const_iterator tmp( boost::detail::variant::move(lhs) ); - lhs = boost::detail::variant::move(rhs); - rhs = boost::detail::variant::move(tmp); -} -} } } -#endif -#endif +#include +#include namespace CGAL { @@ -61,46 +30,27 @@ struct Arr_point_location_result { typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle; -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 - typedef CGAL::Object Type; -#else - typedef typename boost::variant Type; -#endif typedef Type type; - // This function returns either make_object() or a result_type constructor - // to generate return values. The Object version takes a dummy template - // argument, which is needed for the return of the other option, e.g., - // boost::optional >. + // This function returns a result_type constructor + // to generate return values. // In theory a one parameter variant could be returned, but this _could_ // lead to conversion overhead, and so we rather go for the real type. // Overloads for empty returns are also provided. -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 - template - static - inline Type make_result(T t) { return CGAL::make_object(t); } - - static - inline CGAL::Object empty_optional_result() { return CGAL::Object(); } - - template - static - inline const T* assign(const Type* obj) { return CGAL::object_cast(obj); } -#else template static inline Type make_result(T t) { return Type(t); } static - inline boost::optional empty_optional_result() - { return boost::optional(); } + inline std::optional empty_optional_result() + { return std::optional(); } template static - inline const T* assign(const Type* obj) { return boost::get(obj); } -#endif // CGAL_ARR_POINT_LOCATION_VERSION < 2 + inline const T* assign(const Type* obj) { return std::get_if(obj); } //this one is only to remove warnings in functions static 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/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h index db9b12395f9..488ed21dea7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -185,9 +185,9 @@ public: OutputIterator operator_impl(const Curve_2& cv, OutputIterator oi, Arr_all_sides_oblivious_tag) const { - typedef boost::variant + typedef std::variant Make_x_monotone_subresult; - typedef boost::variant + typedef std::variant Make_x_monotone_result; // If the polycurve is empty, return. @@ -212,7 +212,7 @@ public: for (auto its = cv.subcurves_begin(); its != cv.subcurves_end(); ++its) make_seg_x_monotone(*its, std::back_inserter(x_seg_objects)); auto it = x_seg_objects.begin(); - const auto* x_seg_p = boost::get(&(*it)); + const auto* x_seg_p = std::get_if(&(*it)); #if ! defined (CGAL_NO_ASSERTIONS) CGAL_assertion(x_seg_p != nullptr); #endif @@ -260,7 +260,7 @@ public: #endif for (++it; it != x_seg_objects.end(); ++it) { - const auto* x_seg_p = boost::get(&(*it)); + const auto* x_seg_p = std::get_if(&(*it)); #if ! defined (CGAL_NO_ASSERTIONS) CGAL_assertion(x_seg_p != nullptr); #endif @@ -318,9 +318,9 @@ public: OutputIterator operator_impl(const Curve_2& cv, OutputIterator oi, Arr_not_all_sides_oblivious_tag) const { - typedef boost::variant + typedef std::variant Make_x_monotone_subresult; - typedef boost::variant + typedef std::variant Make_x_monotone_result; // If the polycurve is empty, return. @@ -350,7 +350,7 @@ public: for (auto its = cv.subcurves_begin(); its != cv.subcurves_end(); ++its) make_seg_x_monotone(*its, std::back_inserter(x_seg_objects)); auto it = x_seg_objects.begin(); - const auto* x_seg_p = boost::get(&(*it)); + const auto* x_seg_p = std::get_if(&(*it)); #if ! defined (CGAL_NO_ASSERTIONS) CGAL_assertion(x_seg_p != nullptr); #endif @@ -398,7 +398,7 @@ public: #endif for (++it; it != x_seg_objects.end(); ++it) { - const auto* x_seg_p = boost::get(&(*it)); + const auto* x_seg_p = std::get_if(&(*it)); #if ! defined (CGAL_NO_ASSERTIONS) CGAL_assertion(x_seg_p != nullptr); #endif @@ -696,10 +696,9 @@ public: OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_base_result; - typedef boost::variant - Intersection_result; + const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); auto cmp_y_at_x = m_poly_traits.compare_y_at_x_2_object(); @@ -744,7 +743,7 @@ public: // cv1's right endpoint equals cv2's left endpoint // Thus we can return this single(!) intersection point Intersection_point p(max_vertex(cv1[i1]), 0); - *oi++ = Intersection_result(p); + *oi++ = p; return oi; } dir1 == SMALLER ? @@ -767,7 +766,7 @@ public: // cv2's right endpoint equals cv1's left endpoint // Thus we can return this single(!) intersection point Intersection_point p(max_vertex(cv2[i2]), 0); - *oi++ = Intersection_result(p); + *oi++ = p; return oi; } @@ -824,7 +823,7 @@ public: intersect(cv1[i1], cv2[i2], std::back_inserter(xections)); for (const auto& xection : xections) { const X_monotone_subcurve_2* subcv_p = - boost::get(&xection); + std::get_if(&xection); if (subcv_p != nullptr) { ocv.push_back(*subcv_p); oi = output_ocv (ocv, invert_ocv, oi); @@ -832,8 +831,8 @@ public: } const Intersection_point* p_p = - boost::get(&xection); - if (p_p != nullptr) *oi++ = Intersection_result(*p_p); + std::get_if(&xection); + if (p_p != nullptr) *oi++ = *p_p; } } else if (right_coincides && left_coincides) { @@ -846,7 +845,7 @@ public: for (const auto& item : sub_xections) { const X_monotone_subcurve_2* x_seg = - boost::get(&item); + std::get_if(&item); if (x_seg != nullptr) { X_monotone_subcurve_2 seg = *x_seg; // We maintain the variant that if the input curves have opposite @@ -863,7 +862,7 @@ public: } const Intersection_point* p_ptr = - boost::get(&item); + std::get_if(&item); if (p_ptr != nullptr) { // Any point that is not equal to the max_vertex of the // subcurve should be inserted into oi. @@ -871,7 +870,7 @@ public: // will be taken care of as the min_vertex of in the next // iteration. if (! equal(p_ptr->first, max_vertex(cv1[i1]))) - *oi++ = Intersection_result(*p_ptr); + *oi++ = *p_ptr; } } } @@ -896,11 +895,11 @@ public: // it multiplicity 0. if (left_res == SMALLER) { Intersection_point p(min_vertex(cv2[i2]), 0); - *oi++ = Intersection_result(p); + *oi++ = p; } else { Intersection_point p(min_vertex(cv1[i1]), 0); - *oi++ = Intersection_result(p); + *oi++ = p; } } } @@ -941,7 +940,7 @@ public: (i1 != Polycurve_traits_2::INVALID_INDEX) ? return_point(max_vertex(cv1[i1+1]), 0) : return_point(max_vertex(cv1[0]), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } else if (right_res == LARGER) { ip = (dir2 == SMALLER) ? @@ -949,7 +948,7 @@ public: (i2 != Polycurve_traits_2::INVALID_INDEX) ? return_point(max_vertex(cv2[i2+1]), 0) : return_point(max_vertex(cv2[0]), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } else if (((i1 > 0) && (dir1 == SMALLER)) || ((i1 < n1) && (dir1 != SMALLER)) || @@ -961,7 +960,7 @@ public: (i1 != Polycurve_traits_2::INVALID_INDEX) ? return_point(max_vertex(cv1[i1+1]), 0) : return_point(max_vertex(cv1[0]), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } else { CGAL_assertion_msg((dir2 == SMALLER && i2 > 0) || @@ -976,7 +975,7 @@ public: (i2 != Polycurve_traits_2::INVALID_INDEX) ? return_point(max_vertex(cv2[i2+1]), 0) : return_point(max_vertex(cv2[0]), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } } @@ -989,15 +988,12 @@ public: inline OutputIterator output_ocv (std::vector& ocv, bool invert_ocv, OutputIterator oi) const { - typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; X_monotone_curve_2 curve; if (invert_ocv) std::reverse (ocv.begin(), ocv.end()); for (X_monotone_subcurve_2& sc : ocv) curve.push_back (sc); - *(oi ++) = Intersection_result(curve); + *(oi ++) = curve; ocv.clear(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h index 8b076506227..3f49b0f2221 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h @@ -2038,8 +2038,6 @@ public: OutputIterator intersect(const Self& arc, OutputIterator oi, const Cache& cache) const { - typedef boost::variant Intersection_result; - CGAL_precondition(this->is_valid()); CGAL_precondition(this->is_continuous()); CGAL_precondition(arc.is_valid()); @@ -2047,7 +2045,7 @@ public: if (this->equals(arc)) { Self overlap_arc(*this); - *oi++ = Intersection_result(overlap_arc); + *oi++ = overlap_arc; return oi; } @@ -2170,7 +2168,7 @@ public: (this->SRC_AT_Y_MINUS_INFTY | this->SRC_AT_Y_PLUS_INFTY) == 0) { Intersection_point ip(p_left, 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } return oi; @@ -2189,7 +2187,7 @@ public: this->IS_DIRECTED_RIGHT | this->IS_CONTINUOUS | this->IS_VALID); - *oi++ = Intersection_result(overlap_arc); + *oi++ = overlap_arc; return oi; } @@ -2221,7 +2219,7 @@ public: Algebraic_point_2 p(this->_f, *x_iter); // Output the intersection point: Intersection_point ip(p, *m_iter); - *oi++ = Intersection_result(ip); + *oi++ = ip; } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h index 6e775b4917f..f908224fe26 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h @@ -827,7 +827,7 @@ public: template OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; // Make the rational arc continuous. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index e4828c134c4..b080305c6f8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -25,7 +25,7 @@ #include -#include +#include #include #include @@ -566,7 +566,7 @@ public: OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { // Wrap the segment with a variant. - typedef boost::variant + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(cv); return oi; @@ -706,8 +706,6 @@ public: OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; // Early ending with Bbox overlapping test if (! do_bboxes_overlap(cv1, cv2)) return oi; @@ -724,7 +722,7 @@ public: CGAL_assertion(bool(res)); // Check if we have a single intersection point. - const Point_2* ip = boost::get(&*res); + const Point_2* ip = std::get_if(&*res); if (ip != nullptr) { CGAL_assertion(cv1.is_vertical() ? m_traits.is_in_y_range_2_object()(cv1, *ip) : @@ -733,7 +731,7 @@ public: m_traits.is_in_y_range_2_object()(cv2, *ip) : m_traits.is_in_x_range_2_object()(cv2, *ip)); Intersection_point ip_mult(*ip, 1); - *oi++ = Intersection_result(ip_mult); + *oi++ = ip_mult; return oi; } @@ -754,7 +752,7 @@ public: // a common endpoint. Thus we have an intersection point, but we leave // the multiplicity of this point undefined. Intersection_point ip_mult(p_r, 0); - *oi++ = Intersection_result(ip_mult); + *oi++ = ip_mult; return oi; } @@ -765,17 +763,17 @@ public: // in the overlap segment if (cv1.is_directed_right()) { X_monotone_curve_2 overlap_seg(cv1.line(), p_l, p_r); - *oi++ = Intersection_result(overlap_seg); + *oi++ = overlap_seg; return oi; } X_monotone_curve_2 overlap_seg(cv1.line(), p_r, p_l); - *oi++ = Intersection_result(overlap_seg); + *oi++ = overlap_seg; return oi; } // cv1 and cv2 have opposite directions, the overlap segment // will be directed from left to right X_monotone_curve_2 overlap_seg(cv1.line(), p_l, p_r); - *oi++ = Intersection_result(overlap_seg); + *oi++ = overlap_seg; return oi; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h index 099f46edcd6..ab14028c080 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h @@ -26,7 +26,7 @@ #include #include -#include +#include namespace CGAL { @@ -57,11 +57,7 @@ public: typedef Result_type result_type; protected: -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 - typedef Result_type Optional_result_type; -#else - typedef typename boost::optional Optional_result_type; -#endif + typedef typename std::optional Optional_result_type; typedef typename Topology_traits::Dcel Dcel; typedef Arr_traits_basic_adaptor_2 Traits_adaptor_2; @@ -71,13 +67,8 @@ protected: const Traits_adaptor_2* m_geom_traits; // Its associated geometry traits. const Topology_traits* m_topol_traits; // Its associated topology traits. -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 - inline bool optional_empty(const CGAL::Object& obj) const { return obj.empty(); } - inline const Result_type& optional_assign(const CGAL::Object& t) const { return t; } -#else - inline bool optional_empty(const boost::optional& t) const { return (!t); } - inline const Result_type& optional_assign(const boost::optional& t) const { return *t; } -#endif + inline bool optional_empty(const std::optional& t) const { return (!t); } + inline const Result_type& optional_assign(const std::optional& t) const { return *t; } template Result_type make_result(T t) const { return Result::make_result(t); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h index 54264ab18e6..f9f58734738 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h @@ -154,14 +154,14 @@ public: OutputIterator insert(const Vector_3 & normal1, const Vector_3 & normal2, OutputIterator oi) { - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list x_objects; make_x_monotone(normal1, normal2, std::back_inserter(x_objects)); auto it = x_objects.begin(); - const auto* xc = boost::get(&(*it)); + const auto* xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "1.a. insert_in_face_interior(" << *xc << ")" << std::endl; #endif @@ -172,7 +172,7 @@ public: ++it; if (it == x_objects.end()) return oi; - xc = boost::get(&(*it)); + xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "1.b. insert_from_vertex(" << *xc << ")" << std::endl; #endif @@ -195,14 +195,14 @@ public: const Vector_3 & normal2, OutputIterator oi) { - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list x_objects; make_x_monotone(normal1, normal2, std::back_inserter(x_objects)); auto it = x_objects.begin(); - const auto* xc = boost::get(&(*it)); + const auto* xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "2.a. insert_from_vertex(" << *xc << ", " << vertex1->point() << ")" << std::endl; @@ -216,7 +216,7 @@ public: ++it; if (it == x_objects.end()) return oi; - xc = boost::get(&(*it)); + xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "2.b. insert_from_vertex(" << *xc << ")" << std::endl; #endif @@ -239,7 +239,7 @@ public: const Vector_3 & normal2, Vertex_handle vertex2, OutputIterator oi) { - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list x_objects; @@ -247,7 +247,7 @@ public: auto it = x_objects.begin(); if (x_objects.size() == 1) { - const auto* xc = boost::get(&(*it)); + const auto* xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "3. insert_from_vertex(" << *xc << ")" << std::endl; #endif @@ -258,8 +258,8 @@ public: return oi; } - const X_monotone_curve_2* xc1 = boost::get(&(*it++)); - const X_monotone_curve_2* xc2 = boost::get(&(*it)); + const X_monotone_curve_2* xc1 = std::get_if(&(*it++)); + const X_monotone_curve_2* xc2 = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "3.a. insert_from_vertex(" << *xc2 << ")" << std::endl; @@ -294,13 +294,13 @@ public: const Vector_3 & normal2, Vertex_handle vertex2, OutputIterator oi) { - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list x_objects; make_x_monotone(normal1, normal2, std::back_inserter(x_objects)); auto it = x_objects.begin(); if (x_objects.size() == 1) { - const auto* xc = boost::get(&(*it)); + const auto* xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "4. insert_at_vertices(" << *xc << ")" << std::endl; #endif @@ -308,8 +308,8 @@ public: return oi; } - const X_monotone_curve_2 * xc1 = boost::get(&(*it++)); - const X_monotone_curve_2 * xc2 = boost::get(&(*it)); + const X_monotone_curve_2 * xc1 = std::get_if(&(*it++)); + const X_monotone_curve_2 * xc2 = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "4.a. insert_from_vertex(" << *xc1 diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h index 5116ef4ca45..78eb6bc2f47 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h @@ -46,7 +46,7 @@ void Arr_transform_on_sphere(Arrangement & arr, typedef typename Arrangement::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; const Geometry_traits_2 * geom_traits = arr.geometry_traits(); Topology_traits * topol_traits = arr.topology_traits(); @@ -156,10 +156,10 @@ void Arr_transform_on_sphere(Arrangement & arr, auto it = objects.begin(); // The curve that its left vertex lies on the identification curve - const auto* sub_cv1 = boost::get(&(*it)); + const auto* sub_cv1 = std::get(&(*it)); ++it; //The curve that its right vertex lies on the identification curve - const auto* sub_cv2 = boost::get(&(*it)); + const auto* sub_cv2 = std::get(&(*it)); bool eq1 = (*sub_cv1).source() == hei1->source()->point(); bool eq2 = (*sub_cv2).target() == hei1->target()->point(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h index 67202ce862f..e854cb9b385 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h @@ -506,7 +506,7 @@ public: * \pre The curve has a boundary condition in either x or y. * \return An object that contains the curve end. */ - boost::optional > + std::optional > place_boundary_vertex(Face* f, const X_monotone_curve_2& xc, Arr_curve_end ind, @@ -538,7 +538,7 @@ public: * \pre The curve end is incident to the boundary. * \return An object that contains the curve end. */ - boost::variant + std::variant locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ce, Arr_parameter_space ps_x, Arr_parameter_space ps_y); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h index 2170c332d80..ba76651f9d7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h @@ -47,9 +47,9 @@ public: typedef typename Arrangement_2::Face_const_handle Face_const_handle; typedef typename Arrangement_2::Topology_traits Topology_traits; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; protected: // Data members: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h index 9175587a317..34149d15af3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h @@ -571,8 +571,8 @@ let_me_decide_the_outer_ccb(std::pair< CGAL::Sign, CGAL::Sign> signs1, * represent the curve end along the face boundary. */ template -boost::optional - ::Vertex*, typename Arr_spherical_topology_traits_2::Halfedge*> > Arr_spherical_topology_traits_2:: @@ -585,17 +585,17 @@ place_boundary_vertex(Face* /* f */, , Arr_parameter_space ps_y) { - typedef boost::variant Non_optional_result; - typedef boost::optional Result; + typedef std::variant Non_optional_result; + typedef std::optional Result; // std::cout << "place_boundary_vertex()" << std::endl; if (ps_y == ARR_BOTTOM_BOUNDARY) { - if (m_south_pole == nullptr) return boost::none; + if (m_south_pole == nullptr) return std::nullopt; return Result(Non_optional_result(m_south_pole)); } if (ps_y == ARR_TOP_BOUNDARY) { - if (m_north_pole == nullptr) return boost::none; + if (m_north_pole == nullptr) return std::nullopt; return Result(Non_optional_result(m_north_pole)); } @@ -611,7 +611,7 @@ place_boundary_vertex(Face* /* f */, } // The vertex hasn't been created yet, return a null object: - return boost::none; + return std::nullopt; } /*! \brief locate the predecessor halfedge for the given curve around a given @@ -647,7 +647,7 @@ locate_around_boundary_vertex(Vertex* v, /*! \brief locates a DCEL feature that contains a given curve end. */ template -boost::variant +std::variant ::Vertex*, typename Arr_spherical_topology_traits_2::Halfedge*, typename Arr_spherical_topology_traits_2::Face*> @@ -660,7 +660,7 @@ locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind, , Arr_parameter_space ps_y) { - typedef boost::variant Result; + typedef std::variant Result; // Act according to the boundary conditions. if (ps_y == ARR_TOP_BOUNDARY) { // In case the curve end coincides with the north pole, return the vertex diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h index af8e70a3f13..931359c3f11 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h @@ -48,9 +48,9 @@ public: typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; protected: typedef typename Arrangement_2::Topology_traits Topology_traits; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h index 4be3568c3a6..2736919a601 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h @@ -296,8 +296,8 @@ are_equal(const Vertex *v, // represent the curve end along the face boundary. // template -boost::optional - ::Vertex*, typename Arr_unb_planar_topology_traits_2::Halfedge*> > Arr_unb_planar_topology_traits_2:: @@ -305,8 +305,8 @@ place_boundary_vertex(Face* f, const X_monotone_curve_2& cv, Arr_curve_end ind, Arr_parameter_space ps_x, Arr_parameter_space ps_y) { - typedef boost::variant Non_optional_result; - typedef boost::optional Result; + typedef std::variant Non_optional_result; + typedef std::optional Result; // Get a halfedge on the outer CCB of f and start traversing the CCB. Halfedge* first = *(f->outer_ccbs_begin()); @@ -331,14 +331,14 @@ place_boundary_vertex(Face* f, // If we reached here, we did not find a suitable halfedge, which should // never happen. CGAL_error(); - return boost::none; + return std::nullopt; } //----------------------------------------------------------------------------- // Locate a DCEL feature that contains the given unbounded curve end. // template -boost::variant +std::variant ::Vertex*, typename Arr_unb_planar_topology_traits_2::Halfedge*, typename Arr_unb_planar_topology_traits_2::Face*> @@ -346,7 +346,7 @@ Arr_unb_planar_topology_traits_2:: locate_curve_end (const X_monotone_curve_2& cv, Arr_curve_end ind, Arr_parameter_space ps_x, Arr_parameter_space ps_y) { - typedef boost::variant Result; + typedef std::variant Result; // Start traversing the inner CCB of the fictitious face and try to locate // a feature that contains the curve end. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h index 23fa949e3cd..2b0abaceb4b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h @@ -46,9 +46,9 @@ public: typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; protected: typedef typename Arrangement_2::Topology_traits Topology_traits; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index f631bef376a..66dd1834a8c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -531,7 +531,7 @@ public: std::cout << "make_x_monotone" << std::endl << " cv: " << cv << std::endl; - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list container; @@ -540,12 +540,12 @@ public: size_t i = 0; for (auto it = container.begin(); it != container.end(); ++it) { - if (const auto* xcv = boost::get(&*it)) { + if (const auto* xcv = std::get_if(&*it)) { std::cout << " result[" << i++ << "]: xcv: " << *xcv << std::endl; continue; } - if (const auto* p = boost::get(&*it)) { + if (const auto* p = std::get_if(&*it)) { std::cout << " result[" << i++ << "]: p: " << *p << std::endl; continue; } @@ -618,7 +618,7 @@ public: OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; if (! m_enabled) return m_object(xcv1, xcv2, oi); @@ -632,22 +632,22 @@ public: unsigned int i = 0; for (const auto& item : container) { - const X_monotone_curve_2* xcv = boost::get(&item); + const X_monotone_curve_2* xcv = std::get_if(&item); if (xcv != nullptr) { std::cout << " result[" << i++ << "]: xcv: " << *xcv << std::endl; + *oi++ = *xcv; continue; } - const Intersection_point* ip = boost::get(&item); + const Intersection_point* ip = std::get_if(&item); if (ip != nullptr) { std::cout << " result[" << i++ << "]: p: " << ip->first << ", multiplicity: " << ip->second << std::endl; + *oi++ = *ip; continue; } } - for (auto it = container.begin(); it != container.end(); ++it) *oi++ = *it; - container.clear(); return oi; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h index 09cc7c94710..58558968882 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -291,7 +291,7 @@ public: * \return An object that contains the curve end. * In our case this object always wraps a fictitious edge. */ - boost::optional > + std::optional > place_boundary_vertex(Face* f, const X_monotone_curve_2& cv, Arr_curve_end ind, @@ -330,7 +330,7 @@ public: * In our case this object may either wrap an unbounded face, * or an edge with an end-vertex at infinity (in case of an overlap). */ - boost::variant + std::variant locate_curve_end(const X_monotone_curve_2& cv, Arr_curve_end ind, Arr_parameter_space ps_x, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h index 3739d35a83a..75c8f25e0c9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h @@ -109,7 +109,7 @@ decompose(const Arrangement_on_surface_2& arr, } } - // Obtain a extended traits-class object. + // Obtain an extended traits-class object. const Gt2* geom_traits = arr.geometry_traits(); /* We would like to avoid copy construction of the geometry traits class. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h index 27f1a980deb..2abcd426bf4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h @@ -20,7 +20,7 @@ * Definition of the Arr_compute_zone_visitor class. */ -#include +#include namespace CGAL { @@ -55,7 +55,7 @@ private: const Vertex_handle invalid_v; // Invalid vertex. OutputIterator& out_iter; // for outputting the zone objects. - // Its value type is boost::variant. + // Its value type is std::variant. bool output_left; // Determines whether we should // output the left end point of a // subcurve (to avoid outputting @@ -97,7 +97,7 @@ public: Vertex_handle left_v, Halfedge_handle left_he, Vertex_handle right_v, Halfedge_handle right_he) { - typedef boost::variant + typedef std::variant Zone_result; if (output_left) { @@ -138,7 +138,7 @@ public: Halfedge_handle he, Vertex_handle left_v, Vertex_handle right_v) { - typedef boost::variant + typedef std::variant Zone_result; if (output_left) { diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h index d98f1c1307c..8f88642aed8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h @@ -643,7 +643,7 @@ public: Tag_false) const { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; std::list intersections; m_self->intersect_2_object()(xcv1, xcv2, back_inserter(intersections)); @@ -3370,7 +3370,7 @@ public: */ class Compare_xy_2 { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; public: @@ -3580,7 +3580,7 @@ public: // Verify the first intersection is an overlap, remove it, and // recursively call. const X_monotone_curve_2* xcv = - boost::get(&(intersections.front())); + std::get_if(&(intersections.front())); if (! xcv) { CGAL_error_msg("The first intersection is not an overlap!"); return SMALLER; 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 d54f4c2cb0e..0f2957d4714 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 @@ -83,7 +83,7 @@ void insert(Arrangement_on_surface_2& arr, typedef typename Gt2::Point_2 Point_2; typedef typename Gt2::X_monotone_curve_2 X_monotone_curve_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; // Obtain an arrangement accessor. Arr_accessor arr_access(arr); @@ -100,7 +100,7 @@ void insert(Arrangement_on_surface_2& arr, // Insert each x-monotone curve into the arrangement. for (const auto& x_obj : x_objects) { // Act according to the type of the current object. - const auto* x_curve = boost::get(&x_obj); + const auto* x_curve = std::get_if(&x_obj); if (x_curve != nullptr) { // Inserting an x-monotone curve: // Initialize the zone-computation object with the given curve. @@ -118,7 +118,7 @@ void insert(Arrangement_on_surface_2& arr, arr_access.notify_after_global_change(); continue; } - const auto* iso_p = boost::get(&x_obj); + const auto* iso_p = std::get_if(&x_obj); CGAL_assertion(iso_p != nullptr); // Inserting a point into the arrangement: @@ -683,7 +683,7 @@ insert_non_intersecting_curve // The endpoint must not lie on an existing edge, but may coincide with // and existing vertex vh1. - CGAL_precondition_msg(boost::get(&obj1) == nullptr, + CGAL_precondition_msg(std::get_if(&obj1) == nullptr, "The curve must not intersect an existing edge."); } @@ -691,7 +691,7 @@ insert_non_intersecting_curve // We have a left end with boundary conditions. Use the accessor to locate // the feature that contains it. obj1 = arr_access.locate_curve_end(c, ARR_MIN_END, bx1, by1); - CGAL_precondition_msg(boost::get(&obj1) == nullptr, + CGAL_precondition_msg(std::get_if(&obj1) == nullptr, "The curve must not overlap an existing edge."); } vh1 = Pl_result::template assign(&obj1); @@ -710,7 +710,7 @@ insert_non_intersecting_curve // The endpoint must not lie on an existing edge, but may coincide with // and existing vertex vh2. - CGAL_precondition_msg(boost::get(&obj2) == nullptr, + CGAL_precondition_msg(std::get_if(&obj2) == nullptr, "The curve must not intersect an existing edge."); } else { @@ -721,7 +721,7 @@ insert_non_intersecting_curve // << ", by2: " << by2 // << std::endl; obj2 = arr_access.locate_curve_end(c, ARR_MAX_END, bx2, by2); - CGAL_precondition_msg(boost::get(&obj2) == nullptr, + CGAL_precondition_msg(std::get_if(&obj2) == nullptr, "The curve must not overlap an existing edge."); } vh2 = Pl_result::template assign(&obj2); @@ -737,7 +737,7 @@ insert_non_intersecting_curve if (vh1 != nullptr) { if (vh2 != nullptr) { - // Both endpoints are associated with a existing vertices. + // Both endpoints are associated with existing vertices. // In this case insert_at_vertices() already returns a halfedge // directed from left to right. new_he = arr.insert_at_vertices(c, @@ -766,8 +766,8 @@ insert_non_intersecting_curve // we must insert the curve in the interior of a face. // In this case insert_in_face_interior() already returns a halfedge // directed from left to right. - const Face_const_handle* fh1 = boost::get(&obj1); - const Face_const_handle* fh2 = boost::get(&obj2); + const Face_const_handle* fh1 = std::get_if(&obj1); + const Face_const_handle* fh2 = std::get_if(&obj2); // std::cout << arr << std::endl; // std::cout << "(*fh1)->number_of_outer_ccbs(): " @@ -1144,14 +1144,14 @@ insert_point(Arrangement_on_surface_2& arr, arr_access.notify_before_global_change(); - const Face_const_handle* fh = boost::get(&obj); + const Face_const_handle* fh = std::get_if(&obj); if (fh != nullptr) { // p lies inside a face: Insert it as an isolated vertex it the interior of // this face. vh_for_p = arr.insert_in_face_interior(p, arr.non_const_handle(*fh)); } else { - const Halfedge_const_handle* hh = boost::get(&obj); + const Halfedge_const_handle* hh = std::get_if(&obj); if (hh != nullptr) { // p lies in the interior of an edge: Split this edge to create a new // vertex associated with p. @@ -1167,7 +1167,7 @@ insert_point(Arrangement_on_surface_2& arr, } else { // p lies on an existing vertex, so we just update this vertex. - const Vertex_const_handle* vh = boost::get(&obj); + const Vertex_const_handle* vh = std::get_if(&obj); CGAL_assertion(vh != nullptr); vh_for_p = arr.modify_vertex (arr.non_const_handle (*vh), p); } @@ -1381,14 +1381,14 @@ is_valid(const Arrangement_on_surface_2& arr) auto obj = def_pl.ray_shoot_down(curr_v->point()); // if (CGAL::assign(he_below, obj)) { - if (auto* he_below_p = boost::get(&obj)) { + if (auto* he_below_p = std::get_if(&obj)) { // Hit an edge; take the incident face of the halfedge directed to the // right. auto he_below = *he_below_p; in_face = (he_below->direction() == ARR_RIGHT_TO_LEFT) ? he_below->twin()->face() : he_below->face(); } - else if (auto* v_below_p = boost::get(&obj)) { + else if (auto* v_below_p = std::get_if(&obj)) { auto v_below = *v_below_p; // Hit a vertex. if (v_below->is_isolated()) in_face = v_below->face(); @@ -1446,7 +1446,7 @@ is_valid(const Arrangement_on_surface_2& arr) } } else { - auto* in_face_p = boost::get(&obj); + auto* in_face_p = std::get_if(&obj); CGAL_assertion(in_face_p); in_face = *in_face_p; // Hit nothing (an unbounded face is returned). @@ -1584,7 +1584,7 @@ do_intersect(Arrangement_on_surface_2& arr, typedef typename Gt2::Point_2 Point_2; typedef typename Gt2::X_monotone_curve_2 X_monotone_curve_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; typedef typename Arr::Face_const_handle Face_const_handle; const Traits_adaptor_2* traits = @@ -1596,20 +1596,20 @@ do_intersect(Arrangement_on_surface_2& arr, // Insert each x-monotone curve into the arrangement. for (const auto& x_obj : x_objects) { // Act according to the type of the current object. - const X_monotone_curve_2* x_curve = boost::get(&x_obj); + const X_monotone_curve_2* x_curve = std::get_if(&x_obj); if (x_curve != nullptr) { // Check if the x-monotone subcurve intersects the arrangement. if (do_intersect(arr, *x_curve, pl) == true) return true; continue; } - const Point_2* iso_p = boost::get(&x_obj); + const Point_2* iso_p = std::get_if(&x_obj); CGAL_assertion(iso_p != nullptr); // Check whether the isolated point lies inside a face (otherwise, // it coincides with a vertex or an edge). auto obj = pl.locate(*iso_p); - if (boost::get(&x_obj) != nullptr) return true; + if (std::get_if(&x_obj) != nullptr) return true; } // If we reached here, the curve does not intersect the arrangement. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h index 78e0850352d..7ac1332586d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h @@ -31,7 +31,7 @@ * class-template. */ -#include +#include #include #include @@ -2253,7 +2253,7 @@ _place_and_set_curve_end(DFace* f, return v; } - DHalfedge** fict_he_p = boost::get(&*obj); + DHalfedge** fict_he_p = std::get_if(&*obj); if (fict_he_p != nullptr) { DHalfedge* fict_he = *fict_he_p; CGAL_assertion(fict_he != nullptr); @@ -2273,7 +2273,7 @@ _place_and_set_curve_end(DFace* f, Halfedge_handle((*p_pred)->next())); return v; } - DVertex** v_p = boost::get(&*obj); + DVertex** v_p = std::get_if(&*obj); CGAL_assertion(v_p != nullptr); DVertex* v = *v_p; CGAL_assertion(v != nullptr); diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h index feb429273ee..5d1e19f73c7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h @@ -103,7 +103,7 @@ void Arrangement_zone_2::compute_zone() const Vertex_const_handle* vh; const Halfedge_const_handle* hh; - if ((vh = boost::get(&m_obj)) != nullptr) { + if ((vh = std::get_if(&m_obj)) != nullptr) { CGAL_assertion(m_has_left_pt); // The left endpoint coincides with an existing vertex: @@ -125,7 +125,7 @@ void Arrangement_zone_2::compute_zone() #endif } - else if ((hh = boost::get(&m_obj)) != nullptr) { + else if ((hh = std::get_if(&m_obj)) != nullptr) { if (m_has_left_pt) { // Obtain the right halfedge from the halfedge-pair containing m_left_pt // in their interior. @@ -139,7 +139,7 @@ void Arrangement_zone_2::compute_zone() // Compute the overlapping subcurve. bool dummy; auto obj = _compute_next_intersection(m_intersect_he, false, dummy); - m_overlap_cv = boost::get(*obj); + m_overlap_cv = std::get(*obj); // Remove the overlap from the map. _remove_next_intersection(m_intersect_he); @@ -155,7 +155,7 @@ void Arrangement_zone_2::compute_zone() bool dummy; auto obj = _compute_next_intersection(m_intersect_he, false, dummy); - m_overlap_cv = boost::get(*obj); + m_overlap_cv = std::get(*obj); // Remove the overlap from the map. _remove_next_intersection(m_intersect_he); @@ -166,7 +166,7 @@ void Arrangement_zone_2::compute_zone() } else { // The left endpoint lies inside a face. - const Face_const_handle* fh = boost::get(&m_obj); + const Face_const_handle* fh = std::get_if(&m_obj); CGAL_assertion_msg(fh != nullptr, "Invalid object returned by the point-location query."); @@ -213,7 +213,7 @@ void Arrangement_zone_2::compute_zone() // Compute the overlapping subcurve to the right of curr_v. bool dummy; auto obj = _compute_next_intersection(m_intersect_he, false, dummy); - m_overlap_cv = boost::get(*obj); + m_overlap_cv = std::get(*obj); // Remove the overlap from the map. _remove_next_intersection(m_intersect_he); @@ -546,7 +546,7 @@ _compute_next_intersection(Halfedge_handle he, // (if the left point exists). while (! inter_list.empty()) { // Compare that current object with m_left_pt (if exists). - ip = boost::get(&(inter_list.front())); + ip = std::get_if(&(inter_list.front())); if (ip != nullptr) { // We have an intersection point if (m_left_on_boundary) { @@ -570,7 +570,7 @@ _compute_next_intersection(Halfedge_handle he, } else { // We have an overlapping subcurve. - icv = boost::get(&(inter_list.front())); + icv = std::get_if(&(inter_list.front())); CGAL_assertion(icv != nullptr); if (is_closed(*icv, ARR_MIN_END)) { @@ -608,7 +608,7 @@ _compute_next_intersection(Halfedge_handle he, // Discard all intersection lying to the left of m_left_pt (if exists). while (! inter_list.empty()) { // Compare that current object with m_left_pt (if exists). - ip = boost::get(&(inter_list.front())); + ip = std::get_if(&(inter_list.front())); if (ip != nullptr) { // We have an intersection point - @@ -638,7 +638,7 @@ _compute_next_intersection(Halfedge_handle he, } else { // We have an overlapping subcurve. - icv = boost::get(&(inter_list.front())); + icv = std::get_if(&(inter_list.front())); CGAL_assertion(icv != nullptr); if (is_closed(*icv, ARR_MIN_END)) { @@ -832,7 +832,7 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, if (iobj) { // We have found an intersection (either a simple point or an // overlapping x-monotone curve). - const Intersection_point* int_p = boost::get(&*iobj); + const Intersection_point* int_p = std::get_if(&*iobj); if (int_p != nullptr) { Point_2 ip = int_p->first; @@ -854,7 +854,7 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, else { // We have located an overlapping curve. Assign ip as its left // endpoint. - const X_monotone_curve_2* icv = boost::get(&*iobj); + const X_monotone_curve_2* icv = std::get_if(&*iobj); CGAL_assertion(icv != nullptr); Point_2 ip = min_vertex(*icv); diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h index 81f1c8bad04..c32deb11eca 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -101,9 +101,9 @@ protected: // Types used for caching intersection points: typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; - typedef boost::optional Optional_intersection; + typedef std::optional Optional_intersection; typedef std::list Intersect_list; typedef std::map Intersect_map; diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h index 2182023925e..8766eac294d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -155,13 +155,13 @@ public: mutable bool _m_left_to_right; //! stores the index of an interval this arc belongs to - mutable boost::optional _m_interval_id; + mutable std::optional _m_interval_id; //! stores boundary value in x-range of non-vertical interval - mutable boost::optional< Bound > _m_boundary_in_interval; + mutable std::optional< Bound > _m_boundary_in_interval; //! stores a bbox for an arc - mutable boost::optional< CGAL::Bbox_2 > _m_bbox; + mutable std::optional< CGAL::Bbox_2 > _m_bbox; //!@} }; @@ -2240,8 +2240,8 @@ protected: rep._m_is_vertical = this->ptr()->_m_is_vertical; rep._m_left_to_right = this->ptr()->_m_left_to_right; - rep._m_interval_id = boost::none; - rep._m_boundary_in_interval = boost::none; + rep._m_interval_id = std::nullopt; + rep._m_boundary_in_interval = std::nullopt; return std::make_pair(Kernel_arc_2(rep), cmp); } @@ -2372,8 +2372,8 @@ protected: this->ptr()->_m_arcno_max = arcno(); // invalidate curve-specific data - this->ptr()->_m_interval_id = boost::none; - this->ptr()->_m_boundary_in_interval = boost::none; + this->ptr()->_m_interval_id = std::nullopt; + this->ptr()->_m_boundary_in_interval = std::nullopt; } //!@} 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 5e95ec2d731..3bb749b395c 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 @@ -252,8 +252,8 @@ public: class Allocator > inline void draw(const Arc_2& arc, Container< std::vector< Coord_2 >, Allocator >& pts, - boost::optional< Coord_2 > *end_pt1 = nullptr, - boost::optional< Coord_2 > *end_pt2 = nullptr) { + std::optional< Coord_2 > *end_pt1 = nullptr, + std::optional< Coord_2 > *end_pt2 = nullptr) { #ifndef CGAL_CKVA_DUMMY_RENDERER Bbox_2 bbox; diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h index 89c4b6595f8..8fe1efa48c7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h @@ -1426,7 +1426,7 @@ public: typedef unsigned int Multiplicity; typedef std::pair Intersection_point; - typedef boost::variant Intersection_result; + typedef std::variant Intersection_result; //! the result type typedef CGAL::cpp98::iterator @@ -1469,13 +1469,13 @@ public: // point-wise intersections std::vector arcs; if (cv1._trim_if_overlapped(cv2, std::back_inserter(arcs))) { - for (const auto& item : arcs) *oi++ = Intersection_result(item); + for (const auto& item : arcs) *oi++ = item; return oi; } // process non-ov erlapping case std::vector vec; Arc_2::_intersection_points(cv1, cv2, std::back_inserter(vec)); - for (const auto& item : vec) *oi++ = Intersection_result(item); + for (const auto& item : vec) *oi++ = item; return oi; } @@ -1905,7 +1905,7 @@ public: { typedef typename Curved_kernel_via_analysis_2::Point_2 Point_2; typedef typename Curved_kernel_via_analysis_2::Arc_2 Arc_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(cv); return oi; } @@ -1945,7 +1945,7 @@ public: typedef typename Curved_kernel_via_analysis_2::Arc_2 Arc_2; typedef typename Curved_kernel_via_analysis_2::Non_x_monotone_arc_2 Non_x_monotone_arc_2; - typedef boost::variant + typedef std::variant Make_x_monotone_result; Curve_analysis_2 curve; diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h index 55d269ca01b..a7b9453af47 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h @@ -43,7 +43,7 @@ operator << typedef std::pair< int, int > Coord_2; typedef std::vector< Coord_2 > Coord_vec_2; - boost::optional < Coord_2 > p1, p2; + std::optional < Coord_2 > p1, p2; std::list points; Bbox_2 bbox (CGAL::to_double(ws.bounding_rect().xmin()), diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h index c95ee1b85f9..06ec76eb58f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h @@ -83,9 +83,9 @@ public: // end-points (in degenerate case both point to the same object) mutable Generic_point_2 _m_min; - mutable boost::optional _m_max; + mutable std::optional _m_max; // stores native arc object (only for non-degenerate case) - mutable boost::optional _m_arc; + mutable std::optional _m_arc; // whether an arc is degenerate //bool _m_is_degenerate; diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h index f993dd009af..c465cae0300 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h @@ -67,12 +67,12 @@ public: _m_point(p) { } - mutable boost::optional _m_arc; // supporting arc for points at inf + mutable std::optional _m_arc; // supporting arc for points at inf // stores respective curve end if this is a point at infinity CGAL::Arr_curve_end _m_end; - mutable boost::optional _m_point; // stores a finite point + mutable std::optional _m_point; // stores a finite point // befriending the handle friend class Generic_point_2; diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h index 69f9db2015e..aae3aea01e9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h @@ -54,11 +54,11 @@ struct Make_x_monotone_2 : public CGAL::cpp98::binary_function< typename CurvedKernelViaAnalysis_2::Curve_2, CGAL::cpp98::iterator >, CGAL::cpp98::iterator > > { @@ -132,7 +132,7 @@ struct Make_x_monotone_2 : template OutputIterator operator()(Curve_analysis_2 curve, OutputIterator oi) { - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; Construct_arc_2 construct_arc_2 = _m_curved_kernel->construct_arc_2_object(); @@ -290,7 +290,7 @@ private: Coordinate_1 x, std::vector pts, OutputIterator oi) const { - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; Construct_arc_2 construct_arc_2 = _m_curved_kernel->construct_arc_2_object(); diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h index fbdb113ac65..789f24b841e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -106,22 +106,22 @@ public: //! curve point finite coordinates. They are valid only if boundary in y //! is not set (CGAL::NO_BOUNDARY), otherwise only x-coordinate is //! accessible, i.e., point is in interior - boost::optional< Coordinate_2 > _m_xy; + std::optional< Coordinate_2 > _m_xy; //! x-coordinate of a curve point - boost::optional< Coordinate_1 > _m_x; + std::optional< Coordinate_1 > _m_x; //! curve of point at boundary - boost::optional< Curve_analysis_2 > _m_curve; + std::optional< Curve_analysis_2 > _m_curve; //! arc of point at boundary - boost::optional< int > _m_arcno; + std::optional< int > _m_arcno; //! location of a point in parameter space mutable CGAL::Arr_parameter_space _m_location; //! store a double approximation of point - mutable boost::optional< std::pair< double, double > > _m_doubles; + mutable std::optional< std::pair< double, double > > _m_doubles; }; /*!\brief @@ -700,14 +700,13 @@ public: default: // ASCII os << "Point_2("; - - os << this->ptr()->_m_xy; + os << ::CGAL::IO::oformat(this->ptr()->_m_xy); os << ","; - os << this->ptr()->_m_x; + os << ::CGAL::IO::oformat(this->ptr()->_m_x); os << ","; - os << this->ptr()->_m_curve; + os << ::CGAL::IO::oformat(this->ptr()->_m_curve); os << ","; - os << this->ptr()->_m_arcno; + os << ::CGAL::IO::oformat(this->ptr()->_m_arcno); os << ","; os << this->ptr()->_m_location; @@ -737,13 +736,13 @@ public: swallow(is, '('); // read values - is >> rep._m_xy; + is >> iformat(rep._m_xy); swallow(is, ','); - is >> rep._m_x; + is >> iformat(rep._m_x); swallow(is, ','); - is >> rep._m_curve; + is >> iformat(rep._m_curve); swallow(is, ','); - is >> rep._m_arcno; + is >> iformat(rep._m_arcno); swallow(is, ','); is >> rep._m_location; diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h index 3d1bdff6e91..018992c467b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h @@ -22,7 +22,7 @@ #include -#include +#include #include #include #include @@ -726,7 +726,7 @@ public: typedef typename SweepCurvesAdapter_2::Native_arc_2 Native_arc_2; typedef typename SweepCurvesAdapter_2::Native_point_2 Native_point_2; typedef typename SweepCurvesAdapter_2::Generic_point_2 Generic_point_2; - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::vector objs; @@ -734,11 +734,11 @@ public: make_x_monotone(cv, std::back_inserter(objs)); // sort out normal and degenerate arcs for (auto& obj : objs) { - if (auto* arc = boost::get(&obj)) { + if (auto* arc = std::get(&obj)) { *oi++ = Generic_arc_2(*arc); continue; } - auto* pt = boost::get(&obj); + auto* pt = std::get(&obj); CGAL_assertion(pt); *oi++ = Generic_arc_2(Generic_point_2(*pt)); } diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h index f9551ac46fa..32d3d4cc849 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h @@ -423,8 +423,8 @@ template < class Coord_2, template < class, class > class Container, class Allocator > void draw(const Arc_2& arc, Container< std::vector< Coord_2 >, Allocator >& points, - boost::optional< Coord_2 > *end_pt1 = nullptr, - boost::optional< Coord_2 > *end_pt2 = nullptr) { + std::optional< Coord_2 > *end_pt1 = nullptr, + std::optional< Coord_2 > *end_pt2 = nullptr) { #ifdef CGAL_CKVA_CR_TIMING refine_timer.start(); diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h index 34cb310fd07..332f1518179 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h @@ -524,7 +524,7 @@ public: /*! \class * A class defining a textual (\ascii) input/output format for arrangements * that store auxiliary dat with all their DCEL records, as they are templated - * by a extended DCEL class. + * by an extended DCEL class. */ template class Arr_extended_dcel_text_formatter : diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h index 953652180e5..1418044d5f4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h @@ -440,7 +440,7 @@ public: { return (m_base_eq(p1.base(), p2.base())); } }; - /*! Obtain a Equal_2 function object */ + /*! Obtain an `Equal_2` function object */ Equal_2 equal_2_object() const { return (Equal_2(m_base_traits->equal_2_object())); } diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h index f3de33d7fe7..0abc509bcd5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h @@ -98,9 +98,9 @@ public: OutputIterator oi) { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; - typedef boost::variant + typedef std::variant Intersection_base_result; Halfedge_handle invalid_he; @@ -120,13 +120,13 @@ public: // X_monotone_curve_2 for (const auto& xection : xections) { const Intersection_point* - p_p = boost::get(&xection); + p_p = std::get_if(&xection); if (p_p != nullptr) { - *oi++ = Intersection_result(xection); + *oi++ = Intersection_result(*p_p); continue; } const Base_x_monotone_curve_2* base_cv_p = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(base_cv_p); // Add halfedge handles to the resulting curve. diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h index e6d4d543144..e82e28b3164 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h @@ -23,7 +23,7 @@ * This class can be further split into two, where one derives from the other, * such that the derived class handles the case of inserting non-intersecting * curves into a non-empty arrangement, and the base class handles the case of - * inserting non-intersecting curves into a empty arrangement. + * inserting non-intersecting curves into an empty arrangement. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h index ab7b56ce987..30c8b38b4a0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h @@ -22,9 +22,8 @@ * Definition of the Arr_overlay_ss_visitor class-template. */ -#include -#include -#include +#include +#include #include @@ -344,7 +343,7 @@ protected: //@} /*! A visitor class to facilitate the call to create_vertex(). */ - class Create_vertex_visitor : public boost::static_visitor<> { + class Create_vertex_visitor { private: Overlay_traits* m_overlay_traits; Vertex_handle m_vertex_handle; @@ -524,11 +523,11 @@ void Arr_overlay_ss_visitor::update_event(Event* e, CGAL_assertion(sc->color() == Gt2::RED); Halfedge_handle_red red_he = sc->red_halfedge_handle(); - pt.set_red_cell(boost::make_optional(Cell_handle_red(red_he))); + pt.set_red_cell(std::make_optional(Cell_handle_red(red_he))); } else if (pt.is_blue_cell_empty()) { Halfedge_handle_blue blue_he = sc->blue_halfedge_handle(); - pt.set_blue_cell(boost::make_optional(Cell_handle_blue(blue_he))); + pt.set_blue_cell(std::make_optional(Cell_handle_blue(blue_he))); } } @@ -563,7 +562,7 @@ void Arr_overlay_ss_visitor::after_sweep() const Cell_handle_blue& blue_handle = info.second; Vertex_handle v = (*it).first; Create_vertex_visitor visitor(m_overlay_traits, v); - boost::apply_visitor(visitor, red_handle, blue_handle); + std::visit(visitor, red_handle, blue_handle); } // When the sweep-line process is over, the remaining arrangement face @@ -938,8 +937,8 @@ _map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) const Cell_handle_red* red_handle_p = pt.red_cell_handle(); if (red_handle_p) info.first = *red_handle_p; - if (!boost::get(&(info.first)) && - !boost::get(&(info.second))) + if (!std::get_if(&(info.first)) && + !std::get_if(&(info.second))) { // If both, the red and blue, variants do not represent face handles, // they must represt either vertex or edge handles. In this case it is @@ -949,7 +948,7 @@ _map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) const Cell_handle_blue& blue_handle = info.second; Vertex_handle v = (*it).first; Create_vertex_visitor visitor(m_overlay_traits, v); - boost::apply_visitor(visitor, red_handle, blue_handle); + std::visit(visitor, red_handle, blue_handle); m_vertices_map.erase(it); } } @@ -1035,7 +1034,7 @@ _create_vertex(Event* event, CGAL_assertion(blue_handle != nullptr); const Vertex_handle_blue& blue_v = - boost::get(*blue_handle); + std::get(*blue_handle); m_overlay_traits->create_vertex(red_f, blue_v, new_v); return; } @@ -1049,13 +1048,13 @@ _create_vertex(Event* event, CGAL_assertion(red_handle != nullptr); const Vertex_handle_red& red_v = - boost::get(*red_handle); + std::get(*red_handle); m_overlay_traits->create_vertex(red_v, blue_f, new_v); return; } Create_vertex_visitor visitor(m_overlay_traits, new_v); - boost::apply_visitor(visitor, *red_handle, *blue_handle); + std::visit(visitor, *red_handle, *blue_handle); } //----------------------------------------------------------------------------- diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h index b38fc25d344..0adb3c3e831 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h @@ -22,8 +22,8 @@ * Definition of the Arr_overlay_traits_2 class-template. */ -#include -#include +#include +#include #include @@ -105,21 +105,21 @@ public: RB_OVERLAP // Red-blue overlap. }; - typedef boost::variant Cell_handle_red; - typedef boost::optional Optional_cell_red; + typedef std::optional Optional_cell_red; - typedef boost::variant Cell_handle_blue; - typedef boost::optional Optional_cell_blue; + typedef std::optional Optional_cell_blue; template Optional_cell_red make_optional_cell_red(Handle_red handle_red) - { return boost::make_optional(Cell_handle_red(handle_red)); } + { return std::make_optional(Cell_handle_red(handle_red)); } template Optional_cell_red make_optional_cell_blue(Handle_blue handle_blue) - { return boost::make_optional(Cell_handle_blue(handle_blue)); } + { return std::make_optional(Cell_handle_blue(handle_blue)); } private: const Gt2* m_base_traits; // The base traits object. @@ -323,14 +323,14 @@ public: /*! Obtain the red vertex handle or nullptr if it doesn't exist. */ const Vertex_handle_red* red_vertex_handle() const { - return m_red_cell ? boost::get(&(*m_red_cell)) : nullptr; + return m_red_cell ? std::get_if(&(*m_red_cell)) : nullptr; } /*! Obtain the blue vertex handle or nullptr if it doesn't exist. */ const Vertex_handle_blue* blue_vertex_handle() const { return - m_blue_cell ? boost::get(&(*m_blue_cell)) : nullptr; + m_blue_cell ? std::get_if(&(*m_blue_cell)) : nullptr; } }; @@ -371,10 +371,10 @@ public: OutputIterator oi) { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; typedef std::pair Intersection_base_point; - typedef boost::variant + typedef std::variant Intersection_base_result; // In case the curves originate from the same arrangement, they are @@ -440,7 +440,7 @@ public: // the extended X_monotone_curve_2. for (const auto& xection : xections) { const Intersection_base_point* base_ipt = - boost::get(&xection); + std::get_if(&xection); if (base_ipt != nullptr) { // We have a red-blue intersection point, so we attach the // intersecting red and blue halfedges to it. @@ -450,16 +450,16 @@ public: if (xcv1.color() == RED) { CGAL_assertion(xcv2.color() == BLUE); red_cell = - boost::make_optional(Cell_handle_red(xcv1.red_halfedge_handle())); + std::make_optional(Cell_handle_red(xcv1.red_halfedge_handle())); blue_cell = - boost::make_optional(Cell_handle_blue(xcv2.blue_halfedge_handle())); + std::make_optional(Cell_handle_blue(xcv2.blue_halfedge_handle())); } else { CGAL_assertion((xcv2.color() == RED) && (xcv1.color() == BLUE)); red_cell = - boost::make_optional(Cell_handle_red(xcv2.red_halfedge_handle())); + std::make_optional(Cell_handle_red(xcv2.red_halfedge_handle())); blue_cell = - boost::make_optional(Cell_handle_blue(xcv1.blue_halfedge_handle())); + std::make_optional(Cell_handle_blue(xcv1.blue_halfedge_handle())); } // Create the extended point and add the multiplicity. @@ -470,7 +470,7 @@ public: } const Base_x_monotone_curve_2* overlap_xcv = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(overlap_xcv != nullptr); // We have a red-blue overlap, so we mark the curve accordingly. @@ -574,15 +574,15 @@ public: red_cell = (! xcv.red_halfedge_handle()->target()->is_at_open_boundary() && m_base_equal(base_p, xcv.red_halfedge_handle()->target()->point())) ? - boost::make_optional(Cell_handle_red(xcv.red_halfedge_handle()->target())) : - boost::make_optional(Cell_handle_red(xcv.red_halfedge_handle())); + std::make_optional(Cell_handle_red(xcv.red_halfedge_handle()->target())) : + std::make_optional(Cell_handle_red(xcv.red_halfedge_handle())); if ((xcv.color() == BLUE) || (xcv.color() == RB_OVERLAP)) blue_cell = (! xcv.blue_halfedge_handle()->target()->is_at_open_boundary() && m_base_equal(base_p, xcv.blue_halfedge_handle()->target()->point())) ? - boost::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle()->target())) : - boost::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle())); + std::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle()->target())) : + std::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle())); return Point_2(base_p, red_cell, blue_cell); } @@ -631,15 +631,15 @@ public: red_cell = (! xcv.red_halfedge_handle()->source()->is_at_open_boundary() && m_base_equal(base_p, xcv.red_halfedge_handle()->source()->point())) ? - boost::make_optional(Cell_handle_red(xcv.red_halfedge_handle()->source())) : - boost::make_optional(Cell_handle_red(xcv.red_halfedge_handle())); + std::make_optional(Cell_handle_red(xcv.red_halfedge_handle()->source())) : + std::make_optional(Cell_handle_red(xcv.red_halfedge_handle())); if ((xcv.color() == BLUE) || (xcv.color() == RB_OVERLAP)) blue_cell = (! xcv.blue_halfedge_handle()->source()->is_at_open_boundary() && m_base_equal(base_p, xcv.blue_halfedge_handle()->source()->point())) ? - boost::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle()->source())) : - boost::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle())); + std::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle()->source())) : + std::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle())); return (Point_2(base_p, red_cell, blue_cell)); } @@ -705,7 +705,7 @@ public: { return m_base_equal(xcv1.base(), xcv2.base()); } }; - /*! Obtain a Equal_2 functor object. */ + /*! Obtain an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(m_base_traits->equal_2_object()); } diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h index b6b7be876f6..cf26fa9a773 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h @@ -20,7 +20,7 @@ * Definition of the Arr_vert_decomp_ss_visitor class-template. */ -#include +#include namespace CGAL { @@ -66,10 +66,10 @@ public: typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; typedef std::pair Vert_pair; typedef std::pair Vert_entry; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Batched_point_location_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Batched_point_location_test.h index 256d101a386..f84aee4da6d 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Batched_point_location_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Batched_point_location_test.h @@ -45,7 +45,7 @@ public: typedef typename Points_vector::iterator Point_iterator; - typedef typename boost::variant Cell_handle; @@ -226,10 +226,10 @@ compare(const Cell_handle& expected, const Cell_handle& actual) { // Assign object to a face const Face_const_handle* fh_expected = - boost::get(&(expected)); + std::get_if(&(expected)); if (fh_expected) { const Face_const_handle* fh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (fh_actual) { if ((*fh_actual) == (*fh_expected)) return true; @@ -241,13 +241,13 @@ compare(const Cell_handle& expected, const Cell_handle& actual) std::cout << "Error: batched point location!" << std::endl; std::cout << "Expected a face." << std::endl; const Halfedge_const_handle* hh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (hh_actual) { std::cout << "Actual: a halfedge." << std::endl; return false; } const Vertex_const_handle* vh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (vh_actual) { std::cout << "Actual: a vertex." << std::endl; return false; @@ -258,10 +258,10 @@ compare(const Cell_handle& expected, const Cell_handle& actual) // Assign object to a halfedge const Halfedge_const_handle* hh_expected = - boost::get(&(expected)); + std::get_if(&(expected)); if (hh_expected) { const Halfedge_const_handle* hh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (hh_actual) { if (((*hh_actual) == (*hh_expected)) || ((*hh_actual)->twin() == (*hh_expected))) @@ -279,13 +279,13 @@ compare(const Cell_handle& expected, const Cell_handle& actual) std::cout << "Expected: a halfedge, " << (*hh_expected)->curve() << std::endl; const Face_const_handle* fh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (fh_actual) { std::cout << "Actual: a face." << std::endl; return false; } const Vertex_const_handle* vh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (vh_actual) { std::cout << "Actual: a vertex." << std::endl; return false; @@ -296,10 +296,10 @@ compare(const Cell_handle& expected, const Cell_handle& actual) // Assign object to a vertex const Vertex_const_handle* vh_expected = - boost::get(&(expected)); + std::get_if(&(expected)); if (vh_expected) { const Vertex_const_handle* vh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (vh_actual) { if ((*vh_actual) == (*vh_expected)) return true; @@ -313,13 +313,13 @@ compare(const Cell_handle& expected, const Cell_handle& actual) std::cout << "Error: batched point location!"; std::cout << "Expected: a vertex, "<< (*vh_expected)->point() << std::endl; const Face_const_handle* fh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (fh_actual) { std::cout << "Actual: a face" << std::endl; return false; } const Halfedge_const_handle* hh_actual = - boost::get(&(actual)); + std::get_if(&(actual)); if (hh_actual) { std::cout << "Actual: a halfedge." << std::endl; return false; @@ -436,15 +436,15 @@ print(const std::pair& res) // Print the results. std::cout << "The point (" << res.first << ") is located "; if (const Face_const_handle* f = - boost::get(&(res.second))) // inside a face + std::get_if(&(res.second))) // inside a face std::cout << "inside " << (((*f)->is_unbounded()) ? "the unbounded" : "a bounded") << " face." << std::endl; else if (const Halfedge_const_handle* e = - boost::get(&(res.second))) // on an edge + std::get_if(&(res.second))) // on an edge std::cout << "on an edge: " << (*e)->curve() << std::endl; else if (const Vertex_const_handle* v = - boost::get(&(res.second))) // on a vertex + std::get_if(&(res.second))) // on a vertex std::cout << "on " << (((*v)->is_isolated()) ? "an isolated" : "a") << " vertex: " << (*v)->point() << std::endl; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/IO_base_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/IO_base_test.h index d08285f483c..35b3c221eb6 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/IO_base_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/IO_base_test.h @@ -697,11 +697,11 @@ bool IO_base_test::read_xsegment(InputStream_& is, Subcurve_2 seg(point_vector.begin(), point_vector.end()); //convert it into x-monotone bezier segment. - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; std::vector objs; bezier_traits.make_x_monotone_2_object()(seg, std::back_inserter(objs)); assert(! objs.empty()); - const auto* x_seg_p = boost::get(&(objs[0])); + const auto* x_seg_p = std::get_if(&(objs[0])); assert(x_seg_p); xseg = *x_seg_p; @@ -724,7 +724,7 @@ bool IO_base_test::read_xcurve(InputStream_& is, unsigned int number_of_segments; is >> number_of_segments; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; auto make_x_monotone = bezier_traits.make_x_monotone_2_object(); if ((type == 'x') || (type == 'X')) { for (unsigned int i=0; i::read_xcurve(InputStream_& is, std::vector objs; make_x_monotone(seg, std::back_inserter(objs)); assert(! objs.empty()); - const auto* x_seg_p = boost::get(&(objs[0])); + const auto* x_seg_p = std::get_if(&(objs[0])); assert(x_seg_p); x_segments.push_back(*x_seg_p); @@ -1491,7 +1491,7 @@ bool IO_base_test::read_xcurve(InputStream_& is, X_monotone_curve_2& xcv) { std::cout << std::endl; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; std::list x_objs; Curve_2 tmp_cv; is >> tmp_cv; @@ -1509,7 +1509,7 @@ bool IO_base_test::read_xcurve(InputStream_& is, size_t id(0); if (! is.eof()) is >> id; std::advance(xoit, id); - const auto* xcv_p = boost::get(&*xoit); + const auto* xcv_p = std::get_if(&*xoit); assert(xcv_p); xcv = *xcv_p; return false; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h index f4b717db180..72f8306f698 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h @@ -70,7 +70,7 @@ public: typedef std::vector Objects_vector; typedef Objects_vector::iterator Object_iterator; - typedef typename boost::variant Cell_handle; typedef std::vector Variants_vector; @@ -148,7 +148,7 @@ protected: NUM_PL_STRATEGIES }; - typedef boost::variant void deallocate_pl() { - Strategy* strategy = boost::get(m_locators[id].m_variant); + Strategy* strategy = std::get(m_locators[id].m_variant); if (strategy) { delete strategy; m_locators[id].m_variant = static_cast(nullptr); @@ -302,7 +302,7 @@ private: void attach_pl() { if (! m_locators[id].m_active) return; - Strategy* strategy = boost::get(m_locators[id].m_variant); + Strategy* strategy = std::get(m_locators[id].m_variant); strategy->attach(*m_arr); } @@ -311,7 +311,7 @@ private: void attach_pl(Generator* generator) { if (! m_locators[id].m_active) return; - Strategy* strategy = boost::get(m_locators[id].m_variant); + Strategy* strategy = std::get(m_locators[id].m_variant); strategy->attach(*m_arr, generator); } @@ -321,7 +321,7 @@ private: { if (! m_locators[id].m_active) return; const std::string& name = m_locators[id].m_name; - Strategy* strategy = boost::get(m_locators[id].m_variant); + Strategy* strategy = std::get(m_locators[id].m_variant); query(*strategy, name.c_str(), m_query_points.begin(), m_query_points.end(), std::back_inserter(objs)); } @@ -625,7 +625,7 @@ private: #define ATTACH_PL_TRAPEZOID_RIC_NO_GUARANTEE() \ Pl_variant& var = m_locators[TRAPEZOID_RIC_NO_GUARANTEE_PL].m_variant; \ - Trapezoid_ric_pl* strategy = boost::get(var); \ + Trapezoid_ric_pl* strategy = std::get(var); \ strategy->with_guarantees(false); \ attach_pl() @@ -901,12 +901,7 @@ bool Point_location_test::attach_pl_strategies() template bool Point_location_test::perform() { -#if ((CGAL_ARR_POINT_LOCATION_VERSION < 2) || \ - defined(CGAL_ARR_POINT_LOCATION_CONVERSION)) - Objects_vector objs[NUM_PL_STRATEGIES]; -#else Variants_vector objs[NUM_PL_STRATEGIES]; -#endif // Locate the points in the list using all point location strategies. @@ -1088,11 +1083,11 @@ verify(Variants_vector objs[NUM_PL_STRATEGIES], size_t size, size_t pls_num) // Assign and check results for (size_t qi = 0; qi < size; ++qi) { // Assign object to a face - Face_const_handle* fh_ref = boost::get(&(objs[0][qi])); + Face_const_handle* fh_ref = std::get_if(&(objs[0][qi])); if (fh_ref) { for (size_t pl = 1; pl < pls_num; ++pl) { Face_const_handle* fh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (fh_cur) { if ((*fh_cur) != (*fh_ref)) { std::cout << "Error: point location number " << pl << std::endl; @@ -1107,13 +1102,13 @@ verify(Variants_vector objs[NUM_PL_STRATEGIES], size_t size, size_t pls_num) std::cout << "Expected: a face." << std::endl; result += -1; Halfedge_const_handle* hh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (hh_cur) { std::cout << "Actual: a halfedge." << std::endl; continue; } Vertex_const_handle* vh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (vh_cur) { std::cout << "Actual: a vertex." << std::endl; continue; @@ -1129,11 +1124,11 @@ verify(Variants_vector objs[NUM_PL_STRATEGIES], size_t size, size_t pls_num) // Assign object to a halfedge Halfedge_const_handle* hh_ref = - boost::get(&(objs[0][qi])); + std::get_if(&(objs[0][qi])); if (hh_ref) { for (size_t pl = 1; pl < pls_num; ++pl) { Halfedge_const_handle* hh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (hh_cur) { if (((*hh_cur) != (*hh_ref)) && ((*hh_cur)->twin() != (*hh_ref))) { std::cout << "Error: point location number " << pl << std::endl; @@ -1150,13 +1145,13 @@ verify(Variants_vector objs[NUM_PL_STRATEGIES], size_t size, size_t pls_num) << std::endl; result += -1; Face_const_handle* fh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (fh_cur) { std::cout << "Actual: a face." << std::endl; continue; } Vertex_const_handle* vh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (vh_cur) { std::cout << "Actual: a vertex." << std::endl; continue; @@ -1168,11 +1163,11 @@ verify(Variants_vector objs[NUM_PL_STRATEGIES], size_t size, size_t pls_num) // Assign object to a vertex Vertex_const_handle* vh_ref = - boost::get(&(objs[0][qi])); + std::get_if(&(objs[0][qi])); if (vh_ref) { for (size_t pl = 1; pl < pls_num; ++pl) { Vertex_const_handle* vh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (vh_cur) { if ((*vh_cur) != (*vh_ref)) { std::cout << "Error: point location number " << pl << std::endl; @@ -1188,13 +1183,13 @@ verify(Variants_vector objs[NUM_PL_STRATEGIES], size_t size, size_t pls_num) std::cout << "Expected: a vertex: "<< (*vh_ref)->point() << std::endl; result += -1; Face_const_handle* fh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (fh_cur) { std::cout << "Actual: a face." << std::endl; continue; } Halfedge_const_handle* hh_cur = - boost::get(&(objs[pl][qi])); + std::get_if(&(objs[pl][qi])); if (hh_cur) { std::cout << "Actual: a halfedge." << std::endl; continue; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h index 9bfe463e3bf..f03b66bb81d 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h @@ -136,8 +136,8 @@ protected: typename Traits::Equal_2 equal = this->m_geom_traits.equal_2_object(); if (equal(exp_answer, real_answer)) return true; - std::string exp_answer_str = boost::lexical_cast(exp_answer); - std::string real_answer_str = boost::lexical_cast(real_answer); + std::string exp_answer_str = boost::lexical_cast( CGAL::IO::oformat(exp_answer) ); + std::string real_answer_str = boost::lexical_cast( CGAL::IO::oformat(real_answer) ); this->print_answer(exp_answer_str, real_answer_str, "x-monotone curve"); return false; } diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h index 680ae201d40..3331200a607 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h @@ -733,7 +733,7 @@ min_vertex_wrapper(std::istringstream& str_stream) unsigned int id1, id2; str_stream >> id1 >> id2; Point_2& exp_answer = this->m_points[id2]; - std::cout << "Test: min_vertex( " << this->m_xcurves[id1] << " ) ? " + std::cout << "Test: min_vertex( " << CGAL::IO::oformat(this->m_xcurves[id1]) << " ) ? " << exp_answer << " "; Point_2 real_answer = @@ -751,7 +751,7 @@ max_vertex_wrapper(std::istringstream& str_stream) unsigned int id1, id2; str_stream >> id1 >> id2; Point_2& exp_answer = this->m_points[id2]; - std::cout << "Test: max_vertex( " << this->m_xcurves[id1] << " ) ? " + std::cout << "Test: max_vertex( " << CGAL::IO::oformat(this->m_xcurves[id1]) << " ) ? " << exp_answer << " "; Point_2 real_answer = @@ -767,7 +767,7 @@ is_vertical_wrapper(std::istringstream& str_stream) unsigned int id; str_stream >> id; bool exp_answer = this->get_expected_boolean(str_stream); - std::cout << "Test: is_vertical( " << this->m_xcurves[id] << " ) ? " + std::cout << "Test: is_vertical( " << CGAL::IO::oformat(this->m_xcurves[id]) << " ) ? " << exp_answer << " "; bool real_answer = @@ -789,7 +789,7 @@ compare_y_at_x_wrapper(std::istringstream& str_stream) str_stream >> id1 >> id2; unsigned int exp_answer = this->get_expected_enum(str_stream); std::cout << "Test: compare_y_at_x( " << this->m_points[id1] << "," - << this->m_xcurves[id2] << " ) ? " << exp_answer << " "; + << CGAL::IO::oformat(this->m_xcurves[id2]) << " ) ? " << exp_answer << " "; unsigned int real_answer = this->m_geom_traits.compare_y_at_x_2_object()(this->m_points[id1], @@ -853,8 +853,8 @@ compare_y_at_x_right_wrapper(std::istringstream& str_stream) unsigned int id1, id2, id3; str_stream >> id1 >> id2 >> id3; unsigned int exp_answer = this->get_expected_enum(str_stream); - std::cout << "Test: compare_y_at_x_right( " << this->m_xcurves[id1] << "," - << this->m_xcurves[id2] << ", " << this->m_points[id3] << " ) ? " + std::cout << "Test: compare_y_at_x_right( " << CGAL::IO::oformat(this->m_xcurves[id1]) << "," + << CGAL::IO::oformat(this->m_xcurves[id2]) << ", " << this->m_points[id3] << " ) ? " << exp_answer << " "; unsigned int real_answer = @@ -891,8 +891,8 @@ equal_curves_wrapper(std::istringstream& str_stream) unsigned int id1, id2; str_stream >> id1 >> id2; bool exp_answer = this->get_expected_boolean(str_stream); - std::cout << "Test: equal( " << this->m_xcurves[id1] << ", " - << this->m_xcurves[id2] << " ) ? " << exp_answer << " "; + std::cout << "Test: equal( " << CGAL::IO::oformat(this->m_xcurves[id1]) << ", " + << CGAL::IO::oformat(this->m_xcurves[id2]) << " ) ? " << exp_answer << " "; bool real_answer = this->m_geom_traits.equal_2_object()(this->m_xcurves[id1], this->m_xcurves[id2]); @@ -913,12 +913,12 @@ make_x_monotone_wrapper(std::istringstream& str_stream) typedef Geom_traits_T Traits; typedef typename Traits::Point_2 Point_2; typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; CGAL_USE_TYPE(typename Traits::Curve_2); unsigned int id; str_stream >> id; - std::cout << "Test: make_x_monotone( " << this->m_curves[id] << " ) ? "; + std::cout << "Test: make_x_monotone( " << CGAL::IO::oformat(this->m_curves[id]) << " ) ? "; std::vector objs; this->m_geom_traits.make_x_monotone_2_object()(this->m_curves[id], std::back_inserter(objs)); @@ -934,14 +934,14 @@ make_x_monotone_wrapper(std::istringstream& str_stream) unsigned int id; // The id of the point or x-monotone str_stream >> id; // ... curve respectively - const auto* xcv_ptr = boost::get(&(objs[i])); + const auto* xcv_ptr = std::get_if(&(objs[i])); if (xcv_ptr != nullptr) { if (!this->compare(type, 1u, "type")) return false; if (!this->compare_curves(this->m_xcurves[id], *xcv_ptr)) return false; continue; } - const auto* pt_ptr = boost::get(&(objs[i])); + const auto* pt_ptr = std::get_if(&(objs[i])); assert(pt_ptr != nullptr); if (!this->compare(type, 0u, "type")) return false; if (!this->compare_points(this->m_points[id], *pt_ptr)) return false; @@ -969,7 +969,7 @@ intersect_wrapper(std::istringstream& str_stream) typedef typename Traits::Multiplicity Multiplicity; typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; unsigned int id1, id2; @@ -979,8 +979,8 @@ intersect_wrapper(std::istringstream& str_stream) this->m_xcurves[id2], std::back_inserter(xections)); - std::cout << "Test: intersect( " << this->m_xcurves[id1] << "," - << this->m_xcurves[id2] << " ) ? "; + std::cout << "Test: intersect( " << CGAL::IO::oformat(this->m_xcurves[id1]) << "," + << CGAL::IO::oformat(this->m_xcurves[id2]) << " ) ? "; size_t num; str_stream >> num; if (! this->compare(num, xections.size(), "size")) return false; @@ -995,7 +995,7 @@ intersect_wrapper(std::istringstream& str_stream) unsigned int exp_type = 1; const X_monotone_curve_2* cv_p = - boost::get(&(xections[i])); + std::get_if(&(xections[i])); if (cv_p != nullptr) { if (! this->compare(type, exp_type, "type")) return false; @@ -1005,7 +1005,7 @@ intersect_wrapper(std::istringstream& str_stream) exp_type = 0; const Intersection_point* p_p = - boost::get(&(xections[i])); + std::get_if(&(xections[i])); assert(p_p != nullptr); if (! this->compare(type, exp_type, "type")) return false; if (! this->compare_points(this->m_points[id], p_p->first)) return false; @@ -1031,7 +1031,7 @@ bool Traits_test::split_wrapper(std::istringstream& str_stream) unsigned int id1, id2, id3, id4; str_stream >> id1 >> id2 >> id3 >> id4; X_monotone_curve_2 cv1, cv2; - std::cout << "Test: split( " << this->m_xcurves[id1] << "," + std::cout << "Test: split( " << CGAL::IO::oformat(this->m_xcurves[id1]) << "," << this->m_points[id2] << " ) ? "; this->m_geom_traits.split_2_object()(this->m_xcurves[id1], @@ -1069,8 +1069,8 @@ are_mergeable_wrapper_imp(std::istringstream& str_stream, CGAL::Tag_true) unsigned int id1, id2; str_stream >> id1 >> id2; bool exp_answer = this->get_expected_boolean(str_stream); - std::cout << "Test: are_mergeable( " << this->m_xcurves[id1] << ", " - << this->m_xcurves[id2] << " ) ? " << exp_answer << " "; + std::cout << "Test: are_mergeable( " << CGAL::IO::oformat(this->m_xcurves[id1]) << ", " + << CGAL::IO::oformat(this->m_xcurves[id2]) << " ) ? " << exp_answer << " "; bool real_answer = this->m_geom_traits.are_mergeable_2_object()(this->m_xcurves[id1], @@ -1107,8 +1107,8 @@ Traits_test::merge_wrapper_imp(std::istringstream& str_stream, unsigned int id1, id2, id; str_stream >> id1 >> id2 >> id; X_monotone_curve_2 cv; - std::cout << "Test: merge( " << this->m_xcurves[id1] << ", " - << this->m_xcurves[id2] << " ) ? " << this->m_xcurves[id] << " "; + std::cout << "Test: merge( " << CGAL::IO::oformat(this->m_xcurves[id1]) << ", " + << CGAL::IO::oformat(this->m_xcurves[id2]) << " ) ? " << CGAL::IO::oformat(this->m_xcurves[id]) << " "; this->m_geom_traits.merge_2_object()(this->m_xcurves[id1], this->m_xcurves[id2], cv); @@ -1181,7 +1181,7 @@ parameter_space_in_x_wrapper_imp(std::istringstream& str_stream, CGAL::Arr_curve_end cv_end = CGAL::ARR_MIN_END; if (curves_op) { cv_end = static_cast(next_input.second); - std::cout << "Test: parameter_space_x( " << this->m_xcurves[id] << " , " + std::cout << "Test: parameter_space_x( " << CGAL::IO::oformat(this->m_xcurves[id]) << " , " << (cv_end == CGAL::ARR_MIN_END ? "MIN_END" : "MAX_END") << " ) ? "; next_input = this->get_next_input(str_stream); @@ -1248,8 +1248,8 @@ compare_y_near_boundary_wrapper_imp(std::istringstream& str_stream, assert(next_input.first == Base::CURVE_END); CGAL::Arr_curve_end cv_end = static_cast(next_input.second); - std::cout << "Test: compare_y_near_boundary( " << this->m_xcurves[id1] - << " , " << this->m_xcurves[id2] << " , " + std::cout << "Test: compare_y_near_boundary( " << CGAL::IO::oformat(this->m_xcurves[id1]) + << " , " << CGAL::IO::oformat(this->m_xcurves[id2]) << " , " << (cv_end == CGAL::ARR_MIN_END ? "MIN_END" : "MAX_END") << " ) ? "; next_input = this->get_next_input(str_stream); @@ -1309,7 +1309,7 @@ parameter_space_in_y_wrapper_imp(std::istringstream& str_stream, CGAL::Arr_curve_end cv_end = CGAL::ARR_MIN_END; if (curves_op) { cv_end = static_cast(next_input.second); - std::cout << "Test: parameter_space_y( " << this->m_xcurves[id] << " , " + std::cout << "Test: parameter_space_y( " << CGAL::IO::oformat(this->m_xcurves[id]) << " , " << (cv_end == CGAL::ARR_MIN_END ? "MIN_END" : "MAX_END") << " ) ? "; next_input = this->get_next_input(str_stream); @@ -1381,8 +1381,8 @@ compare_x_near_boundary_wrapper_imp(std::istringstream& str_stream, CGAL::Arr_curve_end cv_end = static_cast(next_input.second); - std::cout << this->m_xcurves[id1] << ", " - << this->m_xcurves[id2] << " , " + std::cout << CGAL::IO::oformat(this->m_xcurves[id1]) << ", " + << CGAL::IO::oformat(this->m_xcurves[id2]) << " , " << this->curve_end_str(cv_end) << " ) ? "; next_input = this->get_next_input(str_stream); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Vertical_decomposition_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Vertical_decomposition_test.h index 6ffb18e01f3..1fd487652e8 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Vertical_decomposition_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Vertical_decomposition_test.h @@ -44,9 +44,9 @@ public: typedef typename Arrangement::Edge_const_iterator Edge_const_iterator; typedef typename Arrangement::Vertex_const_iterator Vertex_const_iterator; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; typedef typename std::pair Vert_pair; typedef typename std::pair Vert_decomp_entry; @@ -196,14 +196,14 @@ compare(const Result_type& expected, Vert_type actual) auto obj = *actual; // Assign object to a face. - if (const auto* fh_expected = boost::get(&(expected))) { - if (boost::get(&obj)) { + if (const auto* fh_expected = std::get_if(&(expected))) { + if (std::get_if(&obj)) { std::cout << "Error: vertical decomposition!" << std::endl; std::cout << "Expected: a face." << std::endl; std::cout << "Actual: a vertex." << std::endl; return false; } - if (boost::get(&obj)) { + if (std::get_if(&obj)) { std::cout << "Error: vertical decomposition!" << std::endl; std::cout << "Expected: a face." << std::endl; std::cout << "Actual: a halfedge." << std::endl; @@ -213,9 +213,9 @@ compare(const Result_type& expected, Vert_type actual) } // Assign object to a halfedge. - const auto* hh_expected = boost::get(&(expected)); + const auto* hh_expected = std::get_if(&(expected)); if (hh_expected) { - if (const auto* hh_actual = boost::get(&obj)) { + if (const auto* hh_actual = std::get_if(&obj)) { if (*hh_expected == *hh_actual) return true; std::cout << "Error: vertical decomposition!" << std::endl; @@ -230,13 +230,13 @@ compare(const Result_type& expected, Vert_type actual) std::cout << "Expected: a halfedge, " << (*hh_expected)->curve() << std::endl; - if (const auto* vh_actual = boost::get(&obj)) { + if (const auto* vh_actual = std::get_if(&obj)) { std::cout << "Actual: a vertex, " << (*vh_actual)->point() << std::endl; return false; } Face_const_handle fh_actual; - if (boost::get(&obj)) { + if (std::get_if(&obj)) { std::cout << "Actual: a face." << std::endl; return false; } @@ -245,9 +245,9 @@ compare(const Result_type& expected, Vert_type actual) } // Assign object to a vertex. - const auto* vh_expected = boost::get(&(expected)); + const auto* vh_expected = std::get_if(&(expected)); if (vh_expected) { - if (const auto* vh_actual = boost::get(&obj)) { + if (const auto* vh_actual = std::get_if(&obj)) { if (*vh_expected == *vh_actual) return true; std::cout << "Error: vertical decomposition!" << std::endl; @@ -261,12 +261,12 @@ compare(const Result_type& expected, Vert_type actual) std::cout << "Error: vertical decomposition!" << std::endl; std::cout << "Expected: a vertex, " << (*vh_expected)->point() << std::endl; - if (const auto* hh_actual = boost::get(&obj)) { + if (const auto* hh_actual = std::get_if(&obj)) { std::cout << "Actual: a halfedge, " << (*hh_actual)->curve() << std::endl; return false; } - if (boost::get(&obj)) { + if (std::get_if(&obj)) { std::cout << "Actual: a face." << std::endl; return false; } @@ -291,22 +291,22 @@ print(const Vert_decomp_entry& result) assert(obj_below); auto obj = *obj_below; std::cout << " feature below: "; - if (const auto* hh = boost::get(&obj)) + if (const auto* hh = std::get_if(&obj)) std::cout << '[' << (*hh)->curve() << ']'; - else if (const auto* vh = boost::get(&obj)) + else if (const auto* vh = std::get_if(&obj)) std::cout << '(' << (*vh)->point() << ')'; - else if (const auto* fh = boost::get(&obj)) + else if (const auto* fh = std::get_if(&obj)) std::cout << "NONE"; else std::cout << "EMPTY"; assert(obj_above); obj = *obj_above; std::cout << " feature above: "; - if (const auto* hh = boost::get(&obj)) + if (const auto* hh = std::get_if(&obj)) std::cout << '[' << (*hh)->curve() << ']'; - else if (const auto* vh = boost::get(&obj)) + else if (const auto* vh = std::get_if(&obj)) std::cout << '(' << (*vh)->point() << ')'; - else if (const auto* vh = boost::get(&obj)) + else if (const auto* vh = std::get_if(&obj)) std::cout << "NONE"; else std::cout << "EMPTY"; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake index 898b96445fe..783ba994ab8 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake @@ -706,15 +706,6 @@ function(test_point_location_segments) compile_and_run_with_flags(test_point_location segments "${flags}" segments) endfunction() -# For backward compatibility -function(test_point_location_segments_version) - set(nt ${CGAL_GMPQ_NT}) - set(kernel ${CARTESIAN_KERNEL}) - set(geom_traits ${SEGMENT_GEOM_TRAITS}) - set(flags "-DTEST_NT=${nt} -DTEST_KERNEL=${kernel} -DTEST_GEOM_TRAITS=${geom_traits} -DCGAL_ARR_POINT_LOCATION_VERSION=1") - compile_and_run_with_flags(test_point_location segments "${flags}" segments_version) -endfunction() - # For backward compatibility function(test_point_location_segments_conversion) set(nt ${CGAL_GMPQ_NT}) @@ -1366,7 +1357,6 @@ test_overlay_segments() test_overlay_spherical_arcs() test_point_location_segments() -test_point_location_segments_version() test_point_location_segments_conversion() test_point_location_circle_segments() test_point_location_linear() diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake index ee92d955c82..4d62ce61777 100755 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake @@ -911,16 +911,6 @@ test_point_location_segments() compile_and_run_with_flags test_point_location segments "$flags" } -# For backward compatibility -test_point_location_segments_version() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DCGAL_ARR_POINT_LOCATION_VERSION=1"; - compile_and_run_with_flags test_point_location segments "$flags" -} - # For backward compatibility test_point_location_segments_conversion() { @@ -1706,7 +1696,6 @@ test_overlay_segments test_overlay_spherical_arcs test_point_location_segments -test_point_location_segments_version test_point_location_segments_conversion test_point_location_circle_segments test_point_location_linear diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_arc_polycurve.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_arc_polycurve.cpp index 2856f82b076..ff71cbf9ac9 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_arc_polycurve.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_arc_polycurve.cpp @@ -19,7 +19,7 @@ typedef Sub_traits_2::CoordNT CoordNT; typedef Sub_traits_2::Point_2 Point_2; typedef Sub_traits_2::Curve_2 Subcurve_2; typedef Sub_traits_2::X_monotone_curve_2 Subcurve_x_monotone_2; -typedef boost::variant +typedef std::variant Make_sub_x_monotone_result; void check_equal() @@ -81,8 +81,8 @@ void check_intersect(Traits_2::Make_x_monotone_2 make_x_monotone_2(curve1, std::back_inserter(x_monotone_curves)); make_x_monotone_2(curve2, std::back_inserter(x_monotone_curves)); - const auto* x_curve1 = boost::get(curves[0]); - const auto* x_curve2 = boost::get(curves[1]); + const auto* x_curve1 = std::get(curves[0]); + const auto* x_curve2 = std::get(curves[1]); std::vector Points_of_intersection; @@ -100,7 +100,7 @@ void check_intersect(Traits_2::Make_x_monotone_2 curve3 = Subcurve_2(c6, 1, CGAL::CLOCKWISE, s6, t6); make_x_monotone_2(curve3, std::back_inserter(x_curves)); - const auto* x_curve2 = boost::get<>(&x_curves[2]); + const auto* x_curve2 = std::get<>(&x_curves[2]); Points_of_intersection.clear(); //intersect_2(X_monotone_curve1, X_monotone_curve2, @@ -131,8 +131,8 @@ check_compare_end_points_xy_2(Traits_2::Compare_endpoints_xy_2 std::vector x_curves; make_x_monotone_2(curve1, std::back_inserter(x_curves)); - const auto* x_curve1 = boost::get(&x_curves[0]); - const auto* x_curve2 = boost::get(&x_curves[1]); + const auto* x_curve1 = std::get_if(&x_curves[0]); + const auto* x_curve2 = std::get_if(&x_curves[1]); auto res = compare_endpoints_xy_2(x_curve1); std::cout<< "The first result is: " << res << std::endl; @@ -143,7 +143,7 @@ check_compare_end_points_xy_2(Traits_2::Compare_endpoints_xy_2 Point_2 s2 = Point_2(one_plus_sqrt_3, CoordNT(1)); curve2 = Subcurve_2(circ2, s1, t1); make_x_monotone_2(curve2, std::back_inserter(x_curves)); - const auto* x_curve2 = boost::get(&x_curves[1]); + const auto* x_curve2 = std::get_if(&x_curves[1]); res = compare_endpoints_xy_2(x_curve2); @@ -170,7 +170,7 @@ void check_split(Traits_2::Split_2 split_2, //make x_monotone std::vector x_curves; make_x_monotone_2(curve, std::back_inserter(x_curves)); - const auto* x_curve1 = boost::get(&x_curves[0]); + const auto* x_curve1 = std::get_if(&x_curves[0]); // Subcurve_x_monotone_2 split_x_monotone_curve1, split_x_monotone_curve2 ; //split_2(X_monotone_curve, Kernel::Point_2::Kernel::Point_2(1, 4), @@ -200,8 +200,8 @@ void check_is_vertical(Traits_2::Make_x_monotone_2 //std::vector x_monotone_polycurves; - const auto* x_polycurve1 = boost::get(&x_curves[0]); - const auto* x_polycurve2 = boost::get(&x_curves[1]); + const auto* x_polycurve1 = std::get_if(&x_curves[0]); + const auto* x_polycurve2 = std::get_if(&x_curves[1]); bool res = is_vertical(x_polycurve1); std::cout << "Is_verticle:: The xmonotone curve (quarter circle) is : " @@ -232,8 +232,8 @@ void check_compare_y_at_x_2(Traits_2::Make_x_monotone_2 make_x_monotone_2, for (const auto& cv : curves) make_x_monotone_2(cv, std::back_inserter(x_curves)); - const auto* x_polycurve1 = boost::get(&x_curves[0]); - const auto* x_polycurve2 = boost::get(&x_curves[1]); + const auto* x_polycurve1 = std::get_if(&x_curves[0]); + const auto* x_polycurve2 = std::get_if(&x_curves[1]); Kernel::Point_2 p_test = Kernel::Point_2(3, 1); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_bezier_polycurve.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_bezier_polycurve.cpp index 9936d4648ec..f36f4cc5b2a 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_bezier_polycurve.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_bezier_polycurve.cpp @@ -34,7 +34,7 @@ typedef CGAL::Arr_polyline_traits_2 Bezier_polycurve_traits; typedef Bezier_polycurve_traits::Curve_2 Polycurve_bezier; typedef Bezier_polycurve_traits::X_monotone_curve_2 X_polycurve_bezier; -typedef boost::variant +typedef std::variant Make_x_monotone_result; int main (int argc, char *argv[]) @@ -60,7 +60,7 @@ int main (int argc, char *argv[]) //creating x-mono bezier bezier_traits.make_x_monotone_2_object()(curve_1, std::back_inserter(objs)); //std::cout << "number of x_curves: " << obj_vector.size() << std::endl; - const auto* x_curve_1 = boost::get(&(obj_vector[0])); + const auto* x_curve_1 = std::get_if(&(obj_vector[0])); assert(x_curve_1); //std::cout << x_curve << std::endl; @@ -74,7 +74,7 @@ int main (int argc, char *argv[]) //creating x-monotne obj_vector.clear(); bezier_traits.make_x_monotone_2_object()( curve_2, std::back_inserter(objs)); - const auto* x_curve_2 = boost::get(&(obj_vector[0])); + const auto* x_curve_2 = std::get_if(&(obj_vector[0])); //push curves into polyline vectors curves_vector.push_back(curve_1); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_circular_arc_polycurve.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_circular_arc_polycurve.cpp index 32395799ae5..9c65e0f3ca9 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_circular_arc_polycurve.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_circular_arc_polycurve.cpp @@ -92,7 +92,7 @@ void check_make_x_monotone(typename GeometryTraits::Curve_2 cv, typedef typename Geometry_traits_2::Point_2 Point_2; typedef typename Geometry_traits_2::X_monotone_traits_2 X_monotone_traits_2; - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::vector objs; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_conic_polycurve.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_conic_polycurve.cpp index dda30274d8d..98bedd90038 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_conic_polycurve.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_conic_polycurve.cpp @@ -107,7 +107,7 @@ void check_equal() { typedef typename Traits::Point_2 Point_2; typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2; typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; std::vector intersection_points; @@ -623,7 +623,7 @@ template void check_make_x_monotne_curve(const typename GeometryTraits::Curve_2& c1) { typename GeometryTraits::Point_2 Point_2; typename GeometryTraits::X_monotone_curve_2 X_monotone_curve_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; Polycurve_conic_traits_2 traits; std::vector objs; traits.make_x_monotone_2_object()(c1, std::back_inserter(objs)); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_polycurve_intersection.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_polycurve_intersection.cpp index 2c0a68510c7..dda2f0c27c9 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_polycurve_intersection.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_polycurve_intersection.cpp @@ -26,18 +26,19 @@ struct Test_functor Test_functor (const X_monotone_polyline& reference) : reference (&reference) { } - void operator() (const CGAL::Object& obj) const + void operator()(std::pair) { - const X_monotone_polyline* poly - = CGAL::object_cast(&obj); - assert(poly != nullptr); // Intersection is not a polyline + assert(!"This overload should not be called"); + } + void operator() (const X_monotone_polyline& poly) const + { typename X_monotone_polyline::Point_const_iterator itref = reference->points_begin(), - itpoly = poly->points_begin(); + itpoly = poly.points_begin(); for (; itref != reference->points_end() - && itpoly != poly->points_end(); + && itpoly != poly.points_end(); ++ itref, ++ itpoly) assert(*itref == *itpoly); } diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_vert_ray_shoot_vert_segments.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_vert_ray_shoot_vert_segments.cpp index 07cfc97e199..3dd0399d9dd 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_vert_ray_shoot_vert_segments.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_vert_ray_shoot_vert_segments.cpp @@ -22,17 +22,17 @@ void vertical_ray_shooting_query if (shoot_up) std::cout << " Shooting up from (" << q << ") : "; else std::cout << " Shooting down from (" << q << ") : "; - if (auto* e_p = boost::get(&obj)) { + if (auto* e_p = std::get_if(&obj)) { // We hit an edge: std::cout << "hit an edge: " << (*e_p)->curve() << std::endl; } - else if (auto* v_p = boost::get(&obj)) { + else if (auto* v_p = std::get_if(&obj)) { // We hit a vertex: if ((*v_p)->is_isolated()) std::cout << "hit an isolated vertex: " << (*v_p)->point() << std::endl; else std::cout << "hit a vertex: " << (*v_p)->point() << std::endl; } - else if (auto* f_p = boost::get(&obj)) { + else if (auto* f_p = std::get_if(&obj)) { // We did not hit anything: assert((*f_p)->is_unbounded()); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_zone.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_zone.cpp index 54291b4bf5a..78b9cbadd4d 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_zone.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_zone.cpp @@ -17,7 +17,7 @@ typedef CGAL::Arrangement_2 Arrangement_2; typedef Arrangement_2::Vertex_handle Vertex_handle; typedef Arrangement_2::Halfedge_handle Halfedge_handle; typedef Arrangement_2::Face_handle Face_handle; -typedef boost::variant +typedef std::variant Zone_result; #define N_SEGMENTS 3 diff --git a/BGL/examples/BGL_LCC/CMakeLists.txt b/BGL/examples/BGL_LCC/CMakeLists.txt index f9230373e23..84a67c0f960 100644 --- a/BGL/examples/BGL_LCC/CMakeLists.txt +++ b/BGL/examples/BGL_LCC/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(CGAL REQUIRED) # create a target per cppfile file( - GLOB_RECURSE cppfiles + GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) foreach(cppfile ${cppfiles}) diff --git a/BGL/examples/BGL_triangulation_2/dijkstra.cpp b/BGL/examples/BGL_triangulation_2/dijkstra.cpp index 3a1b061eb9e..1e63fc8810f 100644 --- a/BGL/examples/BGL_triangulation_2/dijkstra.cpp +++ b/BGL/examples/BGL_triangulation_2/dijkstra.cpp @@ -60,9 +60,9 @@ int main(int argc,char* argv[]) for(vertex_descriptor vd : vertices(tr)) { std::cout << vd->point() << " [" << vertex_id_map[vd] << "] "; - std::cout << " has distance = " << boost::get(distance_pmap,vd) + std::cout << " has distance = " << get(distance_pmap,vd) << " and predecessor "; - vd = boost::get(predecessor_pmap,vd); + vd = get(predecessor_pmap,vd); std::cout << vd->point() << " [" << vertex_id_map[vd] << "]\n "; } diff --git a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h index e6f4136481d..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: diff --git a/BGL/include/CGAL/boost/graph/helpers.h b/BGL/include/CGAL/boost/graph/helpers.h index 34597b22192..76135fd82a7 100644 --- a/BGL/include/CGAL/boost/graph/helpers.h +++ b/BGL/include/CGAL/boost/graph/helpers.h @@ -60,7 +60,7 @@ bool is_border(typename boost::graph_traits::edge_descriptor ed, cons returns a halfedge which is on a border and whose target vertex is `vd`, if such a halfedge exists. */ template -boost::optional::halfedge_descriptor> +std::optional::halfedge_descriptor> is_border(typename boost::graph_traits::vertex_descriptor vd, const FaceGraph& g) { @@ -72,7 +72,7 @@ is_border(typename boost::graph_traits::vertex_descriptor vd, } } // empty - return boost::optional::halfedge_descriptor>(); + return std::optional::halfedge_descriptor>(); } namespace BGL { diff --git a/BGL/test/BGL/test_Gwdwg.cpp b/BGL/test/BGL/test_Gwdwg.cpp index e250c5a63a2..08a742f0be1 100644 --- a/BGL/test/BGL/test_Gwdwg.cpp +++ b/BGL/test/BGL/test_Gwdwg.cpp @@ -22,7 +22,7 @@ int main() Mesh mesh2(sm2); try { if( target( *(halfedges(mesh).first), mesh2) == *(vertices(mesh).first)){ - CGAL_error_msg("The previous lie should have throw a exception"); + CGAL_error_msg("The previous line should have throw an exception"); } } catch(...){ std::cerr << "we caught it" << std::endl; diff --git a/BGL/test/BGL/test_Surface_mesh.cpp b/BGL/test/BGL/test_Surface_mesh.cpp deleted file mode 100644 index f47f4f49f94..00000000000 --- a/BGL/test/BGL/test_Surface_mesh.cpp +++ /dev/null @@ -1,125 +0,0 @@ -#define BOOST_TEST_MODULE graph_traits test -#include -#include - -BOOST_AUTO_TEST_CASE( edges_test ) -{ - edge_iterator eb, ee; - vertex_iterator vb, ve; - - Surface_fixture f; - boost::tie(eb, ee) = edges(f.m); - boost::tie(vb, ve) = vertices(f.m); - BOOST_CHECK(std::distance(eb, ee) == 7); - BOOST_CHECK(std::distance(vb, ve) == 5); - - Cube_fixture cf; - boost::tie(eb, ee) = edges(cf.m); - boost::tie(vb, ve) = vertices(cf.m); - BOOST_CHECK(std::distance(eb, ee) == 18); - BOOST_CHECK(std::distance(vb, ve) == 8); -} - -BOOST_AUTO_TEST_CASE( out_edges_test ) -{ - Surface_fixture f; - - BOOST_CHECK(out_degree(f.u, f.m) == 2); - BOOST_CHECK(out_degree(f.v, f.m) == 4); - std::pair out = out_edges(f.v, f.m); - BOOST_CHECK(std::distance(out.first, out.second) == 4); - out_edge_iterator it = out.first; - while(it != out.second) { - // the source should always be u - BOOST_CHECK(source(*it, f.m) == f.v); - // the target never - BOOST_CHECK(target(*it, f.m) != f.v); - ++it; - } -} - -BOOST_AUTO_TEST_CASE( in_edges_test ) -{ - Surface_fixture f; - BOOST_CHECK(in_degree(f.u, f.m) == 2); - BOOST_CHECK(in_degree(f.x, f.m) == 3); - BOOST_CHECK(in_degree(f.v, f.m) == 4); - std::pair in = in_edges(f.v, f.m); - BOOST_CHECK(std::distance(in.first, in.second) == 4); - - in_edge_iterator it = in.first; - while(it != in.second) { - // the source should never be u - BOOST_CHECK(source(*it, f.m) != f.v); - // the target must always be u - BOOST_CHECK(target(*it, f.m) == f.v); - ++it; - } -} - -BOOST_AUTO_TEST_CASE( in_out_equality ) -{ - // in and out degrees must be equal for each vertex - Cube_fixture f; - for(Sm::Vertex_iterator it = f.m.vertices_begin(); - it != f.m.vertices_end(); ++it) { - BOOST_CHECK(in_degree(*it, f.m) == out_degree(*it, f.m)); - } -} - -BOOST_AUTO_TEST_CASE( face_test ) -{ - Surface_fixture f; - std::pair - enc = enclosure(f.f1, f.m); - BOOST_CHECK(enc.first != enc.second); - BOOST_CHECK(std::distance(enc.first, enc.second) == 3); - enclosure_iterator begin = enc.first; - while(begin != enc.second) - { - BOOST_CHECK(face(*begin, f.m) == f.f1); - ++begin; - } -} - -BOOST_AUTO_TEST_CASE( weight_map_test ) -{ - Surface_fixture f; - Cube_fixture c; - - CGAL::SM_edge_weight_pmap wm1 = boost::get(boost::edge_weight, c.m); - edge_iterator eb, ee; - boost::test_tools::check_is_close_t check_close; - for(boost::tie(eb, ee) = edges(c.m); eb != ee; ++eb) { - BOOST_CHECK( - check_close(wm1[*eb], 2.0, boost::test_tools::percent_tolerance_t(0.00001)) - || check_close(wm1[*eb], 2.82843, boost::test_tools::percent_tolerance_t(0.001))); - } -} - - -BOOST_AUTO_TEST_CASE( vertices_test ) -{ - Surface_fixture f; - - // boost::property_map::type vi_map = get(f.m, boost::vertex_index); - - // vertex_iterator b,e; - - // for(boost::tie(b,e) = vertices(f.m); - // b!= e; - // ++b){ - // std::cout << boost::get(vi_map, *(b)) << std::endl; - // } - - // boost::property_map::type ew_map = get(f.m, boost::edge_weight); - - // edge_iterator be, ee; - - // for(boost::tie(be,ee) = edges(f.m); - // be!= ee; - // ++be){ - // std::cout << boost::get(ew_map, *(be)) << std::endl; - // } - -} diff --git a/BGL/test/BGL/test_deprecated_io.cpp b/BGL/test/BGL/test_deprecated_io.cpp index 65459a997fd..8c22b9f17df 100644 --- a/BGL/test/BGL/test_deprecated_io.cpp +++ b/BGL/test/BGL/test_deprecated_io.cpp @@ -21,18 +21,18 @@ int main() SM sm_in, sm_out; Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0); CGAL::make_triangle(p0, p1, p2, sm_out); - bool ok = CGAL::write_off("tmp.off", sm_out); + bool ok = CGAL::write_off("tmp_deprecated.off", sm_out); assert(ok); - ok = CGAL::read_off("tmp.off", sm_in); + ok = CGAL::read_off("tmp_deprecated.off", sm_in); assert(ok); assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); sm_in.clear(); - std::ofstream os("tmp.off"); + std::ofstream os("tmp_deprecated.off"); ok = CGAL::write_off(os, sm_out); assert(ok); os.close(); - std::ifstream is("tmp.off"); + std::ifstream is("tmp_deprecated.off"); ok = CGAL::read_off(is, sm_in); assert(ok); assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); @@ -40,18 +40,18 @@ int main() sm_in.clear(); #ifdef CGAL_USE_VTK //vtk - os.open("tmp.vtp"); + os.open("tmp_deprecated.vtp"); ok = CGAL::write_vtp(os, sm_out); assert(ok); os.close(); - ok = CGAL::IO::read_VTP("tmp.vtp", sm_in); + ok = CGAL::IO::read_VTP("tmp_deprecated.vtp", sm_in); assert(ok); assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); sm_in.clear(); #endif //wrl - os.open("tmp.wrl"); + os.open("tmp_deprecated.wrl"); ok = CGAL::write_wrl(os, sm_out); assert(ok); os.close(); 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/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Concepts/BarycentricCoordinates_2.h b/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Concepts/BarycentricCoordinates_2.h index 7f9ea3dfcbb..da4b706b9bb 100644 --- a/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Concepts/BarycentricCoordinates_2.h +++ b/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Concepts/BarycentricCoordinates_2.h @@ -44,7 +44,7 @@ public: Weights are computed with respect to a query point of the type `Traits::Point_2` and stored in the output iterator `output`. The function returns a pointer to the last stored element. */ - boost::optional + std::optional weights( const Traits::Point_2& query_point, OutputIterator& output) { @@ -57,7 +57,7 @@ public: are computed with respect to a query point of the type `Traits::Point_2` and stored in the output iterator `output`. The function returns a pointer to the last stored element. */ - boost::optional + std::optional coordinates_on_bounded_side( const Traits::Point_2& query_point, OutputIterator& output, @@ -72,7 +72,7 @@ public: are computed with respect to a query point of the type `Traits::Point_2` and stored in the output iterator `output`. The function returns a pointer to the last stored element. */ - boost::optional + std::optional coordinates_on_unbounded_side( const Traits::Point_2& query_point, OutputIterator& output, diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h index 91d96c2f1c4..8ef72b0bce5 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h @@ -24,7 +24,7 @@ #include // Boost headers. -#include +#include // CGAL namespace. namespace CGAL { @@ -98,7 +98,7 @@ public: // This function computes discrete harmonic weights (unnormalized coordinates) for a chosen query point. template - inline boost::optional weights(const Point_2 &query_point, OutputIterator &output) + inline std::optional weights(const Point_2 &query_point, OutputIterator &output) { return weights_2(query_point, output); } @@ -108,7 +108,7 @@ public: // This function computes discrete harmonic barycentric coordinates for a chosen query point on the bounded side of a strictly convex polygon. // \pre The provided polygon is strictly convex. template - inline boost::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { switch(type_of_algorithm) { @@ -124,14 +124,14 @@ public: // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // This function computes discrete harmonic barycentric coordinates for a chosen query point on the unbounded side of a strictly convex polygon. // \pre The provided polygon is strictly convex. template - inline boost::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm, const bool warning_tag = true) + inline std::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm, const bool warning_tag = true) { switch(type_of_algorithm) { @@ -147,8 +147,8 @@ public: // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // Information Functions @@ -184,7 +184,7 @@ private: // Compute discrete harmonic weights without normalization. template - boost::optional weights_2(const Point_2 &query_point, OutputIterator &output) + std::optional weights_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -220,7 +220,7 @@ private: ++output; // Return weights. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON BOUNDED SIDE. @@ -228,7 +228,7 @@ private: // Compute discrete harmonic coordinates on the bounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) { CGAL_precondition( type_of_polygon() == STRICTLY_CONVEX ); @@ -281,13 +281,13 @@ private: ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // Compute discrete harmonic coordinates on the bounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) { CGAL_precondition( type_of_polygon() == STRICTLY_CONVEX ); @@ -338,7 +338,7 @@ private: ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON UNBOUNDED SIDE. @@ -346,7 +346,7 @@ private: // Compute discrete harmonic coordinates on the unbounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) + std::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) { if(warning_tag) std::cout << std::endl << "ATTENTION: Discrete harmonic coordinates might be not well-defined outside the polygon!" << std::endl; @@ -358,7 +358,7 @@ private: // Compute discrete harmonic coordinates on the unbounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) + std::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) { if(warning_tag) std::cout << std::endl << "ATTENTION: Discrete harmonic coordinates might be not well-defined outside the polygon!" << std::endl; diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h index 381291b3a33..94db271c736 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h @@ -24,7 +24,7 @@ #include // Boost headers. -#include +#include // CGAL namespace. namespace CGAL { @@ -118,7 +118,7 @@ public: /// `CGAL::Barycentric_coordinates::PRECISE` - default slow algorithm, which is as precise as possible and /// `CGAL::Barycentric_coordinates::FAST` - fast algorithm, which is less precise but much faster. template - inline boost::optional operator()(const Point_2 &query_point, OutputIterator output, Query_point_location query_point_location = UNSPECIFIED_LOCATION, Type_of_algorithm type_of_algorithm = PRECISE) + inline std::optional operator()(const Point_2 &query_point, OutputIterator output, Query_point_location query_point_location = UNSPECIFIED_LOCATION, Type_of_algorithm type_of_algorithm = PRECISE) { return coordinates_2(query_point, output, query_point_location, type_of_algorithm); } @@ -129,7 +129,7 @@ public: /// \pre The provided query point belongs to the polygon's boundary. /// \pre (0 <= index) && (index < number of the polygon's vertices). template - inline boost::optional compute_on_edge(const Point_2 &query_point, const int index, OutputIterator output) const + inline std::optional compute_on_edge(const Point_2 &query_point, const int index, OutputIterator output) const { return coordinates_on_boundary_2(query_point, index, output); } @@ -139,7 +139,7 @@ public: /// /// \pre (0 <= index) && (index < number of the polygon's vertices). template - inline boost::optional compute_on_vertex(const int index, OutputIterator output) const + inline std::optional compute_on_vertex(const int index, OutputIterator output) const { return coordinates_on_vertex_2(index, output); } @@ -149,7 +149,7 @@ public: /// /// \pre The provided query point belongs to the polygon's interior, excluding the boundary. template - inline boost::optional compute_weights(const Point_2 &query_point, OutputIterator output) + inline std::optional compute_weights(const Point_2 &query_point, OutputIterator output) { return weights_2(query_point, output); } @@ -183,7 +183,7 @@ public: // This function accepts a container of the type `std::vector` // and returns an iterator of the type `std::back_insert_iterator` // that is placed past-the-end of the resulting sequence of coordinate values. - inline boost::optional > > operator()(const Point_2 &query_point, std::vector &output_vector, Query_point_location query_point_location = UNSPECIFIED_LOCATION, Type_of_algorithm type_of_algorithm = PRECISE) + inline std::optional > > operator()(const Point_2 &query_point, std::vector &output_vector, Query_point_location query_point_location = UNSPECIFIED_LOCATION, Type_of_algorithm type_of_algorithm = PRECISE) { output_vector.reserve(output_vector.size() + number_of_vertices); typedef typename std::back_insert_iterator > OutputIterator; @@ -198,7 +198,7 @@ public: // // \pre The provided query point belongs to the polygon's boundary. // \pre (0 <= index) && (index < number of the polygon's vertices). - inline boost::optional > > compute_on_edge(const Point_2 &query_point, const int index, std::vector &output_vector) const + inline std::optional > > compute_on_edge(const Point_2 &query_point, const int index, std::vector &output_vector) const { output_vector.reserve(output_vector.size() + number_of_vertices); typedef typename std::back_insert_iterator > OutputIterator; @@ -212,7 +212,7 @@ public: // that is placed past-the-end of the resulting sequence of coordinate values. // // \pre (0 <= index) && (index < number of the polygon's vertices). - inline boost::optional > > compute_on_vertex(const int index, std::vector &output_vector) const + inline std::optional > > compute_on_vertex(const int index, std::vector &output_vector) const { output_vector.reserve(output_vector.size() + number_of_vertices); typedef typename std::back_insert_iterator > OutputIterator; @@ -226,7 +226,7 @@ public: // that is placed past-the-end of the resulting sequence of weight values. // // \pre The provided query point belongs to the polygon's interior, excluding the boundary. - inline boost::optional > > compute_weights(const Point_2 &query_point, std::vector &output_vector) + inline std::optional > > compute_weights(const Point_2 &query_point, std::vector &output_vector) { output_vector.reserve(output_vector.size() + number_of_vertices); typedef typename std::back_insert_iterator > OutputIterator; @@ -283,7 +283,7 @@ private: // Compute weights on the bounded side of the polygon - see precondition. template - inline boost::optional weights_2(const Point_2 &query_point, OutputIterator &output) + inline std::optional weights_2(const Point_2 &query_point, OutputIterator &output) { // This is the only global precondition on the computation of weights. CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_BOUNDED_SIDE ); @@ -295,7 +295,7 @@ private: // Compute coordinates at any point in the plane. template - boost::optional coordinates_2(const Point_2 &query_point, OutputIterator &output, const Query_point_location query_point_location, const Type_of_algorithm type_of_algorithm) + std::optional coordinates_2(const Point_2 &query_point, OutputIterator &output, const Query_point_location query_point_location, const Type_of_algorithm type_of_algorithm) { // Determine a location of the current query point provided by the user. switch(query_point_location) @@ -324,13 +324,13 @@ private: // Pointer cannot be here. Something went wrong. const bool query_point_location_failure = true; CGAL_postcondition( !query_point_location_failure ); - if(!query_point_location_failure) return boost::optional(output); - else return boost::optional(); + if(!query_point_location_failure) return std::optional(output); + else return std::optional(); } // Compute coordinates at any point in the plane with unspecified location. template - boost::optional coordinates_unspecified_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + std::optional coordinates_unspecified_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { // Determine a global location of the current query point. switch(CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits)) @@ -355,15 +355,15 @@ private: // Pointer cannot be here. Something went wrong. const bool query_point_location_failure = true; CGAL_postcondition( !query_point_location_failure ); - if(!query_point_location_failure) return boost::optional(output); - else return boost::optional(); + if(!query_point_location_failure) return std::optional(output); + else return std::optional(); } // COORDINATES ON BOUNDED SIDE. // Compute coordinates on the bounded side of the polygon - precise or fast. template - inline boost::optional coordinates_on_bounded_side_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_bounded_side_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_BOUNDED_SIDE ); @@ -374,7 +374,7 @@ private: // Compute coordinates along the boundary of the polygon with beforehand known index of the edge to which the query point belongs. template - boost::optional coordinates_on_boundary_2(const Point_2 &query_point, const int index, OutputIterator &output) const + std::optional coordinates_on_boundary_2(const Point_2 &query_point, const int index, OutputIterator &output) const { CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_BOUNDARY ); CGAL_precondition( (0 <= index) && (index < int(number_of_vertices)) ); @@ -393,7 +393,7 @@ private: // Compute segment coordinates along the chosen edge with the index = `index`. Segment_coordinates_2 segment_coordinates(vertex[index], vertex[index+1]); - boost::optional success = segment_coordinates(query_point, output); + std::optional success = segment_coordinates(query_point, output); ++output; for(int i = index + 1; i < last; ++i) { @@ -402,20 +402,20 @@ private: } // Return coordinates. - if(success) return boost::optional(output); - else return boost::optional(); + if(success) return std::optional(output); + else return std::optional(); } // Pointer cannot be here. Something went wrong. const bool coordinates_on_boundary_failure = true; CGAL_postcondition( !coordinates_on_boundary_failure ); - if(!coordinates_on_boundary_failure) return boost::optional(output); - else return boost::optional(); + if(!coordinates_on_boundary_failure) return std::optional(output); + else return std::optional(); } // Compute coordinates along the boundary of the polygon without beforehand known index of the edge to which the query point belongs. template - boost::optional coordinates_on_boundary_2(const Point_2 &query_point, OutputIterator &output) const + std::optional coordinates_on_boundary_2(const Point_2 &query_point, OutputIterator &output) const { CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_BOUNDARY ); @@ -435,7 +435,7 @@ private: // Compute segment coordinates along the edge with the query point. Segment_coordinates_2 segment_coordinates(vertex[index], vertex[index+1]); - boost::optional success = segment_coordinates(query_point, output); + std::optional success = segment_coordinates(query_point, output); if(success) status = true; ++output; break; @@ -452,20 +452,20 @@ private: } // Return coordinates. - if(status == true) return boost::optional(output); - else return boost::optional(); + if(status == true) return std::optional(output); + else return std::optional(); } // Pointer cannot be here. Something went wrong. const bool coordinates_on_boundary_failure = true; CGAL_postcondition( !coordinates_on_boundary_failure ); - if(!coordinates_on_boundary_failure) return boost::optional(output); - else return boost::optional(); + if(!coordinates_on_boundary_failure) return std::optional(output); + else return std::optional(); } // Compute coordinates for a query point lying on the last edge of the polygon. template - boost::optional coordinates_on_last_edge_2(const Point_2 &query_point, const int last, OutputIterator &output) const + std::optional coordinates_on_last_edge_2(const Point_2 &query_point, const int last, OutputIterator &output) const { // Some convenient typedefs. typedef std::vector Coordinate_vector; @@ -478,7 +478,7 @@ private: // Compute segment coordinates along the last edge of the polygon. Segment_coordinates_2 segment_coordinates(vertex[last], vertex[0]); - boost::optional success = segment_coordinates(query_point, std::back_inserter(coordinate)); + std::optional success = segment_coordinates(query_point, std::back_inserter(coordinate)); // Store all the coordinate values. // All the values are zeros apart from those corresponding to the first and the last vertices of the polygon. @@ -492,15 +492,15 @@ private: ++output; // Return computed coordinates. - if(success) return boost::optional(output); - else return boost::optional(); + if(success) return std::optional(output); + else return std::optional(); } // COORDINATES AT VERTEX. // Compute coordinates for a query point lying at one of the polygon's vertices with beforehand known vertex's index. template - boost::optional coordinates_on_vertex_2(const int index, OutputIterator &output) const + std::optional coordinates_on_vertex_2(const int index, OutputIterator &output) const { CGAL_precondition( (0 <= index) && (index < int(number_of_vertices)) ); @@ -519,12 +519,12 @@ private: } // Return coordinates. - return boost::optional(output); + return std::optional(output); } // Compute coordinates for a query point lying at one of the polygon's vertices without beforehand known vertex's index. template - boost::optional coordinates_on_vertex_2(const Point_2 &query_point, OutputIterator &output) const + std::optional coordinates_on_vertex_2(const Point_2 &query_point, OutputIterator &output) const { int index = -1; CGAL_precondition( is_query_point_at_vertex(query_point, index) ); @@ -554,15 +554,15 @@ private: // Return coordinates. CGAL_postcondition( !coordinates_on_vertex_failure ); - if(!coordinates_on_vertex_failure) return boost::optional(output); - else return boost::optional(); + if(!coordinates_on_vertex_failure) return std::optional(output); + else return std::optional(); } // COORDINATES ON UNBOUNDED SIDE. // Compute coordinates on the unbounded side of the polygon - precise or fast. template - inline boost::optional coordinates_on_unbounded_side_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_unbounded_side_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_UNBOUNDED_SIDE ); diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h index ef895698b0a..2dca8b2b8fb 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h @@ -26,7 +26,7 @@ // Boost headers. #include -#include +#include // Barycentric coordinates headers. #include @@ -154,7 +154,7 @@ public: // This function computes mean value weights (unnormalized coordinates) for a chosen query point. template - inline boost::optional weights(const Point_2 &query_point, OutputIterator &output) + inline std::optional weights(const Point_2 &query_point, OutputIterator &output) { return weights_2(query_point, output); } @@ -163,7 +163,7 @@ public: // This function computes mean value barycentric coordinates for a chosen query point on the bounded side of a simple polygon. template - inline boost::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { switch(type_of_algorithm) { @@ -179,13 +179,13 @@ public: // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // This function computes mean value barycentric coordinates for a chosen query point on the unbounded side of a simple polygon. template - inline boost::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { switch(type_of_algorithm) { @@ -201,8 +201,8 @@ public: // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // Information Functions @@ -243,7 +243,7 @@ private: // Compute mean value weights without normalization. template - boost::optional weights_2(const Point_2 &query_point, OutputIterator &output) + std::optional weights_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -293,7 +293,7 @@ private: ++output; // Return weights. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON BOUNDED SIDE. @@ -301,7 +301,7 @@ private: // Compute mean value coordinates on the bounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -368,13 +368,13 @@ private: ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // Compute mean value coordinates on the bounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -437,7 +437,7 @@ private: ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON UNBOUNDED SIDE. @@ -445,7 +445,7 @@ private: // Compute mean value coordinates on the unbounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) { // Use the same formulas as for the bounded side since they are also valid on the unbounded side. return coordinates_on_bounded_side_precise_2(query_point, output); @@ -454,7 +454,7 @@ private: // Compute mean value coordinates on the unbounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) { // Use the same formulas as for the bounded side since they are also valid on the unbounded side. return coordinates_on_bounded_side_fast_2(query_point, output); diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h index 469b84a09a3..d43f879bdf5 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h @@ -24,7 +24,7 @@ #include // Boost headers. -#include +#include // CGAL namespace. namespace CGAL { @@ -96,7 +96,7 @@ public: // This function computes Wachspress weights (unnormalized coordinates) for a chosen query point. template - inline boost::optional weights(const Point_2 &query_point, OutputIterator &output) + inline std::optional weights(const Point_2 &query_point, OutputIterator &output) { return weights_2(query_point, output); } @@ -106,7 +106,7 @@ public: // This function computes Wachspress barycentric coordinates for a chosen query point on the bounded side of a strictly convex polygon. // \pre The provided polygon is strictly convex. template - inline boost::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { switch(type_of_algorithm) { @@ -122,14 +122,14 @@ public: // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // This function computes Wachspress barycentric coordinates for a chosen query point on the unbounded side of a strictly convex polygon. // \pre The provided polygon is strictly convex. template - inline boost::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm, const bool warning_tag = true) + inline std::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm, const bool warning_tag = true) { switch(type_of_algorithm) { @@ -145,8 +145,8 @@ public: // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // Information Functions @@ -181,7 +181,7 @@ private: // Compute Wachspress weights without normalization. template - boost::optional weights_2(const Point_2 &query_point, OutputIterator &output) + std::optional weights_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -214,7 +214,7 @@ private: ++output; // Return weights. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON BOUNDED SIDE. @@ -222,7 +222,7 @@ private: // Compute Wachspress coordinates on the bounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) { CGAL_precondition( type_of_polygon() == STRICTLY_CONVEX ); @@ -265,13 +265,13 @@ private: ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // Compute Wachspress coordinates on the bounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) { CGAL_precondition( type_of_polygon() == STRICTLY_CONVEX ); @@ -319,7 +319,7 @@ private: ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON UNBOUNDED SIDE. @@ -327,7 +327,7 @@ private: // Compute Wachspress coordinates on the unbounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) + std::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) { if(warning_tag) std::cout << std::endl << "ATTENTION: Wachspress coordinates might be not well-defined outside the polygon!" << std::endl; @@ -339,7 +339,7 @@ private: // Compute Wachspress coordinates on the unbounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) + std::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) { if(warning_tag) std::cout << std::endl << "ATTENTION: Wachspress coordinates might be not well-defined outside the polygon!" << std::endl; diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h index 7faa4f49eb2..0cc79e16bc0 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h @@ -31,7 +31,7 @@ // Boost headers. #include -#include +#include // Internal includes. #include @@ -222,7 +222,7 @@ namespace internal { typename VertexRange, typename GeomTraits, typename PointMap> - boost::optional< std::pair > + std::optional< std::pair > get_edge_index_approximate( const VertexRange& polygon, const typename GeomTraits::Point_2& query, @@ -264,7 +264,7 @@ namespace internal { return std::make_pair(Query_point_location::ON_EDGE, i); } } - return boost::none; + return std::nullopt; } // Why this one does not work for harmonic coordinates? - Due to the imprecisions in the Mesh_2 class. @@ -273,7 +273,7 @@ namespace internal { typename VertexRange, typename GeomTraits, typename PointMap> - boost::optional< std::pair > + std::optional< std::pair > get_edge_index_exact( const VertexRange& polygon, const typename GeomTraits::Point_2& query, @@ -303,7 +303,7 @@ namespace internal { return std::make_pair(Query_point_location::ON_EDGE, i); } } - return boost::none; + return std::nullopt; } // Check whether a query point belongs to the last polygon edge. @@ -409,7 +409,7 @@ namespace internal { typename VertexRange, typename GeomTraits, typename PointMap> - boost::optional< std::pair > + std::optional< std::pair > locate_wrt_polygon_2( const VertexRange& polygon, const typename GeomTraits::Point_2& query, @@ -430,7 +430,7 @@ namespace internal { default: return std::make_pair(Query_point_location::UNSPECIFIED, std::size_t(-1)); } - return boost::none; + return std::nullopt; } } // namespace internal diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h index b2b3120e0ba..99f9c6fb76f 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h @@ -245,7 +245,7 @@ namespace Barycentric_coordinates { /// Computes segment barycentric coordinates for a chosen query point with respect to both vertices of the segment. /// Computed coordinates are stored in the output iterator `output`. template - inline boost::optional operator()( + inline std::optional operator()( const Point_2 &query_point, OutputIterator output) { return segment_coordinates_2(query_point, output); @@ -280,7 +280,7 @@ namespace Barycentric_coordinates { // This function accepts a container of the type `std::vector` // and returns an iterator of the type `std::back_insert_iterator` // that is placed past-the-end of the resulting sequence of coordinate values. - inline boost::optional > > operator()( + inline std::optional > > operator()( const Point_2 &query_point, std::vector &output_vector) { output_vector.reserve(output_vector.size() + 2); @@ -327,7 +327,7 @@ namespace Barycentric_coordinates { // Compute segment coordinates. template - boost::optional segment_coordinates_2( + std::optional segment_coordinates_2( const Point_2 &query_point, OutputIterator &output) { // Project point on the segment and compute the first coordinate. @@ -341,7 +341,7 @@ namespace Barycentric_coordinates { ++output; // Output both coordinates. - return boost::optional(output); + return std::optional(output); } }; diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h index 33dd658db9a..bc681d3bf38 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h @@ -257,7 +257,7 @@ namespace Barycentric_coordinates { /// Computes triangle barycentric coordinates for a chosen query point with respect to all three vertices of the triangle. /// Computed coordinates are stored in the output iterator `output`. template - inline boost::optional operator()( + inline std::optional operator()( const Point_2 &query_point, OutputIterator output) { return triangle_coordinates_2(query_point, output); @@ -298,7 +298,7 @@ namespace Barycentric_coordinates { // This function accepts a container of the type `std::vector` // and returns an iterator of the type `std::back_insert_iterator` // that is placed past-the-end of the resulting sequence of coordinate values. - inline boost::optional > > operator()( + inline std::optional > > operator()( const Point_2 &query_point, std::vector &output_vector) { output_vector.reserve(output_vector.size() + 3); @@ -347,7 +347,7 @@ namespace Barycentric_coordinates { // Compute triangle coordinates. template - boost::optional triangle_coordinates_2( + std::optional triangle_coordinates_2( const Point_2 &query_point, OutputIterator &output) { // Compute some related sub-areas. @@ -372,7 +372,7 @@ namespace Barycentric_coordinates { ++output; // Output all coordinates. - return boost::optional(output); + return std::optional(output); } }; diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_dh_deprecated_api.cpp b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_dh_deprecated_api.cpp index c19f597f43f..5a0da9d0165 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_dh_deprecated_api.cpp +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_dh_deprecated_api.cpp @@ -19,7 +19,7 @@ typedef CGAL::Barycentric_coordinates::Triangle_coordinates_2 Triangle_c typedef CGAL::Barycentric_coordinates::Discrete_harmonic_2 Discrete_harmonic; typedef CGAL::Barycentric_coordinates::Generalized_barycentric_coordinates_2 Discrete_harmonic_coordinates; -typedef boost::optional Output_type; +typedef std::optional Output_type; using std::cout; using std::endl; using std::string; @@ -50,8 +50,8 @@ int main() for (Scalar y = step; y < limit; y += step) { const Point point(x, y); - const Output_type tri_result = triangle_coordinates(point, tri_coordinates); - const Output_type dh_result = discrete_harmonic_coordinates(point, old_coordinates); + /* const Output_type tri_result = */triangle_coordinates(point, tri_coordinates); + /* const Output_type dh_result = */discrete_harmonic_coordinates(point, old_coordinates); CGAL::Barycentric_coordinates::discrete_harmonic_coordinates_2( vertices, point, std::back_inserter(new_coordinates)); diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_mv_deprecated_api.cpp b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_mv_deprecated_api.cpp index 25436a0bd6e..50cbb51b97b 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_mv_deprecated_api.cpp +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_mv_deprecated_api.cpp @@ -19,7 +19,7 @@ typedef CGAL::Barycentric_coordinates::Triangle_coordinates_2 Triangle_c typedef CGAL::Barycentric_coordinates::Mean_value_2 Mean_value; typedef CGAL::Barycentric_coordinates::Generalized_barycentric_coordinates_2 Mean_value_coordinates; -typedef boost::optional Output_type; +typedef std::optional Output_type; using std::cout; using std::endl; using std::string; @@ -53,8 +53,8 @@ int main() for (Scalar y = step; y < limit; y += step) { const Point point(x, y); - const Output_type tri_result = triangle_coordinates(point, tri_coordinates); - const Output_type mv_result = mean_value_coordinates(point, old_coordinates); + /* const Output_type tri_result = */triangle_coordinates(point, tri_coordinates); + /* const Output_type mv_result = */mean_value_coordinates(point, old_coordinates); CGAL::Barycentric_coordinates::mean_value_coordinates_2( vertices, point, std::back_inserter(new_coordinates)); diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_sc_deprecated_api.cpp b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_sc_deprecated_api.cpp index d0b363c7a7e..90ec3474739 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_sc_deprecated_api.cpp +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_sc_deprecated_api.cpp @@ -12,7 +12,7 @@ typedef std::back_insert_iterator Vector_insert_iterator; typedef CGAL::Barycentric_coordinates::Segment_coordinates_2 Segment_coordinates; -typedef boost::optional Output_type; +typedef std::optional Output_type; using std::cout; using std::endl; using std::string; @@ -44,7 +44,7 @@ int main() int count = 0; for (int i = 0; i < 6; ++i) { - const Output_type result = segment_coordinates(query_points[i], std::back_inserter(old_coordinates)); + segment_coordinates(query_points[i], std::back_inserter(old_coordinates)); CGAL::Barycentric_coordinates::segment_coordinates_2( first_vertex, second_vertex, query_points[i], std::back_inserter(new_coordinates)); diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_tc_deprecated_api.cpp b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_tc_deprecated_api.cpp index e37784a8adb..58506a5cec0 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_tc_deprecated_api.cpp +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_tc_deprecated_api.cpp @@ -12,7 +12,7 @@ typedef std::back_insert_iterator Vector_insert_iterator; typedef CGAL::Barycentric_coordinates::Triangle_coordinates_2 Triangle_coordinates; -typedef boost::optional Output_type; +typedef std::optional Output_type; using std::cout; using std::endl; using std::string; @@ -43,7 +43,7 @@ int main() int count = 0; for (int i = 0; i < 5; ++i) { - const Output_type result = triangle_coordinates(query_points[i], std::back_inserter(old_coordinates)); + triangle_coordinates(query_points[i], std::back_inserter(old_coordinates)); CGAL::Barycentric_coordinates::triangle_coordinates_2( first_vertex, second_vertex, third_vertex, query_points[i], std::back_inserter(new_coordinates)); diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_wp_deprecated_api.cpp b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_wp_deprecated_api.cpp index a44bdb5391d..eb4c47ec2b5 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_wp_deprecated_api.cpp +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/test_wp_deprecated_api.cpp @@ -19,7 +19,7 @@ typedef CGAL::Barycentric_coordinates::Triangle_coordinates_2 Triangle_c typedef CGAL::Barycentric_coordinates::Wachspress_2 Wachspress; typedef CGAL::Barycentric_coordinates::Generalized_barycentric_coordinates_2 Wachspress_coordinates; -typedef boost::optional Output_type; +typedef std::optional Output_type; using std::cout; using std::endl; using std::string; @@ -51,8 +51,8 @@ int main() for (Scalar y = step; y < limit; y += step) { const Point point(x, y); - const Output_type tri_result = triangle_coordinates(point, tri_coordinates); - const Output_type wp_result = wachspress_coordinates(point, old_coordinates); + /* const Output_type tri_result = */triangle_coordinates(point, tri_coordinates); + /* const Output_type wp_result = */wachspress_coordinates(point, old_coordinates); CGAL::Barycentric_coordinates::wachspress_coordinates_2( vertices, point, std::back_inserter(new_coordinates)); diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Intersect_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Intersect_2.h index 0d90fbacb2f..0ceae84b195 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Intersect_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Intersect_2.h @@ -18,7 +18,7 @@ public: /*! computes the intersections of `xc1` and `xc2` and inserts them in an * ascending lexicographic \f$ xy\f$-order into a range beginning at - * `oi`. The type `OutputIterator` dereferences a `boost::variant` of either the + * `oi`. The type `OutputIterator` dereferences a `std::variant` of either the * type `pair` or the type * `ArrDirectionalTraits::X_monotone_curve_2`. An object of the former type diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp index 853340f86d2..d99e287d40b 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp @@ -3,6 +3,7 @@ */ #include +#include #ifndef CGAL_USE_CORE #include @@ -108,22 +109,13 @@ bool read_bezier(char const* aFileName, Bezier_polygon_set& rSet) for (unsigned int k = 0; k < n_curves; ++k) { // Read the current curve and subdivide it into x-monotone subcurves. - std::list x_objs; - std::list::const_iterator xoit; - Bezier_X_monotone_curve xcv; Bezier_traits traits; Bezier_traits::Make_x_monotone_2 make_x_monotone = traits.make_x_monotone_2_object(); Bezier_curve B = read_bezier_curve(in_file, lDoubleFormat); if (B.number_of_control_points() >= 2) { - - make_x_monotone(B, std::back_inserter(x_objs)); - - for (xoit = x_objs.begin(); xoit != x_objs.end(); ++xoit) { - if (CGAL::assign(xcv, *xoit)) - xcvs.push_back(xcv); - } + make_x_monotone(B, CGAL::dispatch_or_drop_output(std::back_inserter(xcvs))); } } diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/circle_segment.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/circle_segment.cpp index 7cf3ec3dc7b..02bf08f58ca 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/circle_segment.cpp +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/circle_segment.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -24,22 +25,15 @@ typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2; // Construct a polygon from a circle. Polygon_2 construct_polygon (const Circle_2& circle) { - // Subdivide the circle into two x-monotone arcs. + // Subdivide the circle into two x-monotone arcs and construct the polygon. Traits_2 traits; Curve_2 curve (circle); - std::list objects; - traits.make_x_monotone_2_object() (curve, std::back_inserter(objects)); - assert(objects.size() == 2); - - // Construct the polygon. Polygon_2 pgn; - X_monotone_curve_2 arc; - std::list::iterator iter; - for (iter = objects.begin(); iter != objects.end(); ++iter) { - CGAL::assign (arc, *iter); - pgn.push_back (arc); - } + traits.make_x_monotone_2_object() (curve, + CGAL::dispatch_or_drop_output(std::back_inserter(pgn))); + std::cout << "size: " << pgn.size() << "\n"; + assert(pgn.size() == 2); return pgn; } diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/conic_traits_adapter.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/conic_traits_adapter.cpp index a35c90e29c6..f215b1a5267 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/conic_traits_adapter.cpp +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/conic_traits_adapter.cpp @@ -3,6 +3,7 @@ */ #include +#include #ifndef CGAL_USE_CORE #include @@ -42,14 +43,8 @@ typedef Traits_2::Point_2 Point_2; // sub-arcs and append these sub-arcs as polygon edges. void append_conic_arc(Polygon_2& polygon, const Curve_2& arc) { Conic_traits_2 traits; - std::list objects; - X_monotone_curve_2 xarc; - - traits.make_x_monotone_2_object() (arc, std::back_inserter(objects)); - for (auto it = objects.begin(); it != objects.end(); ++it) { - if (CGAL::assign (xarc, *it)) - polygon.push_back (xarc); - } + traits.make_x_monotone_2_object() (arc, + CGAL::dispatch_or_drop_output(std::back_inserter(polygon))); } int main() { diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/set_union.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/set_union.cpp index cecacc9a107..8ff0ced217f 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/set_union.cpp +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/set_union.cpp @@ -25,22 +25,14 @@ typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2; // Construct a polygon from a circle. Polygon_2 construct_polygon (const Circle_2& circle) { - // Subdivide the circle into two x-monotone arcs. + // Subdivide the circle into two x-monotone arcs and construct the polygon Traits_2 traits; Curve_2 curve (circle); - std::list objects; - traits.make_x_monotone_2_object() (curve, std::back_inserter(objects)); - assert(objects.size() == 2); - - // Construct the polygon. Polygon_2 pgn; - X_monotone_curve_2 arc; - std::list::iterator iter; - for (iter = objects.begin(); iter != objects.end(); ++iter) { - CGAL::assign (arc, *iter); - pgn.push_back (arc); - } + traits.make_x_monotone_2_object() (curve, + CGAL::dispatch_or_drop_output(std::back_inserter(pgn))); + assert(pgn.size() == 2); return pgn; } diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h index 8a0744933e3..e4d6936e78f 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h @@ -160,11 +160,8 @@ public: typedef const std::pair Intersection_base_point; - typedef boost::variant + typedef std::variant Intersection_base_result; - typedef const std::pair Intersection_point; - typedef boost::variant - Intersection_result; const auto* base_traits = m_traits.m_base_traits; auto base_cmp_xy = base_traits->compare_xy_2_object(); @@ -183,16 +180,16 @@ public: // the extenede X_monotone_curve_2 for (const auto& xection : xections) { const Intersection_base_point* base_pt = - boost::get(&xection); + std::get_if(&xection); if (base_pt != nullptr) { Point_2 point_plus(base_pt->first); // the extended point *oi++ = - Intersection_result(std::make_pair(point_plus, base_pt->second)); + std::make_pair(point_plus, base_pt->second); continue; } const Base_x_monotone_curve_2* overlap_cv = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(overlap_cv != nullptr); unsigned int ov_bc; unsigned int ov_twin_bc; @@ -214,7 +211,7 @@ public: Curve_data cv_data(cv1.data().arr(), Halfedge_handle(), ov_bc, ov_twin_bc); - *oi++ = Intersection_result(X_monotone_curve_2(*overlap_cv, cv_data)); + *oi++ = X_monotone_curve_2(*overlap_cv, cv_data); } return oi; diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h index fdc111751de..24b69369a43 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h @@ -133,11 +133,8 @@ public: { typedef const std::pair Intersection_base_point; - typedef boost::variant + typedef std::variant Intersection_base_result; - typedef const std::pair Intersection_point; - typedef boost::variant - Intersection_result; const auto* base_traits = m_traits.m_base_traits; auto base_cmp_xy = base_traits->compare_xy_2_object(); @@ -170,17 +167,17 @@ public: // the extenede X_monotone_curve_2 for (const auto& xection : xections) { const Intersection_base_point* base_pt = - boost::get(&xection); + std::get_if(&xection); if (base_pt != nullptr) { Point_data pt_data(m_traits.invalid_index()); Point_2 point_plus(base_pt->first, pt_data); // the extended point *oi++ = - Intersection_result(std::make_pair(point_plus, base_pt->second)); + std::make_pair(point_plus, base_pt->second); continue; } const Base_x_monotone_curve_2* overlap_cv = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(overlap_cv != nullptr); unsigned int ov_bc; @@ -202,7 +199,7 @@ public: } Curve_data cv_data(ov_bc, ov_twin_bc, m_traits.invalid_index()); - *oi++ = Intersection_result(X_monotone_curve_2(*overlap_cv, cv_data)); + *oi++ = X_monotone_curve_2(*overlap_cv, cv_data); } return oi; diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h index d9d6f19c1c9..cf1574c6ace 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h @@ -387,7 +387,7 @@ public: } }; - /*! Get a Equal_2 functor object. */ + /*! Get an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(m_base_traits->equal_2_object()); diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h index f974c628e31..0f880d66ad2 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h @@ -92,7 +92,7 @@ convert_polygon(const Polygon_2& polygon, if (polygon.is_empty()) return General_polygon_2(); using Point = typename ArrTraits::Point_2; using X_monotone_curve = typename ArrTraits::X_monotone_curve_2; - using Make_x_monotone_result = boost::variant; + using Make_x_monotone_result = std::variant; auto cv = ctr(boost::range::join(CGAL::make_range(polygon.vertices_begin(), polygon.vertices_end()), CGAL::make_single(*polygon.vertices_begin()))); @@ -101,7 +101,7 @@ convert_polygon(const Polygon_2& polygon, make_x_mtn(cv, boost::make_function_output_iterator ([&](const Make_x_monotone_result& obj) - { gpgn.push_back(*(boost::get(&obj))); })); + { gpgn.push_back(*(std::get_if(&obj))); })); return gpgn; } diff --git a/Boolean_set_operations_2/include/CGAL/General_polygon_2.h b/Boolean_set_operations_2/include/CGAL/General_polygon_2.h index 93469d5e93b..f43a41e2709 100644 --- a/Boolean_set_operations_2/include/CGAL/General_polygon_2.h +++ b/Boolean_set_operations_2/include/CGAL/General_polygon_2.h @@ -38,6 +38,7 @@ public: typedef std::list Containter; typedef typename Containter::iterator Curve_iterator; typedef typename Containter::const_iterator Curve_const_iterator; + typedef X_monotone_curve_2 value_type; protected: std::list m_xcurves; diff --git a/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h b/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h index 1645afc1354..986ba9e86e1 100644 --- a/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h +++ b/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h @@ -25,6 +25,7 @@ #include #include #include +#include namespace CGAL { @@ -97,29 +98,19 @@ public: typename Traits_2::Make_x_monotone_2 make_x_monotone = traits.make_x_monotone_2_object(); typename Dxf_circles_list::iterator circ_it; - CGAL::Object obj_vec[3]; - CGAL::Object *obj_begin = (obj_vec + 0); - CGAL::Object *obj_end; - X_monotone_curve_2 cv1, cv2; for (circ_it = circles.begin(); circ_it != circles.end(); ++circ_it) { // Break the circle into two x-monotone circular arcs. const Dxf_circle_2& dxf_circ = *circ_it; Curve_2 circ (dxf_circ.first, dxf_circ.second); - - obj_end = make_x_monotone (circ, obj_begin); - CGAL_assertion(obj_end - obj_begin == 2); - - CGAL::assign(cv1, obj_vec[0]); - CGAL::assign(cv2, obj_vec[1]); - - // Generate the corresponding polygon. Circ_polygon_2 pgn; - pgn.push_back (cv1); - pgn.push_back (cv2); - *pgns = pgn; - ++pgns; + + make_x_monotone (circ, + CGAL::dispatch_or_drop_output(std::back_inserter(pgn))); + CGAL_assertion(pgn.size() == 2); + + *pgns++ = pgn; } circles.clear(); @@ -131,8 +122,6 @@ public: typename Dxf_polygon_2::iterator curr, next; Point_2 ps, pt; Circle_2 supp_circ; - std::size_t n_subarcs; - std::size_t i; for (pgn_it = polygons.begin(); pgn_it != polygons.end(); ++pgn_it) { @@ -184,15 +173,8 @@ public: // Break the arc into x-monotone subarcs (there can be at most // three subarcs) and add them to the polygon. - obj_end = make_x_monotone (circ_arc, obj_begin); - n_subarcs = (obj_end - obj_begin); - CGAL_assertion (n_subarcs <= 3); - - for (i = 0; i < n_subarcs; i++) - { - if (CGAL::assign (cv1, obj_vec[i])) - pgn.push_back (cv1); - } + make_x_monotone (circ_arc, + CGAL::dispatch_or_drop_output(std::back_inserter(pgn))); } else { diff --git a/Boolean_set_operations_2/test/Boolean_set_operations_2/test_general_polygon_constructions.cpp b/Boolean_set_operations_2/test/Boolean_set_operations_2/test_general_polygon_constructions.cpp index be2fb2d3e5b..81add300c23 100644 --- a/Boolean_set_operations_2/test/Boolean_set_operations_2/test_general_polygon_constructions.cpp +++ b/Boolean_set_operations_2/test/Boolean_set_operations_2/test_general_polygon_constructions.cpp @@ -66,11 +66,11 @@ int main() { ctr(boost::range::join(CGAL::make_range(points.begin(), points.end()), CGAL::make_single(*points.begin()))); General_pgn gpgn2; - using Make_x_monotone_result = boost::variant; + using Make_x_monotone_result = std::variant; make_x_mtn(curve2, boost::make_function_output_iterator ([&](const Make_x_monotone_result& obj) - { gpgn2.push_back(*(boost::get(&obj))); })); + { gpgn2.push_back(*(std::get_if(&obj))); })); std::cout << "gpgn2: " << gpgn2 << std::endl; // Case 3: Polyline-based GPS from polyline of segments @@ -81,7 +81,7 @@ int main() { make_x_mtn(curve3, boost::make_function_output_iterator ([&](const Make_x_monotone_result& obj) - { gpgn3.push_back(*(boost::get(&obj))); })); + { gpgn3.push_back(*(std::get_if(&obj))); })); std::cout << "gpgn3: " << gpgn3 << std::endl; if (! eql(gpgn2, gpgn3)) { 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/CGAL_ImageIO/include/CGAL/SEP_header.h b/CGAL_ImageIO/include/CGAL/SEP_header.h index 9bf345d4c6e..6a6bf2ff44d 100644 --- a/CGAL_ImageIO/include/CGAL/SEP_header.h +++ b/CGAL_ImageIO/include/CGAL/SEP_header.h @@ -56,12 +56,12 @@ public: { using boost::get; visitor vis(this, get<0>(tuple)); - boost::apply_visitor(vis, get<1>(tuple)); + std::visit(vis, get<1>(tuple)); return *this; } private: - struct visitor : public boost::static_visitor<> { + struct visitor { SEP_header_aux* self; std::string key; visitor(SEP_header_aux* header, std::string key) @@ -261,7 +261,7 @@ private: #endif // CGAL_SEP_READER_DEBUG } // end constructor of sep_header_grammar - typedef boost::variant value; typedef boost::tuple entry_type; diff --git a/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp b/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp index e0725a743e9..795375437fa 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp @@ -209,16 +209,14 @@ void hyperbolicIpelet::protected_run(int fn) } // clip circ by poincare - std::vector< CGAL::Object > result; Kernel::Circular_arc_point_2 L,R; - std::pair the_pair; + typedef std::pair The_pair; + std::vector result; - CGAL::intersection(circ, poincare, std::back_inserter(result)); + CGAL::intersection(circ, poincare, CGAL::dispatch_or_drop_output(std::back_inserter(result))); assert (result.size()==2); - assign(the_pair, result[0]); - L = the_pair.first; - assign(the_pair, result[1]); - R = the_pair.first; + L = result[0].first; + R = result[1].first; Point_2 LL(CGAL::to_double(L.x()),CGAL::to_double(L.y())); Point_2 RR(CGAL::to_double(R.x()),CGAL::to_double(R.y())); assert( LL.x() <= RR.x()); diff --git a/CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp b/CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp index 7d2026c5981..71557e65968 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp @@ -11,7 +11,6 @@ // Author(s) : Sebastien Loriot, Sylvain Pion #include -#include #include #include #include @@ -38,10 +37,10 @@ const std::string Hmsg[] = { class SkeletonIpelet : public CGAL::Ipelet_base{ - typedef boost::shared_ptr PolygonPtr ; + typedef std::shared_ptr PolygonPtr ; typedef std::vector PolygonPtrVector ; typedef CGAL::Straight_skeleton_2 Skeleton ; - typedef boost::shared_ptr SkeletonPtr ; + typedef std::shared_ptr SkeletonPtr ; void draw_straight_skeleton(const Skeleton& skeleton,double); diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h index 276e5d5c651..5373b0a3445 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h @@ -822,41 +822,34 @@ public: CGAL::Cartesian_converter conv; Exact_circle_2 exact_circle=conv(approx_circle); + typedef std::pair Cp2_mult; SK::Intersect_2 inter=SK().intersect_2_object(); - std::vector< std::pair > points; + std::vector< Cp2_mult > points; points.reserve(8); - std::vector ints; + std::vector< Cp2_mult > ints; ints.reserve(2); - std::pair tmp_pt; int indices[8]={-1,-1,-1,-1,-1,-1,-1,-1}; for (unsigned i=0;i!=4;++i){ ints.clear(); SK::Segment_2 S(conv(bbox[i]),conv(bbox[(i+1)%4])); - inter(exact_circle,SK::Line_arc_2(S),std::back_inserter(ints)); + inter(exact_circle,SK::Line_arc_2(S),dispatch_or_drop_output(std::back_inserter(ints))); unsigned index=0; - bool ok=true; switch (ints.size()){ case 1: - ok=CGAL::assign(tmp_pt,ints[0]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[0]); index=points.size()-1; indices[i]=index; indices[(i+1)%4+4]=index; break; case 2: int right_ind=i<2?0:1; - ok=CGAL::assign(tmp_pt,ints[right_ind]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[right_ind]); index=points.size()-1; indices[i]=index; - ok=CGAL::assign(tmp_pt,ints[(right_ind+1)%2]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[(right_ind+1)%2]); index=points.size()-1; indices[(i+1)%4+4]=index; break; diff --git a/Cartesian_kernel/include/CGAL/Cartesian_converter.h b/Cartesian_kernel/include/CGAL/Cartesian_converter.h index cde883c91c0..26071f43ca2 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian_converter.h +++ b/Cartesian_kernel/include/CGAL/Cartesian_converter.h @@ -56,7 +56,7 @@ struct Default_converter { // Out will be a variant, source kernel and target kernel template -struct Converting_visitor : boost::static_visitor<> { +struct Converting_visitor{ Converting_visitor(const Converter& conv, Output& out) : conv(&conv), out(&out) {} const Converter* conv; Output* out; @@ -145,13 +145,13 @@ public: // from the sequence, transform with the type mapper and throw the // new list into a variant // visit to get the type, and copy construct inside the return type - template + template typename - Type_mapper< boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >, + Type_mapper< std::optional< std::variant< U ... > >, K1, K2 >::type - operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const { + operator()(const std::optional< std::variant< U ... > >& o) const { typedef typename - Type_mapper< boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >, + Type_mapper< std::optional< std::variant< U ... > >, K1, K2 >::type result_type; result_type res; if(!o) { @@ -161,22 +161,22 @@ public: internal::Converting_visitor conv_visitor = internal::Converting_visitor(*this, res); - boost::apply_visitor(conv_visitor, *o); + std::visit(conv_visitor, *o); return res; } - template + template typename - Type_mapper< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) >, + Type_mapper< std::variant< U ... >, K1, K2 >::type - operator()(const boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > & o) const { + operator()(const std::variant< U ... > & o) const { typedef typename - Type_mapper< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) >, + Type_mapper< std::variant< U ... >, K1, K2 >::type result_type; result_type res; internal::Converting_visitor conv_visitor = internal::Converting_visitor(*this, res); - boost::apply_visitor(conv_visitor, o); + std::visit(conv_visitor, o); return res; } diff --git a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h index 6c37f7e6907..78b235c2937 100644 --- a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h +++ b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h @@ -11,7 +11,7 @@ #include #include #include "Input_data.h" -#include +#include diff --git a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmarks_arrangement.cpp index 674e5a0ea53..a0958077ead 100644 --- a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmarks_arrangement.cpp @@ -72,7 +72,7 @@ for(i=1;i<6;i++){ typedef CircularKernel::Line_arc_2 Line_arc_2; typedef CGAL::Variant_traits CircularK_Variant_Traits; - typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; + typedef std::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; bench.kernel("CK VarTraits"); @@ -93,7 +93,7 @@ for(i=1;i<6;i++){ typedef BBCircularKernel::Circular_arc_2 Circular_arc_6; typedef BBCircularKernel::Line_arc_2 Line_arc_6; - typedef boost::variant BBCircVarArc; + typedef std::variant BBCircVarArc; typedef std::vector BBCircVarContainer; typedef CGAL::Variant_traits BBCircVariantTraits; diff --git a/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h b/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h index 179ea2b2f82..216e670bfc7 100644 --- a/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h +++ b/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h @@ -11,7 +11,7 @@ #include #include #include "Input_data.h" -#include +#include class Bench { diff --git a/Circular_kernel_2/benchmark/arrangement_traits/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/arrangement_traits/benchmarks_arrangement.cpp index 5ebf26838bc..056ae74e392 100644 --- a/Circular_kernel_2/benchmark/arrangement_traits/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/arrangement_traits/benchmarks_arrangement.cpp @@ -166,7 +166,7 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i]); typedef CircularKernel::Line_arc_2 Line_arc_2; typedef CGAL::Variant_traits CircularK_Variant_Traits; - typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; + typedef std::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; bench.kernel("Circular kernel Variant traits"); diff --git a/Circular_kernel_2/benchmark/benchmark.h b/Circular_kernel_2/benchmark/benchmark.h index 92ba72909ca..e6be22a2a56 100644 --- a/Circular_kernel_2/benchmark/benchmark.h +++ b/Circular_kernel_2/benchmark/benchmark.h @@ -11,7 +11,7 @@ #include #include #include "Input_data.h" -#include +#include #include diff --git a/Circular_kernel_2/benchmark/benchmark_CK2.cpp b/Circular_kernel_2/benchmark/benchmark_CK2.cpp index fca08228340..681cba38d04 100644 --- a/Circular_kernel_2/benchmark/benchmark_CK2.cpp +++ b/Circular_kernel_2/benchmark/benchmark_CK2.cpp @@ -38,7 +38,7 @@ typedef std::vector CircularKArcContainer; typedef CircularKernel::Circular_arc_2 Circular_arc_2; typedef CircularKernel::Line_arc_2 Line_arc_2; typedef CGAL::Arr_circular_line_arc_traits_2 CircularK_Variant_Traits; -typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; +typedef std::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; @@ -55,7 +55,7 @@ typedef BBCircularKernel::Circular_arc_2 Circular_arc_6; typedef BBCircularKernel::Line_arc_2 Line_arc_6; -typedef boost::variant +typedef std::variant BBCircVarArc; typedef std::vector BBCircVarContainer; diff --git a/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp index 3b548a20e2a..59867dbd1e3 100644 --- a/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp @@ -163,7 +163,7 @@ Bench bench; //If you want create table with all datasets typedef CircularKernel::Line_arc_2 Line_arc_2; typedef CGAL::Arr_circular_line_arc_traits_2 CircularK_Variant_Traits; - typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; + typedef std::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; bench.kernel("CKVar"); @@ -197,7 +197,7 @@ bench.Compute_no_dxf BBCircVarArc; + typedef std::variant BBCircVarArc; typedef std::vector BBCircVarContainer; typedef CGAL::Arr_circular_line_arc_traits_2 BBCircVariantTraits; diff --git a/Circular_kernel_2/benchmark/bff_reader/Breader.cpp b/Circular_kernel_2/benchmark/bff_reader/Breader.cpp index 3fac248eb68..ac18cceab92 100644 --- a/Circular_kernel_2/benchmark/bff_reader/Breader.cpp +++ b/Circular_kernel_2/benchmark/bff_reader/Breader.cpp @@ -189,7 +189,7 @@ int main( int argc, char* argv[] ) { typedef CK::Circular_arc_2 Circular_arc_2; typedef CK::Line_arc_2 Line_arc_2; typedef CGAL::Variant_traits CircularK_Variant_Traits; - typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; + typedef std::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; CircularKVarArcContainer arc; typedef CGAL::Arrangement_2 Pmwx; diff --git a/Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h b/Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h index b8ad60ea3c1..3b54da14f93 100644 --- a/Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h +++ b/Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h b/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h index 1a251c11978..bb1e534e73b 100644 --- a/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h +++ b/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h @@ -11,7 +11,7 @@ #include #include #include "Input_data.h" -#include +#include class Bench { diff --git a/Circular_kernel_2/benchmark/incremental_insertion/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/incremental_insertion/benchmarks_arrangement.cpp index 8895b11f372..c00db5e079a 100644 --- a/Circular_kernel_2/benchmark/incremental_insertion/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/incremental_insertion/benchmarks_arrangement.cpp @@ -157,7 +157,7 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i],true); typedef CircularKernel::Line_arc_2 Line_arc_2; typedef CGAL::Variant_traits CircularK_Variant_Traits; - typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; + typedef std::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; bench.kernel("Circular kernel Variant traits"); diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h index 674b4ca27b2..34ba0ccc386 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h @@ -19,7 +19,7 @@ #include -#include +#include namespace CGAL { @@ -40,7 +40,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename CK::Circle_2, + std::variant< typename CK::Circle_2, typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -52,7 +52,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename CK::Circular_arc_2, + std::variant< typename CK::Circular_arc_2, typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -64,7 +64,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename CK::Line_arc_2, + std::variant< typename CK::Line_arc_2, typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -76,7 +76,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename std::pair< typename CK::Circular_arc_point_2, + std::variant< typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > @@ -92,7 +92,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename std::pair< typename CK::Circular_arc_point_2, + std::variant< typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > @@ -108,7 +108,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename CK::Line_arc_2, + std::variant< typename CK::Line_arc_2, typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -125,7 +125,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename std::pair< typename CK::Circular_arc_point_2, + std::variant< typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > @@ -155,7 +155,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename std::pair< typename CK::Circular_arc_point_2, + std::variant< typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h index 09696e5069c..b68746e4a3d 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h @@ -308,7 +308,7 @@ namespace CircularFunctors { operator()(const Circular_arc_2 &A, OutputIterator res) const { typedef std::pair relat_pos; - typedef std::pair< CGAL::Object, relat_pos> Obj_descr_2; + typedef std::pair< Circular_arc_2, relat_pos> Obj_descr_2; std::vector vec; CircularFunctors::advanced_make_xy_monotone (A, std::back_inserter(vec)); diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h index 9ced0754a2c..9e799e497f0 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h @@ -120,8 +120,6 @@ namespace CircularFunctors { const typename CK::Circle_2 & c2, OutputIterator res ) { - typedef typename CK2_Intersection_traits - ::type result_type; typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_for_circles_2_2 Equation; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; @@ -129,7 +127,7 @@ namespace CircularFunctors { Equation e2 = CircularFunctors::get_equation(c2); if (e1 == e2) { - *res++ = CGAL::internal::ck2_intersection_return(c1); + *res++ = c1; return res; } @@ -145,9 +143,7 @@ namespace CircularFunctors { for ( typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it ) { - *res++ = CGAL::internal::ck2_intersection_return - (std::make_pair(Circular_arc_point_2(it->first), - it->second )); + *res++ = std::make_pair(Circular_arc_point_2(it->first), it->second ); } return res; diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h index 61fdc75b4b6..1e577eea5b3 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h @@ -536,17 +536,15 @@ namespace CircularFunctors { const typename CK::Circular_arc_2 &a2, OutputIterator res ) { - typedef typename CK2_Intersection_traits::type result_type; - - typedef std::vector solutions_container; typedef typename CK::Circular_arc_2 Circular_arc_2; + typedef typename CK::Circle_2 Circle_2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE + typedef std::vector solutions_container; // same curve if(a1.number() == a2.number()) { - *res++ = result_type(a1); + *res++ = a1; return res; } @@ -571,14 +569,14 @@ namespace CircularFunctors { if((a1s_a2s && a1t_a2t) || (a1s_a2t && a1t_a2s)){ // Case 1 if( (a1.supporting_circle() == a2.supporting_circle()) && ((a1.on_upper_part() && a2.on_upper_part())|| (! a1.on_upper_part() && (! a2.on_upper_part())))){ - *res++ = result_type(a1); + *res++ = a1; } else { if(compare_x(a1.source(), a1.target()) == SMALLER){ - *res++ = result_type(std::make_pair(a1.source(),1u)); - *res++ = result_type(std::make_pair(a1.target(),1u)); + *res++ = std::make_pair(a1.source(),1u); + *res++ = std::make_pair(a1.target(),1u); } else { - *res++ = result_type(std::make_pair(a1.target(),1u)); - *res++ = result_type(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.target(),1u); + *res++ = std::make_pair(a1.source(),1u); } } return res; @@ -625,7 +623,7 @@ namespace CircularFunctors { if(return_q){ - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } @@ -634,16 +632,14 @@ namespace CircularFunctors { const bool sqr1_eq_sqr2 = (a1.squared_radius() == a2.squared_radius()); const bool c1_eq_c2 = (a1.center() == a2.center()); - typedef typename CK2_Intersection_traits::type result_type; if(sqr1_eq_sqr2 && c1_eq_c2) { if(a1.is_full()) { - *res++ =CGAL::internal::ck2_intersection_return(a2); + *res++ = a2; //return res; } else if(a2.is_full()) { - *res++ =CGAL::internal::ck2_intersection_return(a1); + *res++ = a1; //return res; } else { bool t2_in_a1 = has_on(a1,a2.target(),true); @@ -656,66 +652,66 @@ namespace CircularFunctors { CircularFunctors::compare_xy(a1.source(), a2.source()); if(comp < 0) { if(a1.source() == a2.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } if(a2.source() == a1.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } } else if (comp > 0) { if(a2.source() == a1.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } if(a1.source() == a2.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } } else { - *res++ =CGAL::internal::ck2_intersection_return(a1); + *res++ = a1; } } else { - *res++ =CGAL::internal::ck2_intersection_return(a2); + *res++ = a2; //return res; } } else if(t2_in_a1) { if(a1.source() == a2.target()) - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } //return res; } else if(s2_in_a1) { if(a2.source() == a1.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } //return res; } else if(has_on(a2,a1.source(),true)) { - *res++ =CGAL::internal::ck2_intersection_return(a1); + *res++ = a1; //return res; } //return res; } } else if(!c1_eq_c2) { - solutions_container solutions; + std::vector< std::variant> > solutions; #ifdef CGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES if(!Circular_arc_2::template @@ -736,24 +732,23 @@ namespace CircularFunctors { if(solutions.size() == 0) return res; else { // The supporting circles are not the same and intersects - for (typename solutions_container::iterator it = solutions.begin(); - it != solutions.end(); ++it) { + for (const auto& v : solutions) { const std::pair - *result = CGAL::object_cast - > (&(*it)); + *result = std::get_if + > (&v); #ifdef CGAL_CK_TEST_BBOX_BEFORE_HAS_ON Bbox_2 rb = result->first.bbox(); if(do_overlap(a1.bbox(), rb) && do_overlap(a2.bbox(),rb)){ if (has_on(a1,result->first,true) && has_on(a2,result->first,true)) { - *res++ =CGAL::internal::ck2_intersection_return(*result); + *res++ = *result; } } #else if (has_on(a1,result->first,true) && has_on(a2,result->first,true)) { - *res++ =CGAL::internal::ck2_intersection_return(*result); + *res++ = *result; } #endif } @@ -1069,7 +1064,7 @@ template < class CK, class OutputIterator > A.circle_number(); #endif - *res++ = make_object(A); + *res++ = A; return res; } @@ -1101,8 +1096,8 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca1); - *res++ = make_object(ca2); + *res++ = ca1; + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point1,1u))); @@ -1131,7 +1126,7 @@ template < class CK, class OutputIterator > unsigned int cn = ca1.circle_number(); #endif - *res++ = make_object(ca1); + *res++ = ca1; if (cmp_end > 0) { // We must cut in 3 parts. const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), @@ -1148,8 +1143,8 @@ template < class CK, class OutputIterator > ca3.set_circle_number(cn); #endif - *res++ = make_object(ca2); - *res++ = make_object(ca3); + *res++ = ca2; + *res++ = ca3; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point1,1u))); intersecs2.push_back(make_object(std::make_pair(x_extremal_point2,1u))); @@ -1171,7 +1166,7 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca2); + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point1,1u))); @@ -1191,7 +1186,7 @@ template < class CK, class OutputIterator > unsigned int cn = ca1.circle_number(); #endif - *res++ = make_object(ca1); + *res++ = ca1; if (cmp_end < 0) { const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point2, @@ -1207,8 +1202,8 @@ template < class CK, class OutputIterator > ca3.set_circle_number(cn); #endif - *res++ = make_object(ca2); - *res++ = make_object(ca3); + *res++ = ca2; + *res++ = ca3; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point2,1u))); @@ -1232,7 +1227,7 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca2); + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point2,1u))); @@ -1259,8 +1254,8 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca1); - *res++ = make_object(ca2); + *res++ = ca1; + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point2,1u))); @@ -1287,8 +1282,8 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca1); - *res++ = make_object(ca2); + *res++ = ca1; + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point1,1u))); @@ -1317,7 +1312,7 @@ template < class CK, class OutputIterator > OutputIterator res ) { typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef std::pair S_pair; + typedef std::pair S_pair; int cmp_begin_y = CGAL::compare @@ -1332,13 +1327,13 @@ template < class CK, class OutputIterator > ((((cmp_begin_y > 0) || (cmp_end_y > 0)) && (cmp_x > 0)) || (((cmp_begin_y < 0) || (cmp_end_y < 0)) && (cmp_x < 0)))) { - *res++ = S_pair(make_object(A),(cmp_begin_y>0 || cmp_end_y>0) ); + *res++ = S_pair(A,(cmp_begin_y>0 || cmp_end_y>0) ); return res; } // Half circles if (cmp_begin_y == 0 && cmp_end_y == 0 && cmp_x != 0) { - *res++ = std::make_pair(make_object(A), cmp_x>0 ); + *res++ = std::make_pair(A, cmp_x>0 ); return res; } @@ -1347,67 +1342,67 @@ template < class CK, class OutputIterator > if (cmp_begin_y > 0) { *res++ = S_pair - (make_object(Circular_arc_2(A.supporting_circle(), A.source(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true))), + (Circular_arc_2(A.supporting_circle(), A.source(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true)), true); if (cmp_end_y > 0) { // We must cut in 3 parts. *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false))), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false)), false); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false), + A.target()), true); } else { *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true), + A.target()), false); } } else if (cmp_begin_y < 0) { // Very similar to the previous case. *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - A.source(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false))), + (Circular_arc_2 (A.supporting_circle(), + A.source(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false)), false); if (cmp_end_y < CGAL::EQUAL) { // We must cut in 3 parts. *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true))) , + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true)) , true ); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true), + A.target()), false); } else { *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false), + A.target()), true); } } @@ -1415,34 +1410,34 @@ template < class CK, class OutputIterator > if ( compare(A.source().x(),A.supporting_circle().center().x())< 0) { CGAL_assertion(cmp_end_y >= 0); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - A.source(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false))), + (Circular_arc_2 (A.supporting_circle(), + A.source(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false)), false); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false), + A.target()), true); } else { CGAL_assertion( compare(A.source().x(),A.supporting_circle().center().x())< 0); CGAL_assertion(cmp_end_y != LARGER); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - A.source(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true))), + (Circular_arc_2 (A.supporting_circle(), + A.source(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true)), true); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true), + A.target()), false); } } @@ -1469,8 +1464,8 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, typedef typename CK::Circular_arc_2 Circular_arc_2; typedef std::pair relat_pos; - typedef std::pair< CGAL::Object, bool> Obj_descr_1; - typedef std::pair< CGAL::Object, relat_pos> Obj_descr_2; + typedef std::pair< Circular_arc_2, bool> Obj_descr_1; + typedef std::pair< Circular_arc_2, relat_pos> Obj_descr_2; typedef std::vector Obj_vector_1; typedef std::vector Obj_vector_2; @@ -1481,8 +1476,7 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, advanced_make_x_monotone(a,std::back_inserter(vec)); for(unsigned int i=0;i(&vec.at(i).first); + const Circular_arc_2 *tmp_arc = (&vec.at(i).first); int cmp_begin_x = CGAL::compare (tmp_arc->source().x(), tmp_arc->supporting_circle().center().x()); @@ -1501,22 +1495,21 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, Obj_descr_1 tmp=vec.at(i); Obj_descr_2 tmp1,tmp2; - const Circular_arc_2 *tmp_arc = - CGAL::object_cast(&tmp.first); + const Circular_arc_2 *tmp_arc = &tmp.first; - tmp1.first = make_object - (Circular_arc_2(a.supporting_circle(),tmp_arc->source(), + tmp1.first = + Circular_arc_2(a.supporting_circle(),tmp_arc->source(), CircularFunctors::y_extremal_point - (a.supporting_circle(),!tmp.second))); + (a.supporting_circle(),!tmp.second)); tmp1.second.first=tmp.second; tmp1.second.second= (tmp.second)? false : true ; - tmp2.first = make_object - (Circular_arc_2(a.supporting_circle(), + tmp2.first = + Circular_arc_2(a.supporting_circle(), CircularFunctors::y_extremal_point (a.supporting_circle(),!tmp.second), - tmp_arc->target())); + tmp_arc->target()); tmp2.second.first=tmp.second; tmp2.second.second= (tmp.second)? true : false ; @@ -1528,7 +1521,6 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, } return res; - } template diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h index baecb215725..6b3d632cbfb 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h @@ -377,8 +377,6 @@ namespace CircularFunctors { const typename CK::Circle_2 & c, OutputIterator res ) { - typedef typename CK2_Intersection_traits - ::type result_type; typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_1_2 Equation_line; typedef typename CK::Polynomial_for_circles_2_2 Equation_circle; @@ -399,8 +397,7 @@ namespace CircularFunctors { for ( typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it ) { - *res++ = CGAL::internal::ck2_intersection_return - (std::make_pair(Circular_arc_point_2(it->first), it->second )); + *res++ = std::make_pair(Circular_arc_point_2(it->first), it->second ); } return res; @@ -412,8 +409,6 @@ namespace CircularFunctors { const typename CK::Line_arc_2 &a2, OutputIterator res ) { - typedef typename CK2_Intersection_traits - ::type result_type; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Point_2 Point_2; @@ -427,13 +422,13 @@ namespace CircularFunctors { if((a1s_a2s && a1t_a2t) || (a1s_a2t && a1t_a2s)){ - *res++ = result_type(a1); + *res++ = a1; return res; } if(a1s_a2s || a1s_a2t || a1t_a2s || a1t_a2t) { if(! LinearFunctors::non_oriented_equal(a1.supporting_line(),a2.supporting_line())){ - if(a1s_a2s || a1s_a2t) *res++ = CGAL::internal::ck2_intersection_return(std::make_pair(a1.source(), 1u)); - if(a1t_a2s || a1t_a2t) *res++ = CGAL::internal::ck2_intersection_return(std::make_pair(a1.target(), 1u)); + if(a1s_a2s || a1s_a2t) *res++ = std::make_pair(a1.source(), 1u); + if(a1t_a2s || a1t_a2t) *res++ = std::make_pair(a1.target(), 1u); return res; } } @@ -445,16 +440,13 @@ namespace CircularFunctors { int comparison = compare_xy(a2.left(),a1.right()); if(comparison < 0){ if(compare_xy(a1.right(),a2.right()) <= 0){ - *res++ = CGAL::internal::ck2_intersection_return - (Line_arc_2(a1.supporting_line(), a2.left(), a1.right() )); + *res++ = Line_arc_2(a1.supporting_line(), a2.left(), a1.right() ); } else{ - *res++ = CGAL::internal::ck2_intersection_return - (Line_arc_2(a1.supporting_line(), a2.left(), a2.right() )); + *res++ = Line_arc_2(a1.supporting_line(), a2.left(), a2.right() ); } } else if (comparison == 0){ - *res++ =CGAL::internal::ck2_intersection_return - ( std::make_pair(a2.left(),1u)); + *res++ = std::make_pair(a2.left(),1u); } return res; } @@ -462,17 +454,14 @@ namespace CircularFunctors { int comparison = compare_xy(a1.left(),a2.right()); if(comparison < 0){ if(compare_xy(a1.right(),a2.right()) <= 0){ - *res++ = CGAL::internal::ck2_intersection_return - (Line_arc_2(a1.supporting_line(), a1.left(), a1.right() )); + *res++ = Line_arc_2(a1.supporting_line(), a1.left(), a1.right() ); } else{ - *res++ = CGAL::internal::ck2_intersection_return - (Line_arc_2(a1.supporting_line(), a1.left(), a2.right() )); + *res++ = Line_arc_2(a1.supporting_line(), a1.left(), a2.right() ); } } else if (comparison == 0){ - *res++ = CGAL::internal::ck2_intersection_return - ( std::make_pair(a1.left(),1u)); + *res++ = std::make_pair(a1.left(),1u); } return res; } @@ -491,13 +480,13 @@ namespace CircularFunctors { CircularFunctors::compare_xy(intersect_point, a1.target())) && (CircularFunctors::compare_xy(intersect_point, a2.source()) != CircularFunctors::compare_xy(intersect_point, a2.target()))) - *res++ = CGAL::internal::ck2_intersection_return(std::make_pair(intersect_point, 1u)); + *res++ = std::make_pair(intersect_point, 1u); return res; } template - struct Has_on_visitor : public boost::static_visitor { + struct Has_on_visitor { Has_on_visitor(const T* l) : l(l){} const T* l; bool operator()(const std::pair& pair) const { @@ -527,8 +516,8 @@ namespace CircularFunctors { for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { - if(boost::apply_visitor(Has_on_visitor(&l), *it)) - *res++ = *it; + if(std::visit(Has_on_visitor(&l), *it)) + *res++ = std::get>(*it); } return res; @@ -565,11 +554,11 @@ namespace CircularFunctors { if((ls_cs && lt_ct) || (ls_ct && lt_cs)){ // Case 0 if (compare_xy(l.source(), l.target()) == SMALLER){ - *res++ = result_type(std::make_pair(l.source(), 1u)); - *res++ = result_type(std::make_pair(l.target(), 1u)); + *res++ = std::make_pair(l.source(), 1u); + *res++ = std::make_pair(l.target(), 1u); } else { - *res++ = result_type(std::make_pair(l.target(), 1u)); - *res++ = result_type(std::make_pair(l.source(), 1u)); + *res++ = std::make_pair(l.target(), 1u); + *res++ = std::make_pair(l.source(), 1u); } return res; } else if (ls_cs || lt_ct || ls_ct || lt_cs) { @@ -594,20 +583,20 @@ namespace CircularFunctors { } if( (CircularFunctors::compare_x(p,q) == EQUAL) || CircularFunctors::point_in_x_range(p,r,q)){ // Case 1 - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } else if(c.on_upper_part()){ // Case 2 if(CircularFunctors::compare_x(r,q) == LARGER){ if(CircularFunctors::orientation(q,r,p) == RIGHT_TURN // Case 2 || CircularFunctors::compare_y_to_right(l,c,q) == LARGER){ // Case 3a - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } } else { if(CircularFunctors::orientation(r,q,p) == RIGHT_TURN // Case 2 || CircularFunctors::compare_y_to_left(l,c,q) == LARGER){ // Case 3c - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } } @@ -615,13 +604,13 @@ namespace CircularFunctors { if(CircularFunctors::compare_x(r,q) == LARGER){ if (CircularFunctors::orientation(q,r,p) == LEFT_TURN // Case 2 || CircularFunctors::compare_y_to_right(l,c,q) == SMALLER){ // Case 3b - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } } else { if(CircularFunctors::orientation(r,q,p) == LEFT_TURN || CircularFunctors::compare_y_to_left(l,c,q) == SMALLER){ // Case 3d - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } } @@ -629,7 +618,7 @@ namespace CircularFunctors { typename CK::Linear_kernel::Bounded_side bs = CircularFunctors::bounded_side(c.supporting_circle(),p); if(bs == ON_BOUNDED_SIDE){ - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } else { //Case 4b typedef std::vector::type> @@ -639,12 +628,12 @@ namespace CircularFunctors { std::back_inserter(solutions) ); if(CircularFunctors::compare_x(r,q) == LARGER){ - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); *res++ = solutions.back(); return res; } else { *res++ = solutions.front(); - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } @@ -681,10 +670,10 @@ namespace CircularFunctors { for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { - if(boost::apply_visitor(Has_on_visitor(&l), *it) && - boost::apply_visitor(Has_on_visitor(&c), *it) ) + if(std::visit(Has_on_visitor(&l), *it) && + std::visit(Has_on_visitor(&c), *it) ) { - *res++ = *it; + *res++ = std::get>(*it); } } return res; @@ -746,25 +735,23 @@ namespace CircularFunctors { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; - typedef typename CK::Line_arc_2 Line_arc_2; - typedef typename CK2_Intersection_traits::type result_type; if(LinearFunctors::non_oriented_equal(l, la.supporting_line())) { - *res++ = result_type(la); + *res++ = la; } typename Intersection_traits::result_type v = intersection(l, la.supporting_line()); if(!v) return res; - const Point_2 *pt = boost::get(&*v); + const Point_2 *pt = std::get_if(&*v); if(pt == nullptr) return res; Circular_arc_point_2 intersect_point = Circular_arc_point_2(*pt); if (CircularFunctors::compare_xy(intersect_point, la.source()) != CircularFunctors::compare_xy(intersect_point, la.target())) - *res++ = result_type(std::make_pair(intersect_point, 1u)); + *res++ = std::make_pair(intersect_point, 1u); return res; } @@ -790,8 +777,8 @@ namespace CircularFunctors { for (typename solutions_container::const_iterator it = solutions.begin(); it != solutions.end(); ++it) { - if(boost::apply_visitor(Has_on_visitor(&c), *it)) - *res++ = *it; + if(std::visit(Has_on_visitor(&c), *it)) + *res++ = std::get>(*it); } return res; } @@ -810,7 +797,7 @@ namespace CircularFunctors { make_x_monotone( const typename CK::Line_arc_2 &A, OutputIterator res ) { - *res++ = make_object(A); + *res++ = A; return res; } diff --git a/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h b/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h index d0ace79c85c..f6eb3d8fd78 100644 --- a/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h +++ b/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include @@ -47,7 +47,7 @@ template typedef typename CK::Line_2 Line_2; typedef typename CK::Point_2 Point_2; typedef typename CK::Circle_2 Circle_2; - typedef typename boost::variant< Circular_arc_2, Line_arc_2 > Arc; + typedef typename std::variant< Circular_arc_2, Line_arc_2 > Arc; typedef std::list Polygon; typedef std::list Polygons; typedef std::list Circles; diff --git a/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_constructions.h b/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_constructions.h index 6755d363444..dfc1c688ea8 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_constructions.h +++ b/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_constructions.h @@ -19,6 +19,17 @@ #include #include +template +bool assign_variant(Expected& e, const V& v) +{ + if (std::get_if(&v) != nullptr) + { + e = std::get(v); + return true; + } + return false; +} + //#define typename template void _test_circle_construct(CK ck) @@ -33,8 +44,9 @@ void _test_circle_construct(CK ck) typedef typename CK::FT FT; typedef typename CK::Construct_circle_2 Construct_circle_2; typedef typename CK::Intersect_2 Intersect_2; + typedef std::variant> Intersection_result; typedef typename CK::Make_x_monotone_2 Make_x_monotone_2; - typedef typename CK::Make_xy_monotone_2 Make_xy_monotone_2; + typedef typename CK::Make_xy_monotone_2 Make_xy_monotone_2; typedef typename CK::Split_2 Split_2; typedef typename CK::Get_equation Get_equation; typedef typename CK::Compare_xy_2 Compare_xy_2; @@ -107,8 +119,7 @@ void _test_circle_construct(CK ck) Circle_2 circ_intersections_2_2(center_circ_intersections_2_2, circ_intersection_2_1_r); - std::vector< CGAL::Object > - vector_for_intersection_1, vector_for_intersection_1l; + std::vector< Intersection_result > vector_for_intersection_1, vector_for_intersection_1l; theConstruct_intersect_2(circ_intersections_2_1, circ_intersections_2_2, @@ -120,12 +131,12 @@ void _test_circle_construct(CK ck) assert(theDo_intersect_2(circ_intersections_2_1, circ_intersections_2_1)); assert(do_intersect(circ_intersections_2_1, circ_intersections_2_1)); std::pair the_pair; - assert(assign(the_pair, vector_for_intersection_1[0])); - assert(assign(the_pair, vector_for_intersection_1l[0])); + assert(assign_variant(the_pair, vector_for_intersection_1[0])); + assert(assign_variant(the_pair, vector_for_intersection_1l[0])); Circular_arc_point_2 first = the_pair.first; std::cout << first << std::endl; - assert(assign(the_pair, vector_for_intersection_1[1])); - assert(assign(the_pair, vector_for_intersection_1l[1])); + assert(assign_variant(the_pair, vector_for_intersection_1[1])); + assert(assign_variant(the_pair, vector_for_intersection_1l[1])); Circular_arc_point_2 second = the_pair.first; std::cout << second << std::endl; Compare_xy_2 theCompare_xy_2 = ck.compare_xy_2_object(); @@ -146,14 +157,13 @@ void _test_circle_construct(CK ck) CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_3, false); - std::vector< CGAL::Object > - vector_for_intersection_2; + std::vector< Intersection_result > vector_for_intersection_2; theConstruct_intersect_2(circ_intersections_2_1, circ_intersections_2_3, std::back_inserter(vector_for_intersection_2)); assert(theDo_intersect_2(circ_intersections_2_1, circ_intersections_2_3)); assert(vector_for_intersection_2.size() == 1); - assign(the_pair, vector_for_intersection_2[0]); + assign_variant(the_pair, vector_for_intersection_2[0]); assert(the_pair.first == the_intersection_point_1); assert(the_pair.first == the_intersection_point_2); @@ -163,14 +173,13 @@ void _test_circle_construct(CK ck) Circle_2 circ_intersections_2_3_bis(center_circ_intersections_2_3_bis, circ_intersection_2_1_r * circ_intersection_2_1_r * 4); - std::vector< CGAL::Object > - vector_for_intersection_2_bis; + std::vector< Intersection_result > vector_for_intersection_2_bis; theConstruct_intersect_2(circ_intersections_2_1, circ_intersections_2_3_bis, std::back_inserter(vector_for_intersection_2_bis)); assert(theDo_intersect_2(circ_intersections_2_1, circ_intersections_2_3_bis)); assert(vector_for_intersection_2_bis.size() == 1); - assign(the_pair, vector_for_intersection_2_bis[0]); + assign_variant(the_pair, vector_for_intersection_2_bis[0]); assert(the_pair.second == 2u); @@ -202,8 +211,7 @@ void _test_circle_construct(CK ck) ////////////// std::cout << "OH NO!" << std::endl; //////////////} else std::cout << "OK" << std::endl; - std::vector< CGAL::Object > - vector_for_intersection_3; + std::vector< Intersection_result > vector_for_intersection_3; theConstruct_intersect_2(circ_arc_2_1_part_low, circ_arc_2_1_low_part_high, std::back_inserter(vector_for_intersection_3)); @@ -211,12 +219,12 @@ void _test_circle_construct(CK ck) /////////////std::cout << "The size: " << vector_for_intersection_3.size() << std::endl; assert(vector_for_intersection_3.size() == 2); - assign(the_pair, vector_for_intersection_3[0]); + assign_variant(the_pair, vector_for_intersection_3[0]); assert(the_pair.second == 1u); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_1_low, true)); - assign(the_pair, vector_for_intersection_3[1]); + assign_variant(the_pair, vector_for_intersection_3[1]); assert(the_pair.second == 1u); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_1_low, @@ -270,23 +278,21 @@ void _test_circle_construct(CK ck) ); std::cout << "Intersection : same circular arc" << std::endl; - std::vector< CGAL::Object > - vector_for_intersection_the_same_arc; + std::vector< Intersection_result > vector_for_intersection_the_same_arc; theConstruct_intersect_2(circ_arc_overlap_1, circ_arc_overlap_1, std::back_inserter(vector_for_intersection_the_same_arc)); assert(theDo_intersect_2(circ_arc_overlap_1, circ_arc_overlap_1)); assert(vector_for_intersection_the_same_arc.size() == 1); Circular_arc_2 res_same; - assert(assign(res_same, vector_for_intersection_the_same_arc[0])); + assert(assign_variant(res_same, vector_for_intersection_the_same_arc[0])); assert(res_same.source() == circ_arc_overlap_1.source()); assert(res_same.target() == circ_arc_overlap_1.target()); std::cout << "Intersection : overlap on a circular arc" << std::endl; Circular_arc_2 circ_arc_in_overlap; Circular_arc_2 circ_arc_in_overlap_2; - std::vector< CGAL::Object > - vector_for_intersection_overlap_1_1; + std::vector< Intersection_result > vector_for_intersection_overlap_1_1; theConstruct_intersect_2(circ_arc_overlap_2, circ_arc_overlap_1, std::back_inserter(vector_for_intersection_overlap_1_1)); @@ -295,30 +301,29 @@ void _test_circle_construct(CK ck) line_arc_overlap_low_left, true, line_arc_overlap_low_right, false); assert(vector_for_intersection_overlap_1_1.size() == 1); - assign(circ_arc_in_overlap, vector_for_intersection_overlap_1_1[0]); + assign_variant(circ_arc_in_overlap, vector_for_intersection_overlap_1_1[0]); assert(circ_arc_in_overlap.source() == circ_arc_overlap_result.source()); assert(circ_arc_in_overlap.target() == circ_arc_overlap_result.target()); - std::vector< CGAL::Object > - vector_for_intersection_overlap_1_2; + std::vector< Intersection_result > vector_for_intersection_overlap_1_2; theConstruct_intersect_2(circ_arc_overlap_2, circ_arc_overlap_1, std::back_inserter(vector_for_intersection_overlap_1_2)); assert(theDo_intersect_2(circ_arc_overlap_2, circ_arc_overlap_1)); assert(vector_for_intersection_overlap_1_2.size() == 1); - assign(circ_arc_in_overlap, vector_for_intersection_overlap_1_2[0]); + assign_variant(circ_arc_in_overlap, vector_for_intersection_overlap_1_2[0]); assert(circ_arc_in_overlap.source() == circ_arc_overlap_result.source()); assert(circ_arc_in_overlap.target() == circ_arc_overlap_result.target()); std::cout << "Intersection : overlap in one point" << std::endl; - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_overlap_2_1; theConstruct_intersect_2(circ_arc_overlap_1, circ_arc_overlap_3, std::back_inserter(vector_for_intersection_overlap_2_1)); assert(theDo_intersect_2(circ_arc_overlap_1, circ_arc_overlap_3)); assert(vector_for_intersection_overlap_2_1.size() == 1); - assign(the_pair, vector_for_intersection_overlap_2_1[0]); + assign_variant(the_pair, vector_for_intersection_overlap_2_1[0]); std::cout << "x = " << the_pair.first.x() << " the result must be = " << center_circ_intersection_2_1_x + circ_intersection_2_1_r * sqrt2 << std::endl; @@ -337,14 +342,14 @@ void _test_circle_construct(CK ck) assert(square(the_pair.first.y() - RT(center_circ_intersection_2_1_y)) == (circ_intersection_2_1_r * circ_intersection_2_1_r / typename CK::RT(2))); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_overlap_2_2; theConstruct_intersect_2(circ_arc_overlap_3, circ_arc_overlap_1, std::back_inserter(vector_for_intersection_overlap_2_2)); assert(theDo_intersect_2(circ_arc_overlap_3, circ_arc_overlap_1)); assert(vector_for_intersection_overlap_2_2.size() == 1); - assign(the_pair, vector_for_intersection_overlap_2_2[0]); + assign_variant(the_pair, vector_for_intersection_overlap_2_2[0]); std::cout << "x = " << the_pair.first.x() << " the result must be = " << center_circ_intersection_2_1_x + circ_intersection_2_1_r * sqrt2 << std::endl; @@ -362,7 +367,7 @@ void _test_circle_construct(CK ck) std::cout << "Intersection : overlap in two points: " << "lower_part_arc , upper_part_arc" << std::endl; - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_overlap_3_1; theConstruct_intersect_2(circ_arc_overlap_upper_part, circ_arc_overlap_lower_part, @@ -370,13 +375,13 @@ void _test_circle_construct(CK ck) assert(theDo_intersect_2(circ_arc_overlap_upper_part, circ_arc_overlap_lower_part)); assert(vector_for_intersection_overlap_3_1.size() == 2); - assign(the_pair, vector_for_intersection_overlap_3_1[0]); + assign_variant(the_pair, vector_for_intersection_overlap_3_1[0]); assert(the_pair.first == circ_arc_overlap_lower_part.source()); //assert(the_pair.first.is_left()); - assign(the_pair, vector_for_intersection_overlap_3_1[1]); + assign_variant(the_pair, vector_for_intersection_overlap_3_1[1]); assert(the_pair.first == circ_arc_overlap_lower_part.target()); //assert(!the_pair.first.is_left()); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_overlap_3_2; theConstruct_intersect_2(circ_arc_overlap_lower_part, circ_arc_overlap_upper_part, @@ -384,10 +389,10 @@ void _test_circle_construct(CK ck) assert(theDo_intersect_2(circ_arc_overlap_lower_part, circ_arc_overlap_upper_part)); assert(vector_for_intersection_overlap_3_2.size() == 2); - assign(the_pair, vector_for_intersection_overlap_3_2[0]); + assign_variant(the_pair, vector_for_intersection_overlap_3_2[0]); assert(the_pair.first == circ_arc_overlap_lower_part.source()); //assert(the_pair.first.is_left()); - assign(the_pair, vector_for_intersection_overlap_3_2[1]); + assign_variant(the_pair, vector_for_intersection_overlap_3_2[1]); assert(the_pair.first == circ_arc_overlap_lower_part.target()); //assert(!the_pair.first.is_left()); @@ -404,20 +409,20 @@ void _test_circle_construct(CK ck) Circle_2 circ_intersections_2_4(center_circ_intersections_2_4, circ_intersection_2_1_r * circ_intersection_2_1_r); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_1_1; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_4, std::back_inserter(vector_for_intersection_no_x_monotone_1_1)); assert(theDo_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_4)); assert(vector_for_intersection_no_x_monotone_1_1.size() == 2); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_1_1[0])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_1_1[0])); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_4, true)); assert(the_pair.second == 1u); //assert(the_pair.first.is_left()); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_1_1[1])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_1_1[1])); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_4, false)); @@ -432,14 +437,14 @@ void _test_circle_construct(CK ck) Circle_2 circ_intersections_2_5(center_circ_intersections_2_5, circ_intersection_2_1_r * circ_intersection_2_1_r); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_1_2; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_5, std::back_inserter(vector_for_intersection_no_x_monotone_1_2)); assert(theDo_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_5)); assert(vector_for_intersection_no_x_monotone_1_2.size() == 1); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_1_2[0])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_1_2[0])); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_5, true)); @@ -454,14 +459,14 @@ void _test_circle_construct(CK ck) Circle_2 circ_intersections_2_6(center_circ_intersections_2_6, circ_intersection_2_1_r * circ_intersection_2_1_r); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_1_3; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_6, std::back_inserter(vector_for_intersection_no_x_monotone_1_3)); assert(theDo_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_6)); assert(vector_for_intersection_no_x_monotone_1_3.size() == 1); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_1_3[0])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_1_3[0])); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_6, true)); @@ -475,14 +480,14 @@ void _test_circle_construct(CK ck) Circle_2 circ_intersections_2_7(center_circ_intersections_2_7, circ_intersection_2_1_r * circ_intersection_2_1_r); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_1_4; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_7, std::back_inserter(vector_for_intersection_no_x_monotone_1_4)); assert(theDo_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_7)); assert(vector_for_intersection_no_x_monotone_1_4.size() == 1); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_1_4[0])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_1_4[0])); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_7, true)); @@ -495,14 +500,14 @@ void _test_circle_construct(CK ck) Circle_2 circ_intersections_2_8(center_circ_intersections_2_8, circ_intersection_2_1_r * circ_intersection_2_1_r * 4); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_1_5; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_8, std::back_inserter(vector_for_intersection_no_x_monotone_1_5)); assert(theDo_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_8)); assert(vector_for_intersection_no_x_monotone_1_5.size() == 1); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_1_5[0])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_1_5[0])); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_8, true)); @@ -515,14 +520,14 @@ void _test_circle_construct(CK ck) Circle_2 circ_intersections_2_9(center_circ_intersections_2_9, circ_intersection_2_1_r * circ_intersection_2_1_r * 4); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_1_6; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_9, std::back_inserter(vector_for_intersection_no_x_monotone_1_6)); assert(theDo_intersect_2(circ_arc_no_x_monotone_1, circ_intersections_2_9)); assert(vector_for_intersection_no_x_monotone_1_6.size() == 1); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_1_6[0])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_1_6[0])); assert(the_pair.first == CGAL::circle_intersect(circ_intersections_2_1, circ_intersections_2_9, true)); @@ -535,14 +540,14 @@ void _test_circle_construct(CK ck) Circular_arc_2 circ_arc_no_x_monotone_2(circ_intersections_2_1, line_arc_overlap_low_left, true, line_arc_overlap_low_left, false); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_2_1; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_arc_no_x_monotone_2, std::back_inserter(vector_for_intersection_no_x_monotone_2_1)); assert(theDo_intersect_2(circ_arc_no_x_monotone_1, circ_arc_no_x_monotone_2)); assert(vector_for_intersection_no_x_monotone_2_1.size() == 1); - assert(assign(circ_arc_in_overlap, vector_for_intersection_no_x_monotone_2_1[0])); + assert(assign_variant(circ_arc_in_overlap, vector_for_intersection_no_x_monotone_2_1[0])); assert(circ_arc_in_overlap.is_x_monotone()); assert(circ_arc_in_overlap.source() == circ_arc_overlap_result.source()); assert(circ_arc_in_overlap.target() == circ_arc_overlap_result.target()); @@ -556,14 +561,14 @@ void _test_circle_construct(CK ck) line_arc_overlap_low_left, true); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_2_2; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_arc_no_x_monotone_3, std::back_inserter(vector_for_intersection_no_x_monotone_2_2)); assert(theDo_intersect_2(circ_arc_no_x_monotone_1, circ_arc_no_x_monotone_3)); assert(vector_for_intersection_no_x_monotone_2_2.size() == 1); - assert(assign(circ_arc_in_overlap, vector_for_intersection_no_x_monotone_2_2[0])); + assert(assign_variant(circ_arc_in_overlap, vector_for_intersection_no_x_monotone_2_2[0])); assert(circ_arc_in_overlap.source() == circ_arc_no_x_monotone_1.source()); assert(circ_arc_in_overlap.target() == circ_arc_no_x_monotone_3.target()); @@ -575,7 +580,7 @@ void _test_circle_construct(CK ck) Circular_arc_2 circ_arc_no_x_monotone_4(circ_intersections_2_1, line_arc_overlap_low_left, true, line_arc_overlap_low_right, true); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_2_3; theConstruct_intersect_2(circ_arc_no_x_monotone_1, circ_arc_no_x_monotone_4, @@ -586,9 +591,9 @@ void _test_circle_construct(CK ck) std::cout << vector_for_intersection_no_x_monotone_2_3.size() << std::endl; assert(vector_for_intersection_no_x_monotone_2_3.size() == 2); - assert(assign(circ_arc_in_overlap, + assert(assign_variant(circ_arc_in_overlap, vector_for_intersection_no_x_monotone_2_3[0])); - assert(assign(the_pair, + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_2_3[1])); assert(circ_arc_in_overlap.is_x_monotone()); assert(circ_arc_in_overlap.source() @@ -605,7 +610,7 @@ void _test_circle_construct(CK ck) Circular_arc_2 circ_arc_no_x_monotone_5(circ_intersections_2_1, line_arc_overlap_low_right, true, line_arc_overlap_low_left, true); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_2_4; theConstruct_intersect_2(circ_arc_no_x_monotone_4, circ_arc_no_x_monotone_5, @@ -613,10 +618,10 @@ void _test_circle_construct(CK ck) assert(theDo_intersect_2(circ_arc_no_x_monotone_4, circ_arc_no_x_monotone_5)); std::cout << vector_for_intersection_no_x_monotone_2_4.size() << std::endl; assert(vector_for_intersection_no_x_monotone_2_4.size() == 2); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_2_4[0])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_2_4[0])); assert(the_pair.first == circ_arc_no_x_monotone_5.target()); assert(the_pair.second == 1u); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_2_4[1])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_2_4[1])); assert(the_pair.first == circ_arc_no_x_monotone_5.source()); assert(the_pair.second == 1u); @@ -626,7 +631,7 @@ void _test_circle_construct(CK ck) Circular_arc_2 circ_arc_no_x_monotone_6(circ_intersections_2_1, line_arc_overlap_low_right, false, line_arc_overlap_low_right, true); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_2_5; theConstruct_intersect_2(circ_arc_no_x_monotone_6, circ_arc_no_x_monotone_5, @@ -634,7 +639,7 @@ void _test_circle_construct(CK ck) assert(theDo_intersect_2(circ_arc_no_x_monotone_6, circ_arc_no_x_monotone_5)); std::cout << vector_for_intersection_no_x_monotone_2_5.size() << std::endl; assert(vector_for_intersection_no_x_monotone_2_5.size() == 1); - assert(assign(the_pair, vector_for_intersection_no_x_monotone_2_5[0])); + assert(assign_variant(the_pair, vector_for_intersection_no_x_monotone_2_5[0])); assert(the_pair.first == circ_arc_no_x_monotone_5.source()); assert(the_pair.second == 1u); @@ -644,7 +649,7 @@ void _test_circle_construct(CK ck) Circular_arc_2 circ_arc_no_x_monotone_7(circ_intersections_2_1, line_arc_overlap_low_left, false, line_arc_overlap_low_right, false); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_no_x_monotone_2_6; theConstruct_intersect_2(circ_arc_no_x_monotone_7, circ_arc_no_x_monotone_4, @@ -652,8 +657,8 @@ void _test_circle_construct(CK ck) assert(theDo_intersect_2(circ_arc_no_x_monotone_7, circ_arc_no_x_monotone_4)); std::cout << vector_for_intersection_no_x_monotone_2_6.size() << std::endl; assert(vector_for_intersection_no_x_monotone_2_6.size() == 2); - assign(circ_arc_in_overlap,vector_for_intersection_no_x_monotone_2_6[0]); - assign(circ_arc_in_overlap_2,vector_for_intersection_no_x_monotone_2_6[1]); + assign_variant(circ_arc_in_overlap,vector_for_intersection_no_x_monotone_2_6[0]); + assign_variant(circ_arc_in_overlap_2,vector_for_intersection_no_x_monotone_2_6[1]); assert((circ_arc_in_overlap.source() == circ_arc_no_x_monotone_7.source() && circ_arc_in_overlap.target() == circ_arc_no_x_monotone_4.target()) || (circ_arc_in_overlap_2.source() == circ_arc_no_x_monotone_7.source() && @@ -692,7 +697,7 @@ void _test_circle_construct(CK ck) Point_2 center_circ_monotone(x,y); Circle_2 circ_monotone(center_circ_monotone, r*r); Circular_arc_2 theCircular_arc_2_full(circ_monotone); - std::vector< CGAL::Object > outputIterator1, outputIterator1l; + std::vector< Intersection_result > outputIterator1, outputIterator1l; theMake_x_monotone(theCircular_arc_2_full, std::back_inserter(outputIterator1)); make_x_monotone(theCircular_arc_2_full, std::back_inserter(outputIterator1l)); @@ -701,8 +706,8 @@ void _test_circle_construct(CK ck) << circ_monotone << std::endl; Circular_arc_2 circular_arc_2_full, circular_arc_2_fulll; for(std::size_t i = 0; i < outputIterator1.size(); i++){ - assign(circular_arc_2_full, outputIterator1[i]); - assign(circular_arc_2_fulll, outputIterator1l[i]); + assign_variant(circular_arc_2_full, outputIterator1[i]); + assign_variant(circular_arc_2_fulll, outputIterator1l[i]); std::cout << "Circular_arc_2_" << i << " : " << circular_arc_2_full << std::endl; std::cout << "Circular_arc_2_" << i << "source : " @@ -723,8 +728,8 @@ void _test_circle_construct(CK ck) std::back_inserter(outputIterator1l)); assert(outputIterator1.size() == 4); for(std::size_t i = 0; i < outputIterator1.size(); i++){ - assign(circular_arc_2_full, outputIterator1[i]); - assign(circular_arc_2_fulll, outputIterator1l[i]); + assign_variant(circular_arc_2_full, outputIterator1[i]); + assign_variant(circular_arc_2_fulll, outputIterator1l[i]); assert(circular_arc_2_full.is_x_monotone()); assert(circular_arc_2_full.is_y_monotone()); assert(circular_arc_2_full == circular_arc_2_fulll); @@ -767,7 +772,7 @@ void _test_circle_construct(CK ck) std::cout << "T: " << i << " " << j << std::endl; assert(outputIterator1.size() == isize[i][j]); for(std::size_t k = 0; k < outputIterator1.size(); k++) { - assign(circular_arc_2_full, outputIterator1[k]); + assign_variant(circular_arc_2_full, outputIterator1[k]); assert(circular_arc_2_full.is_x_monotone()); assert(circular_arc_2_full.is_y_monotone()); } @@ -782,7 +787,7 @@ void _test_circle_construct(CK ck) Circular_arc_2 theCircular_arc_2_quarter(circ_monotone, theLine_2_1, true, theLine_2_2, true); - std::vector< CGAL::Object > vector_of_object_1; + std::vector< Intersection_result > vector_of_object_1; theMake_x_monotone(theCircular_arc_2_quarter, std::back_inserter(vector_of_object_1)); std::cout << std::endl; @@ -791,7 +796,7 @@ void _test_circle_construct(CK ck) std::cout << vector_of_object_1.size() << std::endl; Circular_arc_2 circular_arc_2_quarter; for(std::size_t i = 0; i < vector_of_object_1.size(); i++){ - assign(circular_arc_2_quarter, vector_of_object_1[i]); + assign_variant(circular_arc_2_quarter, vector_of_object_1[i]); std::cout << "Circular_arc_2_" << i << " : " << circular_arc_2_quarter << std::endl; assert(circular_arc_2_quarter.is_x_monotone()); @@ -801,13 +806,13 @@ void _test_circle_construct(CK ck) Circular_arc_2 theCircular_arc_2_half(circ_monotone, theLine_2_2, false, theLine_2_2, true); - std::vector< CGAL::Object > vector_of_object_1_half; + std::vector< Intersection_result > vector_of_object_1_half; theMake_x_monotone(theCircular_arc_2_half, std::back_inserter(vector_of_object_1_half)); std::cout << std::endl; std::cout << "x_monotone a half circle" << std::endl; assert(vector_of_object_1_half.size() == 1); - assign(circular_arc_2_quarter, vector_of_object_1_half[0]); + assign_variant(circular_arc_2_quarter, vector_of_object_1_half[0]); assert(circular_arc_2_quarter.is_x_monotone()); assert(circular_arc_2_quarter.source() == theCircular_arc_2_half.source()); assert(circular_arc_2_quarter.target() == theCircular_arc_2_half.target()); @@ -837,7 +842,7 @@ void _test_circle_construct(CK ck) Circular_arc_2 theCircular_arc_2_random(circ_monotone, theLine_2_3, true, theLine_2_4, true); - std::vector< CGAL::Object > vector_of_object_2; + std::vector< Intersection_result > vector_of_object_2; theMake_x_monotone(theCircular_arc_2_random, std::back_inserter(vector_of_object_2)); std::cout << std::endl; @@ -845,7 +850,7 @@ void _test_circle_construct(CK ck) << circ_monotone << std::endl; Circular_arc_2 circular_arc_2_random; for(std::size_t i = 0; i < vector_of_object_2.size(); i++){ - assign(circular_arc_2_random, vector_of_object_2[i]); + assign_variant(circular_arc_2_random, vector_of_object_2[i]); std::cout << "Circular_arc_2_" << i << " : " << circular_arc_2_random << std::endl; assert(circular_arc_2_random.is_x_monotone()); @@ -911,7 +916,7 @@ void _test_circle_construct(CK ck) Circular_arc_2 cao8 = Circular_arc_2(Point_2(11,10), Point_2(1,0), Point_2(11,-10)); // = no intersection std::cout << "Testing intersect with lines" << std::endl; - std::vector< CGAL::Object > v_ll1, v_ll2, v_ll3, v_ll4, v_ll5, v_ll6, v_ll7, v_ll8; + std::vector< Intersection_result > v_ll1, v_ll2, v_ll3, v_ll4, v_ll5, v_ll6, v_ll7, v_ll8; theConstruct_intersect_2(lo1, cao1, std::back_inserter(v_ll1)); theConstruct_intersect_2(lo1, cao2, std::back_inserter(v_ll2)); theConstruct_intersect_2(lo1, cao3, std::back_inserter(v_ll3)); @@ -942,7 +947,7 @@ void _test_circle_construct(CK ck) Line_arc_2 llu3 = Line_arc_2(Point_2(-2,-1), Point_2(-2,1)); Circle_2 ccu = Circle_2(Point_2(0,-1), Point_2(-1,0), Point_2(0,1)); - std::vector< CGAL::Object > v_llc1, v_llc2, v_llc3; + std::vector< Intersection_result > v_llc1, v_llc2, v_llc3; theConstruct_intersect_2(llu1, ccu, std::back_inserter(v_llc1)); theConstruct_intersect_2(llu2, ccu, std::back_inserter(v_llc2)); theConstruct_intersect_2(llu3, ccu, std::back_inserter(v_llc3)); @@ -957,7 +962,7 @@ void _test_circle_construct(CK ck) assert(!theDo_intersect_2(llu3, ccu)); assert(!CGAL::do_intersect(llu3, ccu)); - std::vector< CGAL::Object > v_rllc1, v_rllc2, v_rllc3, v_rllc1l, v_rllc2l, v_rllc3l; + std::vector< Intersection_result > v_rllc1, v_rllc2, v_rllc3, v_rllc1l, v_rllc2l, v_rllc3l; theConstruct_intersect_2(llu1.supporting_line(), ccu, std::back_inserter(v_rllc1)); theConstruct_intersect_2(llu2.supporting_line(), ccu, std::back_inserter(v_rllc2)); theConstruct_intersect_2(llu3.supporting_line(), ccu, std::back_inserter(v_rllc3)); diff --git a/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_extention.h b/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_extention.h index 2329bca2acb..02471d6f61d 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_extention.h +++ b/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_extention.h @@ -24,7 +24,9 @@ void _test_circle_bbox(CK ck) typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Point_2 Point_2; + typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Intersect_2 Intersect_2; + typedef std::variant> Intersection_result; CGAL::Random generatorOfgenerator; int random_seed = generatorOfgenerator.get_int(0, 123456); @@ -55,7 +57,7 @@ void _test_circle_bbox(CK ck) bool box_overlap = do_overlap(box1, box2); Intersect_2 theConstruct_intersect_2 = ck.intersect_2_object(); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_1; theConstruct_intersect_2(arc1, arc2, @@ -143,6 +145,7 @@ template typedef typename CK::Intersect_2 Intersect_2; typedef typename CK::Make_x_monotone_2 Make_x_monotone_2; typedef typename CK::Line_arc_2 Line_arc_2; + typedef std::variant, Circular_arc_2> Intersection_result; Point_2 center_circ(0,0); Circle_2 circ(center_circ, 100); @@ -151,7 +154,7 @@ template Point_2(0, -15)); Intersect_2 theConstruct_intersect_2 = ck.intersect_2_object(); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_1; theConstruct_intersect_2(arc, line_vertical, @@ -159,18 +162,18 @@ template Circular_arc_point_2 point_top; Circular_arc_point_2 point_down; std::pair< Circular_arc_point_2, unsigned int> aux; - assign(aux, vector_for_intersection_1[0]); + assign_variant(aux, vector_for_intersection_1[0]); point_down = aux.first; - assign(aux, vector_for_intersection_1[1]); + assign_variant(aux, vector_for_intersection_1[1]); point_top = aux.first; Make_x_monotone_2 theMake_x_monotone = ck.make_x_monotone_2_object(); - std::vector< CGAL::Object > outputIterator1; + std::vector< Intersection_result > outputIterator1; theMake_x_monotone(arc, std::back_inserter(outputIterator1)); Circular_arc_2 arc_top; Circular_arc_2 arc_down; - assign(arc_top,outputIterator1[1]); - assign(arc_down, outputIterator1[0]); + assign_variant(arc_top,outputIterator1[1]); + assign_variant(arc_down, outputIterator1[0]); assert(!ck.has_on_2_object()(arc_top, line_vertical.source())); assert(ck.has_on_2_object()(arc_top, @@ -195,7 +198,7 @@ template typedef typename CK::Point_2 Point_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Intersect_2 Intersect_2; - + typedef std::variant> Intersection_result; int test_suite_cases[3][2][3] = {{{-7,-8,113},{9,9,162}}, @@ -213,20 +216,20 @@ template Intersect_2 theConstruct_intersect_2 = ck.intersect_2_object(); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_1; theConstruct_intersect_2(arc, arc2, std::back_inserter(vector_for_intersection_1)); std::pair< Circular_arc_point_2, unsigned int> aux; - assign(aux, vector_for_intersection_1[0]); + assign_variant(aux, vector_for_intersection_1[0]); CGAL::Bbox_2 box1 = aux.first.bbox(); assert(typename CK::FT(box1.xmin()) <= aux.first.x()); assert(typename CK::FT(box1.xmax()) >= aux.first.x()); assert(typename CK::FT(box1.ymin()) <= aux.first.y()); assert(typename CK::FT(box1.ymax()) >= aux.first.y()); std::cout << "Ok" << std::endl; - assign(aux, vector_for_intersection_1[1]); + assign_variant(aux, vector_for_intersection_1[1]); CGAL::Bbox_2 box2 = aux.first.bbox(); assert(typename CK::FT(box2.xmin()) <= aux.first.x()); assert(typename CK::FT(box2.xmax()) >= aux.first.x()); diff --git a/Circular_kernel_2/test/Circular_kernel_2/test_Line_arc.cpp b/Circular_kernel_2/test/Circular_kernel_2/test_Line_arc.cpp index 38a2174b586..b1633d4b08f 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/test_Line_arc.cpp +++ b/Circular_kernel_2/test/Circular_kernel_2/test_Line_arc.cpp @@ -27,6 +27,17 @@ #include +template +bool assign_variant(Expected& e, const V& v) +{ + if (std::get_if(&v) != nullptr) + { + e = std::get(v); + return true; + } + return false; +} + template void _test_Line_arc(CK ck) { @@ -87,41 +98,42 @@ void _test_Line_arc(CK ck) //////////////Intersection Line_arc Line_arc////////////////// Intersect_2 theConstruct_intersect_2 = ck.intersect_2_object(); + typedef std::variant, Line_arc_2> Intersection_result; - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_1; theConstruct_intersect_2(line_arc_horizontal, line_arc_vertical, std::back_inserter(vector_for_intersection_1)); std::pair the_pair; - assert(assign(the_pair, vector_for_intersection_1[0])); + assert(assign_variant(the_pair, vector_for_intersection_1[0])); Circular_arc_point_2 first = the_pair.first; assert(first.x() == 0); assert(first.y() == 0); Line_arc_2 line_arc_3(Point_2(-1, -2), Point_2(2,1)); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_2; theConstruct_intersect_2(line_arc_horizontal, line_arc_3, std::back_inserter(vector_for_intersection_2)); - assert(assign(the_pair, vector_for_intersection_2[0])); + assert(assign_variant(the_pair, vector_for_intersection_2[0])); first = the_pair.first; assert(first.x() == 1); assert(first.y() == 0); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_3; theConstruct_intersect_2(line_arc_vertical, line_arc_3, std::back_inserter(vector_for_intersection_3)); - assert(assign(the_pair, vector_for_intersection_3[0])); + assert(assign_variant(the_pair, vector_for_intersection_3[0])); first = the_pair.first; assert(first.x() == 0); assert(first.y() == -1); Line_arc_2 line_arc_4(Point_2(20, -2), Point_2(20,10)); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_4; theConstruct_intersect_2(line_arc_horizontal, line_arc_4, @@ -131,14 +143,14 @@ void _test_Line_arc(CK ck) ////////////intersection in overlap/////////////// - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_5; theConstruct_intersect_2(line_arc_horizontal, line_arc_horizontal, std::back_inserter(vector_for_intersection_5)); Line_arc_2 line_arc_tmp; assert(vector_for_intersection_5.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_5[0])); + assert(assign_variant(line_arc_tmp, vector_for_intersection_5[0])); assert(line_arc_tmp == line_arc_horizontal); Line_arc_2 line_arc_horizontal2(Line_2(center_circle1, p2_line_horizontal), @@ -146,25 +158,25 @@ void _test_Line_arc(CK ck) true, circle1, false); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_6; theConstruct_intersect_2(line_arc_horizontal, line_arc_horizontal2, std::back_inserter(vector_for_intersection_6)); assert(vector_for_intersection_6.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_6[0])); + assert(assign_variant(line_arc_tmp, vector_for_intersection_6[0])); assert(line_arc_tmp.source() == line_arc_horizontal.source()); assert(line_arc_tmp.target() == line_arc_horizontal2.target()); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_6_reverse; theConstruct_intersect_2(line_arc_horizontal2, line_arc_horizontal, std::back_inserter(vector_for_intersection_6_reverse)); assert(vector_for_intersection_6_reverse.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_6_reverse[0])); + assert(assign_variant(line_arc_tmp, vector_for_intersection_6_reverse[0])); assert(line_arc_tmp.source() == line_arc_horizontal.source()); assert(line_arc_tmp.target() == line_arc_horizontal2.target()); @@ -175,43 +187,43 @@ void _test_Line_arc(CK ck) true, circle1, false); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_7; theConstruct_intersect_2(line_arc_horizontal, line_arc_horizontal3, std::back_inserter(vector_for_intersection_7)); assert(vector_for_intersection_7.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_7[0])); + assert(assign_variant(line_arc_tmp, vector_for_intersection_7[0])); assert(line_arc_tmp.source() == line_arc_horizontal.source()); assert(line_arc_tmp.target() == line_arc_horizontal3.target()); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_8; theConstruct_intersect_2(line_arc_horizontal3, line_arc_horizontal, std::back_inserter(vector_for_intersection_8)); assert(vector_for_intersection_8.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_8[0])); + assert(assign_variant(line_arc_tmp, vector_for_intersection_8[0])); assert(line_arc_tmp.source() == line_arc_horizontal.source()); assert(line_arc_tmp.target() == line_arc_horizontal3.target()); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_8_bis_1; theConstruct_intersect_2(line_arc_horizontal3, line_arc_horizontal2, std::back_inserter(vector_for_intersection_8_bis_1)); assert(vector_for_intersection_8_bis_1.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_8_bis_1[0])); + assert(assign_variant(line_arc_tmp, vector_for_intersection_8_bis_1[0])); assert(line_arc_tmp.source() == line_arc_horizontal2.source()); assert(line_arc_tmp.target() == line_arc_horizontal3.target()); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_8_bis_2; theConstruct_intersect_2(line_arc_horizontal2, line_arc_horizontal3, std::back_inserter(vector_for_intersection_8_bis_2)); assert(vector_for_intersection_8_bis_2.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_8_bis_2[0])); + assert(assign_variant(line_arc_tmp, vector_for_intersection_8_bis_2[0])); assert(line_arc_tmp.source() == line_arc_horizontal2.source()); assert(line_arc_tmp.target() == line_arc_horizontal3.target()); @@ -221,45 +233,45 @@ void _test_Line_arc(CK ck) true, circle1, true); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_9; theConstruct_intersect_2(line_arc_horizontal4, line_arc_horizontal, std::back_inserter(vector_for_intersection_9)); assert(vector_for_intersection_9.size() == 1); - assert(assign(the_pair, vector_for_intersection_9[0])); + assert(assign_variant(the_pair, vector_for_intersection_9[0])); assert(the_pair.second == 1); assert(the_pair.first == line_arc_horizontal.source()); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_10; theConstruct_intersect_2(line_arc_horizontal, line_arc_horizontal4, std::back_inserter(vector_for_intersection_10)); assert(vector_for_intersection_10.size() == 1); - assert(assign(the_pair, vector_for_intersection_10[0])); + assert(assign_variant(the_pair, vector_for_intersection_10[0])); assert(the_pair.second == 1); assert(the_pair.first == line_arc_horizontal.source()); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_11; theConstruct_intersect_2(Line_arc_2(Point_2(-1, -1),Point_2(2, 2)), Line_arc_2(Point_2(0, 0), Point_2(1, 1)), std::back_inserter(vector_for_intersection_11)); assert(vector_for_intersection_11.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_11[0])); + assert(assign_variant(line_arc_tmp, vector_for_intersection_11[0])); assert(line_arc_tmp == Line_arc_2(Point_2(0, 0), Point_2(1, 1))); //////Split///////////// - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_split_1; theConstruct_intersect_2(line_arc_horizontal, line_arc_3, std::back_inserter(vector_for_intersection_split_1)); - assert(assign(the_pair, vector_for_intersection_split_1[0])); + assert(assign_variant(the_pair, vector_for_intersection_split_1[0])); Circular_arc_point_2 point_of_split = the_pair.first; Split_2 theSplit_2 = ck.split_2_object(); Line_arc_2 first_part_line_arc_horizontal; @@ -291,6 +303,8 @@ void _test_intersection_Line_arc_Circle(CK ck) typedef CGAL::Line_arc_2 Line_arc_2; typedef CGAL::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Intersect_2 Intersect_2; + typedef std::variant, Line_arc_2> Intersection_result; + CGAL::Random generatorOfgenerator; int random_seed = generatorOfgenerator.get_int(0, 123456); std::cout << "random_seed = " << random_seed << std::endl; @@ -368,53 +382,53 @@ void _test_intersection_Line_arc_Circle(CK ck) false); ////////test horizontal////// - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_1; theConstruct_intersect_2(line_arc_horizontal, circle1, std::back_inserter(vector_for_intersection_1)); std::pair the_pair; assert(vector_for_intersection_1.size() == 2); - assert(assign(the_pair, vector_for_intersection_1[0])); + assert(assign_variant(the_pair, vector_for_intersection_1[0])); Circular_arc_point_2 first = the_pair.first; assert(first == line_arc_horizontal.source()); assert(the_pair.second == 1); - assert(assign(the_pair, vector_for_intersection_1[1])); + assert(assign_variant(the_pair, vector_for_intersection_1[1])); first = the_pair.first; assert(first == line_arc_horizontal2.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_2; theConstruct_intersect_2(line_arc_horizontal, circle2, std::back_inserter(vector_for_intersection_2)); assert(vector_for_intersection_2.size() == 1); - assert(assign(the_pair, vector_for_intersection_2[0])); + assert(assign_variant(the_pair, vector_for_intersection_2[0])); first = the_pair.first; assert(first == line_arc_horizontal.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_3; theConstruct_intersect_2(line_arc_horizontal2, circle2, std::back_inserter(vector_for_intersection_3)); assert(vector_for_intersection_3.size() == 0); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_4; theConstruct_intersect_2(line_arc_horizontal3, circle2, std::back_inserter(vector_for_intersection_4)); assert(vector_for_intersection_4.size() == 1); - assert(assign(the_pair, vector_for_intersection_4[0])); + assert(assign_variant(the_pair, vector_for_intersection_4[0])); first = the_pair.first; assert(first == line_arc_horizontal3.source()); assert(the_pair.second == 1); Line_arc_2 line_arc_aux(p2_high_circle2,p2_high_right_circle2); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_5; theConstruct_intersect_2(Line_arc_2(p2_high_left_circle2,p2_high_right_circle2), circle2, @@ -424,17 +438,17 @@ void _test_intersection_Line_arc_Circle(CK ck) circle2, std::back_inserter(vector_for_intersection_5)); assert(vector_for_intersection_5.size() == 2); - assert(assign(the_pair, vector_for_intersection_5[0])); + assert(assign_variant(the_pair, vector_for_intersection_5[0])); first = the_pair.first; assert(first == line_arc_aux.source()); assert(the_pair.second == 2); - assert(assign(the_pair, vector_for_intersection_5[1])); + assert(assign_variant(the_pair, vector_for_intersection_5[1])); first = the_pair.first; assert(first == line_arc_aux.source()); assert(the_pair.second == 2); line_arc_aux = Line_arc_2(p2_low_circle2,p2_low_right_circle2); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_6; theConstruct_intersect_2(Line_arc_2(p2_low_left_circle2,p2_low_right_circle2), circle2, @@ -444,63 +458,63 @@ void _test_intersection_Line_arc_Circle(CK ck) circle2, std::back_inserter(vector_for_intersection_6)); assert(vector_for_intersection_6.size() == 2); - assert(assign(the_pair, vector_for_intersection_6[0])); + assert(assign_variant(the_pair, vector_for_intersection_6[0])); first = the_pair.first; assert(first == line_arc_aux.source()); assert(the_pair.second == 2); - assert(assign(the_pair, vector_for_intersection_6[1])); + assert(assign_variant(the_pair, vector_for_intersection_6[1])); first = the_pair.first; assert(first == line_arc_aux.source()); assert(the_pair.second == 2); ////////test vertical////// - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_7; theConstruct_intersect_2(line_arc_vertical, circle1, std::back_inserter(vector_for_intersection_7)); assert(vector_for_intersection_7.size() == 2); - assert(assign(the_pair, vector_for_intersection_7[0])); + assert(assign_variant(the_pair, vector_for_intersection_7[0])); first = the_pair.first; assert(first == line_arc_vertical.source()); assert(the_pair.second == 1); - assert(assign(the_pair, vector_for_intersection_7[1])); + assert(assign_variant(the_pair, vector_for_intersection_7[1])); first = the_pair.first; assert(first == line_arc_vertical2.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_8; theConstruct_intersect_2(line_arc_vertical, circle2, std::back_inserter(vector_for_intersection_8)); std::cout << vector_for_intersection_8.size() << std::endl; assert(vector_for_intersection_8.size() == 1); - assert(assign(the_pair, vector_for_intersection_8[0])); + assert(assign_variant(the_pair, vector_for_intersection_8[0])); first = the_pair.first; assert(first == line_arc_vertical.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_9; theConstruct_intersect_2(line_arc_vertical2, circle2, std::back_inserter(vector_for_intersection_9)); assert(vector_for_intersection_9.size() == 0); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_10; theConstruct_intersect_2(line_arc_vertical3, circle2, std::back_inserter(vector_for_intersection_10)); assert(vector_for_intersection_10.size() == 1); - assert(assign(the_pair, vector_for_intersection_10[0])); + assert(assign_variant(the_pair, vector_for_intersection_10[0])); first = the_pair.first; assert(first == line_arc_vertical3.source()); assert(the_pair.second == 1); line_arc_aux = Line_arc_2(p2_right_circle2,p2_high_right_circle2); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_11; theConstruct_intersect_2(Line_arc_2(p2_low_right_circle2,p2_high_right_circle2), circle2, @@ -510,17 +524,17 @@ void _test_intersection_Line_arc_Circle(CK ck) circle2, std::back_inserter(vector_for_intersection_11)); assert(vector_for_intersection_11.size() == 2); - assert(assign(the_pair, vector_for_intersection_11[0])); + assert(assign_variant(the_pair, vector_for_intersection_11[0])); first = the_pair.first; assert(first == line_arc_aux.source()); assert(the_pair.second == 2); - assert(assign(the_pair, vector_for_intersection_11[1])); + assert(assign_variant(the_pair, vector_for_intersection_11[1])); first = the_pair.first; assert(first == line_arc_aux.source()); assert(the_pair.second == 2); line_arc_aux = Line_arc_2(p2_left_circle2,p2_high_left_circle2); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_12; theConstruct_intersect_2(Line_arc_2(p2_low_left_circle2,p2_high_left_circle2), circle2, @@ -530,56 +544,56 @@ void _test_intersection_Line_arc_Circle(CK ck) circle2, std::back_inserter(vector_for_intersection_12)); assert(vector_for_intersection_12.size() == 2); - assert(assign(the_pair, vector_for_intersection_12[0])); + assert(assign_variant(the_pair, vector_for_intersection_12[0])); first = the_pair.first; assert(first == line_arc_aux.source()); assert(the_pair.second == 2); - assert(assign(the_pair, vector_for_intersection_12[1])); + assert(assign_variant(the_pair, vector_for_intersection_12[1])); first = the_pair.first; assert(first == line_arc_aux.source()); assert(the_pair.second == 2); //test diagonal - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_13; theConstruct_intersect_2(line_arc_diagonal, circle1, std::back_inserter(vector_for_intersection_13)); assert(vector_for_intersection_13.size() == 2); - assert(assign(the_pair, vector_for_intersection_13[0])); + assert(assign_variant(the_pair, vector_for_intersection_13[0])); first = the_pair.first; assert(first == line_arc_diagonal.source()); assert(the_pair.second == 1); - assert(assign(the_pair, vector_for_intersection_13[1])); + assert(assign_variant(the_pair, vector_for_intersection_13[1])); first = the_pair.first; assert(first == line_arc_diagonal2.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_14; theConstruct_intersect_2(line_arc_diagonal, circle2, std::back_inserter(vector_for_intersection_14)); assert(vector_for_intersection_14.size() == 1); - assert(assign(the_pair, vector_for_intersection_14[0])); + assert(assign_variant(the_pair, vector_for_intersection_14[0])); first = the_pair.first; assert(first == line_arc_diagonal.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_15; theConstruct_intersect_2(line_arc_diagonal2, circle2, std::back_inserter(vector_for_intersection_15)); assert(vector_for_intersection_15.size() == 0); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_16; theConstruct_intersect_2(line_arc_diagonal3, circle2, std::back_inserter(vector_for_intersection_16)); assert(vector_for_intersection_16.size() == 1); - assert(assign(the_pair, vector_for_intersection_16[0])); + assert(assign_variant(the_pair, vector_for_intersection_16[0])); first = the_pair.first; assert(first == line_arc_diagonal3.source()); assert(the_pair.second == 1); @@ -587,42 +601,42 @@ void _test_intersection_Line_arc_Circle(CK ck) //Diagonal tangent - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_17; theConstruct_intersect_2(Line_arc_2(Point_2(-10, -5), Point_2(5, 15)), circle1, std::back_inserter(vector_for_intersection_17)); assert(vector_for_intersection_17.size() == 1); - assert(assign(the_pair, vector_for_intersection_17[0])); + assert(assign_variant(the_pair, vector_for_intersection_17[0])); assert(the_pair.second == 2); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_18; theConstruct_intersect_2(Line_arc_2(Point_2(10, -5), Point_2(-5, 15)), circle1, std::back_inserter(vector_for_intersection_18)); assert(vector_for_intersection_18.size() == 1); - assert(assign(the_pair, vector_for_intersection_18[0])); + assert(assign_variant(the_pair, vector_for_intersection_18[0])); assert(the_pair.second == 2); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_19; theConstruct_intersect_2(Line_arc_2(Point_2(10, 5), Point_2(-5, -15)), circle1, std::back_inserter(vector_for_intersection_19)); assert(vector_for_intersection_19.size() == 1); - assert(assign(the_pair, vector_for_intersection_19[0])); + assert(assign_variant(the_pair, vector_for_intersection_19[0])); assert(the_pair.second == 2); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_20; theConstruct_intersect_2(Line_arc_2(Point_2(-10, 5), Point_2(5, -15)), circle1, std::back_inserter(vector_for_intersection_20)); assert(vector_for_intersection_20.size() == 1); - assert(assign(the_pair, vector_for_intersection_20[0])); + assert(assign_variant(the_pair, vector_for_intersection_20[0])); assert(the_pair.second == 2); } @@ -638,6 +652,7 @@ void _test_intersection_Line_arc_Circular_arc(CK ck) typedef CGAL::Line_arc_2 Line_arc_2; typedef CGAL::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Intersect_2 Intersect_2; + typedef std::variant, Circular_arc_2> Intersection_result; typedef typename CK::Make_x_monotone_2 Make_x_monotone_2; CGAL::Random generatorOfgenerator; int random_seed = generatorOfgenerator.get_int(0, 123456); @@ -699,58 +714,58 @@ void _test_intersection_Line_arc_Circular_arc(CK ck) Line_2(center_circle1, p2_line_vertical), false); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_1; theConstruct_intersect_2(line_arc_horizontal3, arc_1, std::back_inserter(vector_for_intersection_1)); std::pair the_pair; assert(vector_for_intersection_1.size() == 2); - assert(assign(the_pair, vector_for_intersection_1[0])); + assert(assign_variant(the_pair, vector_for_intersection_1[0])); Circular_arc_point_2 first = the_pair.first; assert(first == line_arc_horizontal3.source()); assert(the_pair.second == 1); - assert(assign(the_pair, vector_for_intersection_1[1])); + assert(assign_variant(the_pair, vector_for_intersection_1[1])); first = the_pair.first; assert(first == line_arc_horizontal3.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_2; theConstruct_intersect_2(line_arc_horizontal, arc_1, std::back_inserter(vector_for_intersection_2)); assert(vector_for_intersection_2.size() == 1); - assert(assign(the_pair, vector_for_intersection_2[0])); + assert(assign_variant(the_pair, vector_for_intersection_2[0])); first = the_pair.first; assert(first == line_arc_horizontal.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_3; theConstruct_intersect_2(line_arc_vertical, arc_1, std::back_inserter(vector_for_intersection_3)); assert(vector_for_intersection_3.size() == 1); - assert(assign(the_pair, vector_for_intersection_3[0])); + assert(assign_variant(the_pair, vector_for_intersection_3[0])); first = the_pair.first; assert(first == arc_1.target()); assert(the_pair.second == 1); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_4; theConstruct_intersect_2(Line_arc_2(Point_2(-10, -5), Point_2(5, 15)), arc_2, std::back_inserter(vector_for_intersection_4)); assert(vector_for_intersection_4.size() == 0); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_5; theConstruct_intersect_2(Line_arc_2(Point_2(10, -5), Point_2(-5, 15)), arc_2, std::back_inserter(vector_for_intersection_5)); assert(vector_for_intersection_5.size() == 1); - assert(assign(the_pair, vector_for_intersection_5[0])); + assert(assign_variant(the_pair, vector_for_intersection_5[0])); assert(the_pair.second == 2); //random @@ -778,31 +793,31 @@ void _test_intersection_Line_arc_Circular_arc(CK ck) false); Circular_arc_point_2 first2; - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_random1; theConstruct_intersect_2(Line_arc_2(Point_2(-p_random1.x(),-p_random1.y()), p_random1), arc_random_1, std::back_inserter(vector_for_intersection_random1)); assert(vector_for_intersection_random1.size() > 0); - assert(assign(the_pair, vector_for_intersection_random1[0])); + assert(assign_variant(the_pair, vector_for_intersection_random1[0])); first = the_pair.first; assert(the_pair.second == 1); assert(first == arc_random_1.source()); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_random2; theConstruct_intersect_2(Line_arc_2(Point_2(-p_random2.x(),-p_random2.y()),p_random2), arc_random_1, std::back_inserter(vector_for_intersection_random2)); assert(vector_for_intersection_random2.size() > 0); - assert(assign(the_pair, vector_for_intersection_random2[0])); + assert(assign_variant(the_pair, vector_for_intersection_random2[0])); first = the_pair.first; assert(the_pair.second == 1); if(vector_for_intersection_random2.size() == 2){ - assert(assign(the_pair, vector_for_intersection_random2[1])); + assert(assign_variant(the_pair, vector_for_intersection_random2[1])); first2 = the_pair.first; assert(the_pair.second == 1); assert((first == arc_random_1.target()) || (first2 == arc_random_1.target())); @@ -825,20 +840,20 @@ void _test_intersection_Line_arc_Circular_arc(CK ck) theRandom.get_int(random_min, random_max)); } while (p_random4 == center_circle_random1 || (p_random3 == p_random4)); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_random3; theConstruct_intersect_2(Line_arc_2(p_random3,p_random4), arc_random_1, std::back_inserter(vector_for_intersection_random3)); for( std::size_t i = 0; i < vector_for_intersection_random3.size(); i++){ - assert(assign(the_pair, vector_for_intersection_random3[i])); + assert(assign_variant(the_pair, vector_for_intersection_random3[i])); first = the_pair.first; - std::vector objects_x_monotone; + std::vector objects_x_monotone; theMake_x_monotone( arc_random_1, std::back_inserter(objects_x_monotone)); bool is_on_arc = false; for(std::size_t j = 0; j < objects_x_monotone.size(); j++){ Circular_arc_2 aux; - assign(aux, objects_x_monotone[j]); + assign_variant(aux, objects_x_monotone[j]); if(CGAL::CircularFunctors::has_on(aux, first)){ is_on_arc = true; break; @@ -860,6 +875,7 @@ void _test_compare_y_to_right(CK ck) typedef CGAL::Line_arc_2 Line_arc_2; typedef CGAL::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Intersect_2 Intersect_2; + typedef std::variant, Line_arc_2> Intersection_result; CGAL::Random generatorOfgenerator; int random_seed = generatorOfgenerator.get_int(0, 123456); @@ -883,13 +899,13 @@ void _test_compare_y_to_right(CK ck) p2_line_diagonal), circle1,true, circle2,false); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_1; theConstruct_intersect_2(line_arc_horizontal, line_arc_diagonal, std::back_inserter(vector_for_intersection_1)); std::pair the_pair; - assert(assign(the_pair, vector_for_intersection_1[0])); + assert(assign_variant(the_pair, vector_for_intersection_1[0])); Circular_arc_point_2 first = the_pair.first; assert(CGAL::CircularFunctors::compare_y_to_right(line_arc_horizontal, @@ -934,22 +950,22 @@ void _test_compare_y_to_right(CK ck) part_low, line_arc_horizontal_low.source()) == CGAL::SMALLER); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_2; theConstruct_intersect_2(part_high, line_arc_diagonal, std::back_inserter(vector_for_intersection_2)); - assert(assign(the_pair, vector_for_intersection_2[0])); + assert(assign_variant(the_pair, vector_for_intersection_2[0])); first = the_pair.first; assert(CGAL::CircularFunctors::compare_y_to_right(line_arc_diagonal, part_high, first) == CGAL::LARGER); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_3; theConstruct_intersect_2(part_low, line_arc_diagonal, std::back_inserter(vector_for_intersection_3)); - assert(assign(the_pair, vector_for_intersection_3[0])); + assert(assign_variant(the_pair, vector_for_intersection_3[0])); first = the_pair.first; assert(CGAL::CircularFunctors::compare_y_to_right(line_arc_diagonal, part_low, @@ -959,22 +975,22 @@ void _test_compare_y_to_right(CK ck) p2_line_diagonal2), circle1,true, circle2,false); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_4; theConstruct_intersect_2(part_high, line_arc_diagonal2, std::back_inserter(vector_for_intersection_4)); - assert(assign(the_pair, vector_for_intersection_4[0])); + assert(assign_variant(the_pair, vector_for_intersection_4[0])); first = the_pair.first; assert(CGAL::CircularFunctors::compare_y_to_right(line_arc_diagonal2, part_high, first) == CGAL::SMALLER); - std::vector< CGAL::Object > + std::vector< Intersection_result > vector_for_intersection_5; theConstruct_intersect_2(part_low, line_arc_diagonal2, std::back_inserter(vector_for_intersection_5)); - assert(assign(the_pair, vector_for_intersection_5[0])); + assert(assign_variant(the_pair, vector_for_intersection_5[0])); first = the_pair.first; assert(CGAL::CircularFunctors::compare_y_to_right(line_arc_diagonal2, part_low, diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp index 1502fb44db2..b7192481138 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp @@ -893,20 +893,19 @@ void Viewer::naive_compute_intersection_points(const std::vector& for (std::vector::const_iterator it_f=circles.begin();it_f!=--circles.end();++it_f){ std::vector::const_iterator it_s=it_f; ++it_s; + typedef std::pair Point_and_multiplicity; for (;it_s!=circles.end();++it_s){ - std::vector intersections; + std::vector intersections; //ensure_circles are different CGAL_precondition(*it_s!=*it_f); - CGAL::intersection(*it_f,*it_s,std::back_inserter(intersections)); + CGAL::intersection(*it_f,*it_s,CGAL::dispatch_or_drop_output(std::back_inserter(intersections))); if (!intersections.empty()){ - for (std::vector ::const_iterator it_pt=intersections.begin();it_pt!=intersections.end();++it_pt){ - const std::pair* pt= - CGAL::object_cast< std::pair > (&(*it_pt)); - assert(pt!=nullptr); - *out++=EPIC::Point_3( CGAL::to_double(pt->first.x()), - CGAL::to_double(pt->first.y()), - CGAL::to_double(pt->first.z()) - ); + for (const Point_and_multiplicity& pt : intersections) + { + *out++=EPIC::Point_3( CGAL::to_double(pt.first.x()), + CGAL::to_double(pt.first.y()), + CGAL::to_double(pt.first.z()) + ); } } } diff --git a/Circular_kernel_3/examples/Circular_kernel_3/functor_compare_theta_3.cpp b/Circular_kernel_3/examples/Circular_kernel_3/functor_compare_theta_3.cpp index d318216621f..439b1a55793 100644 --- a/Circular_kernel_3/examples/Circular_kernel_3/functor_compare_theta_3.cpp +++ b/Circular_kernel_3/examples/Circular_kernel_3/functor_compare_theta_3.cpp @@ -1,4 +1,5 @@ #include +#include typedef CGAL::Exact_spherical_kernel_3 SK; @@ -15,15 +16,20 @@ int main(){ SK::Intersect_3 inter; //create a functor to compare theta-coordinates on sphere s1 SK::Compare_theta_z_3 cmp(s1); - std::vector< CGAL::Object > intersections; - inter(C1,C2,std::back_inserter(intersections)); + + //unsigned integer indicates multiplicity of intersection point - std::pair p1= - CGAL::object_cast< std::pair >(intersections[0]); - std::pair p2= - CGAL::object_cast< std::pair >(intersections[1]); + typedef std::pair Point_and_multiplicity; + // only recover points + std::vector< Point_and_multiplicity > intersections; + inter(C1,C2, + CGAL::dispatch_or_drop_output(std::back_inserter(intersections))); + + + const Point_and_multiplicity& p1=intersections[0]; + const Point_and_multiplicity& p2=intersections[1]; SK::Circular_arc_point_3 t_extreme[2]; //Compute theta extremal points of circle C1 on sphere s1 diff --git a/Circular_kernel_3/examples/Circular_kernel_3/intersecting_spheres.cpp b/Circular_kernel_3/examples/Circular_kernel_3/intersecting_spheres.cpp index 587e53cbe85..a31eef6daf3 100644 --- a/Circular_kernel_3/examples/Circular_kernel_3/intersecting_spheres.cpp +++ b/Circular_kernel_3/examples/Circular_kernel_3/intersecting_spheres.cpp @@ -1,10 +1,12 @@ #include #include -typedef CGAL::Exact_spherical_kernel_3 Spherical_k; +typedef CGAL::Exact_spherical_kernel_3 SK; -typedef CGAL::Point_3 Point_3; -typedef CGAL::Sphere_3 Sphere_3; +typedef CGAL::Point_3 Point_3; +typedef CGAL::Sphere_3 Sphere_3; +typedef CGAL::Circle_3 Circle_3; +typedef CGAL::Circular_arc_point_3 Circular_arc_point_3; int main() { @@ -33,9 +35,9 @@ int main() { Sphere_3 s2 = Sphere_3(Point_3(x2,y2,z2), r); Sphere_3 s3 = Sphere_3(Point_3(x3,y3,z3), r); - std::vector< CGAL::Object > intersecs; + std::vector< std::variant > > intersecs; CGAL::intersection(s1, s2, s3, std::back_inserter(intersecs)); - if(intersecs.size() > 0) count++; + if(intersecs.size() > 0) ++count; } std::cout << "The approximate probability that 3 spheres with radius 1" diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h index 9ef9b35f134..fb5420471db 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h @@ -167,11 +167,11 @@ namespace CGAL { CGAL_kernel_precondition(sols1.size() > 0); CGAL_kernel_precondition(sols2.size() > 0); const std::pair& pair1= - *boost::get >( + *std::get >( &sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)] ); const std::pair& pair2= - *boost::get >( + *std::get >( &sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)] ); // the source and target must be different @@ -194,11 +194,11 @@ namespace CGAL { CGAL_kernel_precondition(sols1.size() > 0); CGAL_kernel_precondition(sols2.size() > 0); const std::pair& pair1= - *boost::get >( + *std::get >( &sols1[(sols1.size()==1)?(0):(less_xyz_p1?0:1)] ); const std::pair& pair2= - *boost::get >( + *std::get >( &sols2[(sols2.size()==1)?(0):(less_xyz_p2?0:1)] ); // the source and target must be different diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h index bfb44edf924..99eb521e1fa 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h @@ -81,13 +81,13 @@ public: if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -104,13 +104,13 @@ public: if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -127,13 +127,13 @@ public: if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -149,13 +149,13 @@ public: if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -171,13 +171,13 @@ public: if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -193,13 +193,13 @@ public: if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h index 7a90c240e03..9612d2ca578 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h @@ -15,7 +15,7 @@ #include -#include +#include #include namespace CGAL { @@ -36,7 +36,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > type; @@ -49,7 +49,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int >, typename SK::Circle_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -63,7 +63,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int >, typename SK::Circle_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -77,7 +77,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair , typename SK::Circle_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -87,7 +87,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair CGAL_ADDITIONAL_VARIANT_FOR_ICL > type; @@ -100,7 +100,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< typename SK::Circle_3, std::pair , typename SK::Circular_arc_3 @@ -111,7 +111,7 @@ struct SK3_Intersection_traits struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair , typename SK::Circular_arc_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -125,7 +125,7 @@ struct SK3_Intersection_traits struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair , typename SK::Line_arc_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -136,7 +136,7 @@ struct SK3_Intersection_traits struct SK3_intersect_ternary { - typedef boost::variant< + typedef std::variant< typename SK::Circle_3, typename SK::Plane_3, typename SK::Sphere_3, @@ -167,25 +167,4 @@ struct SK3_Intersection_traits - inline RT - sk3_intersection_return(T&& t) { return RT(std::forward(t)); } - template - inline RT - sk3_intersection_return() { return RT(); } - -} } //end of namespace CGAL::internal - - #endif // CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Line_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Line_arc_3.h index 9d10940f0aa..de30249490d 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Line_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Line_arc_3.h @@ -94,9 +94,9 @@ namespace CGAL { // l must intersect s in 2 points CGAL_kernel_precondition(sols.size() == 2); const std::pair& pair1= - *boost::get >(&sols[0]); + *std::get_if >(&sols[0]); const std::pair& pair2= - *boost::get >(&sols[1]); + *std::get_if >(&sols[1]); if(less_xyz_first) { *this = Line_arc_3(l, pair1.first, pair2.first); } else { @@ -115,9 +115,9 @@ namespace CGAL { CGAL_kernel_precondition(sols1.size() > 0); CGAL_kernel_precondition(sols2.size() > 0); const std::pair& pair1= - *boost::get >(&sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)]); + *std::get_if >(&sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)]); const std::pair& pair2= - *boost::get >(&sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)]); + *std::get_if >(&sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)]); // the source and target must be different CGAL_kernel_precondition(pair1.first != pair2.first); *this = Line_arc_3(l, pair1.first, pair2.first); @@ -134,8 +134,8 @@ namespace CGAL { typedef typename SK3_Intersection_traits::type Intersection; Intersection i1 = SK().intersect_3_object()(l, p1); Intersection i2 = SK().intersect_3_object()(l, p2); - const typename SK::Point_3* point1=boost::get( & *i1 ); - const typename SK::Point_3* point2=boost::get( & *i2 ); + const typename SK::Point_3* point1=std::get_if( & *i1 ); + const typename SK::Point_3* point2=std::get_if( & *i2 ); CGAL_assertion(point1!=nullptr); CGAL_assertion(point2!=nullptr); // the source and target must be different diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h index 33e0451fc3f..56fd4d712ff 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h @@ -189,8 +189,6 @@ namespace CGAL { const typename SK::Circular_arc_3 & ca, OutputIterator res) { - typedef typename SK3_Intersection_traits::type result_type; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef std::vector< typename SK3_Intersection_traits::type @@ -198,7 +196,7 @@ namespace CGAL { typedef std::pair Solution; if(SK().has_on_3_object()(p,ca.supporting_circle())) { - *res++ = CGAL::internal::sk3_intersection_return(ca); + *res++ = ca; } solutions_container solutions; @@ -208,14 +206,14 @@ namespace CGAL { if(solutions.size() == 1) { const Solution& sol=*CGAL::Intersections::internal::intersect_get(solutions[0]); if(SK().has_on_3_object()(ca,sol.first,true)) - *res++ = CGAL::internal::sk3_intersection_return(sol); + *res++ = sol; } else { const Solution& sol1=*CGAL::Intersections::internal::intersect_get(solutions[0]); const Solution& sol2=*CGAL::Intersections::internal::intersect_get(solutions[1]); if(SK().has_on_3_object()(ca,sol1.first,true)) - *res++ = CGAL::internal::sk3_intersection_return(sol1); + *res++ = sol1; if(SK().has_on_3_object()(ca,sol2.first,true)) - *res++ = CGAL::internal::sk3_intersection_return(sol2); + *res++ = sol2; } return res; } @@ -261,8 +259,6 @@ namespace CGAL { const typename SK::Circular_arc_3 & a2, OutputIterator res) { - typedef typename SK3_Intersection_traits::type result_type; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Circular_arc_3 Circular_arc_3; typedef std::vector< typename SK3_Intersection_traits @@ -272,11 +268,11 @@ namespace CGAL { if(non_oriented_equal(a1.supporting_circle(), a2.supporting_circle())) { if(a1.rep().is_full()) { - *res++ = CGAL::internal::sk3_intersection_return(a2); + *res++ = a2; //return res; } else if(a2.rep().is_full()) { - *res++ = CGAL::internal::sk3_intersection_return(a1); + *res++ = a1; //return res; } else { bool t2_in_a1 = SK().has_on_3_object()(a1,a2.target(),true); @@ -289,58 +285,58 @@ namespace CGAL { SK().compare_xyz_3_object()(a1.source(), a2.source()); if(comp < 0) { if(a1.source() == a2.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } if(a2.source() == a1.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } } else if(comp > 0) { if(a2.source() == a1.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } if(a1.source() == a2.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } } else { - *res++ = CGAL::internal::sk3_intersection_return(a1); + *res++ = a1; } } else { - *res++ = CGAL::internal::sk3_intersection_return(a2); + *res++ = a2; } } else if(t2_in_a1) { if(a1.source() == a2.target()) - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } //return res; } else if(s2_in_a1) { if(a2.source() == a1.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } } else if(SK().has_on_3_object()(a2,a1.source(),true)) { - *res++ = CGAL::internal::sk3_intersection_return(a1); + *res++ = a1; } } } else { @@ -353,16 +349,16 @@ namespace CGAL { const Solution& sol=*CGAL::Intersections::internal::intersect_get(solutions[0]); if(SK().has_on_3_object()(a1,sol.first,true) && SK().has_on_3_object()(a2,sol.first,true)) - *res++ = solutions[0]; + *res++ = sol; } else { const Solution& sol1=*CGAL::Intersections::internal::intersect_get(solutions[0]); const Solution& sol2=*CGAL::Intersections::internal::intersect_get(solutions[1]); if(SK().has_on_3_object()(a1,sol1.first,true) && SK().has_on_3_object()(a2,sol1.first,true)) - *res++ = solutions[0]; + *res++ = sol1; if(SK().has_on_3_object()(a1,sol2.first,true) && SK().has_on_3_object()(a2,sol2.first,true)) - *res++ = solutions[1]; + *res++ = sol2; } } return res; diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h index f26063282b1..8491e83d5db 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h @@ -83,7 +83,6 @@ namespace CGAL { typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Line_3 Line_3; typedef typename SK::Line_arc_3 Line_arc_3; - typedef typename SK3_Intersection_traits::type result_type; typename Intersection_traits::result_type o = SK().intersect_3_object()(l1.supporting_line(), @@ -96,7 +95,7 @@ namespace CGAL { Circular_arc_point_3 p = *inters_p; if(!SK().has_on_3_object()(l1,p,true)) return res; if(!SK().has_on_3_object()(l2,p,true)) return res; - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(p,1u)); + *res++ = std::make_pair(p,1u); } else if( CGAL::Intersections::internal::intersect_get(o) ) { if(SK().compare_xyz_3_object()(l1.lower_xyz_extremity(), l2.lower_xyz_extremity()) < 0) { @@ -106,15 +105,15 @@ namespace CGAL { if(comparison < 0) { if(SK().compare_xyz_3_object()(l1.higher_xyz_extremity(), l2.higher_xyz_extremity()) <= 0) { - *res++ = CGAL::internal::sk3_intersection_return - (Line_arc_3(l1.supporting_line(), - l2.lower_xyz_extremity(), - l1.higher_xyz_extremity())); + *res++ = + Line_arc_3(l1.supporting_line(), + l2.lower_xyz_extremity(), + l1.higher_xyz_extremity()); } else { - *res++ = CGAL::internal::sk3_intersection_return(l2); + *res++ = l2; } } else if (comparison == 0) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(l2.lower_xyz_extremity(),1u)); + *res++ = std::make_pair(l2.lower_xyz_extremity(),1u); } } else { @@ -124,16 +123,16 @@ namespace CGAL { if(comparison < 0){ if(SK().compare_xyz_3_object()(l1.higher_xyz_extremity(), l2.higher_xyz_extremity()) <= 0) { - *res++ = CGAL::internal::sk3_intersection_return(l1); + *res++ = l1; } else { - *res++ = CGAL::internal::sk3_intersection_return - (Line_arc_3(l1.supporting_line(), - l1.lower_xyz_extremity(), - l2.higher_xyz_extremity() )); + *res++ = + Line_arc_3(l1.supporting_line(), + l1.lower_xyz_extremity(), + l2.higher_xyz_extremity() ); } } else if (comparison == 0){ - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(l1.lower_xyz_extremity(),1u)); + *res++ = std::make_pair(l1.lower_xyz_extremity(),1u); } } } @@ -149,8 +148,6 @@ namespace CGAL { typedef typename SK::Point_3 Point_3; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Line_3 Line_3; - typedef typename SK::Line_arc_3 Line_arc_3; - typedef typename SK3_Intersection_traits::type result_type; typename Intersection_traits::result_type o = SK().intersect_3_object()(l, la.supporting_line()); @@ -159,11 +156,11 @@ namespace CGAL { return res; if(const Line_3* inters_l = CGAL::Intersections::internal::intersect_get(o)) { - *res++ = CGAL::internal::sk3_intersection_return(la); + *res++ = la; } else if(const Point_3* inters_p = CGAL::Intersections::internal::intersect_get(o)) { Circular_arc_point_3 p = *inters_p; if(!SK().has_on_3_object()(la,p,true)) return res; - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(p,1u)); + *res++ = std::make_pair(p,1u); } return res; diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h index 43a371937ec..3fb21589539 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h @@ -202,17 +202,10 @@ namespace CGAL { namespace internal { // we need to pass the result_type, to hack around the fact that // object doesn't support operator=(const T&) and so we keep backwards compatibility - template - struct pair_transform { - RT operator()(const std::pair< typename SK::Root_for_spheres_2_3, unsigned >& p) { - return RT(std::make_pair(typename SK::Circular_arc_point_3(p.first), p.second)); - } - }; - template - struct pair_transform { - CGAL::Object operator()(const std::pair< typename SK::Root_for_spheres_2_3, unsigned >& p) { - return CGAL::make_object(std::make_pair(typename SK::Circular_arc_point_3(p.first), p.second)); + struct pair_transform { + auto operator()(const std::pair< typename SK::Root_for_spheres_2_3, unsigned >& p) { + return std::make_pair(typename SK::Circular_arc_point_3(p.first), p.second); } }; @@ -222,15 +215,15 @@ namespace CGAL { // pair, otherwise just dump the value with conversion to RT // (again: converting to RT before assigning to the Iterator is // just to keep object working) - template - struct Point_conversion_visitor : public boost::static_visitor { + template + struct Point_conversion_visitor { Point_conversion_visitor(const OutputIterator& it) : it(it) {} template - OutputIterator operator()(const T& t) { *it++ = RT(t); return it; } + OutputIterator operator()(const T& t) { *it++ = t; return it; } OutputIterator operator()(const typename SK::Point_3& p) { // 2 multiplicities - *it++ = RT(std::make_pair(typename SK::Circular_arc_point_3(p), 2u)); + *it++ = std::make_pair(typename SK::Circular_arc_point_3(p), 2u); return it; } OutputIterator it; @@ -244,8 +237,6 @@ namespace CGAL { const typename SK::Line_3 & l, OutputIterator res) { - typedef typename SK3_Intersection_traits - ::type result_type; typedef typename SK::Algebraic_kernel Algebraic_kernel; typedef typename SK::Polynomial_for_spheres_2_3 Equation_sphere; typedef typename SK::Polynomials_for_line_3 Equation_line; @@ -259,7 +250,7 @@ namespace CGAL { solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } // The special 3 object functions @@ -278,20 +269,19 @@ namespace CGAL { typedef typename SK::Point_3 Point_3; typedef typename SK::Sphere_3 Sphere_3; typedef typename SK::Algebraic_kernel Algebraic_kernel; - typedef typename SK3_Intersection_traits::type result_type; CGAL_kernel_precondition(!s1.is_degenerate()); CGAL_kernel_precondition(!s2.is_degenerate()); CGAL_kernel_precondition(!s3.is_degenerate()); if(non_oriented_equal(s1,s2) && non_oriented_equal(s2,s3)) { - *res++ = result_type(s1); + *res++ = s1; return res; } if(non_oriented_equal(s1,s2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(s1, s3)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor(visitor, + internal::Point_conversion_visitor visitor(res); + return std::visit(visitor, *v); } return res; @@ -299,8 +289,8 @@ namespace CGAL { if(non_oriented_equal(s1,s3) || non_oriented_equal(s2,s3)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(s1, s2)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor( + internal::Point_conversion_visitor visitor(res); + return std::visit( visitor, *v); } @@ -312,13 +302,13 @@ namespace CGAL { if(!v) return res; if(const Point_3* p = CGAL::Intersections::internal::intersect_get(v)) { if(SK().has_on_3_object()(s3, *p)) { - *res++ = result_type(std::make_pair(Circular_arc_point_3(*p),2u)); + *res++ = std::make_pair(Circular_arc_point_3(*p),2u); } return res; } if(const Circle_3* c = CGAL::Intersections::internal::intersect_get(v)) { if(SK().has_on_3_object()(s3, *c)) { - *res++ = result_type(*c); + *res++ = *c; } return res; } @@ -332,7 +322,7 @@ namespace CGAL { algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, e3, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } template < class SK, class OutputIterator > @@ -342,8 +332,6 @@ namespace CGAL { const typename SK::Sphere_3 & s2, OutputIterator res) { - typedef typename boost::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int>, - typename SK::Circle_3 > result_type; typedef typename SK::Root_for_spheres_2_3 Root_for_spheres_2_3; typedef typename SK::Polynomial_for_spheres_2_3 Equation_sphere; typedef typename SK::Polynomial_1_3 Equation_plane; @@ -356,8 +344,8 @@ namespace CGAL { if(non_oriented_equal(s1,s2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p, s1)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor( + internal::Point_conversion_visitor visitor(res); + return std::visit( visitor, *v); } @@ -367,8 +355,8 @@ namespace CGAL { if(non_oriented_equal(p,radical_p)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p, s1)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor( + internal::Point_conversion_visitor visitor(res); + return std::visit( visitor, *v); } @@ -381,7 +369,7 @@ namespace CGAL { algebraic_solutions_container; algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, e3, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } template < class SK, class OutputIterator > @@ -391,8 +379,6 @@ namespace CGAL { const typename SK::Sphere_3 & s, OutputIterator res) { - typedef typename boost::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int>, - typename SK::Circle_3 > result_type; typedef typename SK::Root_for_spheres_2_3 Root_for_spheres_2_3; typedef typename SK::Polynomial_for_spheres_2_3 Equation_sphere; typedef typename SK::Polynomial_1_3 Equation_plane; @@ -405,8 +391,8 @@ namespace CGAL { if(non_oriented_equal(p1,p2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p1, s)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor( + internal::Point_conversion_visitor visitor(res); + return std::visit( visitor, *v); } @@ -419,7 +405,7 @@ namespace CGAL { algebraic_solutions_container; algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, e3, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } template < class SK, class OutputIterator > @@ -449,13 +435,9 @@ namespace CGAL { typedef typename SK::Root_for_spheres_2_3 Root_for_spheres_2_3; typedef typename SK::Polynomials_for_circle_3 Equation_circle; typedef typename SK::Algebraic_kernel Algebraic_kernel; - typedef typename SK::Circle_3 Circle_3; - - typedef typename SK3_Intersection_traits - ::type result_type; if(non_oriented_equal(c1,c2)) { - *res++ = CGAL::internal::sk3_intersection_return(c1); + *res++ = c1; return res; } Equation_circle e1 = get_equation(c1); @@ -464,7 +446,7 @@ namespace CGAL { algebraic_solutions_container; algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } template < class SK, class OutputIterator > @@ -476,10 +458,6 @@ namespace CGAL { typedef typename SK::Root_for_spheres_2_3 Root_for_spheres_2_3; typedef typename SK::Polynomials_for_circle_3 Equation_circle; typedef typename SK::Polynomials_for_line_3 Equation_line; - typedef typename SK::Circle_3 Circle_3; - - typedef typename SK3_Intersection_traits - ::type result_type; typedef typename SK::Algebraic_kernel Algebraic_kernel; CGAL_kernel_precondition(!l.is_degenerate()); @@ -489,7 +467,7 @@ namespace CGAL { algebraic_solutions_container; algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } // At the moment we dont need those functions diff --git a/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_functionalities_on_sphere.h b/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_functionalities_on_sphere.h index d02daa9fe8a..a4ba682726d 100644 --- a/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_functionalities_on_sphere.h +++ b/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_functionalities_on_sphere.h @@ -66,21 +66,21 @@ void test_normal_circle_monotonicity(const typename SK::Circle_3& circle, const typename SK::Sphere_3& ref_sphere) { typename SK::Is_theta_monotone_3 is_t_mon=SK().is_theta_monotone_3_object(ref_sphere); - std::vector vect_obj; + std::vector>> vect_obj; typename SK::FT zcoord = CGAL::SphericalFunctors::extremal_points_z_coordinate(circle,ref_sphere); //create extremal points of circle SK().intersect_3_object()(circle,typename SK::Plane_3(0,0,1,-zcoord),std::back_inserter(vect_obj)); assert(vect_obj.size()==2); typename SK::Circular_arc_point_3 extrems[2]; - extrems[0]=CGAL::object_cast >(&vect_obj[0])->first; - extrems[1]=CGAL::object_cast >(&vect_obj[1])->first; + extrems[0]=std::get_if >(&vect_obj[0])->first; + extrems[1]=std::get_if >(&vect_obj[1])->first; //create non extremal points on circle vect_obj.clear(); SK().intersect_3_object()(circle,typename SK::Plane_3(0,0,1,-zcoord-typename SK::FT(0.1)),std::back_inserter(vect_obj)); assert(vect_obj.size()==2); typename SK::Circular_arc_point_3 other_pts[2]; - other_pts[0]=CGAL::object_cast >(&vect_obj[0])->first; - other_pts[1]=CGAL::object_cast >(&vect_obj[1])->first; + other_pts[0]=std::get_if >(&vect_obj[0])->first; + other_pts[1]=std::get_if >(&vect_obj[1])->first; //Test Make_theta_monotone+[Ii]s_theta_monotone(_3) on monotone arcs test_make_monotone_an_already_monotone_arc(typename SK::Circular_arc_3(circle,extrems[0],extrems[1]),ref_sphere); @@ -122,18 +122,18 @@ void test_threaded_circle_monotonicity(const typename SK::Circle_3& circle, const typename SK::Sphere_3& ref_sphere) { typename SK::Is_theta_monotone_3 is_t_mon=SK().is_theta_monotone_3_object(ref_sphere); - std::vector vect_obj; + std::vector>> vect_obj; SK().intersect_3_object()(circle,typename SK::Plane_3(1,0,0,-ref_sphere.center().x()),std::back_inserter(vect_obj)); assert(vect_obj.size()==2); typename SK::Circular_arc_point_3 pts1[2]; - pts1[0]=CGAL::object_cast >(&vect_obj[0])->first; - pts1[1]=CGAL::object_cast >(&vect_obj[1])->first; + pts1[0]=std::get_if >(&vect_obj[0])->first; + pts1[1]=std::get_if >(&vect_obj[1])->first; vect_obj.clear(); SK().intersect_3_object()(circle,typename SK::Plane_3(1,1,0,-ref_sphere.center().x()-ref_sphere.center().y()),std::back_inserter(vect_obj)); assert(vect_obj.size()==2); typename SK::Circular_arc_point_3 pts2[2]; - pts2[0]=CGAL::object_cast >(&vect_obj[0])->first; - pts2[1]=CGAL::object_cast >(&vect_obj[1])->first; + pts2[0]=std::get_if >(&vect_obj[0])->first; + pts2[1]=std::get_if >(&vect_obj[1])->first; //assertions test_make_monotone_an_already_monotone_arc(typename SK::Circular_arc_3(circle,pts1[0],pts1[1]),ref_sphere); test_make_monotone_an_already_monotone_arc(typename SK::Circular_arc_3(circle,pts2[0],pts2[1]),ref_sphere); @@ -154,12 +154,12 @@ void test_polar_circle_monotonicity(const typename SK::Circle_3& circle, const typename SK::Sphere_3& ref_sphere) { typename SK::Is_theta_monotone_3 is_t_mon=SK().is_theta_monotone_3_object(ref_sphere); - std::vector vect_obj; + std::vector>> vect_obj; SK().intersect_3_object()(circle,typename SK::Plane_3(0,0,1,-circle.center().z()),std::back_inserter(vect_obj)); assert(vect_obj.size()==2); typename SK::Circular_arc_point_3 pts[2]; - pts[0]=CGAL::object_cast >(&vect_obj[0])->first; - pts[1]=CGAL::object_cast >(&vect_obj[1])->first; + pts[0]=std::get_if >(&vect_obj[0])->first; + pts[1]=std::get_if >(&vect_obj[1])->first; @@ -262,11 +262,11 @@ void fill_intersections(const typename SK::Circle_3& circle, typename SK::Circular_arc_point_3* inters,unsigned i) { typename SK::Plane_3 meridians=get_meridians(i,ref.center()); - std::vector objs; + std::vector>> objs; SK().intersect_3_object()(circle,meridians,std::back_inserter(objs)); assert(objs.size()==2); - inters[get_num(i,0)]=CGAL::object_cast >(&objs[0])->first; - inters[get_num(i,1)]=CGAL::object_cast >(&objs[1])->first; + inters[get_num(i,0)]=std::get_if >(&objs[0])->first; + inters[get_num(i,1)]=std::get_if >(&objs[1])->first; } @@ -316,7 +316,7 @@ void test_extremal_points(const typename SK::Circle_3& circle, const typename SK::Circular_arc_point_3& inter2=cut_by_M0?xtrms[0]:xtrms[1]; typename SK::Intersect_3 func=SK().intersect_3_object(); - std::vector intersections; + std::vector>> intersections; std::pair vect_pair=get_bounding_vectors(inter1,ref_sphere); func(circle,typename SK::Plane_3(ref_sphere.center(),ref_sphere.center()+typename SK::Vector_3(0,0,1),ref_sphere.center()+vect_pair.first),std::back_inserter(intersections)); @@ -391,11 +391,11 @@ test_functionalities_on_a_reference_sphere(const typename SK::Point_3& ref_spher assert( cmp_theta(y_xtrems[0],y_xtrems[1])==CGAL::LARGER ); typename SK::FT zcoord=CGAL::SphericalFunctors::extremal_points_z_coordinate(normal_cut_M0,ref_sphere); - CGAL::Object objs[2]; + std::variant> objs[2]; SK().intersect_3_object()(normal_cut_M0,typename SK::Plane_3(0,0,1,-zcoord),objs); typename SK::Circular_arc_point_3 xtrms[2]; - xtrms[0]=CGAL::object_cast >(&objs[0])->first; - xtrms[1]=CGAL::object_cast >(&objs[1])->first; + xtrms[0]=std::get_if >(&objs[0])->first; + xtrms[1]=std::get_if >(&objs[1])->first; assert( cmp_theta(xtrms[0],xtrms[1])==CGAL::LARGER ); assert( cmp_theta(xtrms[0],y_xtrems[0])==CGAL::SMALLER ); @@ -440,11 +440,11 @@ test_functionalities_on_a_reference_sphere(const typename SK::Point_3& ref_spher //polar circle typename SK::Line_3 line_n(ref_sphere_center,north_polar.center()-ref_sphere_center); typename SK::Line_3 line_s(ref_sphere_center,south_polar.center()-ref_sphere_center); - CGAL::Object objs[2]; + std::variant> objs[2]; SK().intersect_3_object()(line_n,ref_sphere,objs); - typename SK::Circular_arc_point_3 cn=CGAL::object_cast >(&objs[1])->first; + typename SK::Circular_arc_point_3 cn=std::get_if >(&objs[1])->first; SK().intersect_3_object()(line_s,ref_sphere,objs); - typename SK::Circular_arc_point_3 cs=CGAL::object_cast >(&objs[1])->first; + typename SK::Circular_arc_point_3 cs=std::get_if >(&objs[1])->first; assert (cmp_z_at_theta(cn,typename SK::Circular_arc_3(north_polar,north_pole))==CGAL::LARGER ); assert (cmp_z_at_theta(cs,typename SK::Circular_arc_3(north_polar,north_pole))==CGAL::SMALLER ); @@ -472,9 +472,9 @@ test_functionalities_on_a_reference_sphere(const typename SK::Point_3& ref_spher typename SK::Line_3 line_1(ref_sphere_center,normal1.center()-ref_sphere_center); typename SK::Line_3 line_2(ref_sphere_center,normal2.center()-ref_sphere_center); SK().intersect_3_object()(line_1,ref_sphere,objs); - typename SK::Circular_arc_point_3 c1=CGAL::object_cast >(&objs[1])->first; + typename SK::Circular_arc_point_3 c1=std::get_if >(&objs[1])->first; SK().intersect_3_object()(line_2,ref_sphere,objs); - typename SK::Circular_arc_point_3 c2=CGAL::object_cast >(&objs[1])->first; + typename SK::Circular_arc_point_3 c2=std::get_if >(&objs[1])->first; typename SK::Circular_arc_point_3 xtrms1[2]; typename SK::Circular_arc_point_3 xtrms2[2]; @@ -541,10 +541,10 @@ test_functionalities_on_a_reference_sphere(const typename SK::Point_3& ref_spher //normal vs normal typename SK::Circle_3 normal3 (ref_sphere,typename SK::Plane_3(0.08,1.1,0.9 ,-1-FT(0.08)*ref_sphere_center.x() -FT(1.1)*ref_sphere_center.y()-FT(0.9)*ref_sphere_center.z())); typename SK::Circle_3 normal4 (ref_sphere,typename SK::Plane_3(0.05,1.1,-0.9 ,-1-FT(0.05)*ref_sphere_center.x() -FT(1.1)*ref_sphere_center.y()+FT(0.9)*ref_sphere_center.z())); - std::vector objs; + std::vector>> objs; SK().intersect_3_object()(normal3,normal4,std::back_inserter(objs)); - typename SK::Circular_arc_point_3 int1=CGAL::object_cast >(&objs[1])->first; - typename SK::Circular_arc_point_3 int2=CGAL::object_cast >(&objs[0])->first; + typename SK::Circular_arc_point_3 int1=std::get_if >(&objs[1])->first; + typename SK::Circular_arc_point_3 int2=std::get_if >(&objs[0])->first; typename SK::Circular_arc_point_3 xtrms3[2]; typename SK::Circular_arc_point_3 xtrms4[2]; CGAL::theta_extremal_points(normal3,ref_sphere,xtrms3); @@ -554,8 +554,8 @@ test_functionalities_on_a_reference_sphere(const typename SK::Point_3& ref_spher //normal vs threaded objs.clear(); SK().intersect_3_object()(threaded,normal4,std::back_inserter(objs)); - int1=CGAL::object_cast >(&objs[1])->first; - int2=CGAL::object_cast >(&objs[0])->first; + int1=std::get_if >(&objs[1])->first; + int2=std::get_if >(&objs[0])->first; assert ( cmp_right(typename SK::Circular_arc_3(threaded),typename SK::Circular_arc_3(normal4,xtrms4[1],xtrms4[0]),int1)==CGAL::SMALLER ); assert ( cmp_right(typename SK::Circular_arc_3(threaded),typename SK::Circular_arc_3(normal4,xtrms4[1],xtrms4[0]),int2)==CGAL::LARGER ); //normal vs polar @@ -563,8 +563,8 @@ test_functionalities_on_a_reference_sphere(const typename SK::Point_3& ref_spher typename SK::Circular_arc_point_3 xtrms2[2]; CGAL::theta_extremal_points(normal2,ref_sphere,xtrms2); SK().intersect_3_object()(south_polar,normal2,std::back_inserter(objs)); - int1=CGAL::object_cast >(&objs[1])->first; - int2=CGAL::object_cast >(&objs[0])->first; + int1=std::get_if >(&objs[1])->first; + int2=std::get_if >(&objs[0])->first; assert ( cmp_right(typename SK::Circular_arc_3(south_polar,south_pole),typename SK::Circular_arc_3(normal2,xtrms2[0],xtrms2[1]),int1)==CGAL::LARGER ); assert ( cmp_right(typename SK::Circular_arc_3(south_polar,south_pole),typename SK::Circular_arc_3(normal2,xtrms2[0],xtrms2[1]),int2)==CGAL::SMALLER ); //polar vs polar @@ -574,15 +574,15 @@ test_functionalities_on_a_reference_sphere(const typename SK::Point_3& ref_spher assert(CGAL::classify(spolar,ref_sphere)==CGAL::POLAR); objs.clear(); SK().intersect_3_object()(npolar,spolar,std::back_inserter(objs)); - int1=CGAL::object_cast >(&objs[1])->first; - int2=CGAL::object_cast >(&objs[0])->first; + int1=std::get_if >(&objs[1])->first; + int2=std::get_if >(&objs[0])->first; assert ( cmp_right(typename SK::Circular_arc_3(npolar,north_pole),typename SK::Circular_arc_3(spolar,south_pole),int1)==CGAL::SMALLER ); assert ( cmp_right(typename SK::Circular_arc_3(npolar,north_pole),typename SK::Circular_arc_3(spolar,south_pole),int2)==CGAL::LARGER ); //polar vs threaded objs.clear(); SK().intersect_3_object()(south_polar,threaded,std::back_inserter(objs)); - int1=CGAL::object_cast >(&objs[1])->first; - int2=CGAL::object_cast >(&objs[0])->first; + int1=std::get_if >(&objs[1])->first; + int2=std::get_if >(&objs[0])->first; assert ( cmp_right(typename SK::Circular_arc_3(south_polar,south_pole),typename SK::Circular_arc_3(threaded),int1)==CGAL::LARGER ); assert ( cmp_right(typename SK::Circular_arc_3(south_polar,south_pole),typename SK::Circular_arc_3(threaded),int2)==CGAL::SMALLER ); //threaded vs threaded @@ -590,8 +590,8 @@ test_functionalities_on_a_reference_sphere(const typename SK::Point_3& ref_spher typename SK::Circle_3 threaded2 (ref_sphere,typename SK::Plane_3(0,1.1,-0.9,-FT(1.1)*ref_sphere_center.y()+FT(0.9)*ref_sphere_center.z())); objs.clear(); SK().intersect_3_object()(threaded1,threaded2,std::back_inserter(objs)); - int1=CGAL::object_cast >(&objs[1])->first; - int2=CGAL::object_cast >(&objs[0])->first; + int1=std::get_if >(&objs[1])->first; + int2=std::get_if >(&objs[0])->first; assert ( cmp_right(typename SK::Circular_arc_3(threaded1),typename SK::Circular_arc_3(threaded2),int1)==CGAL::SMALLER ); assert ( cmp_right(typename SK::Circular_arc_3(threaded1),typename SK::Circular_arc_3(threaded2),int2)==CGAL::LARGER ); //tangency tests global diff --git a/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_constructions.h b/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_constructions.h index 363d4b2087b..cac9217e371 100644 --- a/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_constructions.h +++ b/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_constructions.h @@ -15,6 +15,31 @@ #include #include +#include +#include + +template +bool assign_variant(Expected& e, const V& v) +{ + if (std::get_if(&v) != nullptr) + { + e = std::get(v); + return true; + } + return false; +} + +template +bool assign_variant(Expected& e, const std::optional& ov) +{ + if (ov==std::nullopt) return false; + if (std::get_if(&(ov.value())) != nullptr) + { + e = std::get(ov.value()); + return true; + } + return false; +} template void _test_circular_arc_point_construct(SK sk) { @@ -547,7 +572,7 @@ void _test_intersection_construct(SK sk) { const FT z = FT(vz); Line_3 l1 = theConstruct_line_3(Point_3(-1,0,0), Point_3(x,y,z)); Line_3 l2 = theConstruct_line_3(Point_3(FT(-1)-FT(FT(1) / FT(1000000)),FT(0),FT(0)), Point_3(x,y,z)); - std::vector< CGAL::Object > intersection_1, intersection_2; + std::vector< std::variant< std::pair > > intersection_1, intersection_2; theIntersect_3(s, l1, std::back_inserter(intersection_1)); theIntersect_3(s, l2, std::back_inserter(intersection_2)); @@ -557,7 +582,7 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(s, l1)); assert(intersection_1.size() == 1); std::pair the_pair1; - assert(assign(the_pair1, intersection_1[0])); + assert(assign_variant(the_pair1, intersection_1[0])); assert(theHas_on_3(s,the_pair1.first)); assert(theHas_on_3(l1,the_pair1.first)); @@ -572,8 +597,8 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(s, l1)); std::pair the_pair1; std::pair the_pair2; - assert(assign(the_pair1, intersection_1[0])); - assert(assign(the_pair2, intersection_1[1])); + assert(assign_variant(the_pair1, intersection_1[0])); + assert(assign_variant(the_pair2, intersection_1[1])); assert(theHas_on_3(s,the_pair1.first)); assert(theHas_on_3(l1,the_pair1.first)); assert(theHas_on_3(s,the_pair2.first)); @@ -583,8 +608,8 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(s, l2)); std::pair the_pair3; std::pair the_pair4; - assert(assign(the_pair3, intersection_2[0])); - assert(assign(the_pair4, intersection_2[1])); + assert(assign_variant(the_pair3, intersection_2[0])); + assert(assign_variant(the_pair4, intersection_2[1])); assert(theHas_on_3(s,the_pair3.first)); assert(theHas_on_3(l2,the_pair3.first)); assert(theHas_on_3(s,the_pair4.first)); @@ -604,7 +629,7 @@ void _test_intersection_construct(SK sk) { const FT z = FT(vz); Line_3 l1 = theConstruct_line_3(Point_3(-1,0,0), Point_3(x,y,z)); Line_3 l2 = theConstruct_line_3(Point_3(FT(-1)-FT(FT(1) / FT(1000000)),FT(0),FT(0)), Point_3(x,y,z)); - std::vector< CGAL::Object > intersection_1, intersection_2; + std::vector< std::variant< std::pair > > intersection_1, intersection_2; intersection(s, l1, std::back_inserter(intersection_1)); intersection(s, l2, std::back_inserter(intersection_2)); @@ -614,7 +639,7 @@ void _test_intersection_construct(SK sk) { assert(do_intersect(s, l1)); assert(intersection_1.size() == 1); std::pair the_pair1; - assert(assign(the_pair1, intersection_1[0])); + assert(assign_variant(the_pair1, intersection_1[0])); assert(theHas_on_3(s,the_pair1.first)); assert(theHas_on_3(l1,the_pair1.first)); @@ -629,8 +654,8 @@ void _test_intersection_construct(SK sk) { assert(do_intersect(s, l1)); std::pair the_pair1; std::pair the_pair2; - assert(assign(the_pair1, intersection_1[0])); - assert(assign(the_pair2, intersection_1[1])); + assert(assign_variant(the_pair1, intersection_1[0])); + assert(assign_variant(the_pair2, intersection_1[1])); assert(theHas_on_3(s,the_pair1.first)); assert(theHas_on_3(l1,the_pair1.first)); assert(theHas_on_3(s,the_pair2.first)); @@ -640,8 +665,8 @@ void _test_intersection_construct(SK sk) { assert(do_intersect(s, l2)); std::pair the_pair3; std::pair the_pair4; - assert(assign(the_pair3, intersection_2[0])); - assert(assign(the_pair4, intersection_2[1])); + assert(assign_variant(the_pair3, intersection_2[0])); + assert(assign_variant(the_pair4, intersection_2[1])); assert(theHas_on_3(s,the_pair3.first)); assert(theHas_on_3(l2,the_pair3.first)); assert(theHas_on_3(s,the_pair4.first)); @@ -665,20 +690,20 @@ void _test_intersection_construct(SK sk) { const FT r = 4*FT(vr) / FT(2); Sphere_3 sl = theConstruct_sphere_3( Polynomial_for_spheres_2_3(x,y,z,r*r)); - std::vector< CGAL::Object > intersection_1; - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant > > intersection_1; + std::vector< std::variant > > intersection_2; theIntersect_3(s1, s2, sl, std::back_inserter(intersection_1)); theIntersect_3(s1, s3, sl, std::back_inserter(intersection_2)); if(intersection_1.size() == 1) { assert(theDo_intersect_3(s1, s2, sl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_1[0])) { + if(assign_variant(circle,intersection_1[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(s2,circle)); assert(theHas_on_3(sl,circle)); } - if(assign(cap,intersection_1[0])) { + if(assign_variant(cap,intersection_1[0])) { // This case must never happen assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(s2,cap.first)); @@ -688,8 +713,8 @@ void _test_intersection_construct(SK sk) { if(intersection_1.size() == 2) { assert(theDo_intersect_3(s1, s2, sl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_1[0])); - assert(assign(cap2,intersection_1[1])); + assert(assign_variant(cap1,intersection_1[0])); + assert(assign_variant(cap2,intersection_1[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(s2,cap1.first)); assert(theHas_on_3(sl,cap1.first)); @@ -702,13 +727,13 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(s1, s3, sl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_2[0])) { + if(assign_variant(circle,intersection_2[0])) { // This case must never happen assert(theHas_on_3(s1,circle)); assert(theHas_on_3(s3,circle)); assert(theHas_on_3(sl,circle)); } - if(assign(cap,intersection_2[0])) { + if(assign_variant(cap,intersection_2[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(s3,cap.first)); assert(theHas_on_3(sl,cap.first)); @@ -718,8 +743,8 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(s1, s3, sl)); // This case must never happen std::pair cap1, cap2; - assert(assign(cap1,intersection_2[0])); - assert(assign(cap2,intersection_2[1])); + assert(assign_variant(cap1,intersection_2[0])); + assert(assign_variant(cap2,intersection_2[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(s3,cap1.first)); assert(theHas_on_3(sl,cap1.first)); @@ -743,20 +768,20 @@ void _test_intersection_construct(SK sk) { const FT r = 4*FT(vr) / FT(2); Sphere_3 sl = theConstruct_sphere_3( Polynomial_for_spheres_2_3(x,y,z,r*r)); - std::vector< CGAL::Object > intersection_1; - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant , Circle_3, Sphere_3> > intersection_1; + std::vector< std::variant , Circle_3, Sphere_3> > intersection_2; intersection(s1, s2, sl, std::back_inserter(intersection_1)); intersection(s1, s3, sl, std::back_inserter(intersection_2)); if(intersection_1.size() == 1) { assert(CGAL::do_intersect(s1, s2, sl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_1[0])) { + if(assign_variant(circle,intersection_1[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(s2,circle)); assert(theHas_on_3(sl,circle)); } - if(assign(cap,intersection_1[0])) { + if(assign_variant(cap,intersection_1[0])) { // This case must never happen assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(s2,cap.first)); @@ -766,8 +791,8 @@ void _test_intersection_construct(SK sk) { if(intersection_1.size() == 2) { assert(CGAL::do_intersect(s1, s2, sl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_1[0])); - assert(assign(cap2,intersection_1[1])); + assert(assign_variant(cap1,intersection_1[0])); + assert(assign_variant(cap2,intersection_1[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(s2,cap1.first)); assert(theHas_on_3(sl,cap1.first)); @@ -780,13 +805,13 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(s1, s3, sl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_2[0])) { + if(assign_variant(circle,intersection_2[0])) { // This case must never happen assert(theHas_on_3(s1,circle)); assert(theHas_on_3(s3,circle)); assert(theHas_on_3(sl,circle)); } - if(assign(cap,intersection_2[0])) { + if(assign_variant(cap,intersection_2[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(s3,cap.first)); assert(theHas_on_3(sl,cap.first)); @@ -796,8 +821,8 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(s1, s3, sl)); // This case must never happen std::pair cap1, cap2; - assert(assign(cap1,intersection_2[0])); - assert(assign(cap2,intersection_2[1])); + assert(assign_variant(cap1,intersection_2[0])); + assert(assign_variant(cap2,intersection_2[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(s3,cap1.first)); assert(theHas_on_3(sl,cap1.first)); @@ -823,20 +848,20 @@ void _test_intersection_construct(SK sk) { if(a == 0 && b == 0 && c == 0) continue; Plane_3 pl = theConstruct_plane_3( Polynomial_1_3(a,b,c,d)); - std::vector< CGAL::Object > intersection_1; - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant , Circle_3> > intersection_1; + std::vector< std::variant , Circle_3> > intersection_2; theIntersect_3(s1, s2, pl, std::back_inserter(intersection_1)); theIntersect_3(s1, s3, pl, std::back_inserter(intersection_2)); if(intersection_1.size() == 1) { assert(theDo_intersect_3(s1, s2, pl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_1[0])) { + if(assign_variant(circle,intersection_1[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(s2,circle)); assert(theHas_on_3(pl,circle)); } - if(assign(cap,intersection_1[0])) { + if(assign_variant(cap,intersection_1[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(s2,cap.first)); assert(theHas_on_3(pl,cap.first)); @@ -845,8 +870,8 @@ void _test_intersection_construct(SK sk) { if(intersection_1.size() == 2) { assert(theDo_intersect_3(s1, s2, pl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_1[0])); - assert(assign(cap2,intersection_1[1])); + assert(assign_variant(cap1,intersection_1[0])); + assert(assign_variant(cap2,intersection_1[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(s2,cap1.first)); assert(theHas_on_3(pl,cap1.first)); @@ -858,12 +883,12 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(s1, s3, pl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_2[0])) { + if(assign_variant(circle,intersection_2[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(s3,circle)); assert(theHas_on_3(pl,circle)); } - if(assign(cap,intersection_2[0])) { + if(assign_variant(cap,intersection_2[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(s3,cap.first)); assert(theHas_on_3(pl,cap.first)); @@ -872,8 +897,8 @@ void _test_intersection_construct(SK sk) { if(intersection_2.size() == 2) { assert(theDo_intersect_3(s1, s3, pl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_2[0])); - assert(assign(cap2,intersection_2[1])); + assert(assign_variant(cap1,intersection_2[0])); + assert(assign_variant(cap2,intersection_2[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(s3,cap1.first)); assert(theHas_on_3(pl,cap1.first)); @@ -898,20 +923,20 @@ void _test_intersection_construct(SK sk) { if(a == 0 && b == 0 && c == 0) continue; Plane_3 pl = theConstruct_plane_3( Polynomial_1_3(a,b,c,d)); - std::vector< CGAL::Object > intersection_1; - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant , Circle_3> > intersection_1; + std::vector< std::variant , Circle_3> > intersection_2; intersection(s1, s2, pl, std::back_inserter(intersection_1)); intersection(s1, s3, pl, std::back_inserter(intersection_2)); if(intersection_1.size() == 1) { assert(CGAL::do_intersect(s1, s2, pl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_1[0])) { + if(assign_variant(circle,intersection_1[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(s2,circle)); assert(theHas_on_3(pl,circle)); } - if(assign(cap,intersection_1[0])) { + if(assign_variant(cap,intersection_1[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(s2,cap.first)); assert(theHas_on_3(pl,cap.first)); @@ -920,8 +945,8 @@ void _test_intersection_construct(SK sk) { if(intersection_1.size() == 2) { assert(CGAL::do_intersect(s1, s2, pl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_1[0])); - assert(assign(cap2,intersection_1[1])); + assert(assign_variant(cap1,intersection_1[0])); + assert(assign_variant(cap2,intersection_1[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(s2,cap1.first)); assert(theHas_on_3(pl,cap1.first)); @@ -933,12 +958,12 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(s1, s3, pl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_2[0])) { + if(assign_variant(circle,intersection_2[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(s3,circle)); assert(theHas_on_3(pl,circle)); } - if(assign(cap,intersection_2[0])) { + if(assign_variant(cap,intersection_2[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(s3,cap.first)); assert(theHas_on_3(pl,cap.first)); @@ -947,8 +972,8 @@ void _test_intersection_construct(SK sk) { if(intersection_2.size() == 2) { assert(CGAL::do_intersect(s1, s3, pl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_2[0])); - assert(assign(cap2,intersection_2[1])); + assert(assign_variant(cap1,intersection_2[0])); + assert(assign_variant(cap2,intersection_2[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(s3,cap1.first)); assert(theHas_on_3(pl,cap1.first)); @@ -976,20 +1001,20 @@ void _test_intersection_construct(SK sk) { if(a == 0 && b == 0 && c == 0) continue; Plane_3 pl = theConstruct_plane_3( Polynomial_1_3(a,b,c,d)); - std::vector< CGAL::Object > intersection_1; - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant , Circle_3> > intersection_1; + std::vector< std::variant , Circle_3> > intersection_2; theIntersect_3(s1, p1, pl, std::back_inserter(intersection_1)); theIntersect_3(s1, p2, pl, std::back_inserter(intersection_2)); if(intersection_1.size() == 1) { assert(theDo_intersect_3(s1, p1, pl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_1[0])) { + if(assign_variant(circle,intersection_1[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(p1,circle)); assert(theHas_on_3(pl,circle)); } - if(assign(cap,intersection_1[0])) { + if(assign_variant(cap,intersection_1[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(p1,cap.first)); assert(theHas_on_3(pl,cap.first)); @@ -998,8 +1023,8 @@ void _test_intersection_construct(SK sk) { if(intersection_1.size() == 2) { assert(theDo_intersect_3(s1, p1, pl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_1[0])); - assert(assign(cap2,intersection_1[1])); + assert(assign_variant(cap1,intersection_1[0])); + assert(assign_variant(cap2,intersection_1[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(p1,cap1.first)); assert(theHas_on_3(pl,cap1.first)); @@ -1011,12 +1036,12 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(s1, p2, pl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_2[0])) { + if(assign_variant(circle,intersection_2[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(p2,circle)); assert(theHas_on_3(pl,circle)); } - if(assign(cap,intersection_2[0])) { + if(assign_variant(cap,intersection_2[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(p2,cap.first)); assert(theHas_on_3(pl,cap.first)); @@ -1025,8 +1050,8 @@ void _test_intersection_construct(SK sk) { if(intersection_2.size() == 2) { assert(theDo_intersect_3(s1, p2, pl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_2[0])); - assert(assign(cap2,intersection_2[1])); + assert(assign_variant(cap1,intersection_2[0])); + assert(assign_variant(cap2,intersection_2[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(p2,cap1.first)); assert(theHas_on_3(pl,cap1.first)); @@ -1051,20 +1076,20 @@ void _test_intersection_construct(SK sk) { if(a == 0 && b == 0 && c == 0) continue; Plane_3 pl = theConstruct_plane_3( Polynomial_1_3(a,b,c,d)); - std::vector< CGAL::Object > intersection_1; - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant , Circle_3> > intersection_1; + std::vector< std::variant , Circle_3> > intersection_2; intersection(s1, p1, pl, std::back_inserter(intersection_1)); intersection(s1, p2, pl, std::back_inserter(intersection_2)); if(intersection_1.size() == 1) { assert(CGAL::do_intersect(s1, p1, pl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_1[0])) { + if(assign_variant(circle,intersection_1[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(p1,circle)); assert(theHas_on_3(pl,circle)); } - if(assign(cap,intersection_1[0])) { + if(assign_variant(cap,intersection_1[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(p1,cap.first)); assert(theHas_on_3(pl,cap.first)); @@ -1073,8 +1098,8 @@ void _test_intersection_construct(SK sk) { if(intersection_1.size() == 2) { assert(CGAL::do_intersect(s1, p1, pl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_1[0])); - assert(assign(cap2,intersection_1[1])); + assert(assign_variant(cap1,intersection_1[0])); + assert(assign_variant(cap2,intersection_1[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(p1,cap1.first)); assert(theHas_on_3(pl,cap1.first)); @@ -1086,12 +1111,12 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(s1, p2, pl)); Circle_3 circle; std::pair cap; - if(assign(circle,intersection_2[0])) { + if(assign_variant(circle,intersection_2[0])) { assert(theHas_on_3(s1,circle)); assert(theHas_on_3(p2,circle)); assert(theHas_on_3(pl,circle)); } - if(assign(cap,intersection_2[0])) { + if(assign_variant(cap,intersection_2[0])) { assert(theHas_on_3(s1,cap.first)); assert(theHas_on_3(p2,cap.first)); assert(theHas_on_3(pl,cap.first)); @@ -1100,8 +1125,8 @@ void _test_intersection_construct(SK sk) { if(intersection_2.size() == 2) { assert(CGAL::do_intersect(s1, p2, pl)); std::pair cap1, cap2; - assert(assign(cap1,intersection_2[0])); - assert(assign(cap2,intersection_2[1])); + assert(assign_variant(cap1,intersection_2[0])); + assert(assign_variant(cap2,intersection_2[1])); assert(theHas_on_3(s1,cap1.first)); assert(theHas_on_3(p2,cap1.first)); assert(theHas_on_3(pl,cap1.first)); @@ -1134,27 +1159,27 @@ void _test_intersection_construct(SK sk) { Circle_3 c2 = theConstruct_circle_3(std::make_pair(es2, pol)); Circle_3 c3 = theConstruct_circle_3(std::make_pair(es3, pol)); - std::vector< CGAL::Object > intersection_1; + std::vector< std::variant , Circle_3> > intersection_1; theIntersect_3(c1, c1, std::back_inserter(intersection_1)); assert(intersection_1.size() == 1); assert(theDo_intersect_3(c1, c1)); Circle_3 circle; - assert(assign(circle,intersection_1[0])); + assert(assign_variant(circle,intersection_1[0])); assert(circle == c1); - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant , Circle_3> > intersection_2; theIntersect_3(c1, c2, std::back_inserter(intersection_2)); assert(intersection_2.size() == 2); assert(theDo_intersect_3(c1, c2)); std::pair cap1, cap2; - assert(assign(cap1,intersection_2[0])); - assert(assign(cap2,intersection_2[1])); + assert(assign_variant(cap1,intersection_2[0])); + assert(assign_variant(cap2,intersection_2[1])); assert(theHas_on_3(c1,cap1.first)); assert(theHas_on_3(c2,cap1.first)); assert(theHas_on_3(c1,cap2.first)); assert(theHas_on_3(c2,cap2.first)); - std::vector< CGAL::Object > intersection_3; + std::vector< std::variant , Circle_3> > intersection_3; theIntersect_3(c1, c3, std::back_inserter(intersection_3)); if(a != 0) { assert(!theDo_intersect_3(c1, c3)); @@ -1163,7 +1188,7 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(c1, c3)); assert(intersection_3.size() == 1); std::pair cap; - assert(assign(cap,intersection_3[0])); + assert(assign_variant(cap,intersection_3[0])); assert(theHas_on_3(c1,cap.first)); assert(theHas_on_3(c3,cap.first)); } @@ -1175,12 +1200,12 @@ void _test_intersection_construct(SK sk) { const FT dl = 0; Polynomial_1_3 pol2 = Polynomial_1_3(al,bl,cl,dl); Circle_3 c4 = theConstruct_circle_3(std::make_pair(es1, pol2)); - std::vector< CGAL::Object > intersection_4; + std::vector< std::variant , Circle_3> > intersection_4; theIntersect_3(c1, c4, std::back_inserter(intersection_4)); assert(theDo_intersect_3(c1, c4)); assert(intersection_4.size() == 2); - assert(assign(cap1,intersection_4[0])); - assert(assign(cap2,intersection_4[1])); + assert(assign_variant(cap1,intersection_4[0])); + assert(assign_variant(cap2,intersection_4[1])); assert(theHas_on_3(c1,cap1.first)); assert(theHas_on_3(c4,cap1.first)); assert(theHas_on_3(c1,cap2.first)); @@ -1193,12 +1218,12 @@ void _test_intersection_construct(SK sk) { const FT d_c = -FT(va) / FT(10); Polynomial_1_3 pol2 = Polynomial_1_3(a_c,b_c,c_c,d_c); Circle_3 c5 = theConstruct_circle_3(std::make_pair(es2, pol2)); - std::vector< CGAL::Object > intersection_5; + std::vector< std::variant , Circle_3> > intersection_5; theIntersect_3(c1, c5, std::back_inserter(intersection_5)); assert(theDo_intersect_3(c1, c5)); assert(intersection_5.size() == 2); - assert(assign(cap1,intersection_5[0])); - assert(assign(cap2,intersection_5[1])); + assert(assign_variant(cap1,intersection_5[0])); + assert(assign_variant(cap2,intersection_5[1])); assert(theHas_on_3(c1,cap1.first)); assert(theHas_on_3(c5,cap1.first)); assert(theHas_on_3(c1,cap2.first)); @@ -1217,27 +1242,27 @@ void _test_intersection_construct(SK sk) { Circle_3 c2 = theConstruct_circle_3(std::make_pair(es2, pol)); Circle_3 c3 = theConstruct_circle_3(std::make_pair(es3, pol)); - std::vector< CGAL::Object > intersection_1; + std::vector< std::variant , Circle_3> > intersection_1; intersection(c1, c1, std::back_inserter(intersection_1)); assert(intersection_1.size() == 1); assert(CGAL::do_intersect(c1, c1)); Circle_3 circle; - assert(assign(circle,intersection_1[0])); + assert(assign_variant(circle,intersection_1[0])); assert(circle == c1); - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant , Circle_3> > intersection_2; intersection(c1, c2, std::back_inserter(intersection_2)); assert(intersection_2.size() == 2); assert(CGAL::do_intersect(c1, c2)); std::pair cap1, cap2; - assert(assign(cap1,intersection_2[0])); - assert(assign(cap2,intersection_2[1])); + assert(assign_variant(cap1,intersection_2[0])); + assert(assign_variant(cap2,intersection_2[1])); assert(theHas_on_3(c1,cap1.first)); assert(theHas_on_3(c2,cap1.first)); assert(theHas_on_3(c1,cap2.first)); assert(theHas_on_3(c2,cap2.first)); - std::vector< CGAL::Object > intersection_3; + std::vector< std::variant , Circle_3> > intersection_3; intersection(c1, c3, std::back_inserter(intersection_3)); if(a != 0) { assert(!do_intersect(c1, c3)); @@ -1246,7 +1271,7 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(c1, c3)); assert(intersection_3.size() == 1); std::pair cap; - assert(assign(cap,intersection_3[0])); + assert(assign_variant(cap,intersection_3[0])); assert(theHas_on_3(c1,cap.first)); assert(theHas_on_3(c3,cap.first)); } @@ -1258,12 +1283,12 @@ void _test_intersection_construct(SK sk) { const FT dl = 0; Polynomial_1_3 pol2 = Polynomial_1_3(al,bl,cl,dl); Circle_3 c4 = theConstruct_circle_3(std::make_pair(es1, pol2)); - std::vector< CGAL::Object > intersection_4; + std::vector< std::variant , Circle_3> > intersection_4; intersection(c1, c4, std::back_inserter(intersection_4)); assert(CGAL::do_intersect(c1, c4)); assert(intersection_4.size() == 2); - assert(assign(cap1,intersection_4[0])); - assert(assign(cap2,intersection_4[1])); + assert(assign_variant(cap1,intersection_4[0])); + assert(assign_variant(cap2,intersection_4[1])); assert(theHas_on_3(c1,cap1.first)); assert(theHas_on_3(c4,cap1.first)); assert(theHas_on_3(c1,cap2.first)); @@ -1276,12 +1301,12 @@ void _test_intersection_construct(SK sk) { const FT d_c = -FT(va) / FT(10); Polynomial_1_3 pol2 = Polynomial_1_3(a_c,b_c,c_c,d_c); Circle_3 c5 = theConstruct_circle_3(std::make_pair(es2, pol2)); - std::vector< CGAL::Object > intersection_5; + std::vector< std::variant , Circle_3> > intersection_5; intersection(c1, c5, std::back_inserter(intersection_5)); assert(CGAL::do_intersect(c1, c5)); assert(intersection_5.size() == 2); - assert(assign(cap1,intersection_5[0])); - assert(assign(cap2,intersection_5[1])); + assert(assign_variant(cap1,intersection_5[0])); + assert(assign_variant(cap2,intersection_5[1])); assert(theHas_on_3(c1,cap1.first)); assert(theHas_on_3(c5,cap1.first)); assert(theHas_on_3(c1,cap2.first)); @@ -1310,7 +1335,7 @@ void _test_intersection_construct(SK sk) { Circle_3 c1 = theConstruct_circle_3(std::make_pair(pol_s, pol_pl1)); Circle_3 c2 = theConstruct_circle_3(std::make_pair(pol_s, pol_pl2)); - std::vector< CGAL::Object > intersection_1, intersection_2; + std::vector< std::variant > > intersection_1, intersection_2; theIntersect_3(c1, l1, std::back_inserter(intersection_1)); theIntersect_3(c2, l2, std::back_inserter(intersection_2)); @@ -1320,7 +1345,7 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(c1, l1)); assert(intersection_1.size() == 1); std::pair the_pair1; - assert(assign(the_pair1, intersection_1[0])); + assert(assign_variant(the_pair1, intersection_1[0])); assert(theHas_on_3(c1,the_pair1.first)); assert(theHas_on_3(l1,the_pair1.first)); @@ -1336,8 +1361,8 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(c1, l1)); std::pair the_pair1; std::pair the_pair2; - assert(assign(the_pair1, intersection_1[0])); - assert(assign(the_pair2, intersection_1[1])); + assert(assign_variant(the_pair1, intersection_1[0])); + assert(assign_variant(the_pair2, intersection_1[1])); assert(theHas_on_3(c1,the_pair1.first)); assert(theHas_on_3(l1,the_pair1.first)); assert(theHas_on_3(c1,the_pair2.first)); @@ -1347,8 +1372,8 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(c2, l2)); std::pair the_pair3; std::pair the_pair4; - assert(assign(the_pair3, intersection_2[0])); - assert(assign(the_pair4, intersection_2[1])); + assert(assign_variant(the_pair3, intersection_2[0])); + assert(assign_variant(the_pair4, intersection_2[1])); assert(theHas_on_3(c2,the_pair3.first)); assert(theHas_on_3(l2,the_pair3.first)); assert(theHas_on_3(c2,the_pair4.first)); @@ -1378,7 +1403,7 @@ void _test_intersection_construct(SK sk) { Circle_3 c1 = theConstruct_circle_3(std::make_pair(pol_s, pol_pl1)); Circle_3 c2 = theConstruct_circle_3(std::make_pair(pol_s, pol_pl2)); - std::vector< CGAL::Object > intersection_1, intersection_2; + std::vector< std::variant > > intersection_1, intersection_2; intersection(c1, l1, std::back_inserter(intersection_1)); intersection(c2, l2, std::back_inserter(intersection_2)); @@ -1388,7 +1413,7 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(c1, l1)); assert(intersection_1.size() == 1); std::pair the_pair1; - assert(assign(the_pair1, intersection_1[0])); + assert(assign_variant(the_pair1, intersection_1[0])); assert(theHas_on_3(c1,the_pair1.first)); assert(theHas_on_3(l1,the_pair1.first)); @@ -1404,8 +1429,8 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(c1, l1)); std::pair the_pair1; std::pair the_pair2; - assert(assign(the_pair1, intersection_1[0])); - assert(assign(the_pair2, intersection_1[1])); + assert(assign_variant(the_pair1, intersection_1[0])); + assert(assign_variant(the_pair2, intersection_1[1])); assert(theHas_on_3(c1,the_pair1.first)); assert(theHas_on_3(l1,the_pair1.first)); assert(theHas_on_3(c1,the_pair2.first)); @@ -1415,8 +1440,8 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(c2, l2)); std::pair the_pair3; std::pair the_pair4; - assert(assign(the_pair3, intersection_2[0])); - assert(assign(the_pair4, intersection_2[1])); + assert(assign_variant(the_pair3, intersection_2[0])); + assert(assign_variant(the_pair4, intersection_2[1])); assert(theHas_on_3(c2,the_pair3.first)); assert(theHas_on_3(l2,the_pair3.first)); assert(theHas_on_3(c2,the_pair4.first)); @@ -1444,13 +1469,13 @@ void _test_intersection_construct(SK sk) { for(int t4=t3+1;t4<3;t4++) { Point_3 targetl = Point_3(a*t4,b*t4,c*t4); Line_arc_3 lb = theConstruct_line_arc_3(l,sourcel,targetl); - std::vector< CGAL::Object > intersection_1; + std::vector< std::variant > > intersection_1; theIntersect_3(la, lb, std::back_inserter(intersection_1)); if(t1 == t3) { Line_arc_3 line_a; assert(theDo_intersect_3(la, lb)); assert(intersection_1.size() == 1); - assert(assign(line_a, intersection_1[0])); + assert(assign_variant(line_a, intersection_1[0])); if(t2 <= t4) { assert(theEqual_3(line_a, la)); } else { @@ -1460,7 +1485,7 @@ void _test_intersection_construct(SK sk) { Line_arc_3 line_a; assert(theDo_intersect_3(la, lb)); assert(intersection_1.size() == 1); - assert(assign(line_a, intersection_1[0])); + assert(assign_variant(line_a, intersection_1[0])); if(t1 > t3) { assert(theEqual_3(line_a, la)); } else { @@ -1471,14 +1496,14 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(la, lb)); std::pair pair; assert(intersection_1.size() == 1); - assert(assign(pair, intersection_1[0])); + assert(assign_variant(pair, intersection_1[0])); if(t2 == t3) assert(theEqual_3(pair.first,target)); if(t1 == t4) assert(theEqual_3(pair.first,source)); } else if((t1 < t3) && (t3 < t2 )) { Line_arc_3 line_a; assert(theDo_intersect_3(la, lb)); assert(intersection_1.size() == 1); - assert(assign(line_a, intersection_1[0])); + assert(assign_variant(line_a, intersection_1[0])); if(t2 < t4) { Line_arc_3 line_b; line_b = theConstruct_line_arc_3(l,sourcel,target); @@ -1490,7 +1515,7 @@ void _test_intersection_construct(SK sk) { Line_arc_3 line_a; assert(intersection_1.size() == 1); assert(theDo_intersect_3(la, lb)); - assert(assign(line_a, intersection_1[0])); + assert(assign_variant(line_a, intersection_1[0])); if(t4 < t2) { Line_arc_3 line_b; line_b = theConstruct_line_arc_3(l,source,targetl); @@ -1562,7 +1587,7 @@ void _test_intersection_construct(SK sk) { int n_of_intersection = 0; for(int j=0;j<6;j++) { if(i == j) continue; - std::vector< CGAL::Object > intersection_1; + std::vector< std::variant > > intersection_1; theIntersect_3(l[i], l[j], std::back_inserter(intersection_1)); assert((intersection_1.size() == 0) || (intersection_1.size() == 1)); @@ -1570,7 +1595,7 @@ void _test_intersection_construct(SK sk) { assert(theDo_intersect_3(l[i], l[j])); n_of_intersection++; std::pair pair; - assert(assign(pair, intersection_1[0])); + assert(assign_variant(pair, intersection_1[0])); assert(theHas_on_3(l[i],pair.first)); assert(theHas_on_3(l[j],pair.first)); int n_of_edges = 2; @@ -1611,13 +1636,13 @@ void _test_intersection_construct(SK sk) { for(int t4=t3+1;t4<3;t4++) { Point_3 targetl = Point_3(a*t4,b*t4,c*t4); Line_arc_3 lb = theConstruct_line_arc_3(l,sourcel,targetl); - std::vector< CGAL::Object > intersection_1; + std::vector< std::variant > > intersection_1; intersection(la, lb, std::back_inserter(intersection_1)); if(t1 == t3) { Line_arc_3 line_a; assert(CGAL::do_intersect(la, lb)); assert(intersection_1.size() == 1); - assert(assign(line_a, intersection_1[0])); + assert(assign_variant(line_a, intersection_1[0])); if(t2 <= t4) { assert(theEqual_3(line_a, la)); } else { @@ -1627,7 +1652,7 @@ void _test_intersection_construct(SK sk) { Line_arc_3 line_a; assert(CGAL::do_intersect(la, lb)); assert(intersection_1.size() == 1); - assert(assign(line_a, intersection_1[0])); + assert(assign_variant(line_a, intersection_1[0])); if(t1 > t3) { assert(theEqual_3(line_a, la)); } else { @@ -1638,14 +1663,14 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(la, lb)); std::pair pair; assert(intersection_1.size() == 1); - assert(assign(pair, intersection_1[0])); + assert(assign_variant(pair, intersection_1[0])); if(t2 == t3) assert(theEqual_3(pair.first,target)); if(t1 == t4) assert(theEqual_3(pair.first,source)); } else if((t1 < t3) && (t3 < t2 )) { Line_arc_3 line_a; assert(CGAL::do_intersect(la, lb)); assert(intersection_1.size() == 1); - assert(assign(line_a, intersection_1[0])); + assert(assign_variant(line_a, intersection_1[0])); if(t2 < t4) { Line_arc_3 line_b; line_b = theConstruct_line_arc_3(l,sourcel,target); @@ -1657,7 +1682,7 @@ void _test_intersection_construct(SK sk) { Line_arc_3 line_a; assert(intersection_1.size() == 1); assert(CGAL::do_intersect(la, lb)); - assert(assign(line_a, intersection_1[0])); + assert(assign_variant(line_a, intersection_1[0])); if(t4 < t2) { Line_arc_3 line_b; line_b = theConstruct_line_arc_3(l,source,targetl); @@ -1729,7 +1754,7 @@ void _test_intersection_construct(SK sk) { int n_of_intersection = 0; for(int j=0;j<6;j++) { if(i == j) continue; - std::vector< CGAL::Object > intersection_1; + std::vector< std::variant > > intersection_1; intersection(l[i], l[j], std::back_inserter(intersection_1)); assert((intersection_1.size() == 0) || (intersection_1.size() == 1)); @@ -1737,7 +1762,7 @@ void _test_intersection_construct(SK sk) { assert(CGAL::do_intersect(l[i], l[j])); n_of_intersection++; std::pair pair; - assert(assign(pair, intersection_1[0])); + assert(assign_variant(pair, intersection_1[0])); assert(theHas_on_3(l[i],pair.first)); assert(theHas_on_3(l[j],pair.first)); int n_of_edges = 2; @@ -1801,7 +1826,7 @@ void _test_intersection_construct(SK sk) { for(int t2=0;t2<8;t2++) { if(t1 == t2) continue; Circular_arc_3 cb = theConstruct_circular_arc_3(cc,cp[t1],cp[t2]); - std::vector< CGAL::Object > intersection_1; + std::vector< std::variant > > intersection_1; theIntersect_3(ca, cb, std::back_inserter(intersection_1)); Circular_arc_3 cres, cres2; std::pair< Circular_arc_point_3, unsigned > cp1, cp2; @@ -1809,37 +1834,37 @@ void _test_intersection_construct(SK sk) { if(t2 == j) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(ca,cres)); } else if(simulate_has_on(i,j,t2)) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(cb, cres)); } else { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(ca, cres)); } } else if(t2 == j) { if(simulate_has_on(i,j,t1)) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(cb, cres)); } else { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(ca, cres)); } } else if(t1 == j) { if(t2 == i) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 2); - assert(assign(cp1,intersection_1[0])); - assert(assign(cp2,intersection_1[1])); + assert(assign_variant(cp1,intersection_1[0])); + assert(assign_variant(cp2,intersection_1[1])); assert(theEqual_3(cp1.first, cp[i]) || theEqual_3(cp1.first, cp[j])); assert(theEqual_3(cp2.first, cp[i]) || @@ -1848,13 +1873,13 @@ void _test_intersection_construct(SK sk) { } else if(simulate_has_on(t1,i,t2)) { assert(intersection_1.size() == 1); assert(theDo_intersect_3(ca, cb)); - assert(assign(cp1,intersection_1[0])); + assert(assign_variant(cp1,intersection_1[0])); assert(theEqual_3(cp1.first, cp[t1])); } else { assert(intersection_1.size() == 2); assert(theDo_intersect_3(ca, cb)); - if(assign(cp1,intersection_1[0]) && assign(cres,intersection_1[1])); - else if(assign(cres,intersection_1[0]) && assign(cp1,intersection_1[1])); + if(assign_variant(cp1,intersection_1[0]) && assign_variant(cres,intersection_1[1])); + else if(assign_variant(cres,intersection_1[0]) && assign_variant(cp1,intersection_1[1])); else assert(false); Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert(theEqual_3(conf, cres)); @@ -1864,8 +1889,8 @@ void _test_intersection_construct(SK sk) { if(t1 == j) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 2); - assert(assign(cp1,intersection_1[0])); - assert(assign(cp2,intersection_1[1])); + assert(assign_variant(cp1,intersection_1[0])); + assert(assign_variant(cp2,intersection_1[1])); assert(theEqual_3(cp1.first, cp[i]) || theEqual_3(cp1.first, cp[j])); assert(theEqual_3(cp2.first, cp[i]) || @@ -1874,13 +1899,13 @@ void _test_intersection_construct(SK sk) { } else if(simulate_has_on(j,i,t1)) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cp1,intersection_1[0])); + assert(assign_variant(cp1,intersection_1[0])); assert(theEqual_3(cp1.first, cp[i])); } else { assert(intersection_1.size() == 2); assert(theDo_intersect_3(ca, cb)); - if(assign(cp1,intersection_1[0]) && assign(cres,intersection_1[1])); - else if(assign(cres,intersection_1[0]) && assign(cp1,intersection_1[1])); + if(assign_variant(cp1,intersection_1[0]) && assign_variant(cres,intersection_1[1])); + else if(assign_variant(cres,intersection_1[0]) && assign_variant(cp1,intersection_1[1])); else assert(false); Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[t1],cp[j]); assert(theEqual_3(conf, cres)); @@ -1890,19 +1915,19 @@ void _test_intersection_construct(SK sk) { if(simulate_has_on(t1,j,t2)) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(cb, cres)); } else if(simulate_has_on(t2,j,i)) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[t1],cp[j]); assert(theEqual_3(cres, conf)); } else { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 2); - assert(assign(cres,intersection_1[0])); - assert(assign(cres2,intersection_1[1])); + assert(assign_variant(cres,intersection_1[0])); + assert(assign_variant(cres2,intersection_1[1])); Circular_arc_3 conf1 = theConstruct_circular_arc_3(cc,cp[t1],cp[j]); Circular_arc_3 conf2 = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert((theEqual_3(cres, conf1) && theEqual_3(cres2, conf2)) || @@ -1912,20 +1937,20 @@ void _test_intersection_construct(SK sk) { if(simulate_has_on(i,t2,t1)) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(cb, cres)); } else if(simulate_has_on(j,i,t1)) { assert(theDo_intersect_3(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert(theEqual_3(cres, conf)); } else { // This case should never happen, because it already happen before assert(intersection_1.size() == 2); assert(theDo_intersect_3(ca, cb)); - assert(assign(cres,intersection_1[0])); - assert(assign(cres2,intersection_1[1])); + assert(assign_variant(cres,intersection_1[0])); + assert(assign_variant(cres2,intersection_1[1])); Circular_arc_3 conf1 = theConstruct_circular_arc_3(cc,cp[t1],cp[j]); Circular_arc_3 conf2 = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert((theEqual_3(cres, conf1) && theEqual_3(cres2, conf2)) || @@ -1935,7 +1960,7 @@ void _test_intersection_construct(SK sk) { // the case whether (i,j) contains (t1,t2) is handled before assert(intersection_1.size() == 1); assert(theDo_intersect_3(ca, cb)); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(ca, cres)); } else { assert(intersection_1.size() == 0); @@ -1956,7 +1981,7 @@ void _test_intersection_construct(SK sk) { for(int t2=0;t2<8;t2++) { if(t1 == t2) continue; Circular_arc_3 cb = theConstruct_circular_arc_3(cc,cp[t1],cp[t2]); - std::vector< CGAL::Object > intersection_1; + std::vector< std::variant > > intersection_1; intersection(ca, cb, std::back_inserter(intersection_1)); Circular_arc_3 cres, cres2; std::pair< Circular_arc_point_3, unsigned > cp1, cp2; @@ -1964,37 +1989,37 @@ void _test_intersection_construct(SK sk) { if(t2 == j) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(ca,cres)); } else if(simulate_has_on(i,j,t2)) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(cb, cres)); } else { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(ca, cres)); } } else if(t2 == j) { if(simulate_has_on(i,j,t1)) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(cb, cres)); } else { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(ca, cres)); } } else if(t1 == j) { if(t2 == i) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 2); - assert(assign(cp1,intersection_1[0])); - assert(assign(cp2,intersection_1[1])); + assert(assign_variant(cp1,intersection_1[0])); + assert(assign_variant(cp2,intersection_1[1])); assert(theEqual_3(cp1.first, cp[i]) || theEqual_3(cp1.first, cp[j])); assert(theEqual_3(cp2.first, cp[i]) || @@ -2003,13 +2028,13 @@ void _test_intersection_construct(SK sk) { } else if(simulate_has_on(t1,i,t2)) { assert(intersection_1.size() == 1); assert(CGAL::do_intersect(ca, cb)); - assert(assign(cp1,intersection_1[0])); + assert(assign_variant(cp1,intersection_1[0])); assert(theEqual_3(cp1.first, cp[t1])); } else { assert(intersection_1.size() == 2); assert(CGAL::do_intersect(ca, cb)); - if(assign(cp1,intersection_1[0]) && assign(cres,intersection_1[1])); - else if(assign(cres,intersection_1[0]) && assign(cp1,intersection_1[1])); + if(assign_variant(cp1,intersection_1[0]) && assign_variant(cres,intersection_1[1])); + else if(assign_variant(cres,intersection_1[0]) && assign_variant(cp1,intersection_1[1])); else assert(false); Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert(theEqual_3(conf, cres)); @@ -2019,8 +2044,8 @@ void _test_intersection_construct(SK sk) { if(t1 == j) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 2); - assert(assign(cp1,intersection_1[0])); - assert(assign(cp2,intersection_1[1])); + assert(assign_variant(cp1,intersection_1[0])); + assert(assign_variant(cp2,intersection_1[1])); assert(theEqual_3(cp1.first, cp[i]) || theEqual_3(cp1.first, cp[j])); assert(theEqual_3(cp2.first, cp[i]) || @@ -2029,13 +2054,13 @@ void _test_intersection_construct(SK sk) { } else if(simulate_has_on(j,i,t1)) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cp1,intersection_1[0])); + assert(assign_variant(cp1,intersection_1[0])); assert(theEqual_3(cp1.first, cp[i])); } else { assert(intersection_1.size() == 2); assert(CGAL::do_intersect(ca, cb)); - if(assign(cp1,intersection_1[0]) && assign(cres,intersection_1[1])); - else if(assign(cres,intersection_1[0]) && assign(cp1,intersection_1[1])); + if(assign_variant(cp1,intersection_1[0]) && assign_variant(cres,intersection_1[1])); + else if(assign_variant(cres,intersection_1[0]) && assign_variant(cp1,intersection_1[1])); else assert(false); Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[t1],cp[j]); assert(theEqual_3(conf, cres)); @@ -2045,19 +2070,19 @@ void _test_intersection_construct(SK sk) { if(simulate_has_on(t1,j,t2)) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(cb, cres)); } else if(simulate_has_on(t2,j,i)) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[t1],cp[j]); assert(theEqual_3(cres, conf)); } else { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 2); - assert(assign(cres,intersection_1[0])); - assert(assign(cres2,intersection_1[1])); + assert(assign_variant(cres,intersection_1[0])); + assert(assign_variant(cres2,intersection_1[1])); Circular_arc_3 conf1 = theConstruct_circular_arc_3(cc,cp[t1],cp[j]); Circular_arc_3 conf2 = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert((theEqual_3(cres, conf1) && theEqual_3(cres2, conf2)) || @@ -2067,20 +2092,20 @@ void _test_intersection_construct(SK sk) { if(simulate_has_on(i,t2,t1)) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(cb, cres)); } else if(simulate_has_on(j,i,t1)) { assert(CGAL::do_intersect(ca, cb)); assert(intersection_1.size() == 1); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert(theEqual_3(cres, conf)); } else { // This case should never happen, because it already happen before assert(intersection_1.size() == 2); assert(CGAL::do_intersect(ca, cb)); - assert(assign(cres,intersection_1[0])); - assert(assign(cres2,intersection_1[1])); + assert(assign_variant(cres,intersection_1[0])); + assert(assign_variant(cres2,intersection_1[1])); Circular_arc_3 conf1 = theConstruct_circular_arc_3(cc,cp[t1],cp[j]); Circular_arc_3 conf2 = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert((theEqual_3(cres, conf1) && theEqual_3(cres2, conf2)) || @@ -2090,7 +2115,7 @@ void _test_intersection_construct(SK sk) { // the case whether (i,j) contains (t1,t2) is handled before assert(intersection_1.size() == 1); assert(CGAL::do_intersect(ca, cb)); - assert(assign(cres,intersection_1[0])); + assert(assign_variant(cres,intersection_1[0])); assert(theEqual_3(ca, cres)); } else { assert(intersection_1.size() == 0); @@ -2280,11 +2305,11 @@ void _test_bounding_box_construct(SK sk) Circle_3 c1 = theConstruct_circle_3(std::make_pair(es1, pol)); Circle_3 c2 = theConstruct_circle_3(std::make_pair(es2, pol)); - std::vector< CGAL::Object > intersection_2; + std::vector< std::variant > > intersection_2; theIntersect_3(c1, c2, std::back_inserter(intersection_2)); std::pair cap1, cap2; - assign(cap1,intersection_2[0]); - assign(cap2,intersection_2[1]); + assign_variant(cap1,intersection_2[0]); + assign_variant(cap2,intersection_2[1]); _test_bbox(cap1.first); _test_bbox(cap2.first); @@ -2295,10 +2320,10 @@ void _test_bounding_box_construct(SK sk) const FT dl = 0; Polynomial_1_3 pol2 = Polynomial_1_3(al,bl,cl,dl); Circle_3 c4 = theConstruct_circle_3(std::make_pair(es1, pol2)); - std::vector< CGAL::Object > intersection_4; + std::vector< std::variant > > intersection_4; theIntersect_3(c1, c4, std::back_inserter(intersection_4)); - assign(cap1,intersection_4[0]); - assign(cap2,intersection_4[1]); + assign_variant(cap1,intersection_4[0]); + assign_variant(cap2,intersection_4[1]); _test_bbox(cap1.first); _test_bbox(cap2.first); } @@ -2309,10 +2334,10 @@ void _test_bounding_box_construct(SK sk) const FT d_c = -FT(va) / FT(10); Polynomial_1_3 pol2 = Polynomial_1_3(a_c,b_c,c_c,d_c); Circle_3 c5 = theConstruct_circle_3(std::make_pair(es2, pol2)); - std::vector< CGAL::Object > intersection_5; + std::vector< std::variant > > intersection_5; theIntersect_3(c1, c5, std::back_inserter(intersection_5)); - assign(cap1,intersection_5[0]); - assign(cap2,intersection_5[1]); + assign_variant(cap1,intersection_5[0]); + assign_variant(cap2,intersection_5[1]); _test_bbox(cap1.first); _test_bbox(cap2.first); } @@ -2334,15 +2359,15 @@ void _test_bounding_box_construct(SK sk) Sphere_3 sl_2 = theConstruct_sphere_3( Polynomial_for_spheres_2_3(x+10,y+10,z+10,r*r)); int d2 = (vx*vx + vy*vy + vz*vz); - CGAL::Object intersection_1 = theIntersect_3(s, sl_1); - CGAL::Object intersection_2 = theIntersect_3(s_t10, sl_2); + std::optional> intersection_1 = theIntersect_3(s, sl_1); + std::optional> intersection_2 = theIntersect_3(s_t10, sl_2); // No intersection if((d2 > (r+1)*(r+1)) || (d2 < (r-1)*(r-1))) continue; if(x == 0 && y == 0 && z == 0) continue; if((d2 == (r+1)*(r+1)) || (d2 == (r-1)*(r-1))) continue; Circle_3 circle1, circle2; - assign(circle1, intersection_1); - assign(circle2, intersection_2); + assign_variant(circle1, intersection_1); + assign_variant(circle2, intersection_2); _test_bbox(circle1); _test_bbox(circle2); } diff --git a/Circulator/doc/Circulator/CGAL/circulator.h b/Circulator/doc/Circulator/CGAL/circulator.h index 7bfeae56805..2973413afd0 100644 --- a/Circulator/doc/Circulator/CGAL/circulator.h +++ b/Circulator/doc/Circulator/CGAL/circulator.h @@ -246,7 +246,7 @@ Circulator_from_iterator(); /*! a circulator `c` initialized to refer to the element `*cur` in a range `[begin, end)`. -The circulator `c` refers to a empty sequence +The circulator `c` refers to an empty sequence if `begin==end`. */ @@ -255,7 +255,7 @@ const I& end, const I& cur = begin); /*! a copy of circulator `d` referring to the element `*cur`. -The circulator `c` refers to a empty sequence +The circulator `c` refers to an empty sequence if `d` does so. */ diff --git a/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h b/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h index 17b05f8cffb..f1642bce862 100644 --- a/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h +++ b/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h @@ -22,7 +22,7 @@ #include -#include +#include #include @@ -53,9 +53,9 @@ public: private: - boost::optional m_begin; - boost::optional m_end; - boost::optional m_current; + std::optional m_begin; + std::optional m_end; + std::optional m_current; bool m_empty; public: diff --git a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp index c20b9b7155f..6d2ebb01acf 100644 --- a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp +++ b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp @@ -45,7 +45,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h b/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h index 85d703c5ed1..d87ee8f2830 100644 --- a/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h +++ b/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h @@ -37,7 +37,7 @@ class Gradient_of_feature : public Feature_base const InputRange& m_input; ItemMap m_map; Feature_handle m_feature; - boost::shared_ptr m_query; + std::shared_ptr m_query; public: /*! diff --git a/Classification/include/CGAL/Classification/Image.h b/Classification/include/CGAL/Classification/Image.h index 924e39bde24..084e9572764 100644 --- a/Classification/include/CGAL/Classification/Image.h +++ b/Classification/include/CGAL/Classification/Image.h @@ -16,6 +16,7 @@ #include #include +#include #define CGAL_CLASSIFICATION_IMAGE_SIZE_LIMIT 100000000 @@ -38,12 +39,15 @@ class Image std::shared_ptr m_sparse; Type m_default; - // Forbid using copy constructor - Image (const Image&) - { - } public: + // Forbid using copy constructor + // Make it public for a strange VC++ std17 boost-1_82 error + // https://github.com/boostorg/core/issues/148 + Image(const Image&) + { + CGAL_assertion(false); + } Image () : m_width(0), m_height(0), m_depth(0) { diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt index a8f20cf4d06..2867dc1c2f7 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt +++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt @@ -168,7 +168,7 @@ Considering these different advantages and drawbacks, you can choose to use gene The diagram in \cgalFigureRef{fig_cmap_diagramme_class} shows the different classes of the package. `Combinatorial_map` is the main class (see Section \ref sseccombinatorialmap "Combinatorial Maps"). It allows to manage darts and attributes (see Section \ref ssecattributes "Cell Attributes"). Users can customize a combinatorial map thanks to an items class (see Section \ref ssecitem "Combinatorial Map Items"), which defines the information associated with darts and the attribute types. These types may be different for different dimensions, and they may also be void (note that the main concepts of `GenericMap`, `GenericMapItems` and `CellAttribute` are shared between combinatorial maps and generalized maps). -The darts and attributes are accessed through descriptors (either Indices or Handles). A handle is a model of the `Handle` concept, thus supporting the two dereference operators `operator*` and `operator->`. All handles are model of `LessThanComparable` and `Hashable`, that is they can be used as keys in containers such as `std::map` and `std::unordered_map`. An index is a model of the `Index` concept, which is mainly an integer which is convertible from and to std::size_t. Indices can be used as index into vectors which store properties (cf. one example in Section \ref ssecexample3DCMWI "3D Combinatorial Map using Indices"). +The darts and attributes are accessed through descriptors (either Indices or Handles). A handle is a model of the `Handle` concept, thus supporting the two dereference operators `operator*` and `operator->`. All handles are model of `LessThanComparable` and `Hashable`, that is they can be used as keys in containers such as `std::map` and `std::unordered_map`. An index is a model of the `Index` concept, which is mainly an integer which is convertible from and to std::size_t. Indices can be used as index into vectors which store properties (cf. one example in Section \ref ssecexample3DCMWI "3D Combinatorial Map Using Indices"). \cgalFigureBegin{fig_cmap_diagramme_class,cmap_diagramme_class.svg} UML diagram of the main classes of the package. k is the number of non void attributes. @@ -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; @@ -393,6 +393,8 @@ Example of \link GenericMap::insert_cell_1_in_cell_2 `insert_cell_1_in_cell_2`\e `cm.`\link GenericMap::insert_dangling_cell_1_in_cell_2 `insert_dangling_cell_1_in_cell_2(d0)`\endlink adds a 1-cell in the 2-cell containing dart `d0`, the 1-cell being attached by only one of its vertex to the 0-cell containing dart `d0`. This operation is possible if `d0`\f$ \in \f$ \link GenericMap::darts `cm.darts()`\endlink. +`cm.`\link GenericMap::insert_cell_1_between_two_cells_2 `insert_cell_1_between_two_cells_2(d1,d2)`\endlink adds a 1-cell between the two faces containing containing darts `d1` and `d2`, between the two 0-cells containing darts `d1` and `d2`. The 2-cells are merged in one. This operation is possible if d1\f$ \not \in \f$ \f$ \langle{}\f$\f$ \beta_1\f$\f$ \rangle{}\f$(d2) which can be tested thanks to `cm.`\link GenericMap::is_insertable_cell_1_between_two_cells_2 `is_insertable_cell_1_between_two_cells_2(d1,d2)`\endlink. + `cm.`\link GenericMap::insert_cell_2_in_cell_3 `insert_cell_2_in_cell_3(itbegin,itend)`\endlink adds a 2-cell in the 3-cell containing all the darts between `itbegin` and `itend`, along the path of 1-cells containing darts in [`itbegin`,`itend`). The 3-cell is split in two. This operation is possible if all the darts in [`itbegin`,`itend`) form a closed path inside a same 3-cell which can be tested thanks to `cm.`\link GenericMap::is_insertable_cell_2_in_cell_3 `is_insertable_cell_2_in_cell_3(itbegin,itend)`\endlink (see example on \cgalFigureRef{fig_cmap_insert_facet}). \cgalFigureBegin{fig_cmap_insert_facet,cmap_insert_facet.svg} @@ -456,6 +458,24 @@ The second line is the result after the removal operations. We retrieve the orig Example of high level operations. Left: Initial 3D combinatorial map after the creation of the combinatorial hexahedron. Middle: Combinatorial map obtained after the two 1-cell insertions. The two 2-cells were split in two. Right: Combinatorial map obtained after the 2-cell insertion. The 3-cell was split in two. \cgalFigureEnd +\subsection Combinatorial_mapInsertion Insert an Edge Between Two Different Faces + +\anchor ssecexempleinsertion + +This example shows the use of \link GenericMap::insert_cell_1_between_two_cells_2 `insert_cell_1_between_two_cells_2`\endlink operation. First we create a combinatorial hexahedron and a face with 4 edges. This face is inserted in the face of the hexahedron containing dart d1. We display the characteristics of the combinatorial map and check its validity. Then we count and display the number of 2-free darts. + +\cgalExample{Combinatorial_map/map_3_insert.cpp} + +The output is: +\verbatim +#Darts=30, #0-cells=12, #1-cells=17, #2-cells=6, #3-cells=1, #ccs=1, valid=1 +Number of 2-free darts: 4 +\endverbatim + +We can verify that there are 6 2-cells after the insertion since the squared face was inserted as a hole in one face of the hexahedron. We can also see that there are 4 2-free darts, which are the darts of the squared face. Since they bound an hole, there is no face filling the hole and thus 4 darts are 2-free. + +See also a similar example for Linear cell complex \ref Linear_cell_complexInsert "Insert an Edge Between Two Different Faces". + \subsection Combinatorial_mapA4DGenericMap A 4D Combinatorial Map In this example, a 4-dimensional combinatorial map is used. Two tetrahedral cells are created and sewn by \f$ \beta_4\f$. Then the numbers of cells of the combinatorial map are displayed, and its validity is checked. @@ -502,7 +522,7 @@ Lastly we remove the dynamic onmerge functor (step 7). This is done by initializ \cgalExample{Combinatorial_map/map_3_dynamic_onmerge.cpp} -\subsection ssecexample3DCMWI 3D Combinatorial Map using Indices +\subsection ssecexample3DCMWI 3D Combinatorial Map Using Indices In this example, a 3-dimensional combinatorial map is used, but using indices instead of handles. Two vectors are created to store some external information associated with darts and 3-attributes. Since descriptors are indices, they can directly be used to access elements of the vector. diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h index ae828e3cdf0..2439a614f03 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h +++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h @@ -267,12 +267,12 @@ using One_dart_per_cell_const_range = unspecified_type; /// @{ /*! -Returns true iff the generic map is empty, i.e.\ it contains no dart. +Returns `true` iff the generic map is empty, i.e.\ it contains no dart. */ bool is_empty() const; /*! -Returns true iff the generic map is without i-boundary. +Returns `true` iff the generic map is without i-boundary. The map is without i-boundary if there is no `i`-free dart. \pre 1\f$ \leq \f$ i \f$ \leq \f$ \link GenericMap::dimension `dimension`\endlink. @@ -280,7 +280,7 @@ The map is without i-boundary if there is no `i`-free dart. bool is_without_boundary(unsigned int i) const; /*! -Returns true iff the generic map is without boundary in all dimensions. +Returns `true` iff the generic map is without boundary in all dimensions. */ bool is_without_boundary() const; @@ -308,18 +308,18 @@ Returns an upper bound of the id of i-attributes descriptors if indices a template size_type upper_bound_on_attribute_ids() const; -/*! Returns true if `d` is a descriptor of a used dart (i.e.\ valid). +/*! Returns `true` if `d` is a descriptor of a used dart (i.e.\ valid). */ bool is_dart_used(Dart_const_descriptor d) const; /*! -Returns true iff dart `d` is i-free. +Returns `true` iff dart `d` is i-free. \pre 0 \f$ \leq \f$ i \f$ \leq \f$ \link GenericMap::dimension `dimension`\endlink. */ bool is_free(Dart_const_descriptor d, unsigned int i) const; /*! -Returns true iff dart `d` is i-free. +Returns `true` iff dart `d` is i-free. \pre 0 \f$ \leq \f$ i \f$ \leq \f$ \link GenericMap::dimension `dimension`\endlink. */ template @@ -477,7 +477,7 @@ A shortcut for \link GenericMap::dart_of_attribute(typename Attribute_const_desc template Dart_const_descriptor dart(Dart_const_descriptor adart) const; -/*! Returns true if ah points to a used i-attribute (i.e.\ valid). +/*! Returns `true` if ah points to a used i-attribute (i.e.\ valid). \pre 0 \f$ \leq \f$ i \f$ \leq \f$ \link GenericMap::dimension `dimension`\endlink, and i-attributes are non `void`. */ template @@ -703,13 +703,13 @@ void correct_invalid_attributes(); /// \cond SKIP_IN_MANUAL boost::function \endcond -/// \name Dynamic Onmerge/Onsplit functors +/// \name Dynamic On-Merge/On-Split functors /// @{ /*! - Return the current dynamic onsplit function associated with i-attributes. + Return the current dynamic on-split function associated with i-attributes. This is a boost::function returning void and having two references to \link GenericMap::Attribute_type `Attribute_type::type`\endlink as parameters. - The onsplit function is returned by reference so that we can modify it. + The on-split function is returned by reference so that we can modify it. */ template boost::function::type&, @@ -717,7 +717,7 @@ void correct_invalid_attributes(); onsplit_function(); /*! - Return the current dynamic onsplit function associated with i-attributes, when *this is const. + Return the current dynamic on-split function associated with i-attributes, when *this is const. This is a boost::function returning void and having two references to \link GenericMap::Attribute_type `Attribute_type::type`\endlink as parameters. */ template @@ -726,9 +726,9 @@ void correct_invalid_attributes(); onsplit_function() const; /*! - Return the current dynamic onmerge function associated with i-attributes. + Return the current dynamic on-merge function associated with i-attributes. This is a boost::function returning void and having two references to \link GenericMap::Attribute_type `Attribute_type::type`\endlink as parameters. - The onmerge function is returned by reference so that we can modify it. + The on-merge function is returned by reference so that we can modify it. */ template boost::function::type&, @@ -736,7 +736,7 @@ void correct_invalid_attributes(); onmerge_function(); /*! - Return the current dynamic onmerge function associated with i-attributes, when *this is const. + Return the current dynamic on-merge function associated with i-attributes, when *this is const. This is a boost::function returning void and having two references to \link GenericMap::Attribute_type `Attribute_type::type`\endlink as parameters. */ template @@ -756,13 +756,13 @@ index. If there is no more available free mark, throw the exception Exception_no size_type get_new_mark() const; /*! -Returns true iff `m` is a reserved mark of the generic map. +Returns `true` iff `m` is a reserved mark of the generic map. \pre 0\f$ \leq \f$ m \f$ < \f$ \link GenericMap::NB_MARKS `NB_MARKS`\endlink. */ bool is_reserved(size_type m) const; /*! -Returns true iff dart `d` is marked for `m`. +Returns `true` iff dart `d` is marked for `m`. \pre \link GenericMap::is_reserved `is_reserved(m)`\endlink and `d`\f$ \in \f$ `darts()`. */ bool is_marked(Dart_const_descriptor d, size_type m) const; @@ -820,9 +820,9 @@ void free_mark(size_type m) const; Creates a combinatorial hexahedron (six combinatorial quadrangles 2-sewn together), and adds it in the generic map. Returns a descriptor on one dart of this combinatorial hexahedron. \pre `dimension` \f$\geq\f$ 2. -\sa `make_edge` -\sa `make_combinatorial_polygon` -\sa `make_combinatorial_tetrahedron` +\sa `make_edge()` +\sa `make_combinatorial_polygon()` +\sa `make_combinatorial_tetrahedron()` */ Dart_descriptor make_combinatorial_hexahedron(); @@ -831,9 +831,9 @@ Dart_descriptor make_combinatorial_hexahedron(); Creates a combinatorial polygon of length `lg` (a cycle of `lg` edges), and adds it in the generic map. Returns a descriptor on one dart of this combinatorial polygon. \pre `dimension`\f$ \geq\f$ 1 and `lg`\f$ >\f$ 0. -\sa `make_edge` -\sa `make_combinatorial_tetrahedron` -\sa `make_combinatorial_hexahedron` +\sa `make_edge()` +\sa `make_combinatorial_tetrahedron()` +\sa `make_combinatorial_hexahedron()` */ Dart_descriptor make_combinatorial_polygon(unsigned int lg); @@ -841,9 +841,9 @@ Dart_descriptor make_combinatorial_polygon(unsigned int lg); Creates a combinatorial tetrahedron (four combinatorial triangles 2-sewn together), and adds it in the generic map. Returns a descriptor on one dart of this combinatorial tetrahedron. \pre `dimension`\f$ \geq\f$ 2. -\sa `make_edge` -\sa `make_combinatorial_polygon` -\sa `make_combinatorial_hexahedron` +\sa `make_edge()` +\sa `make_combinatorial_polygon()` +\sa `make_combinatorial_hexahedron()` */ Dart_descriptor make_combinatorial_tetrahedron(); @@ -851,9 +851,9 @@ Dart_descriptor make_combinatorial_tetrahedron(); Creates an isolated edge (two darts sewn to represent one edge and two vertices) and adds it in the generic map. Returns a descriptor on one dart of this edge. \pre `dimension`\f$ \geq\f$ 2. -\sa `make_combinatorial_polygon` -\sa `make_combinatorial_tetrahedron` -\sa `make_combinatorial_hexahedron` +\sa `make_combinatorial_polygon()` +\sa `make_combinatorial_tetrahedron()` +\sa `make_combinatorial_hexahedron()` */ Dart_descriptor make_edge(); @@ -868,17 +868,18 @@ Inserts a 0-cell in the 1-cell containing `d`. Returns `next(d)`, a descriptor o See examples for combinatorial map in \cgalFigureRef{fig_cmap_insert_vertex} and for generalized map in \cgalFigureRef{fig_gmap_insert_vertex}. -If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 1-attributes are non `void`, \link CellAttribute::On_split `Attribute_type<1>::type::On_split`\endlink(a,a') is called, with a the original 1-attribute associated with d and a' the new 1-attribute created during the operation. If set, the dynamic onsplit function of 1-attributes is also called on a and a'. +If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 1-attributes are non `void`, \link CellAttribute::On_split `Attribute_type<1>::type::On_split`\endlink(a,a') is called, with a the original 1-attribute associated with d and a' the new 1-attribute created during the operation. If set, the dynamic on-split function of 1-attributes is also called on a and a'. \cgalAdvancedBegin If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==false`, non void attributes are not updated; thus the generic map can be no more valid after this operation. \cgalAdvancedEnd -\sa `insert_cell_0_in_cell_2` -\sa `insert_cell_1_in_cell_2` -\sa `insert_dangling_cell_1_in_cell_2` -\sa `insert_cell_2_in_cell_3` -\sa `remove_cell` +\sa `insert_cell_0_in_cell_2()` +\sa `insert_cell_1_in_cell_2()` +\sa `insert_cell_1_between_two_cells_2()` +\sa `insert_dangling_cell_1_in_cell_2()` +\sa `insert_cell_2_in_cell_3()` +\sa `remove_cell()` */ Dart_descriptor insert_cell_0_in_cell_1(Dart_descriptor d); @@ -888,17 +889,18 @@ Inserts a 0-cell in the 2-cell containing `d`. The 2-cell is split in triangles, See examples for combinatorial map in \cgalFigureRef{fig_cmap_triangulation} and for generalized map in \cgalFigureRef{fig_gmap_triangulation}. -If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 2-attributes are non `void`, \link CellAttribute::On_split `Attribute_type<2>::type::On_split`\endlink(a,a') is called, with a the original 2-attribute associated with `d` and a' each new 2-attribute created during the operation. If set, the dynamic onsplit function of 2-attributes is also called on a and a'. +If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 2-attributes are non `void`, \link CellAttribute::On_split `Attribute_type<2>::type::On_split`\endlink(a,a') is called, with a the original 2-attribute associated with `d` and a' each new 2-attribute created during the operation. If set, the dynamic on-split function of 2-attributes is also called on a and a'. \cgalAdvancedBegin If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==false`, non void attributes are not updated; thus the generic map can be no more valid after this operation. \cgalAdvancedEnd -\sa `insert_cell_0_in_cell_2` -\sa `insert_cell_1_in_cell_2` -\sa `insert_dangling_cell_1_in_cell_2` -\sa `insert_cell_2_in_cell_3` -\sa `remove_cell` +\sa `insert_cell_0_in_cell_2()` +\sa `insert_cell_1_in_cell_2()` +\sa `insert_cell_1_between_two_cells_2()` +\sa `insert_dangling_cell_1_in_cell_2()` +\sa `insert_cell_2_in_cell_3()` +\sa `remove_cell()` */ Dart_descriptor insert_cell_0_in_cell_2(Dart_descriptor d); @@ -908,39 +910,68 @@ Inserts a 1-cell in the 2-cell containing `d1` and `d2`. Returns `previous(d1)`, See examples for combinatorial map in \cgalFigureRef{fig_cmap_insert_edge} and for generalized map in \cgalFigureRef{fig_gmap_insert_edge}. -If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 2-attributes are non `void`, \link CellAttribute::On_split `Attribute_type<2>::type::On_split`\endlink(a,a') is called, with a the original 2-attribute associated with `d` and a' the new 2-attribute created during the operation. If set, the dynamic onsplit function of 2-attributes is also called on a and a'. +If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 2-attributes are non `void`, \link CellAttribute::On_split `Attribute_type<2>::type::On_split`\endlink(a,a') is called, with a the original 2-attribute associated with `d1` and a' the new 2-attribute created during the operation. If set, the dynamic on-split function of 2-attributes is also called on a and a'. \cgalAdvancedBegin If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==false`, non void attributes are not updated; thus the generic map can be no more valid after this operation. \cgalAdvancedEnd -\sa `is_insertable_cell_1_in_cell_2` -\sa `insert_cell_0_in_cell_1` -\sa `insert_cell_0_in_cell_2` -\sa `insert_dangling_cell_1_in_cell_2` -\sa `insert_cell_2_in_cell_3` -\sa `remove_cell` +\sa `is_insertable_cell_1_in_cell_2()` +\sa `insert_cell_0_in_cell_1()` +\sa `insert_cell_0_in_cell_2()` +\sa `insert_cell_1_between_two_cells_2()` +\sa `insert_dangling_cell_1_in_cell_2()` +\sa `insert_cell_2_in_cell_3()` +\sa `remove_cell()` */ Dart_descriptor insert_cell_1_in_cell_2(Dart_descriptor d1, Dart_descriptor d2); +/*! +Inserts a 1-cell between the 2-cell containing `d1` and the one containing `d2`. Returns `previous(d1)`, a descriptor on one dart belonging to the new 1-cell. +\pre `is_insertable_cell_1_between_two_cells_2(d1,d2)`. + +If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, call \link CellAttribute::On_merge `Attribute_type::type::On_merge`\endlink(a,a') is called for all enabled i-attributes, for i>=2, with a the original 2-attribute associated with `d1` and a' the original 2-attribute associated with `d2`. If set, the dynamic on-merge function of i-attributes is also called on a and a'. + +\cgalAdvancedBegin +If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==false`, non void attributes are not updated; thus the generic map can be no more valid after this operation. +\cgalAdvancedEnd + +\sa `is_insertable_cell_1_between_two_cells_2()` +\sa `insert_cell_0_in_cell_1()` +\sa `insert_cell_0_in_cell_2()` +\sa `insert_cell_1_in_cell_2()` +\sa `insert_dangling_cell_1_in_cell_2()` +\sa `insert_cell_2_in_cell_3()` +\sa `remove_cell()` +*/ +Dart_descriptor insert_cell_1_between_two_cells_2(Dart_descriptor d1, Dart_descriptor d2); + +/*! Call `insert_cell_1_in_cell_2()` if `is_insertable_cell_1_in_cell_2(d1, d2)`, otherwise call `insert_cell_1_between_two_cells_2()`. +\sa `insert_cell_1_in_cell_2()` +\sa `insert_cell_1_between_two_cells_2()` +\sa `is_insertable_cell_1_in_cell_2()` +*/ +Dart_descriptor insert_cell_1(Dart_descriptor d1, Dart_descriptor d2); + /*! Inserts a 2-cell along the path of 1-cells containing darts given by the range `[afirst,alast)`. Returns `opposite<2>(*afirst)`, a descriptor on one dart belonging to the new 2-cell. \pre `is_insertable_cell_2_in_cell_3(afirst,alast)`. See examples for combinatorial map in \cgalFigureRef{fig_cmap_insert_facet} and for generalized map in \cgalFigureRef{fig_gmap_insert_facet}. -If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 3-attributes are non `void`, \link CellAttribute::On_split `Attribute_type<3>::type::On_split`\endlink(a,a') is called, with a the original 3-attribute associated with `d` and a' the new 3-attribute created during the operation. If set, the dynamic onsplit function of 3-attributes is also called on a and a'. +If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 3-attributes are non `void`, \link CellAttribute::On_split `Attribute_type<3>::type::On_split`\endlink(a,a') is called, with a the original 3-attribute associated with `d` and a' the new 3-attribute created during the operation. If set, the dynamic on-split function of 3-attributes is also called on a and a'. \cgalAdvancedBegin If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==false`, non void attributes are not updated; thus the generic map can be no more valid after this operation. \cgalAdvancedEnd -\sa `is_insertable_cell_2_in_cell_3` -\sa `insert_cell_0_in_cell_1` -\sa `insert_cell_0_in_cell_2` -\sa `insert_cell_1_in_cell_2` -\sa `insert_dangling_cell_1_in_cell_2` -\sa `remove_cell` +\sa `is_insertable_cell_2_in_cell_3()` +\sa `insert_cell_0_in_cell_1()` +\sa `insert_cell_0_in_cell_2()` +\sa `insert_cell_1_in_cell_2()` +\sa `insert_cell_1_between_two_cells_2()` +\sa `insert_dangling_cell_1_in_cell_2()` +\sa `remove_cell()` */ template Dart_descriptor insert_cell_2_in_cell_3(InputIterator afirst, InputIterator alast); @@ -955,45 +986,57 @@ See examples for combinatorial map in \cgalFigureRef{fig_cmap_insert_edge} and f If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==false`, non void attributes are not updated; thus the generic map can be no more valid after this operation. \cgalAdvancedEnd -\sa `insert_cell_0_in_cell_1` -\sa `insert_cell_0_in_cell_2` -\sa `insert_cell_1_in_cell_2` -\sa `insert_cell_2_in_cell_3` -\sa `remove_cell` +\sa `insert_cell_0_in_cell_1()` +\sa `insert_cell_0_in_cell_2()` +\sa `insert_cell_1_in_cell_2()` +\sa `insert_cell_1_between_two_cells_2()` +\sa `insert_cell_2_in_cell_3()` +\sa `remove_cell()` */ Dart_descriptor insert_dangling_cell_1_in_cell_2(Dart_descriptor d); /*! -Returns true iff it is possible to insert a 1-cell in the generic map between `d1` and `d2`. +Returns `true` iff it is possible to insert a 1-cell in the generic map between `d1` and `d2`. This is possible if `d1`\f$ \neq \f$ `d2` and `d1` can be reached from `d2` by using some `previous` and `next` calls. \pre \link GenericMap::dimension `dimension`\endlink \f$ \geq\f$ 2, `d1`\f$ \in \f$ \link GenericMap::darts `darts()`\endlink, and `d2`\f$ \in \f$ \link GenericMap::darts `darts()`\endlink. -\sa `insert_cell_1_in_cell_2` -\sa `is_insertable_cell_2_in_cell_3` +\sa `insert_cell_1_in_cell_2()` +\sa `is_insertable_cell_2_in_cell_3()` */ bool is_insertable_cell_1_in_cell_2(Dart_const_descriptor d1, Dart_const_descriptor d2); /*! -Returns true iff it is possible to insert a 2-cell in the generic map along the path of darts given by the range `[afirst,alast)`. The 2-cell can be inserted iff the ordered list of darts form a closed path of edges inside a same volume. +Returns `true` iff it is possible to insert a 1-cell in the generic map between `d1` and `d2`. + +This is possible if `d1`\f$ \neq \f$ `d2` and `d1` can not be reached from `d2` by using some `previous` and `next` calls. +\pre \link GenericMap::dimension `dimension`\endlink \f$ \geq\f$ 2, `d1`\f$ \in \f$ \link GenericMap::darts `darts()`\endlink, and `d2`\f$ \in \f$ \link GenericMap::darts `darts()`\endlink. + +\sa `insert_cell_1_between_two_cells_2()` + +*/ +bool is_insertable_cell_1_between_two_cells_2(Dart_const_descriptor d1, Dart_const_descriptor d2); + +/*! +Returns `true` iff it is possible to insert a 2-cell in the generic map along the path of darts given by the range `[afirst,alast)`. The 2-cell can be inserted iff the ordered list of darts form a closed path of edges inside a same volume. \pre \link GenericMap::dimension `dimension`\endlink \f$ \geq\f$ 3. -\sa `insert_cell_2_in_cell_3` -\sa `is_insertable_cell_1_in_cell_2` +\sa `insert_cell_2_in_cell_3()` +\sa `is_insertable_cell_1_in_cell_2()` */ template bool is_insertable_cell_2_in_cell_3(InputIterator afirst, InputIterator alast); /*! -Returns true iff the i-cell containing `d` can be removed. +Returns `true` iff the i-cell containing `d` can be removed. An i-cell can be removed if `i`==\link GenericMap::dimension `dimension`\endlink or if `i`==\link GenericMap::dimension `dimension`\endlink-1 or if `i`\f$ < \f$ \link GenericMap::dimension `dimension`\endlink-1 and the i-cell containing `d` is incident to at most two (i+1)-cells. \pre 0\f$ \leq \f$ `i`\f$ \leq \f$ \link GenericMap::dimension `dimension`\endlink and `d`\f$ \in \f$ \link GenericMap::darts `darts()`\endlink. -\sa `remove_cell` +\sa `remove_cell()` */ template bool is_removable(Dart_const_descriptor d); @@ -1004,20 +1047,21 @@ Removes the i-cell containing `d`. Returns the number of darts removed fr See examples in \cgalFigureRef{fig_cmap_insert_vertex}, \cgalFigureRef{fig_cmap_insert_edge} and \cgalFigureRef{fig_cmap_insert_facet}. -If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if `i`\f$ < \f$ \link GenericMap::dimension `dimension`\endlink, and i+1-attributes are non `void`, and if there are two distinct (i+1)-cells around dart `d`, \link CellAttribute::On_merge `Attribute_type::type::On_merge`\endlink(a1,a2) is called, with a1 the (i+1)-attribute associated to `d`, and a2 the (i+1)-attribute associated to \f$ \beta_{i+1}\f$(d). If set, the dynamic onmerge function of i+1-attributes is also called on a1 and a2. +If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if `i`\f$ < \f$ \link GenericMap::dimension `dimension`\endlink, and i+1-attributes are non `void`, and if there are two distinct (i+1)-cells around dart `d`, \link CellAttribute::On_merge `Attribute_type::type::On_merge`\endlink(a1,a2) is called, with a1 the (i+1)-attribute associated to `d`, and a2 the (i+1)-attribute associated to \f$ \beta_{i+1}\f$(d). If set, the dynamic on-merge function of i+1-attributes is also called on a1 and a2. -If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if a j-cell is disconnected in two j-cells during the operation, and if j-attributes are non void, \link CellAttribute::On_split `Attribute_type::type::On_split`\endlink(a,a') is called with a the original j-attribute and a' the new j-attribute created due to the disconnection. If set, the dynamic onsplit function of j-attributes is also called on a and a'. +If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if a j-cell is disconnected in two j-cells during the operation, and if j-attributes are non void, \link CellAttribute::On_split `Attribute_type::type::On_split`\endlink(a,a') is called with a the original j-attribute and a' the new j-attribute created due to the disconnection. If set, the dynamic on-split function of j-attributes is also called on a and a'. \cgalAdvancedBegin If \link GenericMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==false`, non void attributes are not updated; thus the generic map can be no more valid after this operation. \cgalAdvancedEnd -\sa `is_removable` -\sa `insert_cell_0_in_cell_1` -\sa `insert_cell_0_in_cell_2` -\sa `insert_cell_1_in_cell_2` -\sa `insert_dangling_cell_1_in_cell_2` -\sa `insert_cell_2_in_cell_3` +\sa `is_removable()` +\sa `insert_cell_0_in_cell_1()` +\sa `insert_cell_0_in_cell_2()` +\sa `insert_cell_1_in_cell_2()` +\sa `insert_cell_1_between_two_cells_2()` +\sa `insert_dangling_cell_1_in_cell_2()` +\sa `insert_cell_2_in_cell_3()` */ template size_type remove_cell(Dart_descriptor d); diff --git a/Combinatorial_map/doc/Combinatorial_map/examples.txt b/Combinatorial_map/doc/Combinatorial_map/examples.txt index ce72b6a64a2..c77e4e6c522 100644 --- a/Combinatorial_map/doc/Combinatorial_map/examples.txt +++ b/Combinatorial_map/doc/Combinatorial_map/examples.txt @@ -6,4 +6,5 @@ \example Combinatorial_map/map_3_with_colored_facets.cpp \example Combinatorial_map/map_3_dynamic_onmerge.cpp \example Combinatorial_map/map_3_index.cpp +\example Combinatorial_map/map_3_insert.cpp */ diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_insert.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_insert.cpp new file mode 100644 index 00000000000..4963fcb23a7 --- /dev/null +++ b/Combinatorial_map/examples/Combinatorial_map/map_3_insert.cpp @@ -0,0 +1,34 @@ +#include +#include +#include +#include + +typedef CGAL::Combinatorial_map<3> CMap_3; +typedef CMap_3::Dart_descriptor Dart_descriptor; + +int main() +{ + CMap_3 cm; + + // Create one combinatorial hexahedron + Dart_descriptor d1 = cm.make_combinatorial_hexahedron(); + + // Create one square face + Dart_descriptor d2=cm.make_combinatorial_polygon(4); + + assert(cm.is_insertable_cell_1_between_two_cells_2(d1,d2)); + + // Insert the square face as a hole of the face of the hexahedron containing d1 + cm.insert_cell_1_between_two_cells_2(d1, d2); + + // Display the combinatorial map characteristics. + cm.display_characteristics(std::cout)<<", valid=" + <(dh)) ++nb; } + std::cout<<"Number of 2-free darts: "<::value>=0, "set_attribute but i-attributes are disabled"); - for ( typename Dart_of_cell_range::iterator it(*this, dh); - it.cont(); ++it) + for (typename Dart_of_cell_range::iterator it(*this, dh); + it.cont(); ++it) { this->template set_dart_attribute(it, ah); } + if(ah!=null_descriptor) + // To ensure that the dart of this attribute is dh + { this->template set_dart_of_attribute(ah, dh); } } /// @return a Attributes_range (range through all the @@ -4410,7 +4413,8 @@ namespace CGAL { bool is_insertable_cell_1_in_cell_2(Dart_const_descriptor adart1, Dart_const_descriptor adart2) const { - if ( adart1==adart2 ) return false; + if (adart1==adart2 || adart1==null_descriptor) return false; + if (adart2==null_descriptor) return true; for ( CMap_dart_const_iterator_of_orbit it(*this,adart1); it.cont(); ++it ) { @@ -4427,15 +4431,81 @@ namespace CGAL { * same vertex than adart1. */ Dart_descriptor insert_cell_1_in_cell_2(Dart_descriptor adart1, - Dart_descriptor adart2, - bool update_attributes=true) + Dart_descriptor adart2, + bool update_attributes=true) { + CGAL_assertion(is_insertable_cell_1_in_cell_2(adart1, adart2)); if ( adart2==null_descriptor ) return insert_dangling_cell_1_in_cell_2(adart1, null_descriptor, update_attributes); + return generic_insert_cell_1(adart1, adart2, false, update_attributes); + } - CGAL_assertion(is_insertable_cell_1_in_cell_2(adart1, adart2)); + /** Test if an edge can be inserted between two different 2-cells + * between two given darts. + * @param adart1 a first dart. + * @param adart2 a second dart. + * @return true iff an edge can be inserted between adart1 and adart2. + */ + bool is_insertable_cell_1_between_two_cells_2(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) const + { + if (adart1==adart2 || adart1==null_descriptor || adart2==null_descriptor) + { return false; } + for ( CMap_dart_const_iterator_of_orbit it(*this,adart1); + it.cont(); ++it ) + { + if ( it==adart2 ) return false; + } + return true; + } + /** Insert an edge between two different 2-cells, between two given darts. + * @param adart1 a first dart of the first facet (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart of the second facet (!=null_descriptor && !=null_dart_descriptor). + * @param update_attributes a boolean to update the enabled attributes + * @return a dart of the new edge, and not incident to the + * same vertex than adart1. + */ + Dart_descriptor insert_cell_1_between_two_cells_2(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true) + { + CGAL_assertion(is_insertable_cell_1_between_two_cells_2(adart1, adart2)); + return generic_insert_cell_1(adart1, adart2, true, update_attributes); + } + + /** Insert an edge between two given darts. If the two darts belong to the same facet, call + * insert_cell_1_in_cell_2, otherwise call insert_cell_1_between_two_cells_2. + * @param adart1 a first dart (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart. + * @param update_attributes a boolean to update the enabled attributes + * @return a dart of the new edge, and not incident to the + * same vertex than adart1. + */ + Dart_descriptor insert_cell_1(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true) + { + if(is_insertable_cell_1_in_cell_2(adart1, adart2)) + { return insert_cell_1_in_cell_2(adart1, adart2, update_attributes); } + return insert_cell_1_between_two_cells_2(adart1, adart2, update_attributes); + } + + /** Generic method to insert a 1-cell, either in a 2-cell (cf. insert_cell_1_in_cell_2) + * or between two different 2-cells (cf. insert_cell_1_between_two_cells_2). + * Indeed the code is the same, except for the group/degroup attribute. + * merge is true if adart1 and adart2 belongs to two different facets; in this case + * the two facets should be merged (they are now linked by the new edge); + * merge is false it adart1 and adart2 belongs to the same facet; in this case + * the facet is split in two. + * Internal method not supposed to be called by users. + */ + Dart_descriptor generic_insert_cell_1(Dart_descriptor adart1, + Dart_descriptor adart2, + bool merge, + bool update_attributes) + { size_type m1=get_new_mark(); CMap_dart_iterator_basic_of_involution it1(*this, adart1, m1); @@ -4492,7 +4562,7 @@ namespace CGAL { } this->template basic_link_beta_for_involution<2>(d2, d1); - for ( unsigned int dim=3; dim<=dimension; ++dim) + for (unsigned int dim=3; dim<=dimension; ++dim) { if ( !is_free(it1, dim) && is_marked(beta(it1, dim), treated) ) @@ -4509,7 +4579,19 @@ namespace CGAL { if (are_attributes_automatically_managed() && update_attributes) { - internal::Degroup_attribute_functor_run::run(*this, d1, d2); + if(merge) + { // Here we group all enabled attributes starting from 2 to dimension + Helper::template Foreach_enabled_attributes + , 2>::run(*this, adart1, adart2); + // And we need to group also beta_i(adart1) and beta_i(adart2) for all + // enabled attributes starting from 3 dimension. Indeed when two i-cells + // are grouped for adart1 and adart2, this group also all beta_j two by two + // except for beta_i. + Helper::template Foreach_enabled_attributes + , 3>::run(*this, adart1, adart2); + } + else // Here we degroup 2-attributes + { internal::Degroup_attribute_functor_run::run(*this, adart1, adart2); } } negate_mark(m1); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h index 2b55a2c21c9..a8da5c4ddd5 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h @@ -36,12 +36,19 @@ * non nullptr, we override all the i-attribute of the second i-cell to the * first i-attribute. * + * Group_neighboor_attribute to group the -attributes of beta_i(d1) and + * beta_i(d2) if they exist. + * * Degroup_attribute_functor_run to degroup one i-attributes in two * (except for j-adim). * * Test_split_attribute_functor to test if there is some i-attributes * that are split after an operation. Modified darts are given in a * std::deque. + * + * Set_dart_of_attribute_if_marked to set the dart of the i-attribute + * associated with a dart if the old dart is marked. Used in remove_cell + * functions. */ namespace CGAL { @@ -238,7 +245,8 @@ struct Group_nonvoid_attribute_functor_run { static void run(CMap& amap, typename CMap::Dart_descriptor adart1, - typename CMap::Dart_descriptor adart2) + typename CMap::Dart_descriptor adart2, + bool dart1_deleted=true) { static_assert( 1<=i && i<=CMap::dimension ); static_assert( i!=j ); @@ -251,8 +259,13 @@ struct Group_nonvoid_attribute_functor_run a2=amap.template attribute(adart2); // If the two attributes are equal, nothing to do. - if ( a1 == a2 ) return; - + if (a1==a2) + { + if(a1!=CMap::null_descriptor && dart1_deleted && + amap.template dart_of_attribute(a1)==adart1) + { amap.template set_dart_of_attribute(a1, adart2); } + return; + } typename CMap::Dart_descriptor toSet = amap.null_descriptor; // If the attribute associated to adart1 is nullptr, set it with @@ -268,6 +281,8 @@ struct Group_nonvoid_attribute_functor_run } } amap.template set_attribute(toSet, a1); + if(dart1_deleted && toSet==adart1) + { amap.template set_dart_of_attribute(a1, adart2); } } }; // Specialization for i=0 and 2<=j. We update 0-attributes for beta_j j>=2. @@ -277,7 +292,8 @@ struct Group_nonvoid_attribute_functor_run { static void run( CMap& amap, typename CMap::Dart_descriptor dh1, - typename CMap::Dart_descriptor dh2 ) + typename CMap::Dart_descriptor dh2, + bool dart1_deleted=true) { static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, @@ -306,6 +322,8 @@ struct Group_nonvoid_attribute_functor_run } } amap.template set_attribute<0>(toSet, a1); + if(dart1_deleted && toSet==dh1) + { amap.template set_dart_of_attribute<0>(a1, od); } } } // Second extremity @@ -338,7 +356,8 @@ struct Group_nonvoid_attribute_functor_run { static void run( CMap& amap, typename CMap::Dart_descriptor dh1, - typename CMap::Dart_descriptor dh2 ) + typename CMap::Dart_descriptor dh2, + bool dart1_deleted=true) { static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, @@ -364,6 +383,8 @@ struct Group_nonvoid_attribute_functor_run } } amap.template set_attribute<0>(toSet, a1); + if(dart1_deleted && toSet==dh1) + { amap.template set_dart_of_attribute<0>(a1, od); } } } } @@ -375,7 +396,8 @@ struct Group_nonvoid_attribute_functor_run { static void run( CMap& amap, typename CMap::Dart_descriptor dh1, - typename CMap::Dart_descriptor dh2 ) + typename CMap::Dart_descriptor dh2, + bool=true) { static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, @@ -411,7 +433,8 @@ struct Group_nonvoid_attribute_functor_run { static void run(CMap&, typename CMap::Dart_descriptor, - typename CMap::Dart_descriptor) + typename CMap::Dart_descriptor, + bool=true) {} }; // Specialization for i=1 and j=0. Do nothing as edges attributes are not @@ -421,7 +444,8 @@ struct Group_nonvoid_attribute_functor_run { static void run(CMap&, typename CMap::Dart_descriptor, - typename CMap::Dart_descriptor) + typename CMap::Dart_descriptor, + bool=true) {} }; //------------------------------------------------------------------------------ @@ -432,8 +456,10 @@ struct Group_attribute_functor_run { static void run( CMap& amap, typename CMap::Dart_descriptor d1, - typename CMap::Dart_descriptor d2) - { Group_nonvoid_attribute_functor_run::run(amap, d1, d2); } + typename CMap::Dart_descriptor d2, + bool dart1_deleted=true) + { Group_nonvoid_attribute_functor_run:: + run(amap, d1, d2, dart1_deleted); } }; // Specialization for void attributes. template @@ -441,7 +467,8 @@ struct Group_attribute_functor_run { static void run( CMap&, typename CMap::Dart_descriptor, - typename CMap::Dart_descriptor ) + typename CMap::Dart_descriptor, + bool=true) {} }; // ************************************************************************ @@ -464,6 +491,22 @@ struct Group_attribute_functor run(amap,adart1,adart2); } }; // ************************************************************************ +/// Group i-attribute of beta_i(d1) and beta_i(d2) if they exist. +template +struct Group_neighboor_attribute +{ + template + static void run(CMap& amap, typename CMap::Dart_descriptor d1, + typename CMap::Dart_descriptor d2) + { + if(!amap.template is_free(d1) && !amap.template is_free(d2)) + { + CGAL::internal::Group_attribute_functor_run::run + (amap, amap.template opposite(d1), amap.template opposite(d2), false); + } + } +}; +// ************************************************************************ // Functor used to degroup one i-attribute of one i-cell in two, except the // attribute of j. template::type> +struct Set_dart_of_attribute_if_marked +{ + static void run(CMap& amap, typename CMap::Dart_descriptor d1, + typename CMap::size_type amark) + { + if(amap.template attribute(d1)!=CMap::null_descriptor && + amap.template dart(d1)!=CMap::null_descriptor && + amap.is_marked(amap.template dart(d1), amark)) + { amap.template dart(d1)=d1; } + } +}; +// Specialization for void attributes. +template +struct Set_dart_of_attribute_if_marked +{ + static void run(CMap&, typename CMap::Dart_descriptor, + typename CMap::size_type) + {} +}; +// ************************************************************************ } // namespace internal } // namespace CGAL diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h index 2a8d24c0123..b7ca3d12b42 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h @@ -342,23 +342,24 @@ namespace CGAL //is called for case k only if the k'th type in the tuple //is different from Void. Note that to the converse of Foreach_static //Functor are called from n =0 to k - template + template struct Foreach_static_restricted; - template + template struct Foreach_static_restricted,n> + std::tuple,n, startn> { template static void run(T& ... t){ - Conditionnal_run::run(t...); + if(n>=startn) + { Conditionnal_run::run(t...); } Foreach_static_restricted - ,n+1>::run(t...); + , n+1, startn>::run(t...); } }; - template - struct Foreach_static_restricted,n>{ + template + struct Foreach_static_restricted,n, startn>{ template static void run(T& ... ){} }; @@ -609,13 +610,13 @@ namespace CGAL struct Attribute_const_range { typedef CGAL::Void type; }; - // To iterate onto each enabled attributes - template + // To iterate onto each enabled attributes, starting from startn-attributes (0 by default) + template struct Foreach_enabled_attributes { template static void run(Ts& ... t) - { Foreach_static_restricted::run(t...); } + { Foreach_static_restricted::run(t...); } }; // To iterate onto each enabled attributes, except j-attributes template diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h index 6a7a1b6f271..72c89d40142 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h @@ -107,8 +107,10 @@ namespace CGAL { // We group the two (i+1)-cells incident if they exist. if ( dg1!=amap.null_descriptor ) + { CGAL::internal::Group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be removed + } } // During the operation, we store in modified_darts the darts modified @@ -148,6 +150,9 @@ namespace CGAL if ( d1!=amap.null_dart_descriptor ) { + internal::Set_dart_of_attribute_if_marked:: + run(amap, d1, mark); + if ( d2!=amap.null_dart_descriptor && d1!=d2 ) { amap.template basic_link_beta(d1, d2); @@ -353,7 +358,7 @@ namespace CGAL // We group the two edges incident if they exist. if ( dg1!=amap.null_descriptor ) CGAL::internal::Group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be removed } // During the operation, we store in modified_darts the darts modified @@ -369,6 +374,9 @@ namespace CGAL { if ( !amap.template is_free<0>(*it) ) { + internal::Set_dart_of_attribute_if_marked:: + run(amap, amap.template beta<0>(*it), mark); + if ( !amap.template is_free<1>(*it) && amap.template beta<0>(*it)!=(*it) ) { @@ -523,7 +531,7 @@ namespace CGAL // We group the two (i-1)-cells incident if they exist. if ( dg1!=amap.null_descriptor ) CGAL::internal::Group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be removed } // During the operation, we store in modified_darts the darts modified @@ -677,7 +685,7 @@ namespace CGAL // We group the two vertices incident if they exist. if ( dg1!=amap.null_descriptor ) CGAL::internal::Group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be removed } // During the operation, we store in modified_darts the darts modified diff --git a/Combinatorial_map/include/CGAL/Compact_container_with_index.h b/Combinatorial_map/include/CGAL/Compact_container_with_index.h index 044db27dc87..d3d67c57a88 100644 --- a/Combinatorial_map/include/CGAL/Compact_container_with_index.h +++ b/Combinatorial_map/include/CGAL/Compact_container_with_index.h @@ -738,6 +738,9 @@ public: size_type index(const_iterator cit) const { return static_cast(cit); } + size_type index(Index idx) const + { return static_cast(idx); } + // Returns whether the iterator "cit" is in the range [begin(), end()]. // This function is mostly useful for purposes of efficient debugging at // higher levels. diff --git a/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_3_test.h b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_3_test.h index 1abea6aef50..aecd73c271a 100644 --- a/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_3_test.h +++ b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_3_test.h @@ -1012,6 +1012,17 @@ bool test3D() map.insert_cell_1_in_cell_2(d1, map.beta(d1,1,1)); map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl; map.clear(); + + d1 = map.make_combinatorial_polygon(4); + d2 = map.make_combinatorial_polygon(4); + map.insert_cell_1_between_two_cells_2(d1, d2); + if(!map.is_valid()) + { + map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl; + std::cout<<"ERROR after map.insert_cell_1_between_two_cells_2(d1, d2);"< 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/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 2c1bb194951..9ba9d483d82 100644 --- a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -26,6 +26,6 @@ Halfspaces are considered as lower halfspaces, that is if the plane equation is template void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end, PolygonMesh &pm, - boost::optional::value_type>::Kernel::Point_3> > origin = boost::none); + std::optional::value_type>::Kernel::Point_3> > origin = std::nullopt); } /* namespace CGAL */ diff --git a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index a234d1905ca..76cd8dff9f3 100644 --- a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -25,7 +25,7 @@ template void halfspace_intersection_with_constructions_3(PlaneIterator pbegin, PlaneIterator pend, PolygonMesh &pm, - boost::optional::value_type>::Kernel::Point_3> > origin = boost::none, + std::optional::value_type>::Kernel::Point_3> > origin = std::nullopt, const Traits & ch_traits = Default_traits); } /* namespace CGAL */ 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/examples/Convex_hull_3/lloyd_algorithm.cpp b/Convex_hull_3/examples/Convex_hull_3/lloyd_algorithm.cpp index 4976b5e4a04..75d8847375d 100644 --- a/Convex_hull_3/examples/Convex_hull_3/lloyd_algorithm.cpp +++ b/Convex_hull_3/examples/Convex_hull_3/lloyd_algorithm.cpp @@ -170,7 +170,7 @@ void lloyd_algorithm (PolyIterator poly_begin, CGAL::halfspace_intersection_3(planes.begin(), planes.end(), P, - boost::make_optional(vit->point())); + std::make_optional(vit->point())); // Centroid apply_function_object_polyhedron(P, centroid_acc); 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 87062e5c29d..19ee436cc52 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 @@ -66,7 +66,7 @@ namespace CGAL // Typedefs for intersection typedef typename Kernel::Plane_3 Plane_3; typedef typename Kernel::Line_3 Line_3; - typedef boost::optional< boost::variant< Point_3, + typedef std::optional< std::variant< Point_3, Line_3, Plane_3 > > result_inter; @@ -96,10 +96,10 @@ namespace CGAL result_inter result = CGAL::intersection(pp1, pp2, pp3); CGAL_assertion_msg(bool(result), "halfspace_intersection_3: no intersection"); - CGAL_assertion_msg(boost::get(& *result) != nullptr, + CGAL_assertion_msg(std::get_if(& *result) != nullptr, "halfspace_intersection_3: intersection is not a point"); - const Point_3* pp = boost::get(& *result); + const Point_3* pp = std::get_if(& *result); // Primal vertex associated to the current dual plane Point_3 ppp(origin.x() + pp->x(), @@ -227,7 +227,7 @@ namespace CGAL template void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end, Polyhedron &P, - boost::optional::value_type>::Kernel::Point_3> origin = boost::none) { + std::optional::value_type>::Kernel::Point_3> origin = std::nullopt) { // Checks whether the intersection is a polyhedron CGAL_assertion_msg(Convex_hull_3::internal::is_intersection_dim_3(begin, end), "halfspace_intersection_3: intersection not a polyhedron"); @@ -241,8 +241,8 @@ namespace CGAL // find a point inside the intersection origin = halfspace_intersection_interior_point_3(begin, end); - CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_3: problem when determining a point inside the intersection"); - if (origin==boost::none) + CGAL_assertion_msg(origin!=std::nullopt, "halfspace_intersection_3: problem when determining a point inside the intersection"); + if (origin==std::nullopt) return; } @@ -272,7 +272,7 @@ namespace CGAL void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end, Polyhedron &P, typename Kernel_traits::value_type>::Kernel::Point_3 const& origin) { - halfspace_intersection_3(begin, end , P, boost::make_optional(origin)); + halfspace_intersection_3(begin, end , P, std::make_optional(origin)); } #endif } // namespace CGAL diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h index afdab1fdee0..5ce8dbe7579 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h @@ -165,7 +165,7 @@ public: \ingroup PkgConvexHull3Functions computes a point belonging to the intersection of the halfspaces defined by the planes contained in the range `[begin, end)`. -If the intersection is empty, `boost::none` is returned. +If the intersection is empty, `std::nullopt` is returned. \attention Halfspaces are considered as lower halfspaces that is to say if the plane's equation is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . @@ -173,21 +173,21 @@ is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defin \tparam PlaneIterator must be an input iterator with the value type being a `Plane_3` object from \cgal Kernel */ template -boost::optional::value_type>::Kernel::Point_3> +std::optional::value_type>::Kernel::Point_3> halfspace_intersection_interior_point_3(PlaneIterator begin, PlaneIterator end) { // Types typedef typename Kernel_traits::value_type>::Kernel K; // choose exact integral type - typedef typename internal::Exact_field_selector::Type ET; + typedef typename internal::Exact_field_selector::Type ET; // find a point inside the intersection internal::Interior_polyhedron_3 interior; if (!interior.find(begin, end)) - return boost::none; + return std::nullopt; - return boost::make_optional(interior.inside_point()); + return std::make_optional(interior.inside_point()); } } // namespace CGAL diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index 4a0b9c26d44..d8946af7353 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -90,7 +90,7 @@ namespace CGAL void halfspace_intersection_with_constructions_3(PlaneIterator pbegin, PlaneIterator pend, Polyhedron &P, - boost::optional::value_type>::Kernel::Point_3> origin, + std::optional::value_type>::Kernel::Point_3> origin, const Traits & ch_traits) { typedef typename Kernel_traits::value_type>::Kernel K; typedef typename K::Point_3 Point; @@ -101,8 +101,8 @@ namespace CGAL // find a point inside the intersection origin = halfspace_intersection_interior_point_3(pbegin, pend); - CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_with_constructions_3: problem when determining a point inside the intersection"); - if (origin==boost::none) + CGAL_assertion_msg(origin!=std::nullopt, "halfspace_intersection_with_constructions_3: problem when determining a point inside the intersection"); + if (origin==std::nullopt) return; } @@ -134,7 +134,7 @@ namespace CGAL void halfspace_intersection_with_constructions_3 (PlaneIterator pbegin, PlaneIterator pend, Polyhedron &P, - boost::optional::value_type>::Kernel::Point_3> const& origin = boost::none) { + std::optional::value_type>::Kernel::Point_3> const& origin = std::nullopt) { typedef typename Kernel_traits::value_type>::Kernel K; typedef typename K::Point_3 Point_3; typedef typename Convex_hull_3::internal::Default_traits_for_Chull_3::type Traits; diff --git a/Convex_hull_3/test/Convex_hull_3/test_halfspace_intersections.cpp b/Convex_hull_3/test/Convex_hull_3/test_halfspace_intersections.cpp index a0eef18da7f..686a2b8c717 100644 --- a/Convex_hull_3/test/Convex_hull_3/test_halfspace_intersections.cpp +++ b/Convex_hull_3/test/Convex_hull_3/test_halfspace_intersections.cpp @@ -32,7 +32,7 @@ void test() CGAL::halfspace_intersection_3(planes.begin(), planes.end(), P1, - boost::make_optional(Point(0, 0, 0)) ); + std::make_optional(Point(0, 0, 0)) ); // test halfspace_intersection_3 with non point inside CGAL::halfspace_intersection_3(planes.begin(), @@ -43,7 +43,7 @@ void test() CGAL::halfspace_intersection_with_constructions_3( planes.begin(), planes.end(), P3, - boost::make_optional(Point(0, 0, 0)) ); + std::make_optional(Point(0, 0, 0)) ); // test halfspace_intersection_with_constructions_3 with non point inside CGAL::halfspace_intersection_with_constructions_3( planes.begin(), @@ -54,7 +54,7 @@ void test() CGAL::halfspace_intersection_with_constructions_3( planes.begin(), planes.end(), P5, - boost::optional(), + std::optional(), K()); assert(num_vertices(P1)==8 && num_faces(P1)==6); 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/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index fdb659ea2b5..481b1792c4f 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -241,6 +241,18 @@ else() "#EXTRACT_ALL_NO_DETAILED_IF_EMPTY = NO") endif() +option(CGAL_NO_ADDITIONAL_DETAILS + "Use CGAL special doxygen setting NO_ADDITIONAL_DETAILS." ON) +if(CGAL_NO_ADDITIONAL_DETAILS) + set(CGAL_OPT_NO_ADDITIONAL_DETAILS + "NO_ADDITIONAL_DETAILS = YES") +else() + # The default is NO, so we could leave it out, but it is better to have a commented out placeholder + # this will work for versions with and without the setting. + set(CGAL_OPT_NO_ADDITIONAL_DETAILS + "#NO_ADDITIONAL_DETAILS = NO") +endif() + #we use two directories for the generation/reading of tag files to prevent issues #if the targets are built in parallel set(CGAL_DOC_TAG_GEN_DIR "${CMAKE_BINARY_DIR}/doc_gen_tags") @@ -402,6 +414,15 @@ else() endforeach() endif() +#special cases +foreach(pkg "Mesher_level") + if(CGAL_BRANCH_BUILD) + set(CGAL_${pkg}_INCLUDE_DIR "${CGAL_ROOT}/${pkg}/include") + else() + set(CGAL_${pkg}_INCLUDE_DIR "${CGAL_ROOT}/include") + endif() +endforeach() + option(CGAL_BUILD_THREE_DOC "Build the documentation of the Three package" OFF) if(NOT CGAL_BUILD_THREE_DOC) 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..7f347c1529c 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 @@ -262,7 +264,7 @@ EXTRACT_ALL = YES # the EXTRACT_ALL tag is set to NO. # The default value is: NO. -EXTRACT_ALL_NO_DETAILED_IF_EMPTY = YES +${CGAL_OPT_EXTRACT_ALL_NO_DETAILED_IF_EMPTY} # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. @@ -658,7 +660,8 @@ PREDEFINED = DOXYGEN_RUNNING \ "CGAL_NP_CLASS_1=NamedParameters1" \ "CGAL_NP_TEMPLATE_PARAMETERS_2=NamedParameters2 = CGAL::parameters::Default_named_parameter" \ "CGAL_NP_CLASS_2=NamedParameters2" \ - CGAL_DEPRECATED + CGAL_DEPRECATED \ + CGAL_DEPRECATED_MSG(name)= #--------------------------------------------------------------------------- # Configuration options related to external references diff --git a/Documentation/doc/resources/1.9.6/BaseDoxyfile.in b/Documentation/doc/resources/1.9.6/BaseDoxyfile.in index 1cfd0a6ffd9..f5d4533ce70 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 @@ -643,7 +645,9 @@ PREDEFINED = DOXYGEN_RUNNING \ "CGAL_NP_CLASS_1=NamedParameters1" \ "CGAL_NP_TEMPLATE_PARAMETERS_2=NamedParameters2 = CGAL::parameters::Default_named_parameter" \ "CGAL_NP_CLASS_2=NamedParameters2" \ - CGAL_DEPRECATED + CGAL_DEPRECATED \ + CGAL_DEPRECATED_MSG(name)= + #--------------------------------------------------------------------------- # Configuration options related to external references @@ -791,5 +795,5 @@ GENERATE_LEGEND = NO # NO_ADDITIONAL_DETAILS tag is set to YES. This tag has no effect if # the EXTRACT_ALL tag is set to NO. # The default value is: NO. -NO_ADDITIONAL_DETAILS = YES +${CGAL_OPT_NO_ADDITIONAL_DETAILS} diff --git a/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h b/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h index fc2f04a27ec..4e17e189b11 100644 --- a/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h +++ b/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include @@ -116,9 +116,7 @@ public: { // Subdivide the curves into x-monotone subcurves. CurvesIterator it; - std::list objects; - std::list::iterator obj_it; - X_monotone_curve_2 xcv; + std::list> objects; std::list x_curves; for (it = begin; it != end; it++) @@ -127,10 +125,10 @@ public: objects.clear(); traits->make_x_monotone_2_object()(*it, std::back_inserter(objects)); - for (obj_it = objects.begin(); obj_it != objects.end(); ++obj_it) + for (auto obj_it = objects.begin(); obj_it != objects.end(); ++obj_it) { - if(CGAL::assign (xcv, *obj_it)) - x_curves.push_back (xcv); + if(const X_monotone_curve_2* xcv_ptr = std::get_if(&(*obj_it))) + x_curves.push_back (*xcv_ptr); } } diff --git a/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h b/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h index 9503e338311..657bb0168ea 100644 --- a/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h +++ b/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h @@ -19,7 +19,7 @@ * Definitions of the functions of the Envelope_divide_and_conquer_2 class. */ -#include +#include namespace CGAL { @@ -609,9 +609,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, // This is the rightmost vertex in the current minimization diagram (out_d). // The intersection points/curves that interest us are the ones in // [v_leftmost, v]. - // Without using make_optional we get a "maybe uninitialized" warning with gcc -Wall - boost::optional v_leftmost = - boost::make_optional(false, Vertex_const_handle()); + std::optional v_leftmost; if (is_leftmost1 == true) { if (is_leftmost2 == false) @@ -632,9 +630,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, // Find the next intersection of the envelopes to the right of the current // rightmost point in the merged diagram. - // \todo Use the faster object_cast. - std::list objects; - CGAL::Object obj; + std::list> objects; const X_monotone_curve_2* intersection_curve; const Intersection_point* intersection_point; @@ -643,10 +639,10 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, while (! objects.empty()) { // Pop the xy-lexicographically smallest intersection object. - obj = objects.front(); + auto obj = objects.front(); objects.pop_front(); - if ((intersection_point = CGAL::object_cast(&obj)) != + if ((intersection_point = std::get_if(&obj)) != nullptr) { // We have a simple intersection point. @@ -727,7 +723,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, else { // We have an x-monotone curve representing an overlap of the two // curves. - intersection_curve = CGAL::object_cast(&obj); + intersection_curve = std::get_if(&obj); if (intersection_curve == nullptr) CGAL_error_msg("unrecognized intersection object."); diff --git a/Envelope_3/include/CGAL/Env_plane_traits_3.h b/Envelope_3/include/CGAL/Env_plane_traits_3.h index 1bf7f790a10..85fbbf161be 100644 --- a/Envelope_3/include/CGAL/Env_plane_traits_3.h +++ b/Envelope_3/include/CGAL/Env_plane_traits_3.h @@ -47,7 +47,6 @@ public: typedef typename Kernel::Ray_2 Ray_2; typedef typename Kernel::Line_2 Line_2; typedef typename Kernel::Line_3 Line_3; - typedef typename Kernel::Object_3 Object_3; typedef std::pair Intersection_curve; typedef typename Base::Left_side_category Left_side_category; @@ -326,8 +325,8 @@ public: const Plane_3& h = s.plane(); Line_2 proj_line(h.a(), h.b(), h.d()); - *o++ = make_object(std::make_pair(X_monotone_curve_2(proj_line), - ON_ORIENTED_BOUNDARY)); + *o++ = std::make_pair(X_monotone_curve_2(proj_line), + ON_ORIENTED_BOUNDARY); return o; } @@ -339,7 +338,7 @@ public: Oriented_side side = (res == SMALLER) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE; - *o++ = make_object(std::make_pair(X_monotone_curve_2(s.line()), side)); + *o++ = std::make_pair(X_monotone_curve_2(s.line()), side); return o; } }; @@ -369,11 +368,10 @@ public: { Line_2 l1(h1.a(), h1.b(), h1.d()); Line_2 l2(h2.a(), h2.b(), h2.d()); - Object obj = k.intersect_2_object()(l1, l2); + auto obj = k.intersect_2_object()(l1, l2); - Point_2 p; - if(assign(p, obj)) - *o++ = make_object(p); + if(const Point_2* p = std::get_if(&(*obj))) + *o++ = *p; // otherwise, the vertical planes are parallel or overlap, so we return // nothing. @@ -382,90 +380,82 @@ public: if(s1.is_all_plane() && s2.is_all_plane()) { - Object obj = k.intersect_3_object()(h1, h2); - Line_3 l; - if(assign(l, obj)) - *o++ = make_object(Intersection_curve(project_xy(l, k), 1)); + auto obj = k.intersect_3_object()(h1, h2); + CGAL_assertion(obj != std::nullopt); + if(const Line_3* l = std::get_if(&(*obj))) + *o++ = Intersection_curve(project_xy(*l, k), 1); return o; } if(s1.is_all_plane() && !s2.is_all_plane()) { - Object obj = plane_half_plane_proj_intersection(h1, - h2, - s2.line(), - k); - if(obj.is_empty()) + auto obj = plane_half_plane_proj_intersection(h1, + h2, + s2.line(), + k); + if(obj ==std::nullopt) return o; - Line_2 temp_l; - if(assign(temp_l, obj)) + if(const Line_2* line = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(temp_l, 1)); + *o++ = Intersection_curve(*line, 1); return o; } - Ray_2 ray; - if(assign(ray, obj)) + if(const Ray_2* ray = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(ray, 1)); + *o++ = Intersection_curve(*ray, 1); return o; } return o; } if(!s2.is_all_plane() && s2.is_all_plane()) { - Object obj = plane_half_plane_proj_intersection(h2, - h1, - s1.line(), - k); - if(obj.is_empty()) + auto obj = plane_half_plane_proj_intersection(h2, + h1, + s1.line(), + k); + if(obj == std::nullopt) return o; - Line_2 line; - if(assign(line, obj)) + if(const Line_2* line = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(line, 1)); + *o++ = Intersection_curve(*line, 1); return o; } - Ray_2 ray; - if(assign(ray, obj)) + if(const Ray_2* ray = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(ray, 1)); + *o++ = Intersection_curve(*ray, 1); return o; } return o; - } CGAL_assertion(!s2.is_all_plane() && !s2.is_all_plane()); - Object obj = + auto obj = half_plane_half_plane_proj_intersection(h1, s1.line(), h2, s2.line(), k); - if(obj.is_empty()) + if(obj ==std::nullopt ) return o; - Line_2 line; - if(assign(line, obj)) + + if(const Line_2* line = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(line, 1)); + *o++ = Intersection_curve(*line, 1); return o; } - Ray_2 ray; - if(assign(ray, obj)) + if(const Ray_2* ray = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(ray, 1)); + *o++ = Intersection_curve(*ray, 1); return o; } - Segment_2 seg; - if(assign(seg, obj)) + if(const Segment_2* seg = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(seg, 1)); + *o++ = Intersection_curve(*seg, 1); return o; } - Point_2 p; - if(assign(p, obj)) + if(const Point_2* p = std::get_if(&(*obj))) { - *o++ = make_object(p); + *o++ = *p; return o; } return o; diff --git a/Envelope_3/include/CGAL/Env_sphere_traits_3.h b/Envelope_3/include/CGAL/Env_sphere_traits_3.h index 9dcfa59fe5c..2a42d07f0a0 100644 --- a/Envelope_3/include/CGAL/Env_sphere_traits_3.h +++ b/Envelope_3/include/CGAL/Env_sphere_traits_3.h @@ -18,7 +18,6 @@ #include -#include #include #include #include @@ -26,6 +25,8 @@ #include #include +#include + namespace CGAL { template @@ -109,28 +110,28 @@ public: Rat_point_2 proj_center = parent.project(s.center()); Rat_circle_2 circ(proj_center, s.squared_radius()); Curve_2 curve = gt_2->construct_curve_2_object()(circ); - Object objs[2]; - CGAL_assertion_code(Object *p = ) + typedef std::variant Variant; + Variant objs[2]; + + CGAL_assertion_code(Variant* p = ) parent.make_x_monotone_2_object()(curve, objs); CGAL_assertion(p == objs + 2); - X_monotone_curve_2 cv1, cv2; + const X_monotone_curve_2* cv1 = std::get_if(&(objs[0])); + const X_monotone_curve_2* cv2 = std::get_if(&(objs[1])); - CGAL_assertion(assign(cv1, objs[0])); - CGAL_assertion(assign(cv2, objs[1])); + CGAL_assertion(cv1!=nullptr); + CGAL_assertion(cv2!=nullptr); - assign(cv1, objs[0]); - assign(cv2, objs[1]); - - if (cv1.is_lower()) { - CGAL_assertion(cv2.is_upper()); - *o++ = make_object(std::make_pair(cv1, ON_POSITIVE_SIDE)); - *o++ = make_object(std::make_pair(cv2, ON_NEGATIVE_SIDE)); + if (cv1->is_lower()) { + CGAL_assertion(cv2->is_upper()); + *o++ = std::make_pair(*cv1, ON_POSITIVE_SIDE); + *o++ = std::make_pair(*cv2, ON_NEGATIVE_SIDE); } else { - CGAL_assertion(cv2.is_lower()); - *o++ = make_object(std::make_pair(cv1, ON_NEGATIVE_SIDE)); - *o++ = make_object(std::make_pair(cv2, ON_POSITIVE_SIDE)); + CGAL_assertion(cv2->is_lower()); + *o++ = std::make_pair(*cv1, ON_NEGATIVE_SIDE); + *o++ = std::make_pair(*cv2, ON_POSITIVE_SIDE); } return o; @@ -237,7 +238,7 @@ public: if (n_ys == 1) { // intersection is a point Point_2 inter_point(xs , ys[0]); - *o++ = make_object(inter_point); + *o++ = inter_point; return o; } @@ -254,7 +255,7 @@ public: Curve_2 res = ctr_cv(0, 0, 0, 2*a_diff, 0, -m, COLLINEAR, end1, end2); parent.add_curve_to_output(res, o); - //*o++ = make_object(Intersection_curve(res, TRANSVERSAL)); + //*o++ = Intersection_curve(res, TRANSVERSAL); } else { // here we have c1 == c2, b1 != b2. @@ -308,7 +309,7 @@ public: if (n_xs == 1) { // intersection is a point Point_2 inter_point(xs[0], (-2*a_diff*xs[0] + m)/(2*b_diff) ); - *o++ = make_object(inter_point); + *o++ = inter_point; return o; } @@ -328,7 +329,7 @@ public: Curve_2 res = ctr_cv(0,0,0, 2*a_diff, 2*b_diff, -m, COLLINEAR, end1, end2); parent.add_curve_to_output(res, o); - //*o++ = make_object(Intersection_curve(res, TRANSVERSAL)); + //*o++ = Intersection_curve(res, TRANSVERSAL); } } // now the potential intersection is (a part of) a circle, @@ -439,7 +440,7 @@ public: // should check if the point is in the non-negative side of the // line if (CGAL_NTS sign(la*px + lb*py +lc) != NEGATIVE) - *o++ = make_object(Point_2(px, py)); + *o++ = Point_2(px, py); return o; } @@ -460,7 +461,7 @@ public: if (sign_lc != NEGATIVE) { Curve_2 res = ctr_cv(R, S, T, U, V, W); parent.add_curve_to_output(res, o); - //*o++ = make_object(Intersection_curve(res, TRANSVERSAL)); + //*o++ = Intersection_curve(res, TRANSVERSAL); } return o; } @@ -609,13 +610,13 @@ public: if (lval_sign == POSITIVE) { // the full ellipse is in the positive side parent.add_curve_to_output(inter_cv, o); - //*o++ = make_object(Intersection_curve(inter_cv, TRANSVERSAL)); + //*o++ = Intersection_curve(inter_cv, TRANSVERSAL); return o; } else if (lval_sign == NEGATIVE) { // the full ellipse is in the negative side, except maybe the point // source in the case n_inter_points = 1 (which lies on the line) - if (n_inter_points == 1) *o++ = make_object(Point_2(source)); + if (n_inter_points == 1) *o++ = Point_2(source); return o; } @@ -630,8 +631,8 @@ public: CGAL_assertion(lval_sign != ZERO); if (lval_sign == POSITIVE) parent.add_curve_to_output(inter_cv, o); - //*o++ = make_object(Intersection_curve(inter_cv, TRANSVERSAL)); - else *o++ = make_object(Point_2(source)); + //*o++ = Intersection_curve(inter_cv, TRANSVERSAL); + else *o++ = Point_2(source); return o; } @@ -651,7 +652,7 @@ public: Curve_2 res = ctr_cv(R, S, T, U, V, W, orient, source, target); CGAL_assertion(res.is_valid()); parent.add_curve_to_output(res, o); - //*o++ = make_object(Intersection_curve(res, TRANSVERSAL)); + //*o++ = Intersection_curve(res, TRANSVERSAL); } return o; @@ -1118,16 +1119,16 @@ public: template OutputIterator add_curve_to_output(const Curve_2& c, OutputIterator oi) const { - Object objs[2]; - Object* p_obj = this->make_x_monotone_2_object()(c, objs); - for(Object* o = objs; o != p_obj; ++o) { - X_monotone_curve_2 cv; - if(assign(cv, *o)) *oi++ = make_object(Intersection_curve(cv, 1)); + std::variant objs[2]; + + std::variant* p_obj = this->make_x_monotone_2_object()(c, objs); + for(std::variant* o = objs; o != p_obj; ++o) { + if(const X_monotone_curve_2* cv = std::get_if(o)) + *oi++ = Intersection_curve(*cv, 1); else { - Point_2 pt; - CGAL_assertion(assign(pt, *o)); - assign(pt, *o); - *oi++ = make_object(pt); + const Point_2* pt = std::get_if(o); + CGAL_assertion(pt!=nullptr); + *oi++ = *pt; } } return oi; diff --git a/Envelope_3/include/CGAL/Env_tracing_traits_3.h b/Envelope_3/include/CGAL/Env_tracing_traits_3.h index 06171831a1a..471299a7484 100644 --- a/Envelope_3/include/CGAL/Env_tracing_traits_3.h +++ b/Envelope_3/include/CGAL/Env_tracing_traits_3.h @@ -194,14 +194,15 @@ public: Base base; std::cerr << "Construct_projected_boundary_2: JUST FIRST" << std::endl; std::cerr << "Surface: " << s << std::endl; - std::list l; + // TODO UPDATE CONCEPT + CHANGES.md + std::list< std::variant, Point_2 > > l; base.construct_projected_boundary_2_object() (s, std::back_inserter(l)); if (l.size() > 0) { - std::pair i; - if (CGAL::assign(i, l.front())) - std::cerr << "First: " << i.first << std::endl; + if (const std::pair* i = + std::get_if>(&l.front())) + std::cerr << "First: " << i->first << std::endl; else std::cerr << "First intersection is a point" << std::endl; } @@ -232,15 +233,14 @@ public: << std::endl; std::cerr << "Surface1: " << s1 << std::endl; std::cerr << "Surface2: " << s2 << std::endl; - std::list l; + std::list< std::variant > l; base.construct_projected_intersections_2_object() (s1, s2, std::back_inserter(l)); if (l.size() > 0) { - Intersection_curve i; - if (CGAL::assign(i, l.front())) - std::cerr << "First: " << i.first << std::endl; + if (const Intersection_curve* i = std::get_if(&l.front())) + std::cerr << "First: " << i->first << std::endl; else std::cerr << "First intersection is not a point" << std::endl; } diff --git a/Envelope_3/include/CGAL/Env_triangle_traits_3.h b/Envelope_3/include/CGAL/Env_triangle_traits_3.h index 3587d922415..00ccc69e8fa 100644 --- a/Envelope_3/include/CGAL/Env_triangle_traits_3.h +++ b/Envelope_3/include/CGAL/Env_triangle_traits_3.h @@ -20,8 +20,6 @@ #include - -#include #include #include #include @@ -546,9 +544,9 @@ public: s2 != ON_ORIENTED_BOUNDARY && s3 != ON_ORIENTED_BOUNDARY); - *o++ = make_object(std::make_pair(A, s1)); - *o++ = make_object(std::make_pair(B, s2)); - *o++ = make_object(std::make_pair(C, s3)); + *o++ = std::make_pair(A, s1); + *o++ = std::make_pair(B, s2); + *o++ = std::make_pair(C, s3); } else { @@ -561,8 +559,8 @@ public: b2 = parent->project(a2); CGAL_assertion(b1 != b2); - *o++ = make_object(std::make_pair(X_monotone_curve_2(b1, b2), - ON_ORIENTED_BOUNDARY)); + *o++ = std::make_pair(X_monotone_curve_2(b1, b2), + ON_ORIENTED_BOUNDARY); } return o; } @@ -611,32 +609,30 @@ public: return o; } - Object inter_obj = parent->intersection(s1,s2); - if (inter_obj.is_empty()) + std::optional> inter_obj + = parent->intersection(s1,s2); + if (inter_obj == std::nullopt) { return o; } - Point_3 point; - Segment_3 curve; - if (k.assign_3_object()(point, inter_obj)) - *o++ = make_object(parent->project(point)); + if (const Point_3* point = std::get_if(&(*inter_obj))) + *o++ = parent->project(*point); else { - CGAL_assertion_code(bool b = ) - k.assign_3_object()(curve, inter_obj); - CGAL_assertion(b); + const Segment_3* curve = std::get_if(&(*inter_obj)); + CGAL_assertion(curve != nullptr); - Segment_2 proj_seg = parent->project(curve); + Segment_2 proj_seg = parent->project(*curve); if (! k.is_degenerate_2_object() (proj_seg)) { Intersection_curve inter_cv (proj_seg, 1); - *o++ = make_object(inter_cv); + *o++ = inter_cv; } else { const Point_2& p = k.construct_point_on_2_object() (proj_seg, 0); - *o++ = make_object(p); + *o++ = p; } } @@ -1044,8 +1040,9 @@ public: // intersect two xy-monotone surfaces (3D-triangles or segments) // if the triangles overlap, the result is empty // the result can be a segment or a point - Object intersection(const Xy_monotone_surface_3& s1, - const Xy_monotone_surface_3& s2) const + std::optional< std::variant> + intersection(const Xy_monotone_surface_3& s1, + const Xy_monotone_surface_3& s2) const { CGAL_precondition(s1.is_xy_monotone()); CGAL_precondition(s2.is_xy_monotone()); @@ -1054,14 +1051,13 @@ public: // first, try to intersect the bounding boxes of the triangles, // efficiently return empty object when the triangles are faraway if (!CGAL::do_overlap(s1.bbox(), s2.bbox())) - return Object(); + return std::nullopt; // if intersecting two segment - alculate the intersection // as in the case of dimension 2 if (s1.is_segment() && s2.is_segment()) { - Object res = intersection_of_segments(s1, s2); - return res; + return intersection_of_segments(s1, s2); } // if both triangles lie on the same (non-vertical) plane, they overlap @@ -1070,96 +1066,92 @@ public: Plane_3 p1 = s1.plane(); Plane_3 p2 = s2.plane(); if (p1 == p2 || p1 == p2.opposite()) - return Object(); + return std::nullopt; // calculate intersection between a triangle and the other triangle's // supporting plane // if there is no intersection - then the triangles have no intersection // between them. - Object inter_obj = intersection(p1, s2); + auto inter_obj = intersection(p1, s2); - if (inter_obj.is_empty()) - return Object(); + if (inter_obj == std::nullopt) + return std::nullopt; // otherwise, if the intersection in a point, we should check if it lies // inside the first triangle - Assign_3 assign_obj = k.assign_3_object(); - Point_3 inter_point; - if (assign_obj(inter_point, inter_obj)) + if (const Point_3* inter_point = std::get_if(&(*inter_obj))) { - Object res = intersection_on_plane_3(p1, s1, inter_point); - return res; + std::optional res = intersection_on_plane_3(p1, s1, *inter_point); + if (res != std::nullopt) + return res.value(); } else { // if the intersection is a segment, we check the intersection of the // other plane-triangle pair - Segment_3 inter_seg; - CGAL_assertion(assign_obj(inter_seg, inter_obj)); - assign_obj(inter_seg, inter_obj); + const Segment_3* inter_seg = std::get_if(&(*inter_obj)); + CGAL_assertion(inter_seg != nullptr); - inter_obj = intersection(p2, s1); + auto inter_obj2 = intersection(p2, s1); // if there is no intersection - then the triangles have no intersection // between them. - if (inter_obj.is_empty()) - return Object(); + if (inter_obj2 == std::nullopt) + return std::nullopt; - if (assign_obj(inter_point, inter_obj)) + if (const Point_3* inter_point = std::get_if(&(*inter_obj2))) { - // if the intersection is a point, which lies on the segment, - // than it is the result, - // otherwise, empty result - if (k.has_on_3_object()(inter_seg, inter_point)) - return make_object(inter_point); - else - return Object(); + // if the intersection is a point, which lies on the segment, + // than it is the result, + // otherwise, empty result + if (k.has_on_3_object()(*inter_seg, *inter_point)) + return *inter_point; + else + return std::nullopt; } else { - // both plane-triangle intersections are segments, which are collinear, - // and lie on the line which is the intersection of the two supporting - // planes - Segment_3 inter_seg2; - CGAL_assertion(assign_obj(inter_seg2, inter_obj)); - assign_obj(inter_seg2, inter_obj); + // both plane-triangle intersections are segments, which are collinear, + // and lie on the line which is the intersection of the two supporting + // planes + const Segment_3* inter_seg2 = std::get_if(&(*inter_obj)); + CGAL_assertion(inter_seg2 != nullptr); - Point_3 min1 = k.construct_min_vertex_3_object()(inter_seg), - max1 = k.construct_max_vertex_3_object()(inter_seg); - Point_3 min2 = k.construct_min_vertex_3_object()(inter_seg2), - max2 = k.construct_max_vertex_3_object()(inter_seg2); + Point_3 min1 = k.construct_min_vertex_3_object()(*inter_seg), + max1 = k.construct_max_vertex_3_object()(*inter_seg); + Point_3 min2 = k.construct_min_vertex_3_object()(*inter_seg2), + max2 = k.construct_max_vertex_3_object()(*inter_seg2); - CGAL_assertion((k.collinear_3_object()(min1, min2, max1) && + CGAL_assertion((k.collinear_3_object()(min1, min2, max1) && k.collinear_3_object()(min1, max2, max1))); - // we need to find the overlapping part, if exists - Point_3 min, max; - if (k.less_xyz_3_object()(min1, min2)) - min = min2; - else - min = min1; - if (k.less_xyz_3_object()(max1, max2)) - max = max1; - else - max = max2; + // we need to find the overlapping part, if exists + Point_3 min, max; + if (k.less_xyz_3_object()(min1, min2)) + min = min2; + else + min = min1; + if (k.less_xyz_3_object()(max1, max2)) + max = max1; + else + max = max2; - Object res; - Comparison_result comp_res = k.compare_xyz_3_object()(min, max); - if (comp_res == EQUAL) - res = make_object(min); - else if (comp_res == SMALLER) - res = make_object(Segment_3(min, max)); - // else - empty result - - return res; + Comparison_result comp_res = k.compare_xyz_3_object()(min, max); + if (comp_res == EQUAL) + return min; + else if (comp_res == SMALLER) + return Segment_3(min, max); + // else - empty result } } + return std::nullopt; } // calculate intersection between triangle & point on the same plane plane - Object intersection_on_plane_3(const Plane_3& plane, - const Xy_monotone_surface_3& triangle, - const Point_3& point) const + std::optional + intersection_on_plane_3(const Plane_3& plane, + const Xy_monotone_surface_3& triangle, + const Point_3& point) const { Kernel k; CGAL_precondition( triangle.is_xy_monotone() ); @@ -1177,14 +1169,15 @@ public: else has_on = k.has_on_3_object()(static_cast(triangle), point); if (has_on) - return make_object(point); + return point; else - return Object(); + return std::nullopt; } // calculate intersection between 2 segments on the same vertical plane plane - Object intersection_of_segments(const Xy_monotone_surface_3& s1, - const Xy_monotone_surface_3& s2) const + std::optional< std::variant> + intersection_of_segments(const Xy_monotone_surface_3& s1, + const Xy_monotone_surface_3& s2) const { Kernel k; CGAL_precondition( s1.is_xy_monotone() && s1.is_segment()); @@ -1193,14 +1186,14 @@ public: // if the segments are not coplanar, they cannot intersect if (!k.coplanar_3_object()(s1.vertex(0), s1.vertex(1), s2.vertex(0), s2.vertex(1))) - return Object(); + return std::nullopt; const Plane_3& plane = s1.plane(); if (s2.plane() != plane && s2.plane() != plane.opposite()) // todo: this case is not needed in the algorithm, // so we don't implement it - return Object(); + return std::nullopt; CGAL_precondition( !k.is_degenerate_3_object()(plane) ); CGAL_precondition( s2.plane() == plane || @@ -1212,30 +1205,24 @@ public: v2 = plane.to_2d(s1.vertex(1)); Segment_2 seg1_t(v1, v2); - Point_2 u1 = plane.to_2d(s2.vertex(0)), + Point_2 u1 = plane.to_2d(s2.vertex(0)), u2 = plane.to_2d(s2.vertex(1)); - Segment_2 seg2_t(u1, u2); + Segment_2 seg2_t(u1, u2); - Object inter_obj = k.intersect_2_object()(seg1_t, seg2_t); - Assign_2 assign_2 = k.assign_2_object(); - if (inter_obj.is_empty()) - return inter_obj; + auto inter_obj = k.intersect_2_object()(seg1_t, seg2_t); + if (inter_obj == std::nullopt) + return std::nullopt; - Point_2 inter_point; - Segment_2 inter_segment; - - if (assign_2(inter_point, inter_obj)) - return make_object(plane.to_3d(inter_point)); + if (const Point_2* inter_point = std::get_if(&(*inter_obj))) + return plane.to_3d(*inter_point); else { - CGAL_assertion_code(bool b = ) - assign_2(inter_segment, inter_obj); - CGAL_assertion(b); + const Segment_2* inter_segment = std::get_if(&(*inter_obj)); + CGAL_assertion(inter_segment!=nullptr); - return make_object - (Segment_3 - (plane.to_3d(k.construct_vertex_2_object()(inter_segment, 0)), - plane.to_3d(k.construct_vertex_2_object()(inter_segment, 1)))); + return Segment_3 + (plane.to_3d(k.construct_vertex_2_object()(*inter_segment, 0)), + plane.to_3d(k.construct_vertex_2_object()(*inter_segment, 1))); } } @@ -1244,8 +1231,9 @@ public: // and a (non degenerate) plane in 3d // the result object can be empty, a point, a segment or the original // triangle - Object intersection(const Plane_3& pl, - const Xy_monotone_surface_3& tri) const + std::optional> + intersection(const Plane_3& pl, + const Xy_monotone_surface_3& tri) const { Kernel k; CGAL_precondition( tri.is_xy_monotone() ); @@ -1278,24 +1266,23 @@ public: points_on_plane[n_points_on_plane++] = i; } - CGAL_assertion(n_points_on_plane + - n_points_on_positive + n_points_on_negative == 3); + CGAL_assertion(n_points_on_plane + n_points_on_positive + n_points_on_negative == 3); // if all vertices of tri lie on the same size (positive/negative) of pl, // there is no intersection if (n_points_on_positive == 3 || n_points_on_negative == 3) - return Object(); + return std::nullopt; // if all vertices of tri lie on pl then we return tri if (n_points_on_plane == 3) - return make_object(tri); + return tri; // if 2 vertices lie on pl, then return the segment between them if (n_points_on_plane == 2) { int point_idx1 = points_on_plane[0], point_idx2 = points_on_plane[1]; - return make_object (Segment_3(tri.vertex(point_idx1), - tri.vertex(point_idx2))); + return Segment_3(tri.vertex(point_idx1), + tri.vertex(point_idx2)); } // if only 1 lie on pl, should check the segment opposite to it on tri @@ -1306,7 +1293,7 @@ public: // if the other 2 vertices are on the same side of pl, // then the answer is just this vertex if (n_points_on_negative == 2 || n_points_on_positive == 2) - return make_object(tri.vertex(point_on_plane_idx)); + return tri.vertex(point_on_plane_idx); // now it is known that one vertex is on pl, and the segment of tri // opposite to it should intersect pl @@ -1315,15 +1302,14 @@ public: Segment_3 tri_segment(tri.vertex(point_on_plane_idx+1), tri.vertex(point_on_plane_idx+2)); - Object inter_result = k.intersect_3_object()(pl, tri_segment); - Point_3 inter_point; - CGAL_assertion( k.assign_3_object()(inter_point, inter_result) ); - k.assign_3_object()(inter_point, inter_result); + auto inter_result = k.intersect_3_object()(pl, tri_segment); + const Point_3* inter_point = std::get_if(&(*inter_result)); + CGAL_assertion( inter_point != nullptr ); // create the resulting segment // (between tri[point_on_plane_idx] and inter_point) - return make_object(Segment_3(tri.vertex(point_on_plane_idx), - inter_point)); + return Segment_3(tri.vertex(point_on_plane_idx), + *inter_point); } @@ -1341,16 +1327,14 @@ public: { Segment_3 seg(tri.vertex(points_on_positive[pos_it]), tri.vertex(points_on_negative[neg_it])); - Object inter_result = k.intersect_3_object()(pl, seg); - Point_3 inter_point; - // the result of the intersection must be a point - CGAL_assertion( k.assign_3_object()(inter_point, inter_result) ); - k.assign_3_object()(inter_point, inter_result); - inter_points[n_inter_points++] = inter_point; + auto inter_result = k.intersect_3_object()(pl, seg); + const Point_3* inter_point = std::get_if(&(*inter_result)); + CGAL_assertion( inter_point != nullptr ); + inter_points[n_inter_points++] = *inter_point; } CGAL_assertion( n_inter_points == 2 ); - return make_object(Segment_3(inter_points[0], inter_points[1])); + return Segment_3(inter_points[0], inter_points[1]); } // compare the value of s1 in p1 to the value of s2 in p2 @@ -1394,13 +1378,12 @@ public: Line_3 vl = k.construct_line_3_object() (point, dir); const Plane_3& plane = s.plane(); - Object res = k.intersect_3_object()(plane, vl); - CGAL_assertion(!res.is_empty()); - Point_3 ip; - CGAL_assertion(k.assign_3_object()(ip, res)); - k.assign_3_object()(ip, res); + auto res = k.intersect_3_object()(plane, vl); + CGAL_assertion(res != std::nullopt); + const Point_3* ip = std::get_if(&(*res)); + CGAL_assertion(ip != nullptr); - return ip; + return *ip; } } @@ -1438,12 +1421,10 @@ public: Line_2 l(tvl_point1, tvl_point2); Segment_2 seg(t1, t2); - Object inter_obj = k.intersect_2_object()(seg, l); - Point_2 inter_point; - CGAL_assertion_code(bool is_inter_point =) - k.assign_2_object()(inter_point, inter_obj); - CGAL_assertion(is_inter_point); - return plane.to_3d(inter_point); + auto inter_obj = k.intersect_2_object()(seg, l); + const Point_2* inter_point = std::get_if(&(*inter_obj)); + CGAL_assertion(inter_point != nullptr); + return plane.to_3d(*inter_point); } Point_2 construct_middle_point(const Point_2& p1, const Point_2& p2) const @@ -1495,14 +1476,11 @@ public: typename Kernel::Line_2 vl = k.construct_line_2_object() (pt, dir); // Compute the intersetion between the vertical line and the given curve. - Object res = k.intersect_2_object()(seg, vl); - Point_2 ip; - bool ray_shoot_successful = k.assign_2_object()(ip, res); + auto res = k.intersect_2_object()(seg, vl); + const Point_2* ip = std::get_if(&(*res)); + CGAL_assertion (ip != nullptr); - if (! ray_shoot_successful) - CGAL_assertion (ray_shoot_successful); - - return (ip); + return *ip; } }; diff --git a/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h b/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h index e0caf43d5cd..8ca94fb2049 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h +++ b/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h @@ -16,65 +16,62 @@ #include -#include #include namespace CGAL { template -Object plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, - const typename K::Plane_3 &h2, - const typename K::Line_2 &l, - const K& k) +std::optional< std::variant > +plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, + const typename K::Plane_3 &h2, + const typename K::Line_2 &l, + const K& k) { typedef typename K::Line_3 Line_3; typedef typename K::Line_2 Line_2; typedef typename K::Plane_3 Plane_3; // intersect the two planes - Object h_obj = k.intersect_3_object()(h1, h2); - if(h_obj.is_empty()) - return Object(); // no intersection at all (parallel planes) + auto h_obj = k.intersect_3_object()(h1, h2); + if(h_obj == std::nullopt) + return std::nullopt; // no intersection at all (parallel planes) Plane_3 p; - if(assign(p, h_obj)) - return Object(); + if(std::get_if(&(*h_obj))==nullptr) + return std::nullopt; // if two planes are not parallel they must intersect at a 3D line - Line_3 l3; - CGAL_assertion_code(bool b =) - assign(l3, h_obj); - CGAL_assertion(b); + const Line_3* l3 = std::get_if(&(*h_obj)); + CGAL_assertion(l3!=nullptr); - const Line_2& proj_inter_line = project_xy(l3, k); + const Line_2& proj_inter_line = project_xy(*l3, k); - return line_under_linear_constraint(proj_inter_line, l, k); + return line_under_linear_constraint(proj_inter_line, l, k); //LR } template -Object half_plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, - const typename K::Line_2 &l1, - const typename K::Plane_3 &h2, - const typename K::Line_2 &l2, - const K& k) +std::optional< std::variant > +half_plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, + const typename K::Line_2 &l1, + const typename K::Plane_3 &h2, + const typename K::Line_2 &l2, + const K& k) { typedef typename K::Ray_2 Ray_2; typedef typename K::Line_2 Line_2; - Object obj = plane_half_plane_proj_intersection(h1, h2, l2, k); - if(obj.is_empty()) - return Object(); + auto obj = plane_half_plane_proj_intersection(h1, h2, l2, k); + if(obj == std::nullopt) + return std::nullopt; - Line_2 l; - if(assign(l, obj)) - return line_under_linear_constraint(l, l1, k); + if(const Line_2* line = std::get_if(&(*obj))) + return line_under_linear_constraint(*line, l1, k); - Ray_2 ray; - if(assign(ray, obj)) - return ray_under_linear_constraint(ray, l1, k); + if(const Ray_2* ray = std::get_if(&(*obj))) + return ray_under_linear_constraint(*ray, l1, k); CGAL_error(); // doesn't suppose to reach here - return Object(); + return std::nullopt; } template @@ -97,96 +94,91 @@ typename K::Line_2 project_xy(const typename K::Line_3& l, // l1 is a line, l2 is a linear constraint (determined by the direction // of the line). template -Object line_under_linear_constraint(const typename K::Line_2& l1, - const typename K::Line_2& l2, - const K& k) +std::optional< std::variant > +line_under_linear_constraint(const typename K::Line_2& l1, + const typename K::Line_2& l2, + const K& k) { typedef typename K::Ray_2 Ray_2; - typedef typename K::Line_2 Line_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Point_2 Point_2; - Object obj = k.intersect_2_object()(l1, l2); - Point_2 p; - if(assign(p, obj)) - { - const Vector_2& vec = k.construct_vector_2_object()(l1); - const Point_2& s = k.construct_translated_point_2_object()(p, vec); - const Ray_2& ray = k.construct_ray_2_object()(p, s); - Oriented_side side = k.oriented_side_2_object()(l2, s); - if(side == ON_NEGATIVE_SIDE) - { - return make_object(k.construct_opposite_ray_2_object()(ray)); - } + auto obj = k.intersect_2_object()(l1, l2); - CGAL_assertion(side == ON_POSITIVE_SIDE); //the two lines are not parallel - return make_object(ray); - } - - if(obj.is_empty()) // the two lines are parallel + if(obj == std::nullopt)// the two lines are parallel { const Point_2& s = k.construct_point_on_2_object()(l1, 0); Oriented_side side = k.oriented_side_2_object()(l2, s); if(side == ON_NEGATIVE_SIDE) - return Object(); + return std::nullopt; CGAL_assertion(side == ON_POSITIVE_SIDE); // the two lines are parallel - return make_object(l1); + return l1; + } + + if(const Point_2* p = std::get_if(&(*obj))) + { + const Vector_2& vec = k.construct_vector_2_object()(l1); + const Point_2& s = k.construct_translated_point_2_object()(*p, vec); + const Ray_2& ray = k.construct_ray_2_object()(*p, s); + Oriented_side side = k.oriented_side_2_object()(l2, s); + if(side == ON_NEGATIVE_SIDE) + { + return k.construct_opposite_ray_2_object()(ray); + } + + CGAL_assertion(side == ON_POSITIVE_SIDE); //the two lines are not parallel + return ray; } // the two lines overlap - CGAL_USE_TYPE(Line_2); - CGAL_assertion_code(Line_2 dummy;); - CGAL_assertion_code(bool b = assign(dummy, obj);); - CGAL_assertion(b); - - return make_object(l1); + return l1; } template -Object ray_under_linear_constraint(const typename K::Ray_2& ray, - const typename K::Line_2& l, - const K& k) +std::optional< std::variant > +ray_under_linear_constraint(const typename K::Ray_2& ray, + const typename K::Line_2& l, + const K& k) { typedef typename K::Vector_2 Vector_2; typedef typename K::Point_2 Point_2; const Point_2& s = k.construct_point_on_2_object()(ray, 0); Oriented_side side = k.oriented_side_2_object()(l, s); - Object obj = k.intersect_2_object()(ray, l); - if(obj.is_empty()) + auto obj = k.intersect_2_object()(ray, l); + if(obj == std::nullopt) { if(side == ON_NEGATIVE_SIDE) - return Object(); + return std::nullopt; CGAL_assertion(side == ON_POSITIVE_SIDE); - return make_object(ray); + return ray; } - Point_2 p; - if(assign(p, obj)) + if(const Point_2* p = std::get_if(&(*obj))) { if(side == ON_POSITIVE_SIDE) - return make_object(k.construct_segment_2_object()(s, p)); + return k.construct_segment_2_object()(s, *p); Vector_2 vec = k.construct_vector_2_object()(ray); if(side == ON_NEGATIVE_SIDE) - return make_object(k.construct_ray_2_object()(p, vec)); + return k.construct_ray_2_object()(*p, vec); CGAL_assertion(side == ON_ORIENTED_BOUNDARY); const Vector_2& vec_of_l = k.construct_vector_2_object()(l); Orientation orient = k.orientation_2_object()(vec_of_l, vec); if(orient == LEFT_TURN) - return make_object(ray); + return ray; CGAL_assertion(orient == RIGHT_TURN); - return make_object(s); + return s; } // the ray and the line overlap - return make_object(ray); + return ray; } diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h index 35b172c6233..a15422a19d2 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -307,9 +306,8 @@ protected: void deal_with_one_surface(Xy_monotone_surface_3& surf, Minimization_diagram_2& result) { - typedef std::list Boundary_list; typedef std::pair Boundary_xcurve; - typedef Boundary_list::iterator Boundary_iterator; + typedef std::list> Boundary_list; Boundary_list boundary; m_geom_traits-> @@ -325,17 +323,15 @@ protected: return; } - for (Boundary_iterator boundary_it = boundary.begin(); + for (auto boundary_it = boundary.begin(); boundary_it != boundary.end(); ++boundary_it) { - const Object& obj = *boundary_it; - Boundary_xcurve boundary_cv; - if (assign(boundary_cv, obj)) + if (const Boundary_xcurve* boundary_cv = std::get_if(&(*boundary_it))) { - Oriented_side side = boundary_cv.second; + Oriented_side side = boundary_cv->second; Halfedge_handle he = - insert_non_intersecting_curve(result, boundary_cv.first); + insert_non_intersecting_curve(result, boundary_cv->first); if (side == ON_ORIENTED_BOUNDARY) { @@ -408,10 +404,9 @@ protected: else { // the xy-surface is an isolated point - Point_2 p; - CGAL_assertion(assign(p, obj)); - assign(p, obj); - insert_point(result, p); + const Point_2* p = std::get_if(&(*boundary_it)); + CGAL_assertion(p!=nullptr); + insert_point(result, *p); } } diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h index 0376a0c1119..e5184ba9a2a 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h @@ -131,7 +131,8 @@ protected: Vertices_to_edges_map; typedef std::pair Intersection_curve; - typedef std::list Intersections_list; + typedef std::list> Intersections_list; // this is used in the resolve edge process typedef Triple Point_2_with_info; @@ -199,7 +200,8 @@ public: // find the projected intersections of the surfaces. if none - we have // a simple case: // need only resolve non-intersecting and return - std::list inter_objs; + std::list> inter_objs; + get_projected_intersections(surf1, surf2, std::back_inserter(inter_objs)); if (inter_objs.size() == 0) @@ -243,11 +245,6 @@ public: map_copied_to_orig_faces[copied_face] = face; - // insert the projected intersections into the temporary minimization diagram - Point_2 point; - Intersection_curve curve; - Object cur_obj; - // we use our zone visitor, which only inserts into the arrangement the // points and curves which are inside the copied face // it updates the result arrangement at the same time (action after action @@ -287,12 +284,10 @@ public: this); Md_point_location pl(copied_face_arr); - std::list::iterator inter_objs_it = inter_objs.begin(); - for (; inter_objs_it != inter_objs.end(); ++inter_objs_it) + for (auto inter_objs_it = inter_objs.begin(); + inter_objs_it != inter_objs.end(); ++inter_objs_it) { - cur_obj = *inter_objs_it; - CGAL_assertion(!cur_obj.is_empty()); - if (assign(point, cur_obj)) + if (const Point_2* point = std::get_if(&(*inter_objs_it))) { // intersection can be a point when the surfaces only touch each other. // we are only interested in the points that are inside the face or @@ -302,12 +297,12 @@ public: // should use observer for split_edge // if not in a sub-face of "face", shouldn't insert it // the above information is available in zone_visitor - insert_point(copied_face_arr, point, pl, zone_visitor); + insert_point(copied_face_arr, *point, pl, zone_visitor); } - else if (assign(curve, cur_obj)) + else if (const Intersection_curve* curve = std::get_if(&(*inter_objs_it))) { - zone_visitor.set_current_intersection_type(curve.second); - insert(copied_face_arr, curve.first, pl, zone_visitor); + zone_visitor.set_current_intersection_type(curve->second); + insert(copied_face_arr, curve->first, pl, zone_visitor); CGAL_assertion(copied_face_arr.is_valid()); CGAL_assertion(result.is_valid()); } @@ -485,7 +480,7 @@ public: const Xy_monotone_surface_3& surf2 = get_aux_surface(edge, 1); // find the projected intersections - std::list inter_objs; + std::list> inter_objs; get_projected_intersections(surf1, surf2, std::back_inserter(inter_objs)); if (inter_objs.size() == 0) @@ -522,48 +517,38 @@ public: bool is_min_end_at_inf = false; bool is_max_end_at_inf = false; - Point_2 point; - Intersection_curve icurve; - Object cur_obj; - - std::list::iterator inter_objs_it = inter_objs.begin(); - for (; inter_objs_it != inter_objs.end(); ++inter_objs_it) + for (auto inter_objs_it = inter_objs.begin(); + inter_objs_it != inter_objs.end(); ++inter_objs_it) { - cur_obj = *inter_objs_it; - CGAL_assertion(!cur_obj.is_empty()); - if (assign(point, cur_obj)) + if (const Point_2* point = std::get_if(&(*inter_objs_it))) { // if the point is on the curve, should add it the split points // list, otherwise, it is irrelevant and should be ignored - if (is_point_on_curve(point, original_cv)) - split_points.push_back(Point_2_with_info(point, false, false)); + if (is_point_on_curve(*point, original_cv)) + split_points.push_back(Point_2_with_info(*point, false, false)); } - else if (assign(icurve, cur_obj)) + else if (const Intersection_curve* icurve = std::get_if(&(*inter_objs_it))) { - const X_monotone_curve_2& x_curve = icurve.first; + const X_monotone_curve_2& x_curve = icurve->first; // find the intersection points and overlapping segments with the // original curve and insert them to the list of split points // intersect the x-monotone curve with the edge's curve typedef std::pair Intersect_point_2; - std::list intersections_list; - const Intersect_point_2* ip; - const X_monotone_curve_2* icv; + std::list> intersections_list; m_traits->intersect_2_object()(x_curve, original_cv, std::back_inserter(intersections_list)); - std::list::iterator inter_it = intersections_list.begin(); - for (; inter_it != intersections_list.end(); ++inter_it) + for (auto inter_it = intersections_list.begin(); inter_it != intersections_list.end(); ++inter_it) { - ip = object_cast(&(*inter_it)); - if (ip != nullptr) + if (const Intersect_point_2* ip = std::get_if(&(*inter_it))) { split_points.push_back(Point_2_with_info(ip->first, false, false)); } else { - icv = object_cast(&(*inter_it)); + const X_monotone_curve_2* icv = std::get_if(&(*inter_it)); CGAL_assertion(icv != nullptr); // we will add the *icv end points to the split_points, unless @@ -791,15 +776,15 @@ protected: const Vertex_const_handle* vh; Vertex_handle vh_for_p; - CGAL::Object obj = pl.locate(p); + auto obj = pl.locate(p); visitor.init(&arr); - if ((fh = object_cast(&obj)) + if ((fh = std::get_if(&obj)) != nullptr) { vh_for_p = visitor.found_point_in_face(p, arr.non_const_handle(*fh)); } - else if ((hh = object_cast(&obj)) != nullptr) + else if ((hh = std::get_if(&obj))) { vh_for_p = visitor.found_point_on_edge(p , arr.non_const_handle(*hh)); } @@ -807,7 +792,7 @@ protected: { // In this case p lies on an existing vertex, so we just update this // vertex. - vh = object_cast(&obj); + vh = std::get_if(&obj); CGAL_assertion(vh != nullptr); vh_for_p = visitor.found_point_on_vertex(p, arr.non_const_handle(*vh)); } diff --git a/Envelope_3/test/Envelope_3/Envelope_test_3.h b/Envelope_3/test/Envelope_3/Envelope_test_3.h index 997c4aced68..80656676ca7 100644 --- a/Envelope_3/test/Envelope_3/Envelope_test_3.h +++ b/Envelope_3/test/Envelope_3/Envelope_test_3.h @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -116,49 +115,41 @@ public: Xy_monotone_surface_3 &cur_surface = surfaces[i]; // first insert all the projected curves of the boundary of the current surface // collect the curve in this list, and use sweepline at the end - std::list boundary_list; typedef std::pair Boundary_xcurve; + std::list> boundary_list; - typedef std::list::const_iterator Boundary_iterator; traits.construct_projected_boundary_2_object()(cur_surface, std::back_inserter(boundary_list)); - for(Boundary_iterator boundary_it = boundary_list.begin(); + for(auto boundary_it = boundary_list.begin(); boundary_it != boundary_list.end(); ++boundary_it) { - const Object& obj = *boundary_it; - Boundary_xcurve boundary_cv; - assert(assign(boundary_cv, obj)); - assign(boundary_cv, obj); - curves_col.push_back(boundary_cv.first); + const Boundary_xcurve* boundary_cv = std::get_if(&(*boundary_it)); + assert(boundary_cv!=nullptr); + curves_col.push_back(boundary_cv->first); } // second, intersect it with all surfaces before it - Object cur_obj; for(j=0; j inter_objs; + std::vector> inter_objs; traits.construct_projected_intersections_2_object()(cur_surface, prev_surface, std::back_inserter(inter_objs)); // we collect all intersections and use sweep to insert them - Point_2 point; - Intersection_curve curve; for(std::size_t k=0; k(&inter_objs[k])) { #ifdef CGAL_DEBUG_ENVELOPE_TEST_3 std::cout << "intersection between surfaces is a point: " << point << std::endl; #endif //insert_vertex(result, point, pl); - points_col.push_back(point); + points_col.push_back(*point); } - else if (CGAL::assign(curve, cur_obj)) + else if (const Intersection_curve* curve = std::get_if(&inter_objs[k])) { - curves_col.push_back(curve.first); + curves_col.push_back(curve->first); /*#ifdef CGAL_DEBUG_ENVELOPE_TEST_3 std::cout << "intersection between surfaces is a curve: " << curve.first << std::endl; #endif diff --git a/Envelope_3/test/Envelope_3/Envelope_triangles_test_3.h b/Envelope_3/test/Envelope_3/Envelope_triangles_test_3.h index 29577fefa43..194b9fb7a12 100644 --- a/Envelope_3/test/Envelope_3/Envelope_triangles_test_3.h +++ b/Envelope_3/test/Envelope_3/Envelope_triangles_test_3.h @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -130,48 +129,40 @@ public: #endif // collect the curve in this list, and use sweepline at the end - std::list boundary_list; typedef std::pair Boundary_xcurve; + std::list> boundary_list; traits.construct_projected_boundary_2_object() (cur_surface, std::back_inserter(boundary_list)); - std::list::const_iterator bit; - for (bit = boundary_list.begin(); bit != boundary_list.end(); ++bit) { - const Object& obj = *bit; - Boundary_xcurve boundary_cv; - assert(assign(boundary_cv, obj)); - assign(boundary_cv, obj); - curves_col.push_back(boundary_cv.first); + for (auto bit = boundary_list.begin(); bit != boundary_list.end(); ++bit) { + const Boundary_xcurve* boundary_cv = std::get_if(&(*bit)); + assert(boundary_cv!=nullptr); + curves_col.push_back(boundary_cv->first); } // second, intersect it with all surfaces before it - Object cur_obj; for (unsigned int j = 0; j < i; ++j) { Xy_monotone_surface_3& prev_surface = surfaces[j]; - std::vector inter_objs; + std::vector> inter_objs; traits.construct_projected_intersections_2_object() (cur_surface, prev_surface, std::back_inserter(inter_objs)); // we collect all intersections and use sweep to insert them - Point_2 point; - Intersection_curve curve; for(std::size_t k=0; k(&inter_objs[k])) { #ifdef CGAL_DEBUG_ENVELOPE_TRIANGLES_TEST_3 std::cout << "intersection between surfaces is a point: " << point << std::endl; #endif //insert_vertex(result, point, pl); - points_col.push_back(point); + points_col.push_back(*point); } - else if (CGAL::assign(curve, cur_obj)) { + else if (const Intersection_curve* curve = std::get_if(&inter_objs[k])) { #ifdef CGAL_DEBUG_ENVELOPE_TRIANGLES_TEST_3 std::cout << "intersection between surfaces is a curve: " << curve.first << std::endl; #endif - curves_col.push_back(curve.first); + curves_col.push_back(curve->first); //insert(result, curve.first, pl); } else @@ -262,20 +253,17 @@ public: // foreach face in the test envelope, compute a point inside the face, // locate it in the other envelope and compare the surfaces over the 2 faces Md_point_location pl(env); - Object pl_obj; - Face_const_handle pl_fh; - Face_iterator fi = test_env.faces_begin(); bool eq, result = true; for (; fi != test_env.faces_end(); ++fi) { Face_handle fh = fi; if (!fh->is_unbounded()) { Point_2 inside_test = compute_point_inside_face(test_env, fh); - pl_obj = pl.locate(inside_test); + auto pl_obj = pl.locate(inside_test); // faces of env must contain the faces of test - bool located_in_face = assign(pl_fh, pl_obj); - assert(located_in_face); - eq = fh->is_equal_data(pl_fh->begin_data(), pl_fh->end_data()); + const Face_const_handle* pl_fh = std::get_if(&pl_obj); + assert(pl_fh!=nullptr); + eq = fh->is_equal_data((*pl_fh)->begin_data(), (*pl_fh)->end_data()); assert(eq); result &= eq; } diff --git a/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h b/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h index e2909ff4dd0..b21d123ab68 100644 --- a/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h +++ b/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h @@ -15,14 +15,14 @@ #include #include -#include +#include namespace CGAL { // This class should go away. // It is now only used by the Filtered_kernel. // It allows to iterate over the coordinates of both a Point_2 and a Vector_2, -// using a boost::variant, as the iterator types are the same at the kernel level. +// using a std::variant, as the iterator types are the same at the kernel level. template class Cartesian_coordinate_iterator_2 @@ -31,7 +31,7 @@ class Cartesian_coordinate_iterator_2 protected: typedef typename K::Point_2 P; typedef typename K::Vector_2 V; - boost::variant var; + std::variant var; int index; typedef Cartesian_coordinate_iterator_2 Self; @@ -57,9 +57,9 @@ public: reference operator*() const { - if (const P* const* p = boost::get(&var)) + if (const P* const* p = std::get_if(&var)) return (*p)->cartesian(index); - const V* const* v = boost::get(&var); + const V* const* v = std::get_if(&var); CGAL_assertion(v != 0); return (*v)->cartesian(index); } diff --git a/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h b/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h index c5a16320dc0..2dfc7bcf27d 100644 --- a/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h +++ b/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h @@ -15,14 +15,14 @@ #include #include -#include +#include namespace CGAL { // This class should go away. // It is now only used by the Filtered_kernel. // It allows to iterate over the coordinates of both a Point_3 and a Vector_3, -// using a boost::variant, as the iterator types are the same at the kernel level. +// using a std::variant, as the iterator types are the same at the kernel level. template class Cartesian_coordinate_iterator_3 @@ -31,7 +31,7 @@ class Cartesian_coordinate_iterator_3 protected: typedef typename K::Point_3 P; typedef typename K::Vector_3 V; - boost::variant var; + std::variant var; int index; typedef Cartesian_coordinate_iterator_3 Self; @@ -57,9 +57,9 @@ public: reference operator*() const { - if (const P* const* p = boost::get(&var)) + if (const P* const* p = std::get_if(&var)) return (*p)->cartesian(index); - const V* const* v = boost::get(&var); + const V* const* v = std::get_if(&var); CGAL_assertion(v != 0); return (*v)->cartesian(index); } diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h b/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h index c0b2e2179ca..991fe8247b5 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace CGAL { @@ -31,7 +31,7 @@ class Filtered_predicate_with_state C2E c2e; C2A c2a; O1 o1; - mutable boost::optional oep; + mutable std::optional oep; AP ap; typedef typename AP::result_type Ares; diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 43d6a5ddc11..f8c7a62cdbc 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include #ifdef CGAL_LAZY_KERNEL_DEBUG # include #endif @@ -1196,7 +1196,7 @@ struct Lazy_construction_optional_for_polygonal_envelope typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename LK::E2A E2A; - typedef boost::optional result_type; + typedef std::optional result_type; CGAL_NO_UNIQUE_ADDRESS AC ac; CGAL_NO_UNIQUE_ADDRESS EC ec; @@ -1209,9 +1209,9 @@ struct Lazy_construction_optional_for_polygonal_envelope { Protect_FPU_rounding P; try { - boost::optional oap = ac(CGAL::approx(l1),CGAL::approx(l2),CGAL::approx(l3)); - if(oap == boost::none){ - return boost::none; + std::optional oap = ac(CGAL::approx(l1),CGAL::approx(l2),CGAL::approx(l3)); + if(oap == std::nullopt){ + return std::nullopt; } // Now we have to construct a rep for a lazy point with the three lazy planes. typedef Lazy_rep_optional_n LazyPointRep; @@ -1221,21 +1221,21 @@ struct Lazy_construction_optional_for_polygonal_envelope // rep = LazyPointRep(2,ap, ec, l1, l2, l3); rep.~LazyPointRep(); new (&rep) LazyPointRep(2, ap, ec, l1, l2, l3); typename LK::Point_3 lp(&rep); - return boost::make_optional(lp); + return std::make_optional(lp); } catch (Uncertain_conversion_exception&) {} } Protect_FPU_rounding P2(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - boost::optional oep = ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3)); - if(oep == boost::none){ - return boost::none; + std::optional oep = ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3)); + if(oep == std::nullopt){ + return std::nullopt; } typedef Lazy_rep_0 LazyPointRep; const typename EK::Point_3 ep = *oep; LazyPointRep *rep = new LazyPointRep(ep); typename LK::Point_3 lp(rep); - return boost::make_optional(lp); + return std::make_optional(lp); } // for Intersect_point_3 with Plane_3 Line_3 @@ -1246,9 +1246,9 @@ struct Lazy_construction_optional_for_polygonal_envelope { Protect_FPU_rounding P; try { - boost::optional oap = ac(CGAL::approx(l1),CGAL::approx(l2)); - if(oap == boost::none){ - return boost::none; + std::optional oap = ac(CGAL::approx(l1),CGAL::approx(l2)); + if(oap == std::nullopt){ + return std::nullopt; } // Now we have to construct a rep for a lazy point with the line and the plane. typedef Lazy_rep_optional_n LazyPointRep; @@ -1258,21 +1258,21 @@ struct Lazy_construction_optional_for_polygonal_envelope // rep = LazyPointRep(2, ap, ec, l1, l2); rep.~LazyPointRep(); new (&rep) LazyPointRep(2, ap, ec, l1, l2); typename LK::Point_3 lp(&rep); - return boost::make_optional(lp); + return std::make_optional(lp); } catch (Uncertain_conversion_exception&) {} } Protect_FPU_rounding P2(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - boost::optional oep = ec(CGAL::exact(l1), CGAL::exact(l2)); - if(oep == boost::none){ - return boost::none; + std::optional oep = ec(CGAL::exact(l1), CGAL::exact(l2)); + if(oep == std::nullopt){ + return std::nullopt; } typedef Lazy_rep_0 LazyPointRep; const typename EK::Point_3 ep = *oep; LazyPointRep *rep = new LazyPointRep(ep); typename LK::Point_3 lp(rep); - return boost::make_optional(lp); + return std::make_optional(lp); } }; @@ -1425,19 +1425,19 @@ struct Ith_for_intersection_with_variant { : i(i_) {} - template< BOOST_VARIANT_ENUM_PARAMS(typename U) > + template< typename ... U > const T2& - operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const + operator()(const std::optional< std::variant< U ... > >& o) const { - const std::vector* ptr = (boost::get >(&(*o))); + const std::vector* ptr = (std::get_if >(&(*o))); return (*ptr)[i]; } - template< BOOST_VARIANT_ENUM_PARAMS(typename U) > + template< typename ... U > const T2& - operator()(const boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) >& o) const + operator()(const std::variant< U ... >& o) const { - const std::vector* ptr = (boost::get >(&o)); + const std::vector* ptr = (std::get_if >(&o)); return (*ptr)[i]; } }; @@ -1856,26 +1856,26 @@ template struct Variant_cast { typedef T result_type; - template + template const T& - operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const { + operator()(const std::optional< std::variant< U ... > >& o) const { // can throw but should never because we always build it inside // a static visitor with the right type - return boost::get(*o); + return std::get(*o); } - template + template T& - operator()(boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const { + operator()(std::optional< std::variant< U ... > >& o) const { // can throw but should never because we always build it inside // a static visitor with the right type, if it throws bad_get - return boost::get(*o); + return std::get(*o); } }; template -struct Fill_lazy_variant_visitor_2 : boost::static_visitor<> { +struct Fill_lazy_variant_visitor_2 { Fill_lazy_variant_visitor_2(Result& r, Origin& o) : r(&r), o(&o) {} Result* r; Origin* o; @@ -1912,7 +1912,7 @@ struct Fill_lazy_variant_visitor_2 : boost::static_visitor<> { }; template -struct Fill_lazy_variant_visitor_0 : boost::static_visitor<> { +struct Fill_lazy_variant_visitor_0 { Fill_lazy_variant_visitor_0(Result& r) : r(&r) {} Result* r; @@ -1998,7 +1998,7 @@ struct Lazy_construction_variant { // the static visitor fills the result_type with the correct unwrapped type internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy > visitor(res, lazy); - boost::apply_visitor(visitor, *approx_v); + std::visit(visitor, *approx_v); return res; } catch (Uncertain_conversion_exception&) {} @@ -2014,7 +2014,7 @@ struct Lazy_construction_variant { } internal::Fill_lazy_variant_visitor_0 visitor(res); - boost::apply_visitor(visitor, *exact_v); + std::visit(visitor, *exact_v); return res; } @@ -2052,7 +2052,7 @@ struct Lazy_construction_variant { // the static visitor fills the result_type with the correct unwrapped type internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy > visitor(res, lazy); - boost::apply_visitor(visitor, *approx_v); + std::visit(visitor, *approx_v); return res; } catch (Uncertain_conversion_exception&) {} @@ -2068,7 +2068,7 @@ struct Lazy_construction_variant { } internal::Fill_lazy_variant_visitor_0< result_type, AK, LK, EK> visitor(res); - boost::apply_visitor(visitor, *exact_v); + std::visit(visitor, *exact_v); return res; } }; diff --git a/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index 702ded2525d..911a86debc3 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -177,7 +177,7 @@ private: // The case distinction goes as follows: // result_type == FT => NT // result_type == Object => Object - // result_type == boost::optional => OPTIONAL_ Only for Intersect_point_3_for_polyhedral_envelope which returns a handle for a singleton + // result_type == std::optional => OPTIONAL_ Only for Intersect_point_3_for_polyhedral_envelope which returns a handle for a singleton // result_type == Bbox_2 || result_type == Bbox_3 => BBOX // default => NONE // no result_type => NONE @@ -187,7 +187,7 @@ private: // specializations inside a non-namespace scope. // The default implementation does some default handling, // the special cases are filtered by partial specializations. - template + template struct Lazy_wrapper_traits : boost::mpl::eval_if< internal::Has_result_type, boost::mpl::eval_if< std::is_same< std::remove_cv_t< diff --git a/Filtered_kernel/test/Filtered_kernel/test_lazy_vector_objects.cpp b/Filtered_kernel/test/Filtered_kernel/test_lazy_vector_objects.cpp index 041f6022a0e..dd998fce87c 100644 --- a/Filtered_kernel/test/Filtered_kernel/test_lazy_vector_objects.cpp +++ b/Filtered_kernel/test/Filtered_kernel/test_lazy_vector_objects.cpp @@ -42,7 +42,7 @@ int main() } V = nullptr; - if( !(V = boost::get >(&(*o_variant))) ){ + if( !(V = std::get_if >(&(*o_variant))) ){ std::cerr << "ERROR, something other than vector< point_2 >" << std::endl; return EXIT_FAILURE; } @@ -82,7 +82,7 @@ int main() } V = nullptr; - if( !(V = boost::get > (&(*o_variant))) ){ + if( !(V = std::get_if > (&(*o_variant))) ){ std::cerr << "ERROR" << std::endl; return EXIT_FAILURE; } diff --git a/Generalized_map/doc/Generalized_map/Generalized_map.txt b/Generalized_map/doc/Generalized_map/Generalized_map.txt index 9ea562fd56f..04c4b9c30a8 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; @@ -399,6 +399,8 @@ Example of \link GenericMap::insert_cell_1_in_cell_2 `insert_cell_1_in_cell_2`\e `gm.`\link GenericMap::insert_dangling_cell_1_in_cell_2 `insert_dangling_cell_1_in_cell_2(d0)`\endlink adds a 1-cell in the 2-cell containing dart `d0`, the 1-cell being attached by only one of its vertex to the 0-cell containing dart `d0`. This operation is possible if `d0` \f$ \in \f$ \link GenericMap::darts `gm.darts()`\endlink. +`gm.`\link GenericMap::insert_cell_1_between_two_cells_2 `insert_cell_1_between_two_cells_2(d1,d2)`\endlink adds a 1-cell between the two faces containing containing darts `d1` and `d2`, between the two 0-cells containing darts `d1` and `d2`. The 2-cells are merged in one. This operation is possible if d1\f$ \not \in \f$ \f$ \langle{}\f$\f$ \alpha_0, \alpha_1\f$\f$ \rangle{}\f$(d2) which can be tested thanks to `gm.`\link GenericMap::is_insertable_cell_1_between_two_cells_2 `is_insertable_cell_1_between_two_cells_2(d1,d2)`\endlink. + `gm.`\link GenericMap::insert_cell_2_in_cell_3 `insert_cell_2_in_cell_3(itbegin,itend)`\endlink adds a 2-cell in the 3-cell containing all the darts between `itbegin` and `itend`, along the path of 1-cells containing darts in [`itbegin`,`itend`). The 3-cell is split in two. This operation is possible if all the darts in [`itbegin`,`itend`) form a closed path inside a same 3-cell which can be tested thanks to `gm.`\link GenericMap::is_insertable_cell_2_in_cell_3 `is_insertable_cell_2_in_cell_3(itbegin,itend)`\endlink (see example on \cgalFigureRef{fig_gmap_insert_facet}). \cgalFigureBegin{fig_gmap_insert_facet,gmap_insert_facet.svg} @@ -478,6 +480,24 @@ The second line is the result after the removal operations. We retrieve the orig Example of high level operations. Left: Initial 3D generalized map after the creation of the generalized hexahedron. Middle: Generalized map obtained after the two 1-cell insertions. The two 2-cells were split in two. Right: Generalized map obtained after the 2-cell insertion. The 3-cell was split in two. \cgalFigureEnd +\subsection Generalized_mapInsertion Insert an edge between two different faces + +\anchor ssecexempleinsertiongmap + +This example shows the use of \link GenericMap::insert_cell_1_between_two_cells_2 `insert_cell_1_between_two_cells_2`\endlink operation. First we create a combinatorial hexahedron and a face with 4 edges. This face is inserted in the face of the hexahedron containing dart d1. We display the characteristics of the generalized map and check its validity. Then we count and display the number of 2-free darts. + +\cgalExample{Generalized_map/gmap_3_insert.cpp} + +The output is: +\verbatim +#Darts=60, #0-cells=12, #1-cells=17, #2-cells=6, #3-cells=1, #ccs=1, orientable=true, valid=1 +Number of 2-free darts: 8 +\endverbatim + +We can verify that there are 6 2-cells after the insertion since the squared face was inserted as a hole in one face of the hexahedron. We can also see that there are 8 2-free darts, which are the darts of the squared face. Since they bound an hole, there is no face filling the hole and thus 8 darts are 2-free. + +See also a similar example for Linear cell complex \ref Linear_cell_complexInsert "Insert an Edge Between Two Different Faces". + \subsection Generalized_mapA4DGeneralizedMap A 4D Generalized Map In this example, a 4-dimensional generalized map is used. Two tetrahedral cells are created and sewn by \f$ \alpha_4\f$. Then the numbers of cells of the generalized map are displayed, and its validity is checked. diff --git a/Generalized_map/doc/Generalized_map/examples.txt b/Generalized_map/doc/Generalized_map/examples.txt index c38131ac9fb..1ea597a3975 100644 --- a/Generalized_map/doc/Generalized_map/examples.txt +++ b/Generalized_map/doc/Generalized_map/examples.txt @@ -7,4 +7,5 @@ \example Generalized_map/gmap_3_with_colored_facets.cpp \example Generalized_map/gmap_3_dynamic_onmerge.cpp \example Generalized_map/gmap_3_index.cpp +\example Generalized_map/gmap_3_insert.cpp */ diff --git a/Generalized_map/examples/Generalized_map/gmap_3_insert.cpp b/Generalized_map/examples/Generalized_map/gmap_3_insert.cpp new file mode 100644 index 00000000000..56c4a5cbd2f --- /dev/null +++ b/Generalized_map/examples/Generalized_map/gmap_3_insert.cpp @@ -0,0 +1,34 @@ +#include +#include +#include +#include + +typedef CGAL::Generalized_map<3> GMap_3; +typedef GMap_3::Dart_descriptor Dart_descriptor; + +int main() +{ + GMap_3 gm; + + // Create one combinatorial hexahedron + Dart_descriptor d1 = gm.make_combinatorial_hexahedron(); + + // Create one square face + Dart_descriptor d2=gm.make_combinatorial_polygon(4); + + assert(gm.is_insertable_cell_1_between_two_cells_2(d1,d2)); + + // Insert the square face as a hole of the face of the hexahedron containing d1 + gm.insert_cell_1_between_two_cells_2(d1, d2); + + // Display the combinatorial map characteristics. + gm.display_characteristics(std::cout)<<", valid=" + <(dh)) ++nb; } + std::cout<<"Number of 2-free darts: "<::value>=0, "set_attribute but i-attributes are disabled"); - for ( typename Dart_of_cell_range::iterator it(*this, dh); - it.cont(); ++it) + for (typename Dart_of_cell_range::iterator it(*this, dh); + it.cont(); ++it) { this->template set_dart_attribute(it, ah); } + if(ah!=null_descriptor) + // To ensure that the dart of this attribute is dh + { this->template set_dart_of_attribute(ah, dh); } } /// @return a Attributes_range (range through all the @@ -3512,7 +3515,9 @@ namespace CGAL { bool is_insertable_cell_1_in_cell_2(Dart_const_descriptor adart1, Dart_const_descriptor adart2) { - if ( adart1==adart2 || adart1==this->template alpha<0>(adart2) ) + if (adart2==null_descriptor) return true; + if (adart1==adart2 || adart1==this->template alpha<0>(adart2) || + adart1==null_descriptor || this->template is_free<1>(adart2)) return false; for ( CGAL::GMap_dart_const_iterator_of_orbit it(*this,adart1); it.cont(); ++it ) @@ -3525,29 +3530,104 @@ namespace CGAL { /** Insert an edge in a 2-cell between two given darts. * @param adart1 a first dart of the facet (!=null_descriptor && !=null_dart_descriptor). * @param adart2 a second dart of the facet. If null_descriptor insert a dangling edge. + * @param update_attributes a boolean to update the enabled attributes * @return a dart of the new edge, and not incident to the * same vertex than adart1. */ Dart_descriptor insert_cell_1_in_cell_2(Dart_descriptor adart1, - Dart_descriptor adart2, - bool update_attributes=true, - typename Attribute_descriptor<0>::type - ah=null_descriptor) + Dart_descriptor adart2, + typename Attribute_descriptor<0>:: + type ah=null_descriptor, + bool update_attributes=true) { - if ( adart2!=null_descriptor) - { - CGAL_assertion(is_insertable_cell_1_in_cell_2(adart1, adart2)); - } + CGAL_assertion(is_insertable_cell_1_in_cell_2(adart1, adart2)); + return generic_insert_cell_1(adart1, adart2, false, update_attributes, ah); + } + /** Test if an edge can be inserted between two different 2-cells + * between two given darts. + * @param adart1 a first dart. + * @param adart2 a second dart. + * @return true iff an edge can be inserted between adart1 and adart2. + */ + bool is_insertable_cell_1_between_two_cells_2(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) const + { + if (adart1==adart2 || adart1==null_descriptor || adart2==null_descriptor) + { return false; } + for ( CGAL::GMap_dart_const_iterator_of_orbit it(*this,adart1); + it.cont(); ++it ) + { + if ( it==adart2 ) return false; + } + for(unsigned int d=3; d<=dimension; ++d) + { if(is_free(adart1, d)!=is_free(adart2, d)) { return false; }} + + return true; + } + + /** Insert an edge between two different 2-cells, between two given darts. + * @param adart1 a first dart of the first facet (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart of the second facet (!=null_descriptor && !=null_dart_descriptor). + * @param update_attributes a boolean to update the enabled attributes + * @return a dart of the new edge, and not incident to the + * same vertex than adart1. + */ + Dart_descriptor insert_cell_1_between_two_cells_2(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true) + { + CGAL_assertion(is_insertable_cell_1_between_two_cells_2(adart1, adart2)); + return generic_insert_cell_1(adart1, adart2, true, update_attributes); + } + + /** Insert an edge between two given darts. If the two darts belong to the same facet, call + * insert_cell_1_in_cell_2, otherwise call insert_cell_1_between_two_cells_2. + * @param adart1 a first dart (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart. + * @param update_attributes a boolean to update the enabled attributes + * @return a dart of the new edge, and not incident to the + * same vertex than adart1. + */ + Dart_descriptor insert_cell_1(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true, + typename Attribute_descriptor<0>::type + ah=null_descriptor) + { + CGAL_assertion(adart1!=null_descriptor); + if(is_insertable_cell_1_in_cell_2(adart1, adart2)) + { return insert_cell_1_in_cell_2(adart1, adart2, update_attributes, ah); } + return insert_cell_1_between_two_cells_2(adart1, adart2, update_attributes); + } + + /** Generic method to insert a 1-cell, either in a 2-cell (cf. insert_cell_1_in_cell_2) + * or between two different 2-cells (cf. insert_cell_1_between_two_cells_2). + * Indeed the code is the same, except for the group/degroup attribute. + * merge is true if adart1 and adart2 belongs to two different facets; in this case + * the two facets should be merged (they are now linked by the new edge); + * merge is false it adart1 and adart2 belongs to the same facet; in this case + * the facet is split in two. + * Internal method not supposed to be called by users. + */ + Dart_descriptor generic_insert_cell_1(Dart_descriptor adart1, + Dart_descriptor adart2, + bool merge, + bool update_attributes=true, + typename Attribute_descriptor<0>::type + ah=null_descriptor) + { /* CGAL::GMap_dart_iterator_basic_of_involution will contain all * alpha_i except alpha_0, alpha_1 and alpha_2, i.e. this is * */ + Dart_descriptor dart2_a1=null_descriptor; + if(adart2!=null_descriptor) { dart2_a1=alpha<1>(adart2); } + size_type m1=get_new_mark(); CGAL::GMap_dart_iterator_basic_of_involution it1(*this, adart1, m1); - size_type m2=get_new_mark(); - CGAL::GMap_dart_iterator_basic_of_involution it2(*this, adart2, m2); + CGAL::GMap_dart_iterator_basic_of_involution it2(*this, dart2_a1, m2); Dart_descriptor d1=null_descriptor; Dart_descriptor d2=null_descriptor; @@ -3565,13 +3645,13 @@ namespace CGAL { if (!isfree1) { - d3 = create_dart(); - d4 = create_dart(); - this->template basic_link_alpha<2>(d1, d3); - this->template basic_link_alpha<2>(d2, d4); + d3 = create_dart(); + d4 = create_dart(); + this->template basic_link_alpha<2>(d1, d3); + this->template basic_link_alpha<2>(d2, d4); } - for ( unsigned int dim=3; dim<=dimension; ++dim) + for (unsigned int dim=3; dim<=dimension; ++dim) { if ( !is_free(it1, dim) && is_marked(alpha(it1, dim), treated) ) @@ -3598,7 +3678,7 @@ namespace CGAL { } this->template link_alpha<1>(it1, d1); - if ( adart2!=null_descriptor ) + if (adart2!=null_descriptor) { CGAL_assertion (it2.cont()); this->template link_alpha<1>(it2, d2); @@ -3626,9 +3706,25 @@ namespace CGAL { if (are_attributes_automatically_managed() && update_attributes) { - if ( !this->template is_free<2>(d1) && d2!=null_descriptor ) - CGAL::internal::GMap_degroup_attribute_functor_run:: - run(*this, d1, this->template alpha<2>(d1)); + if(merge) + { // Here we group all enabled attributes starting from 2 to dimension + Helper::template Foreach_enabled_attributes + , 2>:: + run(*this, adart1, adart2); + // And we need to group also alpha_i(adart1) and alpha_i(adart2) for all + // enabled attributes starting from 3 dimension. Indeed when two i-cells + // are grouped for adart1 and adart2, this group also all alpha_j two by two + // except for alpha_i. + Helper::template Foreach_enabled_attributes + , 3>::run(*this, adart1, adart2); + + } + else // Here we degroup 2-attributes + { + if (!this->template is_free<2>(d1) && d2!=null_descriptor) + { CGAL::internal::GMap_degroup_attribute_functor_run:: + run(*this, d1, this->template alpha<2>(d1)); } + } } negate_mark(m1); @@ -3673,7 +3769,8 @@ namespace CGAL { typename Attribute_descriptor<0>:: type ah=null_descriptor, bool update_attributes=true ) - { return insert_cell_1_in_cell_2(adart1, null_descriptor, update_attributes, ah); } + { return insert_cell_1_in_cell_2(adart1, null_descriptor, ah, + update_attributes); } /** Test if a 2-cell can be inserted onto a given 3-cell along * a path of edges. diff --git a/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h b/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h index 4b3c17816e4..4d4a98cfdbe 100644 --- a/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h +++ b/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h @@ -132,7 +132,8 @@ struct GMap_group_attribute_functor_run { static void run(GMap& amap, typename GMap::Dart_descriptor adart1, - typename GMap::Dart_descriptor adart2) + typename GMap::Dart_descriptor adart2, + bool dart1_deleted=true) { static_assert( i<=GMap::dimension ); static_assert( i!=j ); @@ -145,7 +146,13 @@ struct GMap_group_attribute_functor_run a2=amap.template attribute(adart2); // If the two attributes are equal, nothing to do. - if ( a1 == a2 ) return; + if ( a1 == a2 ) + { + if(a1!=GMap::null_descriptor && dart1_deleted && + amap.template dart_of_attribute(a1)==adart1) + { amap.template set_dart_of_attribute(a1, adart2); } + return; + } typename GMap::Dart_descriptor toSet = amap.null_descriptor; @@ -162,15 +169,18 @@ struct GMap_group_attribute_functor_run } } amap.template set_attribute(toSet, a1); + if(dart1_deleted && toSet==adart1) + { amap.template set_dart_of_attribute(a1, adart2); } } }; // Specialization for void attributes. template struct GMap_group_attribute_functor_run { - static void run( GMap&, - typename GMap::Dart_descriptor, - typename GMap::Dart_descriptor ) + static void run(GMap&, + typename GMap::Dart_descriptor, + typename GMap::Dart_descriptor, + bool=true) {} }; // Specialization for i=j. Do nothing as j is the dimension to not consider. @@ -179,7 +189,8 @@ struct GMap_group_attribute_functor_run { static void run(GMap&, typename GMap::Dart_descriptor, - typename GMap::Dart_descriptor) + typename GMap::Dart_descriptor, + bool=true) {} }; // ************************************************************************ diff --git a/Generalized_map/include/CGAL/Generalized_map_operations.h b/Generalized_map/include/CGAL/Generalized_map_operations.h index 0ebec7a7c5c..4c65af865db 100644 --- a/Generalized_map/include/CGAL/Generalized_map_operations.h +++ b/Generalized_map/include/CGAL/Generalized_map_operations.h @@ -91,8 +91,9 @@ namespace CGAL it.cont(); ++it ) { to_erase.push_back(it); - if ( !amap.template is_free(it) && dg1==amap.null_descriptor ) - { dg1=it; dg2=amap.template alpha(it); } + if (dg1==amap.null_descriptor && !amap.template is_free(it) && + !amap.template is_free(amap.template alpha(it))) + { dg1=it; dg2=amap.template alpha(it); } amap.mark(it, mark); ++res; } @@ -102,7 +103,7 @@ namespace CGAL // We group the two (i+1)-cells incident if they exist. if ( dg1!=amap.null_descriptor ) CGAL::internal::GMap_group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be deleted } // During the operation, we store in modified_darts the darts modified @@ -136,6 +137,9 @@ namespace CGAL modified_darts.push_back(d2); amap.mark(d2, mark_modified_darts); } + + internal::Set_dart_of_attribute_if_marked:: + run(amap, d1, mark); } } } @@ -320,7 +324,7 @@ namespace CGAL // We group the two (i-1)-cells incident if they exist. if ( dg1!=amap.null_descriptor ) CGAL::internal::GMap_group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be deleted } // During the operation, we store in modified_darts the darts modified diff --git a/Generalized_map/test/Generalized_map/GMap_test_insertions.h b/Generalized_map/test/Generalized_map/GMap_test_insertions.h index b239bad84c1..1a3f67aabc3 100644 --- a/Generalized_map/test/Generalized_map/GMap_test_insertions.h +++ b/Generalized_map/test/Generalized_map/GMap_test_insertions.h @@ -149,7 +149,7 @@ bool test_edge_insertion(GMAP& gmap) trace_test_begin(); d1 = gmap.make_combinatorial_polygon(4); - gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1,0)); + gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1)); if ( !check_number_of_cells_3(gmap, 4, 5, 2, 1, 1) ) return false; gmap.clear(); @@ -158,7 +158,7 @@ bool test_edge_insertion(GMAP& gmap) d1 = gmap.make_combinatorial_polygon(4); d2 = gmap.make_combinatorial_polygon(4); gmap.template sew<3>(d1, d2); - gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1,0)); + gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1)); if ( !check_number_of_cells_3(gmap, 4, 5, 2, 2, 1) ) return false; gmap.clear(); @@ -167,18 +167,11 @@ bool test_edge_insertion(GMAP& gmap) d1 = gmap.make_combinatorial_polygon(4); d2 = gmap.make_combinatorial_polygon(4); gmap.template sew<2>(d1, d2); - gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1,0)); + gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1)); if ( !check_number_of_cells_3(gmap, 6, 8, 3, 1, 1) ) return false; gmap.clear(); - trace_test_begin(); - d1 = gmap.create_dart(); - gmap.insert_dangling_cell_1_in_cell_2(d1); - if ( !check_number_of_cells_3(gmap, 2, 2, 1, 1, 1) ) - return false; - gmap.clear(); - trace_test_begin(); d1 = gmap.make_edge(); gmap.template sew<1>(d1, gmap.alpha(d1, 0)); diff --git a/Generalized_map/test/Generalized_map/gmap_test_split_attribute.cpp b/Generalized_map/test/Generalized_map/gmap_test_split_attribute.cpp index 51e5618ce9c..6dd17ee0a84 100644 --- a/Generalized_map/test/Generalized_map/gmap_test_split_attribute.cpp +++ b/Generalized_map/test/Generalized_map/gmap_test_split_attribute.cpp @@ -54,7 +54,7 @@ bool test(const std::string& s) for(std::size_t i=0; i(dd)); + newd=m.insert_cell_1_in_cell_2(dd, m.template alpha<0,1>(dd)); if(m.template attribute<2>(newd)==GMap::null_descriptor) { std::cout<<"ERROR1: "<` 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/GraphicsView/demo/Circular_kernel_2/ArcsGraphicsItem.h b/GraphicsView/demo/Circular_kernel_2/ArcsGraphicsItem.h index b4de860626c..148293b705c 100644 --- a/GraphicsView/demo/Circular_kernel_2/ArcsGraphicsItem.h +++ b/GraphicsView/demo/Circular_kernel_2/ArcsGraphicsItem.h @@ -16,14 +16,18 @@ namespace Qt { template class ArcsGraphicsItem : public GraphicsItem { - std::vector& arcs, &intersections; typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; + typedef std::variant, Circular_arc_2, Line_arc_2 > Inter_variant; + typedef std::variant Arc_variant; + + std::vector& arcs; + std::vector& intersections; public: - ArcsGraphicsItem(std::vector& arcs_, std::vector& intersections_); + ArcsGraphicsItem(std::vector& arcs_, std::vector& intersections_); void modelChanged(); @@ -68,7 +72,7 @@ protected: template -ArcsGraphicsItem::ArcsGraphicsItem(std::vector& arcs_, std::vector& intersections_) +ArcsGraphicsItem::ArcsGraphicsItem(std::vector& arcs_, std::vector& intersections_) : arcs(arcs_), intersections(intersections_), painterostream(nullptr) { setIntersectionsPen(QPen(::Qt::red, 3.)); @@ -97,33 +101,29 @@ ArcsGraphicsItem::paint(QPainter *painter, painter->setPen(this->inputPen()); painterostream = PainterOstream(painter); - for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ + for(typename std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ Circular_arc_2 ca; Line_arc_2 la; - if(assign(ca, *it)){ - painterostream << ca; - } else if(assign(la, *it)){ - painterostream << la; + if(auto ca = std::get_if(&(*it))){ + painterostream << *ca; + } else if(auto la = std::get_if(&(*it))){ + painterostream << *la; } } painter->setPen(this->intersectionsPen()); painterostream = PainterOstream(painter); - for(std::vector::iterator it = intersections.begin(); it != intersections.end(); ++it){ - std::pair cap_ui; - Circular_arc_2 ca; - Line_arc_2 la; - - if(assign(cap_ui, *it)){ + for(typename std::vector::iterator it = intersections.begin(); it != intersections.end(); ++it){ + if(auto cap_ui = std::get_if>(&*it)){ QTransform matrix = painter->worldTransform(); painter->resetTransform(); - painter->drawPoint(matrix.map(convert(cap_ui.first))); + painter->drawPoint(matrix.map(convert(cap_ui->first))); painter->setWorldTransform(matrix); - }if(assign(ca, *it)){ - painterostream << ca; - } else if(assign(la, *it)){ - painterostream << la; + }if(auto ca = std::get_if(&(*it))){ + painterostream << *ca; + } else if(auto la = std::get_if(&(*it))){ + painterostream << *la; } } } @@ -135,22 +135,22 @@ ArcsGraphicsItem::updateBoundingBox() bounding_rect = QRectF(0,0,100, 100); Bbox_2 bb; bool initialized = false; - for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ + for(typename std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ Circular_arc_2 ca; Line_arc_2 la; - if(assign(ca, *it)){ + if(auto ca = std::get_if(&(*it))){ if(initialized){ - bb = bb + ca.supporting_circle().bbox(); + bb = bb + ca->supporting_circle().bbox(); } else { initialized = true; - bb = ca.supporting_circle().bbox(); + bb = ca->supporting_circle().bbox(); } - } else if(assign(la, *it)){ + } else if(auto la = std::get_if(&(*it))){ if(initialized){ - bb = bb + la.bbox(); + bb = bb + la->bbox(); } else { initialized = true; - bb = la.bbox(); + bb = la->bbox(); } } } diff --git a/GraphicsView/demo/Circular_kernel_2/Circular_kernel_2.cpp b/GraphicsView/demo/Circular_kernel_2/Circular_kernel_2.cpp index 4fa766fb87c..e593af52c14 100644 --- a/GraphicsView/demo/Circular_kernel_2/Circular_kernel_2.cpp +++ b/GraphicsView/demo/Circular_kernel_2/Circular_kernel_2.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include // Qt headers @@ -38,12 +37,15 @@ typedef CircularKernel::Segment_2 Segment_2; typedef CircularKernel::Line_arc_2 Line_arc_2; typedef CircularKernel::Circular_arc_2 Circular_arc_2; typedef CircularKernel::Circular_arc_point_2 Circular_arc_point_2; - +typedef std::variant Arc_variant; +typedef std::variant, + Circular_arc_2, Line_arc_2 > Inter_variant; typedef CGAL::Qt::ArcsGraphicsItem ArcsGraphicsItem; -typedef std::vector ArcContainer; +typedef std::vector ArcContainer; +typedef std::vector ArcIntersection; class MainWindow : public CGAL::Qt::DemosMainWindow, @@ -53,7 +55,7 @@ class MainWindow : private: ArcContainer arcs; - ArcContainer intersections; + ArcIntersection intersections; QGraphicsScene scene; ArcsGraphicsItem * agi; @@ -68,7 +70,7 @@ public Q_SLOTS: virtual void open(QString); - void processInput(CGAL::Object o); + void processInput(Arc_variant o); void on_actionInsertCircularArc_toggled(bool checked); @@ -107,8 +109,8 @@ MainWindow::MainWindow() // the signal/slot mechanism cai = new CGAL::Qt::GraphicsViewCircularArcInput(this, &scene); - QObject::connect(cai, SIGNAL(generate(CGAL::Object)), - this, SLOT(processInput(CGAL::Object))); + QObject::connect(cai, SIGNAL(generate(Arc_variant)), + this, SLOT(processInput(Arc_variant))); // Manual handling of actions // @@ -146,33 +148,33 @@ MainWindow::MainWindow() void -MainWindow::processInput(CGAL::Object o) +MainWindow::processInput(Arc_variant o) { - Circular_arc_2 ca; - Line_arc_2 la; + const Circular_arc_2* ca = nullptr; + const Line_arc_2* la = nullptr; bool is_circular = false; - if(assign(ca, o)){ + if( (ca = std::get_if(&o)) ){ is_circular = true; - } else if(! assign(la, o)){ + } else if(! (la = std::get_if(&o))){ std::cerr << "unknown object" << std::endl; return; } - for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ + for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ Circular_arc_2 vca; Line_arc_2 vla; - if(assign(vca, *it)){ + if(auto vca = std::get_if(&(*it))){ if(is_circular){ - CGAL::intersection(ca, vca, std::back_inserter(intersections)); + CGAL::intersection(*ca, *vca, std::back_inserter(intersections)); } else { - CGAL::intersection(la, vca, std::back_inserter(intersections)); + CGAL::intersection(*la, *vca, std::back_inserter(intersections)); } - } else if(assign(vla, *it)){ + } else if(auto vla = std::get_if(&(*it))){ if(is_circular){ - CGAL::intersection(ca, vla, std::back_inserter(intersections)); + CGAL::intersection(*ca, *vla, std::back_inserter(intersections)); } else { - CGAL::intersection(la, vla, std::back_inserter(intersections)); + CGAL::intersection(*la, *vla, std::back_inserter(intersections)); } } } @@ -241,32 +243,30 @@ MainWindow::open(QString fileName) { Line_arc_2 la(Segment_2(multi_points[0], multi_points[1])); - for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ - Circular_arc_2 vca; - Line_arc_2 vla; - if(assign(vca, *it)){ - CGAL::intersection(la, vca, std::back_inserter(intersections)); - } else if(assign(vla, *it)){ - CGAL::intersection(la, vla, std::back_inserter(intersections)); + for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ + if(auto vca = std::get_if(&(*it))){ + CGAL::intersection(la, *vca, std::back_inserter(intersections)); + } else if(auto vla = std::get_if(&(*it))){ + CGAL::intersection(la, *vla, std::back_inserter(intersections)); } } - arcs.push_back(make_object(la)); + arcs.push_back(la); } else if(multi_points.size() == 3) { Circular_arc_2 ca(multi_points[0], multi_points[1], multi_points[2]); - for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ + for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ Circular_arc_2 vca; Line_arc_2 vla; - if(assign(vca, *it)){ - CGAL::intersection(ca, vca, std::back_inserter(intersections)); - } else if(assign(vla, *it)){ - CGAL::intersection(ca, vla, std::back_inserter(intersections)); + if(auto vca = std::get_if(&(*it))){ + CGAL::intersection(ca, *vca, std::back_inserter(intersections)); + } else if(auto vla = std::get_if(&(*it))){ + CGAL::intersection(ca, *vla, std::back_inserter(intersections)); } } - arcs.push_back(make_object(ca)); + arcs.push_back(ca); } else if(multi_points.size()>0) { @@ -285,16 +285,14 @@ MainWindow::open(QString fileName) Point_2 q(x,y); Line_arc_2 la(Segment_2(p,q)); - for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ - Circular_arc_2 vca; - Line_arc_2 vla; - if(assign(vca, *it)){ - CGAL::intersection(la, vca, std::back_inserter(intersections)); - } else if(assign(vla, *it)){ - CGAL::intersection(la, vla, std::back_inserter(intersections)); + for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ + if(auto vca = std::get_if(&(*it))){ + CGAL::intersection(la, *vca, std::back_inserter(intersections)); + } else if(auto vla = std::get_if(&(*it))){ + CGAL::intersection(la, *vla, std::back_inserter(intersections)); } } - arcs.push_back(make_object(la)); + arcs.push_back(la); } else if(c == 'c'){ ifs >> x >> y; Point_2 p(x,y); @@ -303,16 +301,16 @@ MainWindow::open(QString fileName) ifs >> x >> y; Point_2 r(x,y); Circular_arc_2 ca(p,q,r); - for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ + for(std::vector::iterator it = arcs.begin(); it != arcs.end(); ++it){ Circular_arc_2 vca; Line_arc_2 vla; - if(assign(vca, *it)){ - CGAL::intersection(ca, vca, std::back_inserter(intersections)); - } else if(assign(vla, *it)){ - CGAL::intersection(ca, vla, std::back_inserter(intersections)); + if(auto vca = std::get_if(&(*it))){ + CGAL::intersection(ca, *vca, std::back_inserter(intersections)); + } else if(auto vla = std::get_if(&(*it))){ + CGAL::intersection(ca, *vla, std::back_inserter(intersections)); } } - arcs.push_back(make_object(ca)); + arcs.push_back(ca); } } } diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h index 49be2350b4d..e7d9b163a4c 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h @@ -270,7 +270,7 @@ public: // The sites have the same x/y coordinate. if (s_x == CGAL::ZERO || s_y == CGAL::ZERO) { - *o++ = CGAL::make_object(Intersection_curve(CGAL::bisector(s1, s2), 1)); + *o++ = Intersection_curve(CGAL::bisector(s1, s2), 1); return o; } @@ -300,7 +300,7 @@ public: } // We construct the diagonal line either way. - *o++ = CGAL::make_object(Intersection_curve(Segment_2(p1, p2), 1)); + *o++ = Intersection_curve(Segment_2(p1, p2), 1); // Now construct vertical rays. Two or four rays. If it is only two rays, // then the multiplicity of all the curves is 1. @@ -309,14 +309,14 @@ public: if (s_d != CGAL::POSITIVE) { // horizontal rectangle or square = vertical rays. - *o++ = CGAL::make_object(Intersection_curve(Ray_2(*top, Direction_2(0, 1)), mult)); - *o++ = CGAL::make_object(Intersection_curve(Ray_2(*bottom, Direction_2(0, -1)), mult)); + *o++ = Intersection_curve(Ray_2(*top, Direction_2(0, 1)), mult); + *o++ = Intersection_curve(Ray_2(*bottom, Direction_2(0, -1)), mult); } if (s_d != CGAL::NEGATIVE) { // vertical rectangle or square = horizontal rays. - *o++ = CGAL::make_object(Intersection_curve(Ray_2(*right, Direction_2(1, 0)), mult)); - *o++ = CGAL::make_object(Intersection_curve(Ray_2(*left, Direction_2(-1, 0)), mult)); + *o++ = Intersection_curve(Ray_2(*right, Direction_2(1, 0)), mult); + *o++ = Intersection_curve(Ray_2(*left, Direction_2(-1, 0)), mult); } return o; diff --git a/GraphicsView/demo/Polygon/Polygon_2.cpp b/GraphicsView/demo/Polygon/Polygon_2.cpp index 9463c2e979b..67c16d0b3dc 100644 --- a/GraphicsView/demo/Polygon/Polygon_2.cpp +++ b/GraphicsView/demo/Polygon/Polygon_2.cpp @@ -1,5 +1,4 @@ #include -#include // CGAL headers #include #include @@ -42,9 +41,9 @@ typedef CGAL::Polygon_with_holes_2 > Polygon_with_holes_2 typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; -typedef boost::shared_ptr PolygonPtr ; +typedef std::shared_ptr PolygonPtr ; typedef std::vector PolygonPtr_vector ; diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index 0950301c127..cd505d53540 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -194,7 +194,7 @@ This method is automatically called once, before the first call to paintGL(). Overload init() instead of this method to modify viewer specific OpenGL state. -If a 4.3 context could not be set, a ES 2.0 context will be used instead. +If a 4.3 context could not be set, an ES 2.0 context will be used instead. \see `isOpenGL_4_3()` */ CGAL_INLINE_FUNCTION 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/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/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstream.h b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstream.h index 73eea197640..e561bd30b69 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstream.h +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstream.h @@ -80,12 +80,12 @@ public: PainterOstream& operator<<(const Hyperbolic_segment_2& s) { - if(const Euclidean_segment_2* seg = boost::get(&s)) { + if(const Euclidean_segment_2* seg = std::get_if(&s)) { CGAL::Qt::PainterOstream::operator << (*seg); return *this; } - const Circular_arc_2& arc = boost::get(s); + const Circular_arc_2& arc = std::get(s); if(arc.squared_radius() > 100) { Euclidean_segment_2 seg(arc.source(), arc.target()); diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstreamCK.h b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstreamCK.h index 8f434a5a41f..f634789193c 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstreamCK.h +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstreamCK.h @@ -44,12 +44,12 @@ namespace Qt { PainterOstream& operator <<(const Hyperbolic_segment_2& s) { - if(const Line_arc* seg = boost::get(&s)) { + if(const Line_arc* seg = std::get_if(&s)) { operator << (*seg); return *this; } - const Circular_arc& arc = boost::get(s); + const Circular_arc& arc = std::get(s); if(arc.squared_radius() > 10) { diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h index 19e4c668351..4d2b45ca343 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h @@ -208,7 +208,7 @@ public: /// @{ /*! Inserts the point `p` in the triangulation. - If the point `p` coincides with a existing vertex, then the vertex is returned + If the point `p` coincides with an existing vertex, then the vertex is returned and the triangulation is not modified. The optional parameter `start` is used to initialize the location of `p`. */ diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index 8913899a271..3dcd277ab47 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -35,7 +35,7 @@ public: typedef typename K::Circular_arc_point_2 Hyperbolic_Voronoi_point_2; typedef typename K::Circular_arc_2 Circular_arc_2; typedef typename K::Line_arc_2 Line_arc_2; - typedef boost::variant Hyperbolic_segment_2; typedef typename K::Triangle_2 Hyperbolic_triangle_2; /// @} diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h index 8eab67ea083..c1131a1e1ef 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h @@ -35,7 +35,7 @@ public: typedef Hyperbolic_point_2 Hyperbolic_Voronoi_point_2; typedef unspecified_type Circular_arc_2; typedef typename K::Segment_2 Euclidean_segment_2; - typedef boost::variant< Circular_arc_2, + typedef std::variant< Circular_arc_2, Euclidean_segment_2 > Hyperbolic_segment_2; typedef typename K::Triangle_2 Hyperbolic_triangle_2; /// @} 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 538991692ba..d95bfe27fba 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h @@ -880,7 +880,7 @@ public: Face_handle locate(const Point& query, Locate_type& lt, int &li, Face_handle hint = Face_handle()) const { - // Perform an Euclidean location first and get close to the hyperbolic face containing the query point + // Perform a Euclidean location first and get close to the hyperbolic face containing the query point typename Base::Locate_type blt; Face_handle fh = Base::locate(query, blt, li, hint); @@ -901,7 +901,7 @@ public: CGAL_assertion(!is_infinite(fh)); - // This case corresponds to when the point is located on an Euclidean edge. + // This case corresponds to when the point is located on a Euclidean edge. if(lt == EDGE) { // Here because the call to `side_of_hyperbolic_triangle` might change `li` diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index da42c7429f9..ee95f6c0f85 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include @@ -69,9 +69,9 @@ namespace internal { Euclidean_line_2* l; Circle_2* c; - if(Circle_2* c_pq = boost::get(&bis_pq)) + if(Circle_2* c_pq = std::get_if(&bis_pq)) { - if(Circle_2* c_qr = boost::get(&bis_qr)) + if(Circle_2* c_qr = std::get_if(&bis_qr)) { typedef typename CK2_Intersection_traits::type Intersection_result; std::vector< Intersection_result > inters; @@ -90,14 +90,14 @@ namespace internal { } // here bis_qr is a line - l = boost::get(&bis_qr); + l = std::get_if(&bis_qr); c = c_pq; } else { // here bis_pq is a line, and bis_qr is necessarily a circle - l = boost::get(&bis_pq); - c = boost::get(&bis_qr); + l = std::get_if(&bis_pq); + c = std::get_if(&bis_qr); } typedef typename CK2_Intersection_traits::type Intersection_result; @@ -157,7 +157,7 @@ namespace internal { } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c = boost::get(&bis_pq); + Circle_2* c = std::get_if(&bis_pq); if(_gt.less_y_2_object()(po, c->center())) return Circular_arc_2(*c, l_inf, true, l_inf, false); @@ -200,7 +200,7 @@ namespace internal { Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c_pq = boost::get(&bis_pq); + Circle_2* c_pq = std::get_if(&bis_pq); if(_gt.compare_distance_2_object()(po, p, q) == POSITIVE) { @@ -251,7 +251,7 @@ namespace internal { } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c_pq = boost::get(&bis_pq); + Circle_2* c_pq = std::get_if(&bis_pq); Hyperbolic_point_2 approx_a(to_double(a.x()),to_double(a.y())); @@ -311,14 +311,14 @@ public: typedef typename R::Point_2 Hyperbolic_point_2; typedef typename R::Circle_2 Circle_2; typedef typename R::Line_2 Euclidean_line_2; - typedef boost::variant Euclidean_circle_or_line_2; + typedef std::variant Euclidean_circle_or_line_2; typedef typename R::Circular_arc_2 Circular_arc_2; typedef typename R::Line_arc_2 Line_arc_2; typedef typename R::Circular_arc_point_2 Circular_arc_point_2; typedef Circular_arc_point_2 Hyperbolic_Voronoi_point_2; typedef typename R::Segment_2 Euclidean_segment_2; // only used internally here - typedef boost::variant Hyperbolic_segment_2; + typedef std::variant Hyperbolic_segment_2; typedef typename R::Triangle_2 Hyperbolic_triangle_2; diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h index 801ee71d993..0c0829309b7 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include @@ -187,9 +187,9 @@ public: Hyperbolic_point_2 operator()(Hyperbolic_segment_2 s1, Hyperbolic_segment_2 s2) { - if(Circular_arc_2* c1 = boost::get(&s1)) + if(Circular_arc_2* c1 = std::get_if(&s1)) { - if(Circular_arc_2* c2 = boost::get(&s2)) + if(Circular_arc_2* c2 = std::get_if(&s2)) { std::pair res = operator()(c1->supporting_circle(), c2->supporting_circle()); Hyperbolic_point_2 p1 = res.first; @@ -202,7 +202,7 @@ public: } else { - Euclidean_segment_2* ell2 = boost::get(&s2); + Euclidean_segment_2* ell2 = std::get_if(&s2); std::pair res = operator()(c1->supporting_circle(), ell2->supporting_line()); Hyperbolic_point_2 p1 = res.first; @@ -216,8 +216,8 @@ public: } else { - Euclidean_segment_2* ell1 = boost::get(&s1); - if(Circular_arc_2* c2 = boost::get(&s2)) + Euclidean_segment_2* ell1 = std::get_if(&s1); + if(Circular_arc_2* c2 = std::get_if(&s2)) { std::pair res = operator()(ell1->supporting_line(), c2->supporting_circle()); @@ -231,7 +231,7 @@ public: } else { - Euclidean_segment_2* ell2 = boost::get(&s2); + Euclidean_segment_2* ell2 = std::get_if(&s2); Hyperbolic_point_2 p1 = operator()(ell1->supporting_line(), ell2->supporting_line()); CGAL_assertion(p1.x()*p1.x() + p1.y()*p1.y() < FT(1)); return p1; @@ -279,9 +279,9 @@ public: Euclidean_line_2* l; Circle_2* c; - if(Circle_2* c_pq = boost::get(&bis_pq)) + if(Circle_2* c_pq = std::get_if(&bis_pq)) { - if(Circle_2* c_qr = boost::get(&bis_qr)) + if(Circle_2* c_qr = std::get_if(&bis_qr)) { std::pair inters = ci(*c_pq, *c_qr); @@ -291,14 +291,14 @@ public: return inters.second; } - l = boost::get(&bis_qr); + l = std::get_if(&bis_qr); c = c_pq; } else { // here bis_pq is a line - l = boost::get(&bis_pq); - c = boost::get(&bis_qr); + l = std::get_if(&bis_pq); + c = std::get_if(&bis_qr); } std::pair inters = ci(*c, *l); @@ -348,7 +348,7 @@ public: } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c = boost::get(&bis_pq); + Circle_2* c = std::get_if(&bis_pq); std::pair inters = ci(*c, l_inf); if(_gt.orientation_2_object()(c->center(), inters.first, inters.second) == POSITIVE) @@ -388,7 +388,7 @@ public: } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c_pq = boost::get(&bis_pq); + Circle_2* c_pq = std::get_if(&bis_pq); if(_gt.compare_distance_2_object()(po, p, q) == POSITIVE) { // then p is inside the supporting circle @@ -430,7 +430,7 @@ public: } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c_pq = boost::get(&bis_pq); + Circle_2* c_pq = std::get_if(&bis_pq); std::pair inters = ci(*c_pq, l_inf); Hyperbolic_point_2 approx_pinf = inters.first; @@ -468,10 +468,10 @@ public: typedef Hyperbolic_point_2 Hyperbolic_Voronoi_point_2; typedef typename Kernel::Circle_2 Circle_2; typedef typename Kernel::Line_2 Euclidean_line_2; - typedef boost::variant Euclidean_circle_or_line_2; + typedef std::variant Euclidean_circle_or_line_2; typedef internal::HDT_2_Circular_arc_2 Circular_arc_2; typedef typename Kernel::Segment_2 Euclidean_segment_2; // only used internally here - typedef boost::variant Hyperbolic_segment_2; + typedef std::variant Hyperbolic_segment_2; typedef typename Kernel::Triangle_2 Hyperbolic_triangle_2; 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/Installation/CHANGES.md b/Installation/CHANGES.md index 388f336227b..47998400268 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -10,12 +10,36 @@ Release date: October 2023 - **Breaking change**: C++17 is now required - Support for Visual `C++` 14.0 (Visual studio 2015) is dropped. +- **Breaking change**: The usage of `boost::shared_ptr` has been replaced by `std::shared_ptr`. Packages affected are 2D Straight Line Skeleton and Shape Detection. +- **Breaking change**: The usage of `boost::optional` has been replaced by `std::optional`. Packages affected are 2D Straight Line Skeleton, 3D Fast Intersection and Distance Computation (AABB Tree), and the Kernel intersection. +- **Breaking change**: The usage of `boost::variant` has been replaced by `std::variant`. Packages affected are 2D Arrangements, and the Kernel intersection. + +#### 2D Arrangements + +- **Breaking change**: The type of the result of point location queries changed to + `std::variant`. The support for the old macro `CGAL_ARR_POINT_LOCATION_VERSION` + has been removed. + +#### Envelopes of Surfaces in 3D +- ** Breaking change**: Construct_projected_boundary_2 in `EnvelopeTraits_3` is now using `std::variant` instead of `Object` + +### [Combinatorial Maps](https://doc.cgal.org/6.0/Manual/packages.html#PkgCombinatorialMaps) and [Generalized Maps](https://doc.cgal.org/6.0/Manual/packages.html#PkgGeneralizedMaps) + +- Added the function `insert_cell_1_between_two_cells_2()` to the `GenericMap` concept, which enables users to insert an edge between two different faces in order to create faces with holes. + +### [3D Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgMesh3) + +- **Breaking change**: Removed the concept `TriangleAccessor`, the template parameter `TriangleAccessor`, as well + as the class `Triangle_accessor`. They were no longer used for several releases. + +- Removed the class templates `Gray_image_mesh_domain_3`, `Implicit_mesh_domain_3`, and `Labeled_image_mesh_domain_3` + which are deprecated since CGAL-4.13. [Release 5.6](https://github.com/CGAL/cgal/releases/tag/v5.6) ----------- -Release date: June 2023 +Release date: July 2023 ### General Changes @@ -33,7 +57,7 @@ Release date: June 2023 instead of `void`, that is used inside the class `Region_growing` for detecting if the input conditions for the new region are satisfied. This change affects only user-defined types of regions. - **Breaking change**: The constructors of all models used together with the region growing algorithm - now enable users to provide parameters through the [named parameters](https://doc.cgal.org/latest/BGL/group__bgl__namedparameters.html) mechanism. + now enable users to provide parameters through the [named parameters](https://doc.cgal.org/5.6/BGL/group__bgl__namedparameters.html) mechanism. - All fitting classes in the region growing framework are now using better versions of the region conditions, more precise and faster, including the correct normal orientations. - Added new models of the concept `RegionType` for getting linear regions in a set of 2D and 3D @@ -186,6 +210,13 @@ Release date: June 2023 to describe 3D simplicial meshes, and makes the data structure independent from the [tetrahedral mesh generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) package. +### [Tetrahedral Remeshing](https://doc.cgal.org/5.6/Manual/packages.html#PkgTetrahedralRemeshing) +- **Breaking change**: The template parameters of + [`CGAL::Tetrahedral_remeshing::Remeshing_vertex_base_3`](https://doc.cgal.org/5.6/Tetrahedral_remeshing/group__PkgTetrahedralRemeshingClasses.html#ga7ef4f8c0c1ed715c34389ea4ee851a92) + and + [`CGAL::Tetrahedral_remeshing::Remeshing_cell_base_3`](https://doc.cgal.org/5.6/Tetrahedral_remeshing/classCGAL_1_1Tetrahedral__remeshing_1_1Remeshing__cell__base__3.html) + have been modified. + ### [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) - Added two new named parameters to the named constructor diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 355bde0dd6d..1d51bbbdac5 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -15,7 +15,7 @@ # .. variable:: CGAL_DISABLE_GMP # # If set, the `GMP` library will not be used. If -# :variable:`WITH_LEDA` is not used either, a efficient exact +# :variable:`WITH_LEDA` is not used either, an efficient exact # number types are used by CGAL kernels for exact computation. # # .. variable:: WITH_LEDA diff --git a/Installation/cmake/modules/FindTBB.cmake b/Installation/cmake/modules/FindTBB.cmake index 4e808b39eee..23ec7180e34 100644 --- a/Installation/cmake/modules/FindTBB.cmake +++ b/Installation/cmake/modules/FindTBB.cmake @@ -84,7 +84,7 @@ function(tbb_extract_real_library library real_library) set(_elf_magic "7f454c46") file(READ ${library} _hex_data OFFSET 0 LIMIT 4 HEX) if(_hex_data STREQUAL _elf_magic) - #we have opened a elf binary so this is what + #we have opened an elf binary so this is what #we should link to set(${real_library} "${library}" PARENT_SCOPE) return() diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index c7062d61cae..c31b233091e 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -112,6 +112,7 @@ #include #include +#include //----------------------------------------------------------------------// // platform specific workaround flags (CGAL_CFG_...) diff --git a/Installation/include/CGAL/version_checker.h b/Installation/include/CGAL/version_checker.h new file mode 100644 index 00000000000..785f8be1712 --- /dev/null +++ b/Installation/include/CGAL/version_checker.h @@ -0,0 +1,53 @@ +// Copyright (c) 2023 GeometryFactory. +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : - + +#ifndef CGAL_VERSION_CHECKER_H +#define CGAL_VERSION_CHECKER_H + +#include + +// All files including this header are meant to work with a given version of CGAL +// When using forked headers, set the following macro to the version of CGAL +// you want to use. + +//// Set the 3 following macros to the version of CGAL you want to use +//#define CGAL_COMPATIBLE_VERSION_MAJOR 6 +//#define CGAL_COMPATIBLE_VERSION_MINOR 0 +//#define CGAL_COMPATIBLE_VERSION_PATCH 0 + +// Set the following macros to 1 to get a warning/an error +// when using a possibly incompatible version of CGAL +#define CGAL_VERSION_CHECKER_ERROR 0 +#define CGAL_VERSION_CHECKER_WARNING 0 + +#define CGAL_COMPATIBLE_VERSION_STR CGAL_STR(CGAL_COMPATIBLE_VERSION_MAJOR) "." \ + CGAL_STR(CGAL_COMPATIBLE_VERSION_MINOR) "." \ + CGAL_STR(CGAL_COMPATIBLE_VERSION_PATCH) + + +// Check that the version of CGAL used is the one expected +#if CGAL_COMPATIBLE_VERSION_MAJOR != CGAL_VERSION_MAJOR \ + || CGAL_COMPATIBLE_VERSION_MINOR != CGAL_VERSION_MINOR \ + || CGAL_COMPATIBLE_VERSION_PATCH != CGAL_VERSION_PATCH + + #if CGAL_VERSION_CHECKER_WARNING || CGAL_VERSION_CHECKER_ERROR + #pragma message("These headers are meant to be used with CGAL " CGAL_COMPATIBLE_VERSION_STR " only."\ + " You are using CGAL version: " CGAL_STR(CGAL_VERSION) ".") + + #ifdef CGAL_VERSION_CHECKER_ERROR + #error "Incompatible version of CGAL" + #endif + + #endif + +#endif + +#endif // CGAL_VERSION_CHECKER_H diff --git a/Interpolation/include/CGAL/sibson_gradient_fitting.h b/Interpolation/include/CGAL/sibson_gradient_fitting.h index 074ca037afb..f08600a4603 100644 --- a/Interpolation/include/CGAL/sibson_gradient_fitting.h +++ b/Interpolation/include/CGAL/sibson_gradient_fitting.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -229,7 +229,7 @@ sibson_gradient_fitting_nn_2(const Dt& dt, // of the value functor is 'DT::Point' or 'DT::Vertex_handle' std::enable_if_t< std::is_constructible< - std::function, + std::function, ValueFunctor >::value>* = nullptr) { @@ -255,7 +255,7 @@ sibson_gradient_fitting_nn_2(const Dt& dt, const Traits& traits, std::enable_if_t< std::is_constructible< - std::function, + std::function, ValueFunctor >::value>* = nullptr) { @@ -299,7 +299,7 @@ sibson_gradient_fitting_rn_2(const Rt& rt, // of the value functor is 'Rt::Point' (weighted point) or 'Rt::Vertex_handle' std::enable_if_t< std::is_constructible< - std::function, + std::function, ValueFunctor >::value>* = nullptr) { @@ -325,7 +325,7 @@ sibson_gradient_fitting_rn_2(const Rt& rt, const Traits& traits, std::enable_if_t< std::is_constructible< - std::function, + std::function, ValueFunctor >::value>* = nullptr) { diff --git a/Intersections_2/benchmark/Intersections_2/variant_any_object.cpp b/Intersections_2/benchmark/Intersections_2/variant_any_object.cpp index 11416d859b7..7fa07b4760a 100644 --- a/Intersections_2/benchmark/Intersections_2/variant_any_object.cpp +++ b/Intersections_2/benchmark/Intersections_2/variant_any_object.cpp @@ -10,9 +10,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -26,8 +26,8 @@ struct Intersection_traits; template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::variant variant_type; + typedef typename std::optional< variant_type > result_type; }; @@ -53,8 +53,8 @@ OutputIterator intersect_do_iterator(const typename K::Segment_2 &seg1, template -boost::optional< - boost::variant +std::optional< + std::variant > intersection_variant(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2, @@ -62,8 +62,8 @@ intersection_variant(const typename K::Segment_2 &seg1, { typedef CGAL::internal::Segment_2_Segment_2_pair is_t; - typedef boost::variant Variant; - typedef boost::optional OptVariant; + typedef std::variant Variant; + typedef std::optional OptVariant; is_t ispair(&seg1, &seg2); switch (ispair.intersection_type()) { @@ -78,7 +78,7 @@ intersection_variant(const typename K::Segment_2 &seg1, } template -boost::any intersection_any(const typename K::Segment_2 &seg1, +std::any intersection_any(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2, const K&) { @@ -88,11 +88,11 @@ boost::any intersection_any(const typename K::Segment_2 &seg1, switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: - return boost::any(); + return std::any(); case is_t::POINT: - return boost::any(ispair.intersection_point()); + return std::any(ispair.intersection_point()); case is_t::SEGMENT: - return boost::any(ispair.intersection_segment()); + return std::any(ispair.intersection_segment()); } } @@ -122,7 +122,7 @@ protected: std::vector* s; }; -struct Visitor : public boost::static_visitor<>, Vec_holder +struct Visitor { Visitor(std::vector* p, std::vector* s) : Vec_holder(p, s) { } @@ -141,7 +141,7 @@ struct Variant_f { void operator()(const Segment& s1, const Segment& s2) { result_type obj = intersection_variant(s1, s2, K()); if(obj) { - boost::apply_visitor(v, *obj); + std::visit(v, *obj); } } }; @@ -165,10 +165,10 @@ struct Any_f : Vec_holder { Vec_holder(p, s) { } void operator()(const Segment& s1, const Segment& s2) { - boost::any obj = intersection_any(s1, s2, K()); - if (const Point * point = boost::any_cast(&obj)) { + std::any obj = intersection_any(s1, s2, K()); + if (const Point * point = std::any_cast(&obj)) { p->push_back(*point); - } else if (const Segment * segment = boost::any_cast(&obj)) { + } else if (const Segment * segment = std::any_cast(&obj)) { s->push_back(*segment); } } @@ -224,7 +224,7 @@ std::tuple intersect_each_variant_overload(const Vector& segs) { std::function( [&ret](const Point& p) { (void)p; ++(std::get<0>(ret)); }))); - boost::apply_visitor(v, *obj); + std::visit(v, *obj); } else { ++(std::get<2>(ret)); } diff --git a/Intersections_2/include/CGAL/Intersection_traits.h b/Intersections_2/include/CGAL/Intersection_traits.h index 67dc7512581..09daf0479ac 100644 --- a/Intersections_2/include/CGAL/Intersection_traits.h +++ b/Intersections_2/include/CGAL/Intersection_traits.h @@ -18,24 +18,24 @@ #include #include -#include +#include #include #define CGAL_INTERSECTION_TRAITS_2(A, B, R1, R2) \ template \ struct Intersection_traits { \ - typedef typename boost::variant \ + typedef typename std::variant \ variant_type; \ - typedef typename boost::optional< variant_type > result_type; \ + typedef typename std::optional< variant_type > result_type; \ }; #define CGAL_INTERSECTION_TRAITS_3(A, B, R1, R2, R3) \ template \ struct Intersection_traits { \ - typedef typename boost::variant variant_type; \ - typedef typename boost::optional< variant_type > result_type; \ + typedef typename std::optional< variant_type > result_type; \ }; #define CGAL_INTERSECTION_FUNCTION(A, B, DIM) \ @@ -118,16 +118,16 @@ const T* intersect_get(const CGAL::Object& o) { return CGAL::object_cast(&o); } -template +template inline -const T* intersect_get(const boost::optional< boost::variant >& v) { - return boost::get(&*v); +const T* intersect_get(const std::optional< std::variant >& v) { + return std::get_if(&*v); } -template +template inline -const T* intersect_get(const boost::variant & v) { - return boost::get(&v); +const T* intersect_get(const std::variant & v) { + return std::get_if(&v); } template diff --git a/Intersections_2/include/CGAL/Intersection_traits_2.h b/Intersections_2/include/CGAL/Intersection_traits_2.h index 921405c27f9..bf43d9a079a 100644 --- a/Intersections_2/include/CGAL/Intersection_traits_2.h +++ b/Intersections_2/include/CGAL/Intersection_traits_2.h @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #include namespace CGAL { @@ -49,9 +49,9 @@ CGAL_INTERSECTION_TRAITS_2(Ray_2, Triangle_2, Point_2, Segment_2) template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_2, typename K::Segment_2, + std::variant< typename K::Point_2, typename K::Segment_2, typename K::Triangle_2, typename std::vector< typename K::Point_2 > > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; @@ -69,37 +69,37 @@ CGAL_INTERSECTION_TRAITS_2(Ray_2, Iso_rectangle_2, Point_2, Segment_2) // Variants of one for backwards compatibility template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; // Point_2 is special template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; template struct Intersection_traits { - typedef typename boost::variant > variant_type; - typedef typename boost::optional < variant_type > result_type; + typedef typename std::optional < variant_type > result_type; }; template @@ -118,14 +118,14 @@ struct Intersection_traits { template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; } // namespace CGAL diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h index 9b75f968c2e..2ebd27332ad 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h @@ -25,13 +25,13 @@ do_intersect(const CGAL::Bbox_2& c, return CGAL::do_overlap(c, bbox); } -typename boost::optional< typename boost::variant > +typename std::optional< typename std::variant > inline intersection(const CGAL::Bbox_2& a, const CGAL::Bbox_2& b) { - typedef typename boost::variant variant_type; - typedef typename boost::optional result_type; + typedef typename std::variant variant_type; + typedef typename std::optional result_type; if(!do_intersect(a, b)) return result_type(); diff --git a/Intersections_2/test/Intersections_2/test_intersections_2.cpp b/Intersections_2/test/Intersections_2/test_intersections_2.cpp index 5c15555404a..c86e9191539 100644 --- a/Intersections_2/test/Intersections_2/test_intersections_2.cpp +++ b/Intersections_2/test/Intersections_2/test_intersections_2.cpp @@ -490,7 +490,7 @@ struct Test std::set ds; auto test = [&ds](S s1, S s2) { - P i = boost::get

      (*CGAL::intersection(s1,s2)); + P i = std::get

      (*CGAL::intersection(s1,s2)); ds.insert(CGAL::to_double(i.x())); ds.insert(CGAL::to_double(i.y())); assert(ds.size()==2); }; @@ -924,9 +924,9 @@ int main() { CGAL::Set_ieee_double_precision pfr; - Test< CGAL::Simple_cartesian::Type > >().run(); + Test< CGAL::Simple_cartesian::Type > >().run(); Test< CGAL::Cartesian >().run(); - Test< CGAL::Homogeneous::Type > >().run(); + Test< CGAL::Homogeneous::Type > >().run(); Test< CGAL::Exact_predicates_inexact_constructions_kernel >().run(); Test< CGAL::Exact_predicates_exact_constructions_kernel >().run(); } diff --git a/Intersections_3/include/CGAL/Intersection_traits_3.h b/Intersections_3/include/CGAL/Intersection_traits_3.h index 85287e8c044..2d2b8ca64ff 100644 --- a/Intersections_3/include/CGAL/Intersection_traits_3.h +++ b/Intersections_3/include/CGAL/Intersection_traits_3.h @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include @@ -84,9 +84,9 @@ CGAL_INTERSECTION_TRAITS_3(Sphere_3, Sphere_3, Point_3, Circle_3, Sphere_3) template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, typename std::vector< typename K::Point_3 > > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; @@ -108,8 +108,8 @@ CGAL_INTERSECTION_TRAITS_2(Iso_cuboid_3, Ray_3, Point_3, Segment_3) template struct Intersection_traits { typedef typename - boost::variant< typename K::Iso_cuboid_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Iso_cuboid_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; @@ -118,8 +118,8 @@ struct Intersection_traits struct Intersection_traits { typedef typename - boost::variant< typename K::Segment_3, typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Segment_3, typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; template @@ -148,23 +148,23 @@ struct Intersection_traits : template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Bbox_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; @@ -172,8 +172,8 @@ struct Intersection_traits { template struct Intersection_traits { typedef typename - boost::variant< typename K::Iso_cuboid_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Iso_cuboid_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; template @@ -184,204 +184,204 @@ struct Intersection_traits template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Iso_cuboid_3 Plane_3, variant of 4 template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Iso_cuboid_3 Triangle_3, variant of 4 template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Bbox_3 Plane_3, variant of 4 template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Bbox_3 Triangle_3, variant of 4 template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Line_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Line_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Ray_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Ray_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Segment_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Segment_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Plane_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Plane_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Triangle_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Triangle_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Tetrahedron_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Tetrahedron_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Sphere_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Sphere_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; //Tetrahedron_3 Plane_3, variant of 4 @@ -389,9 +389,9 @@ template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 , typename K::Segment_3, + std::variant< typename K::Point_3 , typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; //Plane_3 Tetrahedron_3, variant of 4 @@ -399,9 +399,9 @@ template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 , typename K::Segment_3, + std::variant< typename K::Point_3 , typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; //Triangle_3 Tetrahedron_3, variant of 4 @@ -409,9 +409,9 @@ template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 , typename K::Segment_3, + std::variant< typename K::Point_3 , typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Tetrahedron_3 Triangle_3, variant of 4 @@ -419,9 +419,9 @@ template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 , typename K::Segment_3, + std::variant< typename K::Point_3 , typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h index bb244628c5a..c3303e93e80 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include #include @@ -39,13 +39,13 @@ do_intersect(const CGAL::Bbox_3& c, return CGAL::do_overlap(c, bbox); } -typename boost::optional< typename boost::variant< Bbox_3> > +typename std::optional< typename std::variant< Bbox_3> > inline intersection(const CGAL::Bbox_3& a, const CGAL::Bbox_3& b) { - typedef typename boost::variant variant_type; - typedef typename boost::optional result_type; + typedef typename std::variant variant_type; + typedef typename std::optional result_type; if(!do_intersect(a,b)) return result_type(); diff --git a/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h b/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h index ec3806b41f7..5689ce58935 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h @@ -27,7 +27,7 @@ #include #include -#include +#include namespace CGAL { @@ -36,7 +36,7 @@ CGAL_INTERSECTION_FUNCTION(Line_3, Plane_3, 3) template inline -boost::optional +std::optional intersection_point_for_polyhedral_envelope(const Plane_3& plane, const Line_3& line) { @@ -45,7 +45,7 @@ intersection_point_for_polyhedral_envelope(const Plane_3& plane, template inline -boost::optional +std::optional intersection_point_for_polyhedral_envelope(const Line_3& line, const Plane_3& plane) { diff --git a/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h b/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h index 3030089906c..9d7351039ff 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h @@ -52,7 +52,7 @@ intersection(const Plane_3& plane1, template inline -boost::optional +std::optional intersection_point_for_polyhedral_envelope(const Plane_3& p0, const Plane_3& p1, const Plane_3& p2) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h index a82d17dd759..1ec423af9c9 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include namespace CGAL { namespace Intersections { @@ -34,7 +34,7 @@ namespace internal { // But it must be a template function since the original kernel must be // taken into account. template -typename boost::optional< boost::variant > +typename std::optional< std::variant > intersection_bl(const Bbox_3& box, double lpx, double lpy, double lpz, double ldx, double ldy, double ldz, @@ -45,7 +45,7 @@ intersection_bl(const Bbox_3& box, typedef typename K::Vector_3 Vector_3; typedef typename K::Segment_3 Segment_3; - typedef typename boost::optional > result_type; + typedef typename std::optional > result_type; double seg_min = 0.0, seg_max = 1.0; // first on x value diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h index b052243ff0c..7349337fc84 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h @@ -180,7 +180,7 @@ intersection(const typename K::Iso_cuboid_3& cub, } if (all_in || all_out) - return boost::none; + return std::nullopt; if (start_id == -1) return { result_type(corners[solo_id]) }; diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h index ccdba585679..2c834588f6b 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h @@ -67,7 +67,7 @@ void clip_poly_halfspace( SP_type inter = k.intersect_3_object()(seg, pl); if(inter) { - Point* p_inter = boost::get(&*inter); + Point* p_inter = std::get_if(&*inter); if(p_inter && !(k.equal_3_object()(*p_inter, p1)) && !(k.equal_3_object()(*p_inter, p2))) @@ -90,7 +90,7 @@ void clip_poly_halfspace( SP_type inter = typename K::Intersect_3()(seg, pl); if(inter) { - Point* p_inter = boost::get(&*inter); + Point* p_inter = std::get_if(&*inter); if(p_inter && !(k.equal_3_object()(*p_inter, p1)) && !(k.equal_3_object()(*p_inter, p2))) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h index d14c119b56e..737205703e3 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h @@ -24,7 +24,7 @@ namespace Intersections { namespace internal { template -boost::optional +std::optional intersection_point(const typename K::Plane_3& plane, const typename K::Line_3& line, const K& /*k*/) @@ -41,9 +41,9 @@ intersection_point(const typename K::Plane_3& plane, RT den = plane.a()*line_dir.dx() + plane.b()*line_dir.dy() + plane.c()*line_dir.dz(); if(den == 0) - return boost::none; + return std::nullopt; - return boost::make_optional(Point_3(den*line_pt.hx()-num*line_dir.dx(), + return std::make_optional(Point_3(den*line_pt.hx()-num*line_dir.dx(), den*line_pt.hy()-num*line_dir.dy(), den*line_pt.hz()-num*line_dir.dz(), wmult_hw((K*)0, den, line_pt))); diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h index be6ca11f069..b0cc8f3ec22 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include namespace CGAL { namespace Intersections { @@ -27,7 +27,7 @@ namespace internal { // triple plane intersection template -boost::optional +std::optional intersection_point(const typename K::Plane_3& plane1, const typename K::Plane_3& plane2, const typename K::Plane_3& plane3, @@ -56,7 +56,7 @@ intersection_point(const typename K::Plane_3& plane1, const FT den = minor_0*m22 - minor_1*m12 + minor_2*m02; // determinant of M if(is_zero(den)){ - return boost::none; + return std::nullopt; } const FT num3 = minor_0*b2 - minor_1*b1 + minor_2*b0; // determinant of M with M[x:2] swapped with [b0,b1,b2] @@ -70,17 +70,17 @@ intersection_point(const typename K::Plane_3& plane1, const FT num1 = - minor_3*m21 + minor_4*m11 - minor_5*m01; // determinant of M with M[x:0] swapped with [b0,b1,b2] const FT num2 = minor_3*m20 - minor_4*m10 + minor_5*m00; // determinant of M with M[x:1] swapped with [b0,b1,b2] - return boost::make_optional(typename K::Point_3(num1/den, num2/den, num3/den)); + return std::make_optional(typename K::Point_3(num1/den, num2/den, num3/den)); } template -boost::optional > +std::optional > intersection(const typename K::Plane_3& plane1, const typename K::Plane_3& plane2, const typename K::Plane_3& plane3, const K& k) { - typedef typename boost::optional > result_type; diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h index 37e092956d7..0a1afefb0ea 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h @@ -164,7 +164,7 @@ intersection(const typename K::Tetrahedron_3& tet, } if (all_in || all_out) - return boost::none; + return std::nullopt; if (start_id == -1) return { result_type(corners[solo_id]) }; diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h index 35983013bba..5eeb8d85c8e 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h @@ -396,7 +396,7 @@ intersection_coplanar(const typename K::Triangle_3& t, template inline -typename boost::optional +typename std::optional t3r3_intersection_aux(const typename K::Triangle_3& t, const typename K::Ray_3& r, const K& k) @@ -410,7 +410,7 @@ t3r3_intersection_aux(const typename K::Triangle_3& t, return *p; } - return boost::optional(); + return std::optional(); } template @@ -455,7 +455,7 @@ intersection(const typename K::Triangle_3& t, if ( orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) { - boost::optional op = t3r3_intersection_aux(t,r,k); + std::optional op = t3r3_intersection_aux(t,r,k); if(op) return intersection_return(*op); else return intersection_return(); } @@ -476,7 +476,7 @@ intersection(const typename K::Triangle_3& t, if ( orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) { - boost::optional op = t3r3_intersection_aux(t,r,k); + std::optional op = t3r3_intersection_aux(t,r,k); if(op) return intersection_return(*op); else return intersection_return(); } @@ -502,7 +502,7 @@ intersection(const typename K::Triangle_3& t, && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) { - boost::optional op = t3r3_intersection_aux(t,r,k); + std::optional op = t3r3_intersection_aux(t,r,k); if(op) return intersection_return(*op); else return intersection_return(); } @@ -515,7 +515,7 @@ intersection(const typename K::Triangle_3& t, && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) { - boost::optional op = t3r3_intersection_aux(t,r,k); + std::optional op = t3r3_intersection_aux(t,r,k); if(op) return intersection_return(*op); else return intersection_return(); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h index 9bf2ed97ac7..c231137fd7d 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h @@ -76,8 +76,6 @@ intersection_collinear_segments(const typename K::Segment_3& s1, template struct L_p_visitor - : public boost::static_visitor< - typename Intersection_traits::result_type> { typedef typename Intersection_traits::result_type result_type; @@ -117,7 +115,7 @@ intersection(const typename K::Segment_3& s1, v = internal::intersection(s1.supporting_line(), s2.supporting_line(), k); if(v) - return apply_visitor(L_p_visitor(s1, s2) , *v); + return std::visit(L_p_visitor(s1, s2) , *v); return intersection_return(); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h index 49bc573489e..e3668392be0 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h @@ -148,7 +148,7 @@ intersection(const typename K::Tetrahedron_3& tet, supporting_planes.swap(current_sp); if (res.empty()) - return boost::none; + return std::nullopt; } switch(res.size()) 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 f4f4caff77f..269c86c3e60 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 @@ -539,7 +539,7 @@ intersection(const typename K::Triangle_3& t1, return intersection_return(); } - return boost::apply_visitor(Triangle_Line_visitor(), *inter1, *inter2); + return std::visit(Triangle_Line_visitor(), *inter1, *inter2); } return intersection_return(); diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h b/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h index 1dc059a20f1..4aba04c9e1a 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h @@ -68,7 +68,7 @@ struct Tetrahedron_lines_intersection_3_base if(do_intersect(o, triangle)) { tr_seg[i] = typename K::Intersect_3()(o, triangle); - if(boost::get(&*tr_seg[i]) != nullptr) + if(std::get_if(&*tr_seg[i]) != nullptr) { res_id = i; break; @@ -91,7 +91,7 @@ struct Tetrahedron_lines_intersection_3_base { if(tr_seg[i]) { - if(const typename K::Point_3* p = boost::get(&*tr_seg[i])) + if(const typename K::Point_3* p = std::get_if(&*tr_seg[i])) { if(res_points.empty()) { diff --git a/Intersections_3/test/Intersections_3/intersection_test_helper.h b/Intersections_3/test/Intersections_3/intersection_test_helper.h index a38e2bad55f..167e18661fc 100644 --- a/Intersections_3/test/Intersections_3/intersection_test_helper.h +++ b/Intersections_3/test/Intersections_3/intersection_test_helper.h @@ -309,10 +309,8 @@ public: template bool compare_to_other_variant(const T& t) const { - if(ov->type() == typeid(T)) + if(auto* r = std::get_if(&*ov)) { - auto* r = boost::get(&*ov); // ov is an optional - assert(r); return (t == *r); } @@ -363,7 +361,7 @@ public: assert(ires12 && ires34); Variant_visitor vis(ires12); - boost::apply_visitor(vis, *ires34); + std::visit(vis, *ires34); assert(vis.equal); } } diff --git a/Intersections_3/test/Intersections_3/issue_5428.cpp b/Intersections_3/test/Intersections_3/issue_5428.cpp index ba39e1bd109..ba905ed12c5 100644 --- a/Intersections_3/test/Intersections_3/issue_5428.cpp +++ b/Intersections_3/test/Intersections_3/issue_5428.cpp @@ -15,7 +15,7 @@ int main(int, char**) auto result = intersection(cub, pl); - const std::vector* res = boost::get >(&*result); + const std::vector* res = std::get_if >(&*result); for(const Point& p : *res) std::cout << p << std::endl; diff --git a/Intersections_3/test/Intersections_3/test_intersections_Iso_cuboid_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Iso_cuboid_3.cpp index 91e91913a48..e5ef0e49284 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Iso_cuboid_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Iso_cuboid_3.cpp @@ -208,7 +208,7 @@ public: // face auto res = CGAL::intersection(cub, Pl(p(1,1,1), p(1,2,1), p(1,2,2))); - const std::vector

      * poly = boost::get >(&*res); + const std::vector

      * poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 4); for(const P& pt : *poly) @@ -217,7 +217,7 @@ public: } res = CGAL::intersection(cub, Pl(p(1,1,1), p(1,2,1), p(2,2,2))); - poly = boost::get >(&*res); + poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 4); for(const P& pt : *poly) { @@ -227,7 +227,7 @@ public: // other edge Pl pln(p(1,1,1), p(1,2,1), P(1.5, 1, 2)); res = CGAL::intersection(cub, pln); - poly = boost::get >(&*res); + poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 4); for(const P& pt : *poly) { @@ -245,7 +245,7 @@ public: // random pln = Pl(0.265189, 0.902464, 0.33946, -2.47551); res = CGAL::intersection(cub, pln); - poly = boost::get >(&*res); + poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 5); for(const P& pt : *poly) { @@ -575,7 +575,7 @@ public: // face in a tr Tr tr(p(-3, -3, 1), p(3, -3, 1), P(1.5, 6, 1)); Res res = CGAL::intersection(cub, tr); - Pol* poly = boost::get >(&*res); + Pol* poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 4); if(this->has_exact_c) @@ -618,7 +618,7 @@ public: // tr through tr = Tr(p(2, 4, 2), P(1, 3.5, -0.5), p(1, -1, 1)); res = CGAL::intersection(cub, tr); - poly = boost::get >(&*res); + poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 4); if(this->has_exact_c) @@ -635,7 +635,7 @@ public: // cutting in half along diagonal (intersection included in triangle) tr = Tr(p(1, 1, 10), p(10, 10, 1), p(1, 1, 1)); res = CGAL::intersection(cub, tr); - poly = boost::get >(&*res); + poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 4); if(this->has_exact_c) @@ -647,7 +647,7 @@ public: // 6 points intersection tr = Tr(P(18.66, -5.4, -11.33), P(-2.41, -7.33, 19.75), P(-10.29, 20.15, -10.33)); res = CGAL::intersection(cub, tr); - poly = boost::get >(&*res); + poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 6); if(this->has_exact_c) @@ -659,7 +659,7 @@ public: // triangle clipping a cuboid corner tr = Tr(P(1.02, 1.33, 0.62), P(1.95, 2.54, 0.95), P(0.79, 2.36, 1.92)); res = CGAL::intersection(cub, tr); - Tr* tr_res = boost::get(&*res); + Tr* tr_res = std::get_if(&*res); assert(tr_res != nullptr); if(this->has_exact_c) { diff --git a/Intersections_3/test/Intersections_3/test_intersections_Plane_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Plane_3.cpp index fc32a571b4c..265435329e5 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Plane_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Plane_3.cpp @@ -286,7 +286,7 @@ public: // Don't have the right values to test further. auto res = CGAL::intersection(tet, pln); - const std::vector

      * poly = boost::get >(&*res); + const std::vector

      * poly = std::get_if >(&*res); assert(poly != nullptr); assert(poly->size() == 4); } diff --git a/Intersections_3/test/Intersections_3/test_intersections_Tetrahedron_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Tetrahedron_3.cpp index 6f45f6200e6..f6b40f5e778 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Tetrahedron_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Tetrahedron_3.cpp @@ -226,7 +226,7 @@ public: Tr tr(p(-2,2,0), p(2,2,0), P(0.25,0.25,0)); auto res = CGAL::intersection(tet, tr); - const Poly* poly = boost::get(&*res); + const Poly* poly = std::get_if(&*res); assert(poly != nullptr); assert(poly->size() == 4); for(const P& pt : *poly) { @@ -235,7 +235,7 @@ public: tr = Tr(P(0.45, 0.20, 0.1), P(0.1, 0.20, 0.5), P(-0.5, 0.25, -0.5)); res = CGAL::intersection(tet, tr); - const Poly* inter = boost::get(&*res); + const Poly* inter = std::get_if(&*res); assert(inter != nullptr); assert(inter->size() == 5); for(const P& pt : *inter) { @@ -287,22 +287,22 @@ public: auto res = CGAL::intersection(tet, tr); std::vector

      points; - if(const P* pt = boost::get

      (&*res)) + if(const P* pt = std::get_if

      (&*res)) { points.push_back(*pt); } - else if(const S* s = boost::get(&*res)) + else if(const S* s = std::get_if(&*res)) { points.push_back(s->source()); points.push_back(s->target()); } - else if(const Tr* itr = boost::get(&*res)) + else if(const Tr* itr = std::get_if(&*res)) { points.push_back(itr->operator[](0)); points.push_back(itr->operator[](1)); points.push_back(itr->operator[](2)); } - else if(const Poly* poly = boost::get(&*res)) + else if(const Poly* poly = std::get_if(&*res)) { points = *poly; @@ -322,8 +322,8 @@ public: Tr tri(P(0.191630, -0.331630, -0.370000), P(-0.124185, -0.385815, -0.185000), P(-0.0700000, -0.0700000, 0.00000)); Tet tet(P(0, -1, 0), P(-1, 0, 0), P(0, 0, 0), P(0, 0, -1)); auto res = intersection(tri, tet); - assert(res != boost::none); - const std::vector

      *vps = boost::get>(&*res); + assert(res != std::nullopt); + const std::vector

      *vps = std::get_if>(&*res); assert(vps!=nullptr); } 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/doc/Kernel_23/CGAL/Projection_traits_xy_3.h b/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h index ab57d5cfb67..fec8c6c80a1 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h @@ -81,7 +81,7 @@ typedef Line_3 Line_2; A construction object. Provides the operator : -`boost::optional< boost::variant > operator()(Segment_2 s1, Segment_2 s2);` +`std::optional< std::variant > operator()(Segment_2 s1, Segment_2 s2);` which returns a 3D object whose projection on the xy-plane is the intersection of the projections of `s1` and `s2`. If non empty, the returned object is either a segment or a point. diff --git a/Kernel_23/doc/Kernel_23/CGAL/Spherical_kernel_intersections.h b/Kernel_23/doc/Kernel_23/CGAL/Spherical_kernel_intersections.h index f235beb0e79..85554368984 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Spherical_kernel_intersections.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Spherical_kernel_intersections.h @@ -102,7 +102,7 @@ intersection(const SphericalType1 &obj1, const SphericalType2 &obj2, /*! Copies in the output iterator the intersection elements between the three objects. `intersections` iterates on -elements of type `boost::variant< Circle_3, Plane_3, Sphere_3, std::pair< Circular_arc_point_3, unsigned > >`, in lexicographic order +elements of type `std::variant< Circle_3, Plane_3, Sphere_3, std::pair< Circular_arc_point_3, unsigned > >`, in lexicographic order when this ordering is defined on the computed objects where `Type1`, `Type2` and `Type3` diff --git a/Kernel_23/doc/Kernel_23/CGAL/intersections.h b/Kernel_23/doc/Kernel_23/CGAL/intersections.h index 1b6c85341a3..160bb35d7eb 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/intersections.h +++ b/Kernel_23/doc/Kernel_23/CGAL/intersections.h @@ -103,7 +103,7 @@ The following tables give the possible values for `Type1` and `Type2`. The return type of intersecting two objects of the types `Type1` and `Type2` can be specified through the placeholder type specifier `auto`. It is equivalent to -`boost::optional< boost::variant< T... > >`, the last column in the table providing +`std::optional< std::variant< T... > >`, the last column in the table providing the template parameter pack.

      @@ -193,7 +193,7 @@ the template parameter pack.
      Additional overloads are provided for the type `Point_2` combined with any other type with the result type being -`boost::optional< boost::variant< Point_2 > >`. +`std::optional< std::variant< Point_2 > >`. Overloads are also provided for the type `Bbox_2`, for all intersections existing with the type `Iso_rectangle_2`. Note that the return type for `Bbox_2` - `Bbox_2` is `Bbox_2` and not `Iso_rectangle_2`. @@ -202,7 +202,7 @@ intersections existing with the type `Iso_rectangle_2`. Note that the return typ The return type of intersecting two objects of the types `Type1` and `Type2` can be specified through the placeholder type specifier `auto`. It is equivalent to -`boost::optional< boost::variant< T... > >`, the last column in the table providing +`std::optional< std::variant< T... > >`, the last column in the table providing the template parameter pack.
      @@ -351,7 +351,7 @@ the template parameter pack.
      Additional overloads are provided for the type `Point_3` combined with any other type with the result type being -`boost::optional< boost::variant< Point_3 > >`. Overloads are also provided for the type `Bbox_3`, for all +`std::optional< std::variant< Point_3 > >`. Overloads are also provided for the type `Bbox_3`, for all intersections existing with the type `Iso_cuboid_3`. Note that the return type for `Bbox_3` - `Bbox_3` is `Bbox_3` and not `Iso_cuboid_3`. @@ -363,18 +363,18 @@ The following examples demonstrate the most common use of In the first two examples we intersect a segment and a line. The result type can be specified through the placeholder type specifier `auto`, -but you must anyway know that the result type is a `boost::optional >`, +but you must anyway know that the result type is a `std::optional >`, in order to unpack the point or segment. -`boost::optional` comes in -as there might be no intersection. `boost::variant` comes in +`std::optional` comes in +as there might be no intersection. `std::variant` comes in as, if there is an intersection, it is either a point or a segment. -As explained in the boost manual pages for `boost::variant`, there are two ways to access the variants. The first examples uses `boost::get`. +As explained in the boost manual pages for `std::variant`, there are two ways to access the variants. The first examples uses `boost::get`. \cgalExample{Kernel_23/intersection_get.cpp} -The second example uses `boost::apply_visitor`. +The second example uses `std::visit`. \cgalExample{Kernel_23/intersection_visitor.cpp} diff --git a/Kernel_23/doc/Kernel_23/Kernel_23.txt b/Kernel_23/doc/Kernel_23/Kernel_23.txt index 51eeea986db..0919077d3ab 100644 --- a/Kernel_23/doc/Kernel_23/Kernel_23.txt +++ b/Kernel_23/doc/Kernel_23/Kernel_23.txt @@ -495,7 +495,7 @@ especially integer types and rationals. Some functions, for example \link intersection_linear_grp `intersection()`\endlink, can return different types of objects. To achieve this in a type-safe way \cgal uses -return values of type `boost::optional< boost::variant< T... > >` where `T...` is a +return values of type `std::optional< std::variant< T... > >` where `T...` is a list of all possible resulting geometric objects. The exact result type of an intersection can be specified through the placeholder type specifier `auto`. @@ -521,10 +521,10 @@ std::cin >> segment_1 >> segment_2; auto v = intersection(segment_1, segment_2); if (v) { /* not empty */ - if (const Point_2 *p = boost::get(&*v) ) { + if (const Point_2 *p = std::get_if(&*v) ) { /* do something with *p */ } else { - const Segment_2 *s = boost::get(&*v); + const Segment_2 *s = std::get_if(&*v); /* do something with *s */ } } else { diff --git a/Kernel_23/examples/Kernel_23/MyKernel.cpp b/Kernel_23/examples/Kernel_23/MyKernel.cpp index 13eec454b3d..834a22629b8 100644 --- a/Kernel_23/examples/Kernel_23/MyKernel.cpp +++ b/Kernel_23/examples/Kernel_23/MyKernel.cpp @@ -56,7 +56,7 @@ int main() K::Intersect_2 intersection; - const auto intersect = intersection(s1, s2); + /* const auto intersect = */intersection(s1, s2); K::Construct_cartesian_const_iterator_2 construct_it; K::Cartesian_const_iterator_2 cit = construct_it(a); diff --git a/Kernel_23/examples/Kernel_23/cartesian_converter.cpp b/Kernel_23/examples/Kernel_23/cartesian_converter.cpp index ebd4343d304..6d13c05bce1 100644 --- a/Kernel_23/examples/Kernel_23/cartesian_converter.cpp +++ b/Kernel_23/examples/Kernel_23/cartesian_converter.cpp @@ -30,7 +30,7 @@ int main(){ // As we are sure that there IS an intersection // and that the intersection IS a point // we do not have to check for this, or put it in a try/catch - const EK::Point_3& exact_pt = boost::get(*inter); + const EK::Point_3& exact_pt = std::get(*inter); EK_to_IK to_inexact; diff --git a/Kernel_23/examples/Kernel_23/intersection_get.cpp b/Kernel_23/examples/Kernel_23/intersection_get.cpp index ff2332a153c..b245edd4a56 100644 --- a/Kernel_23/examples/Kernel_23/intersection_get.cpp +++ b/Kernel_23/examples/Kernel_23/intersection_get.cpp @@ -14,10 +14,10 @@ int main() const auto result = intersection(seg, lin); if (result) { - if (const Segment_2* s = boost::get(&*result)) { + if (const Segment_2* s = std::get_if(&*result)) { std::cout << *s << std::endl; } else { - const Point_2* p = boost::get(&*result); + const Point_2* p = std::get_if(&*result); std::cout << *p << std::endl; } } diff --git a/Kernel_23/examples/Kernel_23/intersection_visitor.cpp b/Kernel_23/examples/Kernel_23/intersection_visitor.cpp index ffe5c09c7d8..61d0dbba7e2 100644 --- a/Kernel_23/examples/Kernel_23/intersection_visitor.cpp +++ b/Kernel_23/examples/Kernel_23/intersection_visitor.cpp @@ -28,7 +28,7 @@ int main() const auto result = intersection(seg, lin); if (result) { - boost::apply_visitor(Intersection_visitor(), *result); + std::visit(Intersection_visitor(), *result); } else { // no intersection } diff --git a/Kernel_23/include/CGAL/Kernel/Type_mapper.h b/Kernel_23/include/CGAL/Kernel/Type_mapper.h index 6b3ce37ed85..bdb2785889e 100644 --- a/Kernel_23/include/CGAL/Kernel/Type_mapper.h +++ b/Kernel_23/include/CGAL/Kernel/Type_mapper.h @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -51,8 +51,8 @@ struct Type_mapper_impl, K1, K2 > { }; template < typename T, typename K1, typename K2 > -struct Type_mapper_impl, K1, K2 > { - typedef boost::optional< typename Type_mapper_impl::type > type; +struct Type_mapper_impl, K1, K2 > { + typedef std::optional< typename Type_mapper_impl::type > type; }; @@ -63,9 +63,9 @@ struct Type_mapper_impl, K1, K2 > { #define CGAL_VARIANT_TYPEMAP(z, n, d) \ template< typename K1, typename K2, BOOST_PP_ENUM_PARAMS(n, class T) > \ -struct Type_mapper_impl, K1, K2> { \ +struct Type_mapper_impl, K1, K2> { \ BOOST_PP_REPEAT(n, CGAL_TYPEMAP_TYPEDEFS, T) \ - typedef boost::variant type; \ + typedef std::variant type; \ }; BOOST_PP_REPEAT_FROM_TO(1, 10, CGAL_VARIANT_TYPEMAP, _) @@ -73,16 +73,6 @@ BOOST_PP_REPEAT_FROM_TO(1, 10, CGAL_VARIANT_TYPEMAP, _) #undef CGAL_TYPEMAP_TYPEDEFS #undef CGAL_VARIANT_TYPEMAP -// CODE_TAG -//template -//struct Type_mapper_impl, K1, K2 > { -// typedef typename boost::make_variant_over< -// typename boost::mpl::transform< -// typename boost::variant::types, -// Type_mapper_impl >::type -// >::type type; -//}; - // Then we specialize for all kernel objects. // More details on why it is like that are here: https://github.com/CGAL/cgal/pull/4878#discussion_r459986501 #define CGAL_Kernel_obj(X) \ diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 6917a06edcf..8974b762dcb 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -1764,8 +1764,8 @@ namespace CommonKernelFunctors { Line l2 = construct_line(l21, l22); const auto res = typename K::Intersect_3()(l1,l2); - CGAL_assertion(res!=boost::none); - const Point* e_pt = boost::get(&(*res)); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); CGAL_assertion(e_pt!=nullptr); return *e_pt; } @@ -2172,8 +2172,8 @@ namespace CommonKernelFunctors { Line line = construct_line( l1, l2 ); const auto res = typename K::Intersect_3()(plane,line); - CGAL_assertion(res!=boost::none); - const Point* e_pt = boost::get(&(*res)); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); CGAL_assertion(e_pt!=nullptr); return *e_pt; } @@ -2185,8 +2185,8 @@ namespace CommonKernelFunctors { Line line = construct_line( l1, l2 ); const auto res = typename K::Intersect_3()(plane,line); - CGAL_assertion(res!=boost::none); - const Point* e_pt = boost::get(&(*res)); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); CGAL_assertion(e_pt!=nullptr); return *e_pt; } @@ -3518,7 +3518,7 @@ namespace CommonKernelFunctors { const Plane_3& plane = circ.supporting_plane(); const auto optional = K().intersect_3_object()(plane, Segment_3(a, b)); CGAL_kernel_assertion_msg(bool(optional) == true, "the segment does not intersect the supporting plane"); - const Point_3* p = boost::get(&*optional); + const Point_3* p = std::get_if(&*optional); CGAL_kernel_assertion_msg(p != 0, "the segment intersection with the plane is not a point"); return squared_distance(circ.center(), *p) < circ.squared_radius(); } @@ -3723,7 +3723,7 @@ namespace CommonKernelFunctors { operator()(const T1& t1, const T2& t2) const { return Intersections::internal::intersection(t1, t2, K() ); } - boost::optional > + std::optional > operator()(const Plane_3& pl1, const Plane_3& pl2, const Plane_3& pl3)const { return Intersections::internal::intersection(pl1, pl2, pl3, K() ); } }; @@ -3740,7 +3740,7 @@ namespace CommonKernelFunctors { typedef typename K::Point_3 Point_3; typedef typename K::Line_3 Line_3; typedef typename K::Plane_3 Plane_3; - typedef typename boost::optional result_type; + typedef typename std::optional result_type; result_type operator()(const Plane_3& pl1, const Plane_3& pl2, const Plane_3& pl3) const diff --git a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h index 9f9896ac7eb..dd4e24005a4 100644 --- a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h +++ b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h @@ -428,10 +428,10 @@ public: - boost::optional< boost::variant > + std::optional< std::variant > operator()(const Segment_3& s1, const Segment_3& s2) const { - typedef boost::variant variant_type; + typedef std::variant variant_type; Point_2 s1_source = project(s1.source()); Point_2 s1_target = project(s1.target()); @@ -447,10 +447,10 @@ public: auto o = intersection(s1_2,s2_2); if(! o){ - return boost::none; + return std::nullopt; } - if(const Segment_2* si = boost::get(&*o)){ + if(const Segment_2* si = std::get_if(&*o)){ FT src[3],tgt[3]; //the third coordinate is the midpoint between the points on s1 and s2 FT z1 = s1.source()[dim] + ( alpha(si->source(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); @@ -468,11 +468,11 @@ public: src[Projector::y_index] = si->source().y(); tgt[Projector::x_index] = si->target().x(); tgt[Projector::y_index] = si->target().y(); - return boost::make_optional(variant_type(Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) ) ); + return std::make_optional(variant_type(Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) ) ); } - const Point_2* pi = boost::get(&*o); + const Point_2* pi = std::get_if(&*o); FT coords[3]; //compute the third coordinate of the projected intersection point onto 3D segments FT z1 = s1.source()[dim] + ( alpha(*pi, s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); @@ -484,7 +484,7 @@ public: Point_3 res(coords[0],coords[1],coords[2]); CGAL_assertion(x(res)==pi->x() && y(res)==pi->y()); - return boost::make_optional(variant_type(res)); + return std::make_optional(variant_type(res)); } }; diff --git a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h index 42c3bc31859..089fe5ba6cb 100644 --- a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h +++ b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h @@ -182,12 +182,12 @@ public: CGAL_TIME_PROFILER("Construct Projected_intersect_3") } - boost::optional > + std::optional > operator()(const Segment& s1, const Segment& s2) { CGAL_PROFILER("Projected_intersect_3::operator()") CGAL_TIME_PROFILER("Projected_intersect_3::operator()") - typedef boost::variant variant_type; + typedef std::variant variant_type; const Vector_3 u1 = cross_product(s1.to_vector(), normal); if(u1 == NULL_VECTOR) return K().intersect_3_object()(s1.supporting_line(), s2); @@ -204,9 +204,9 @@ public: #ifdef CGAL_T2_PTB_3_DEBUG std::cerr << "planes_intersection is empty\n"; #endif - return boost::none; + return std::nullopt; } - if(const Line* line = boost::get(&*planes_intersection)) + if(const Line* line = std::get_if(&*planes_intersection)) { // check if the intersection line intersects both segments by // checking if a point on the intersection line is between @@ -222,7 +222,7 @@ public: #ifdef CGAL_T2_PTB_3_DEBUG std::cerr << "intersection not inside\n"; #endif - return boost::none; + return std::nullopt; } else { @@ -233,14 +233,14 @@ public: cross_product(s1.to_vector(), s2.to_vector()))); if(! inter){ - return boost::none; + return std::nullopt; } - if(const Point* point = boost::get(&*inter)){ - return boost::make_optional(variant_type(*point)); + if(const Point* point = std::get_if(&*inter)){ + return std::make_optional(variant_type(*point)); } } } - if(boost::get(&*planes_intersection)) + if(std::get_if(&*planes_intersection)) { #ifdef CGAL_T2_PTB_3_DEBUG std::cerr << "coplanar supporting lines\n"; @@ -255,50 +255,50 @@ public: bool src1_in_s2 = is_inside_segment(s2, s1.source()); bool tgt1_in_s2 = is_inside_segment(s2, s1.target()); - if (src1_in_s2 && tgt1_in_s2) return boost::make_optional(variant_type(s1)); - if (src2_in_s1 && tgt2_in_s1) return boost::make_optional(variant_type(s2)); + if (src1_in_s2 && tgt1_in_s2) return std::make_optional(variant_type(s1)); + if (src2_in_s1 && tgt2_in_s1) return std::make_optional(variant_type(s2)); if (src1_in_s2) { if (src2_in_s1) { if (cross_product(normal, Vector_3(s1.source(), s2.source())) != NULL_VECTOR) - return boost::make_optional(variant_type(Segment(s1.source(), s2.source()))); + return std::make_optional(variant_type(Segment(s1.source(), s2.source()))); else - return boost::make_optional(variant_type((s1.source()))); + return std::make_optional(variant_type((s1.source()))); } if (tgt2_in_s1) { if (cross_product(normal, Vector_3(s1.source(), s2.target())) != NULL_VECTOR) - return boost::make_optional(variant_type(Segment(s1.source(), s2.target()))); + return std::make_optional(variant_type(Segment(s1.source(), s2.target()))); else - return boost::make_optional(variant_type(s1.source())); + return std::make_optional(variant_type(s1.source())); } // should never get here with a Kernel with exact constructions - return boost::make_optional(variant_type(s1.source())); + return std::make_optional(variant_type(s1.source())); } if (tgt1_in_s2) { if (src2_in_s1) { if (cross_product(normal, Vector_3(s1.target(), s2.source())) != NULL_VECTOR) - return boost::make_optional(variant_type(Segment(s1.target(), s2.source()))); + return std::make_optional(variant_type(Segment(s1.target(), s2.source()))); else - return boost::make_optional(variant_type(s1.target())); + return std::make_optional(variant_type(s1.target())); } if (tgt2_in_s1) { if (cross_product(normal, Vector_3(s1.target(), s2.target())) != NULL_VECTOR) - return boost::make_optional(variant_type(Segment(s1.target(), s2.target()))); + return std::make_optional(variant_type(Segment(s1.target(), s2.target()))); else - return boost::make_optional(variant_type(s1.target())); + return std::make_optional(variant_type(s1.target())); } // should never get here with a Kernel with exact constructions - return boost::make_optional(variant_type(s1.target())); + return std::make_optional(variant_type(s1.target())); } - return boost::none; + return std::nullopt; } - return boost::none; + return std::nullopt; } }; // end class Projected_intersect_3 diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_all_linear_intersections.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_all_linear_intersections.h index 4d2b09ac3b2..2e9aab53fba 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_all_linear_intersections.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_all_linear_intersections.h @@ -1,9 +1,9 @@ #include #include -#include +#include template -bool is_intersection_empty(const boost::optional& t) +bool is_intersection_empty(const std::optional& t) { return bool(t); } diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_depth.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_depth.h index 313d448c871..b3e519f2979 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_depth.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_depth.h @@ -14,7 +14,7 @@ _test_depth(const R& ) Point_3 m = CGAL::midpoint(p,q); auto result = CGAL::intersection(s0, s1); - const Point_3* ip = boost::get(&*result); + const Point_3* ip = std::get_if(&*result); assert(CGAL::depth(p) == 0); assert(CGAL::depth(q) == 0); 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/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h b/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h index 1ac4f08cf2d..769b4a3d0a2 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h @@ -36,7 +36,7 @@ The following table gives the possible values for `Type1` and `Type2`. The return type of intersecting two objects of the types `Type1` and `Type2` can be specified through the placeholder type specifier `auto`. It is equivalent to -`boost::optional< boost::variant< T... > >`, the last column in the table providing +`std::optional< std::variant< T... > >`, the last column in the table providing the template parameter pack. @@ -147,7 +147,7 @@ void foo(Segment_d seg, Line_d lin) { // use auto auto result = intersection(seg, lin); - if(result) { boost::apply_visitor(Intersection_visitor(), *result); } + if(result) { std::visit(Intersection_visitor(), *result); } else { // no intersection } } @@ -155,8 +155,8 @@ void foo(Segment_d seg, Line_d lin) \sa `do_intersect` \sa `Kernel_d::Intersect_d` -\sa `boost::optional` -\sa `boost::variant` +\sa `std::optional` +\sa `std::variant` */ decltype(auto) diff --git a/Kernel_d/doc/Kernel_d/Kernel_d.txt b/Kernel_d/doc/Kernel_d/Kernel_d.txt index fcfbfe0afec..ab2154269a8 100644 --- a/Kernel_d/doc/Kernel_d/Kernel_d.txt +++ b/Kernel_d/doc/Kernel_d/Kernel_d.txt @@ -477,7 +477,7 @@ Intersections on kernel objects currently cover only those objects that are part of flats (`R::Segment_d`, `R::Ray_d`, `R::Line_d`, and `R::Hyperplane_d`). For any pair of objects \f$ o1\f$, \f$ o2\f$ of these types the operation `intersection(o1,o2)` -returns a `boost::optional< boost::variant< T... > >` +returns a `std::optional< std::variant< T... > >` where `T...` is a list of all possible resulting geometric objects. The return type of intersecting two objects of the types `Type1` and `Type2` can be @@ -501,10 +501,10 @@ std::cin >> s1 >> s2; auto v = intersection(s1, s2); if (v) { // not empty - if (const Point *p = boost::get(&*v) ) { + if (const Point *p = std::get_if(&*v) ) { // do something with *p } else { - const Segment *s = boost::get(&*v) ) { + const Segment *s = std::get_if(&*v) ) { // do something with *s } } else { diff --git a/Kernel_d/include/CGAL/Kernel_d/function_objects.h b/Kernel_d/include/CGAL/Kernel_d/function_objects.h index 221c3c7bbdb..0a20e339cf0 100644 --- a/Kernel_d/include/CGAL/Kernel_d/function_objects.h +++ b/Kernel_d/include/CGAL/Kernel_d/function_objects.h @@ -76,22 +76,22 @@ public: template struct result - { typedef boost::optional< boost::variant< Point_d, Line_d > > type; }; + { typedef std::optional< std::variant< Point_d, Line_d > > type; }; template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d > > type; }; template struct result : result { }; template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d > > type; }; template struct result - { typedef boost::optional< boost::variant< Point_d, Ray_d > > type; }; + { typedef std::optional< std::variant< Point_d, Ray_d > > type; }; template struct result : result @@ -99,7 +99,7 @@ public: template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d > > type; }; template struct result : result @@ -107,25 +107,25 @@ public: template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d, Ray_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d, Ray_d > > type; }; template struct result - { typedef boost::optional< boost::variant< Point_d, Line_d > > type; }; + { typedef std::optional< std::variant< Point_d, Line_d > > type; }; template struct result : result { }; template struct result - { typedef boost::optional< boost::variant< Point_d, Ray_d > > type; }; + { typedef std::optional< std::variant< Point_d, Ray_d > > type; }; template struct result : result { }; template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d > > type; }; template struct result : result { }; 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/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/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt index 6eae9275a75..0cb7753c302 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt @@ -76,7 +76,7 @@ The class `Linear_cell_complex_min_items` is a model of `LinearCellComplexIte \section Linear_cell_complexOperations Operations -Several operations defined in the combinatorial maps or generalized maps package can be used on a linear cell complex. This is the case for all the iteration operations that do not modify the model (see example in Section \ref ssec3Dlcc "A 3D Linear Cell Complex"). This is also the case for all the operations that do not create new 0-cells: `sew`, `unsew`, \link GenericMap::remove_cell `remove_cell`\endlink, \link GenericMap::insert_cell_1_in_cell_2 `insert_cell_1_in_cell_2`\endlink or \link GenericMap::insert_cell_2_in_cell_3 `insert_cell_2_in_cell_3`\endlink. Indeed, all these operations update non `void` attributes, and thus update vertex attributes of a linear cell complex. Note that some existing 0-attributes can be duplicated by the `unsew` method, but these 0-attributes are not new but copies of existing old 0-attributes. +Several operations defined in the combinatorial maps or generalized maps package can be used on a linear cell complex. This is the case for all the iteration operations that do not modify the model (see example in Section \ref ssec3Dlcc "A 3D Linear Cell Complex"). This is also the case for all the operations that do not create new 0-cells: `sew`, `unsew`, \link GenericMap::remove_cell `remove_cell`\endlink, \link GenericMap::insert_cell_1_in_cell_2 `insert_cell_1_in_cell_2`\endlink, \link GenericMap::insert_cell_1_between_two_cells_2 `insert_cell_1_between_two_cells_2`\endlink or \link GenericMap::insert_cell_2_in_cell_3 `insert_cell_2_in_cell_3`\endlink. Indeed, all these operations update non `void` attributes, and thus update vertex attributes of a linear cell complex. Note that some existing 0-attributes can be duplicated by the `unsew` method, but these 0-attributes are not new but copies of existing old 0-attributes. However, operations that create a new 0-cell can not be directly used since the new 0-cell would not be associated with a vertex attribute. Indeed, it is not possible for these operations to automatically decide which point to create. These operations are: \link GenericMap::insert_cell_0_in_cell_1 `insert_cell_0_in_cell_1`\endlink, \link GenericMap::insert_cell_0_in_cell_2 `insert_cell_0_in_cell_2`\endlink, \link GenericMap::insert_dangling_cell_1_in_cell_2 `insert_dangling_cell_1_in_cell_2`\endlink, plus all the creation operations. For these operations, new versions are proposed taking some points as additional parameters. Lastly, some new operations are defined, which use the geometry (see sections \ref ssecconstructionsop "Construction Operations" and \ref ssecmodifop "Modification Operations"). @@ -278,6 +278,15 @@ The following example shows the incremental builder. \cgalExample{Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp} +\subsection Linear_cell_complexInsert Insert an Edge Between Two Different Faces + +The following example shows the use of \link GenericMap::insert_cell_1_between_two_cells_2 `insert_cell_1_between_two_cells_2`\endlink operation that inserts an edge between two different faces, thus creating an hole in the first face. + +\cgalExample{Linear_cell_complex/linear_cell_complex_3_insert.cpp} + +\cgalFigureBegin{fig_lcc_insert,lcc_insert_example.png} +Result of the run of the linear_cell_complex_3_insert program. A window shows the 3D cube where one face has a hole. +\cgalFigureEnd \section Linear_cell_complexDesign Design and Implementation History diff --git a/Linear_cell_complex/doc/Linear_cell_complex/examples.txt b/Linear_cell_complex/doc/Linear_cell_complex/examples.txt index 4f178f666d1..def1f1a28fe 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/examples.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/examples.txt @@ -5,4 +5,5 @@ \example Linear_cell_complex/linear_cell_complex_3_attributes_management.cpp \example Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp \example Linear_cell_complex/draw_linear_cell_complex.cpp +\example Linear_cell_complex/linear_cell_complex_3_insert.cpp */ diff --git a/Linear_cell_complex/doc/Linear_cell_complex/fig/lcc_insert_example.png b/Linear_cell_complex/doc/Linear_cell_complex/fig/lcc_insert_example.png new file mode 100644 index 00000000000..959598345aa Binary files /dev/null and b/Linear_cell_complex/doc/Linear_cell_complex/fig/lcc_insert_example.png differ diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index d0ed1c3a028..871ba893bfd 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -17,11 +17,12 @@ create_single_source_cgal_program("gmap_linear_cell_complex_3.cpp") create_single_source_cgal_program("linear_cell_complex_3.cpp") create_single_source_cgal_program( "linear_cell_complex_3_attributes_management.cpp") +create_single_source_cgal_program("linear_cell_complex_3_incremental_builder.cpp") +create_single_source_cgal_program("linear_cell_complex_3_insert.cpp") create_single_source_cgal_program("linear_cell_complex_3_operations.cpp") create_single_source_cgal_program( "linear_cell_complex_3_with_colored_vertices.cpp") create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp") -create_single_source_cgal_program("linear_cell_complex_3_incremental_builder.cpp") create_single_source_cgal_program("linear_cell_complex_4.cpp") create_single_source_cgal_program("plane_graph_to_lcc_2.cpp") create_single_source_cgal_program("voronoi_2.cpp") @@ -31,4 +32,5 @@ create_single_source_cgal_program("draw_linear_cell_complex.cpp") if(CGAL_Qt5_FOUND) target_link_libraries(draw_linear_cell_complex PUBLIC CGAL::CGAL_Basic_viewer) target_link_libraries(linear_cell_complex_3_incremental_builder PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(linear_cell_complex_3_insert PUBLIC CGAL::CGAL_Basic_viewer) endif() diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_insert.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_insert.cpp new file mode 100644 index 00000000000..686ca8ce03a --- /dev/null +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_insert.cpp @@ -0,0 +1,35 @@ +#include +#include +#include + +typedef CGAL::Linear_cell_complex_for_combinatorial_map<3> LCC1; +typedef CGAL::Linear_cell_complex_for_generalized_map<3> LCC2; + +template +void test() +{ + LCC lcc; + using Point=typename LCC::Point; + + typename LCC::Dart_descriptor d1= + lcc.make_hexahedron(Point(0,0,0), Point(5,0,0), + Point(5,5,0), Point(0,5,0), + Point(0,5,4), Point(0,0,4), + Point(5,0,4), Point(5,5,4)); + typename LCC::Dart_descriptor d2= + lcc.make_quadrangle(Point(5,2,2), Point(5,1,2), + Point(5,1,1), Point(5,2,1)); + + lcc.insert_cell_1_between_two_cells_2 + (lcc.template opposite<2>(lcc.next(lcc.next(d1))), + lcc.next(lcc.next(d2))); + + CGAL::draw(lcc); +} + +int main() +{ + test(); + test(); + return EXIT_SUCCESS; +} diff --git a/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt index 9adb636537f..b5adbf664ec 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt @@ -14,6 +14,7 @@ create_single_source_cgal_program(Linear_cell_complex_2_test.cpp ${hfiles}) create_single_source_cgal_program(Linear_cell_complex_3_test.cpp ${hfiles}) create_single_source_cgal_program(Linear_cell_complex_4_test.cpp ${hfiles}) create_single_source_cgal_program(Linear_cell_complex_copy_test.cpp ${hfiles}) +create_single_source_cgal_program(LCC_3_incremental_builder_test.cpp ${hfiles}) # Same targets, defining USE_COMPACT_CONTAINER_WITH_INDEX to test index version add_executable(Linear_cell_complex_2_test_index Linear_cell_complex_2_test.cpp ${hfiles}) diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.cpp index 28195f35354..89f981f53d1 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.cpp +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.cpp @@ -32,7 +32,8 @@ struct Myattrib : public CGAL::Cell_attribute_with_point struct MonInfo { - MonInfo(int i=0) : mnb(i==0?rand():i), ptr(reinterpret_cast(this)) + MonInfo(long long int i=0) : mnb(i==0?rand():static_cast(i)), + ptr(reinterpret_cast(this)) {} bool operator==(const MonInfo& info) const diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.h b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.h index 55e93de1f2b..b76bbf1d7e6 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.h +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.h @@ -45,20 +45,103 @@ void trace_display_msg(const char* msg) #endif } -template -struct Alpha1 +template::type::Info> +struct SetInfoIfNonVoid { - static typename LCC::Dart_descriptor run(LCC&, typename LCC::Dart_descriptor dh) - { return dh; } + static void run(Map& map, + typename Map::template Attribute_descriptor::type attr, + long long int nb) + { + map.template info_of_attribute(attr)= + typename Map::template Attribute_type::type::Info(nb); + } }; -template -struct Alpha1 +template +struct SetInfoIfNonVoid { - static typename LCC::Dart_descriptor run(LCC& lcc, typename LCC::Dart_descriptor dh) - { return lcc.template alpha<1>(dh); } + static void run(Map&, typename Map::template Attribute_descriptor::type, + long long int) + {} }; +template::type> +struct CreateAttributes +{ + static void run(Map& map) + { + long long int nb=0; + for(typename Map::Dart_range::iterator it=map.darts().begin(), + itend=map.darts().end(); it!=itend; ++it) + { + if ( map.template attribute(it)==map.null_descriptor ) + { + map.template set_attribute(it, map.template create_attribute()); + SetInfoIfNonVoid::run(map, map.template attribute(it), ++nb); + } + } + } +}; + +template +struct CreateAttributes +{ + static void run(Map& amap) + { + long long int nb=0; + for ( typename Map::template Attribute_range<0>::type::iterator + it=amap.template attributes<0>().begin(), + itend=amap.template attributes<0>().end(); it!=itend; ++it ) + SetInfoIfNonVoid::run(amap, it, ++nb); + } +}; + +template +struct CreateAttributes +{ + static void run(Map&) + {} +}; + +template +struct CreateAttributes +{ + static void run(Map&) + {} +}; + +template +struct InitDartInfo +{ + static void run(Map& map) + { + long long int nb=0; + for(typename Map::Dart_range::iterator it=map.darts().begin(), + itend=map.darts().end(); it!=itend; ++it) + { + nb=CGAL::get_default_random().get_int(0,20000); + map.info(it)=Info(nb); + } + } +}; + +template +struct InitDartInfo +{ + static void run(Map&) + {} +}; + +template +void create_attributes_2(Map& map) +{ + CreateAttributes::run(map); + CreateAttributes::run(map); + CreateAttributes::run(map); + InitDartInfo::run(map); +} + // Test orientation specialized below only for CMap. For GMap return true. template struct Test_change_orientation_LCC_2 diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.cpp index c1d6eb4cdfe..6e04cbb07a3 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.cpp +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.cpp @@ -32,7 +32,8 @@ struct Myattrib : public CGAL::Cell_attribute_with_point struct MonInfo { - MonInfo(int i=0) : mnb(i==0?rand():i), ptr(reinterpret_cast(this)) + MonInfo(long long int i=0) : mnb(i==0?rand():static_cast(i)), + ptr(reinterpret_cast(this)) {} bool operator==(const MonInfo& info) const diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.h b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.h index 7235848f2e8..1f696a41811 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.h +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.h @@ -20,7 +20,6 @@ #include "Linear_cell_complex_2_test.h" #include #include - template bool check_number_of_cells_3(LCC& lcc, unsigned int nbv, unsigned int nbe, unsigned int nbf, unsigned int nbvol, @@ -63,6 +62,13 @@ bool check_number_of_cells_3(LCC& lcc, unsigned int nbv, unsigned int nbe, return true; } +template +void create_attributes_3(Map& map) +{ + create_attributes_2(map); + CreateAttributes::run(map); +} + template typename LCC::Dart_descriptor make_loop(LCC& lcc, const typename LCC::Point& p1) { @@ -96,6 +102,7 @@ bool test_LCC_3() Dart_descriptor dh1=lcc.make_segment(Point(0,0,0),Point(1,0,0), true); Dart_descriptor dh2=lcc.make_segment(Point(2,0,0),Point(2,1,0), true); Dart_descriptor dh3=lcc.make_segment(Point(2,2,0),Point(3,1,0), true); + create_attributes_3(lcc); if ( !check_number_of_cells_3(lcc, 6, 3, 6, 3, 3) ) return false; @@ -320,6 +327,7 @@ bool test_LCC_3() dh1 = lcc.make_triangle(Point(5,5,3),Point(7,5,3),Point(6,6,3)); dh2 = lcc.make_triangle(Point(5,4,3),Point(7,4,3),Point(6,3,3)); lcc.template sew<3>(dh1, dh2); + create_attributes_3(lcc); dh2 = lcc.previous(dh1); dh3 = lcc.next(dh1); lcc.template contract_cell<1>(dh1); @@ -341,6 +349,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_triangle(Point(5,5,3),Point(7,5,3),Point(6,6,3)); dh2 = lcc.make_triangle(Point(5,4,3),Point(7,4,3),Point(6,3,3)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); dh2 = lcc.next(dh2); @@ -373,6 +382,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_triangle(Point(5,5,3),Point(7,5,3),Point(6,6,3)); dh2 = lcc.make_triangle(Point(5,4,3),Point(7,4,3),Point(6,3,3)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); dh2 = lcc.next(dh2); @@ -405,6 +415,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_triangle(Point(5,5,3),Point(7,5,3),Point(6,6,3)); dh2 = lcc.make_triangle(Point(5,4,3),Point(7,4,3),Point(6,3,3)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); dh3 = lcc.make_triangle(Point(5,5,4),Point(7,5,4),Point(6,6,4)); @@ -445,6 +456,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_triangle(Point(5,5,3),Point(7,5,3),Point(6,6,3)); dh2 = lcc.make_triangle(Point(5,4,3),Point(7,4,3),Point(6,3,3)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); dh3 = lcc.make_triangle(Point(5,5,4),Point(7,5,4),Point(6,6,4)); @@ -483,6 +495,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_tetrahedron(Point(9, 9, 0),Point(9, 0, 9), Point(0, 9, 9),Point(0, 0, 0)); + create_attributes_3(lcc); typename LCC::Vector v=CGAL::compute_normal_of_cell_0(lcc, dh1); if (v!=typename LCC::Vector(-9,-9,9)) { @@ -496,7 +509,7 @@ bool test_LCC_3() dh1 = lcc. make_hexahedron(Point(0,0,0),Point(1,0,0),Point(1,2,0),Point(0,2,0), Point(0,3,4),Point(0,0,4),Point(6,0,4),Point(6,3,4)); - + create_attributes_3(lcc); v=CGAL::compute_normal_of_cell_2(lcc, lcc.template opposite<2>(lcc.previous(dh1))); if (v!=typename LCC::Vector(0,0,1)) @@ -529,6 +542,7 @@ bool test_LCC_3() make_hexahedron(Point(0,3,0),Point(1,3,0),Point(1,4,0),Point(0,4,0), Point(0,4,1),Point(0,3,1),Point(1,3,1),Point(1,4,1)); dh2 = lcc.template opposite<2>(lcc.next(lcc.next(lcc.template opposite<2>(dh2)))); + create_attributes_3(lcc); lcc.template sew<3>(dh1,dh2); lcc.template contract_cell<1>(lcc.previous(dh1)); @@ -560,12 +574,14 @@ bool test_LCC_3() trace_test_begin(); dh1 = make_loop(lcc, Point(0,0,0)); + create_attributes_3(lcc); lcc.template contract_cell<2>(dh1); if ( !check_number_of_cells_3(lcc, 0, 0, 0, 0, 0) ) return false; trace_test_begin(); dh1 = lcc.make_segment(Point(0,0,0),Point(1,0,0), true); + create_attributes_3(lcc); lcc.template sew<1>(lcc.template opposite<2>(dh1), lcc.other_orientation(lcc.template opposite<2>(dh1))); lcc.template contract_cell<2>(dh1); @@ -575,6 +591,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_segment(Point(0,0,0),Point(1,0,0),true); + create_attributes_3(lcc); lcc.template sew<1>(dh1, lcc.other_orientation(dh1)); lcc.template sew<1>(lcc.template opposite<2>(dh1), lcc.other_orientation(lcc.template opposite<2>(dh1))); @@ -586,6 +603,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = make_face_two_edges(lcc, Point(0,0,0), Point(1,0,0)); dh2 = make_face_two_edges(lcc, Point(0,0,1), Point(1,0,1)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); lcc.template contract_cell<2>(dh1); if ( !check_number_of_cells_3(lcc, 2, 2, 1, 1, 1) ) @@ -600,6 +618,7 @@ bool test_LCC_3() dh1 = lcc.make_triangle(Point(5,5,3),Point(7,5,3),Point(6,6,3)); dh2 = lcc.make_triangle(Point(5,4,3),Point(7,4,3),Point(6,3,3)); dh3 = lcc.make_triangle(Point(5,3,3),Point(7,3,3),Point(6,0,3)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); lcc.template sew<2>(lcc.next(dh2), dh3); @@ -615,6 +634,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.create_dart(Point(0,0,0)); + create_attributes_3(lcc); lcc.template sew<3>(dh1, lcc.create_dart(Point(1,0,0))); lcc.template contract_cell<2>(dh1); if ( !check_number_of_cells_3(lcc, 0, 0, 0, 0, 0) ) @@ -623,6 +643,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = make_loop(lcc, Point(0,0,0)); dh2 = make_loop(lcc, Point(0,0,1)); + create_attributes_3(lcc); lcc.template sew<3>(dh1, dh2); lcc.template contract_cell<2>(dh1); if ( !check_number_of_cells_3(lcc, 0, 0, 0, 0, 0) ) @@ -630,6 +651,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_segment(Point(0,0,0),Point(1,0,0), true); + create_attributes_3(lcc); lcc.template sew<3>(dh1, lcc.make_segment(Point(0,0,1),Point(1,0,1), true)); lcc.template sew<3>(lcc.template opposite<2>(dh1), lcc.template opposite<2>(lcc.template opposite<3>(dh1))); @@ -640,8 +662,10 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_segment(Point(0,0,0),Point(1,0,0), true); + create_attributes_3(lcc); lcc.template sew<1>(dh1, lcc.other_orientation(dh1)); dh2 = lcc.make_segment(Point(0,0,1),Point(1,0,1), true); + create_attributes_3(lcc); lcc.template sew<1>(dh2, lcc.other_orientation(dh2)); lcc.template sew<3>(dh1, dh2); lcc.template contract_cell<2>(dh1); @@ -651,10 +675,12 @@ bool test_LCC_3() trace_test_begin(); dh1 = lcc.make_segment(Point(0,0,0),Point(1,0,0), true); + create_attributes_3(lcc); lcc.template sew<1>(dh1, lcc.other_orientation(dh1)); lcc.template sew<1>(lcc.template opposite<2>(dh1), lcc.other_orientation(lcc.template opposite<2>(dh1))); dh2 = lcc.make_segment(Point(0,0,1),Point(1,0,1), true); + create_attributes_3(lcc); lcc.template sew<1>(dh2, lcc.other_orientation(dh2)); lcc.template sew<1>(lcc.template opposite<2>(dh2), lcc.other_orientation(lcc.template opposite<2>(dh2))); @@ -669,6 +695,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = make_face_two_edges(lcc, Point(0,0,0), Point(1,0,0)); dh2 = make_face_two_edges(lcc, Point(0,0,1), Point(1,0,1)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); lcc.template sew<3>(dh1, make_face_two_edges(lcc, Point(0,0,1), Point(1,0,1))); @@ -686,6 +713,7 @@ bool test_LCC_3() trace_test_begin(); dh1 = make_face_two_edges(lcc, Point(0,0,0), Point(1,0,0)); dh2 = make_face_two_edges(lcc, Point(0,0,1), Point(1,0,1)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); lcc.template sew<3>(dh1, make_face_two_edges(lcc, Point(0,0,1), Point(1,0,1))); @@ -706,6 +734,7 @@ bool test_LCC_3() dh1 = lcc.make_triangle(Point(5,5,3),Point(7,5,3),Point(6,6,3)); dh2 = lcc.make_triangle(Point(5,4,3),Point(7,4,3),Point(6,3,3)); dh3 = lcc.make_triangle(Point(5,3,3),Point(7,3,3),Point(6,0,3)); + create_attributes_3(lcc); lcc.template sew<2>(dh1, dh2); lcc.template sew<2>(lcc.next(dh2), dh3); lcc.template sew<3>(dh1, lcc.make_triangle(Point(5,5,4),Point(7,5,4), @@ -737,18 +766,21 @@ bool test_LCC_3() trace_test_begin(); dh1 = make_loop(lcc, Point(0,0,0)); + create_attributes_3(lcc); lcc.template contract_cell<3>(dh1); if ( !check_number_of_cells_3(lcc, 0, 0, 0, 0, 0) ) return false; trace_test_begin(); dh1 = lcc.make_segment(Point(0,0,0),Point(1,0,0)); + create_attributes_3(lcc); lcc.template contract_cell<3>(dh1); if ( !check_number_of_cells_3(lcc, 0, 0, 0, 0, 0) ) return false; trace_test_begin(); dh1 = lcc.make_segment(Point(0,0,0),Point(1,0,0), true); + create_attributes_3(lcc); lcc.template sew<1>(dh1, lcc.other_orientation(dh1)); lcc.template sew<1>(lcc.template opposite<2>(dh1), lcc.other_orientation(lcc.template opposite<2>(dh1))); @@ -764,6 +796,7 @@ bool test_LCC_3() dh2 = lcc. make_hexahedron(Point(0,3,0),Point(1,3,0),Point(1,4,0),Point(0,4,0), Point(0,4,1),Point(0,3,1),Point(1,3,1),Point(1,4,1)); + create_attributes_3(lcc); dh2 = lcc.template opposite<2>(lcc.next(lcc.next(lcc.template opposite<2>(dh2)))); lcc.template sew<3>(dh1,dh2); @@ -813,6 +846,7 @@ bool test_LCC_3() dh3 = lcc. make_hexahedron(Point(0,6,0),Point(1,6,0),Point(1,7,0),Point(0,7,0), Point(0,7,1),Point(0,6,1),Point(1,6,1),Point(1,7,1)); + create_attributes_3(lcc); dh3 = lcc.template opposite<2>(lcc.next(lcc.next(lcc.template opposite<2>(dh3)))); lcc.template sew<3>(dh2,dh3); dh2 = lcc.template opposite<2>(lcc.next(lcc.next(lcc.template opposite<2>(dh2)))); @@ -861,6 +895,12 @@ bool test_LCC_3() Point(1,2,0),Point(0,2,0), Point(0,3,4),Point(0,0,4), Point(6,0,4),Point(6,3,4)); + + dh2=lcc.insert_cell_1_in_cell_2(lcc.next(dh1), lcc.previous(dh1)); + if ( !check_number_of_cells_3(lcc, 8, 13, 7, 1, 1) ) + return false; + lcc.template remove_cell<1>(dh2); + dh2 = lcc. make_hexahedron(Point(0,0,4),Point(1,0,4), Point(1,2,4),Point(0,2,4), @@ -871,16 +911,24 @@ bool test_LCC_3() Point(6,2,4),Point(5,2,4), Point(5,3,8),Point(5,0,8), Point(11,0,8),Point(11,3,8)); - lcc.template sew<3>(dh1,lcc.template opposite<2>(lcc.next(lcc.next(lcc.template opposite<2>(dh2))))); - lcc.template sew<3>(lcc.template opposite<2>(lcc.next(dh1)), lcc.template opposite<2>(lcc.previous(dh3))); + create_attributes_3(lcc); + lcc.template sew<3>(dh1,lcc.template opposite<2> + (lcc.next(lcc.next(lcc.template opposite<2>(dh2))))); + lcc.template sew<3>(lcc.template opposite<2>(lcc.next(dh1)), + lcc.template opposite<2>(lcc.previous(dh3))); lcc.template close<3>(); if ( !check_number_of_cells_3(lcc, 16, 28, 16, 4, 1) ) return false; - lcc.insert_cell_1_in_cell_2(lcc.next(dh1), Alpha1::run(lcc, lcc.previous(dh1))); + lcc.insert_cell_1_in_cell_2(lcc.next(dh1), lcc.previous(dh1)); + if ( !check_number_of_cells_3(lcc, 16, 29, 17, 4, 1) ) + return false; + dh2=lcc.template opposite<2>(lcc.next(lcc.next(lcc.template opposite<2>(dh1)))); - lcc.insert_cell_1_in_cell_2(dh2, Alpha1::run(lcc, lcc.next(lcc.next(dh2)))); + lcc.insert_cell_1_in_cell_2(dh2, lcc.next(lcc.next(dh2))); + if ( !check_number_of_cells_3(lcc, 16, 30, 18, 4, 1) ) + return false; std::vector path; path.push_back(lcc.next(dh1)); @@ -891,6 +939,51 @@ bool test_LCC_3() if ( !check_number_of_cells_3(lcc, 16, 30, 19, 5, 1) ) return false; + // Test insertion between two different 2-cells + trace_test_begin(); + lcc.clear(); + dh1 = lcc. + make_hexahedron(Point(0,0,0),Point(1,0,0), + Point(1,2,0),Point(0,2,0), + Point(0,3,4),Point(0,0,4), + Point(6,0,4),Point(6,3,4)); + dh2 = lcc. + make_hexahedron(Point(0,0,4),Point(1,0,4), + Point(1,2,4),Point(0,2,4), + Point(0,3,8),Point(0,0,8), + Point(6,0,8),Point(6,3,8)); + create_attributes_3(lcc); + lcc.template sew<3>(dh1,lcc.template opposite<2>(lcc.next(lcc.next(lcc.template opposite<2>(dh2))))); + + lcc.insert_cell_1_between_two_cells_2(lcc.template opposite<2>(dh1), + lcc.template opposite<2>(lcc.next(dh1))); + if ( !check_number_of_cells_3(lcc, 12, 21, 10, 2, 1) ) + return false; + + trace_test_begin(); + lcc.clear(); + dh1=lcc.make_hexahedron(Point(0,0,0), Point(5,0,0), + Point(5,5,0), Point(0,5,0), + Point(0,5,4), Point(0,0,4), + Point(5,0,4), Point(5,5,4)); + dh2=lcc.make_hexahedron(Point(5,0,0), Point(10,0,0), + Point(10,5,0), Point(5,5,0), + Point(5,5,4), Point(5,0,4), + Point(10,0,4), Point(10,5,4)); + dh3=lcc.make_quadrangle(Point(5,2,2), Point(5,1,2), + Point(5,1,1), Point(5,2,1)); + lcc.template sew<3>(lcc.template opposite<2>(lcc.next(lcc.next(dh1))), + lcc.other_orientation(lcc.template opposite<2>(dh2))); + lcc.template sew<3>(dh3, lcc.make_combinatorial_polygon(4)); + create_attributes_3(lcc); + + // Create an hole in the face between the two cubes + lcc.insert_cell_1_between_two_cells_2(lcc.template opposite<2>(lcc.next(lcc.next(dh1))), + lcc.next(lcc.next(dh3))); + + if (!check_number_of_cells_3(lcc, 16, 25, 11, 2, 1) ) + return false; + // Construction from Polyhedron_3 { trace_test_begin(); diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.cpp index 737e6b965ba..b4d88213275 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.cpp +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.cpp @@ -35,7 +35,8 @@ struct Myattrib : public CGAL::Cell_attribute_with_point struct MonInfo { - MonInfo(int i=0) : mnb(i==0?rand():i), ptr(reinterpret_cast(this)) + MonInfo(long long int i=0) : mnb(i==0?rand():static_cast(i)), + ptr(reinterpret_cast(this)) {} bool operator==(const MonInfo& info) const diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.h b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.h index 1606dbdaffa..edc8b0f6d40 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.h +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.h @@ -377,9 +377,9 @@ bool test_LCC_4() if ( !check_number_of_cells_4(lcc, 16, 28, 16, 4, 2, 1) ) return false; - lcc.insert_cell_1_in_cell_2(lcc.next(dh1), Alpha1::run(lcc, lcc.previous(dh1))); + lcc.insert_cell_1_in_cell_2(lcc.next(dh1), lcc.previous(dh1)); dh2=lcc.template opposite<2>(lcc.next(lcc.next(lcc.template opposite<2>(dh1)))); - lcc.insert_cell_1_in_cell_2(dh2, Alpha1::run(lcc, lcc.next(lcc.next(dh2)))); + lcc.insert_cell_1_in_cell_2(dh2, lcc.next(lcc.next(dh2))); std::vector path; path.push_back(lcc.next(dh1)); diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py index cd976dd2d01..282ae35aaa0 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py @@ -16,8 +16,8 @@ actions = { "Tuesday": integration, "Wednesday": integration, "Thursday": integration, - "Friday": beta_release("5.6", 2), - "Saturday": release("5.5"), + "Friday": release("5.5"), + "Saturday": release("5.6"), "Sunday": master, } diff --git a/Maintenance/public_release/announcement/announcement.md b/Maintenance/public_release/announcement/announcement.md index 4976234e241..eb9cd301033 100644 --- a/Maintenance/public_release/announcement/announcement.md +++ b/Maintenance/public_release/announcement/announcement.md @@ -1,63 +1,108 @@ -The CGAL Open Source Project is pleased to announce the release 5.5 of CGAL, the Computational Geometry Algorithms Library. +The CGAL Open Source Project is pleased to announce the release 5.6 of CGAL, the Computational Geometry Algorithms Library. -Besides fixes and general enhancement to existing packages, the following has changed since CGAL 5.4: +Besides fixes and general enhancement to existing packages, the following has changed since CGAL 5.5: -### [3D Alpha Wrapping (new package)](https://doc.cgal.org/5.5/Manual/packages.html#PkgAlphaWrap3) +### General Changes -- This component takes a 3D triangle mesh, soup, or point set as input, and generates a valid (watertight, intersection-free, and combinatorially 2-manifold) surface triangle mesh that contains the input. - The algorithm proceeds by shrink-wrapping and refining a 3D Delaunay triangulation, starting from a loose bounding box of the input. - Two user-defined parameters, alpha and offset, offer control over the maximum size of cavities where the shrink-wrapping process can enter, and the tightness of the final surface mesh to the input, respectively. Once combined, these parameters provide a means to trade fidelity - to the input for complexity of the output. +- **Breaking change**: Package-specific assertions, preconditions, and postconditions (such as `CGAL_triangulation_assertion`) have been removed. Corresponding CGAL-wide versions (such as `CGAL_assertion`) should be used instead. - See also the [announcement page](https://www.cgal.org/2022/05/18/alpha_wrap/). +### [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) (major changes) -### [2D Straight Skeleton and Polygon Offsetting (breaking change)](https://doc.cgal.org/5.5/Manual/packages.html#PkgStraightSkeleton2) -- Fix the output of the function [CGAL::create_exterior_skeleton_and_offset_polygons_with_holes_2()](https://doc.cgal.org/5.5/Straight_skeleton_2/group__PkgStraightSkeleton2OffsetFunctions.html#gaa159f093e5d6d7fdb62c1660a44f95fe) - to not take into account the offset of the outer frame. -- Fix the computation of the exterior offset of a polygon with holes that was not computing the offset of the holes +- **Breaking change**: The region growing part of the package have been reworked to fix design issues introduced with the handling of `FaceGraph` models. In particular, the notion of `Item` has been introduced to reference an element in the input range of elements. Region maps now operates on `Item` and no longer on the value type of the input range. +- **Breaking change**: The method `update()` in the concept `RegionType` now returns a `Boolean` instead of `void`, that is used inside the class `Region_growing` for detecting if the input conditions for the new region are satisfied. This change affects only user-defined types of regions. +- **Breaking change**: The constructors of all models used together with the region growing algorithm now enable users to provide parameters through the [named parameters](https://doc.cgal.org/5.6/BGL/group__bgl__namedparameters.html) mechanism. +- All fitting classes in the region growing framework are now using better versions of the region conditions, more precise and faster, including the correct normal orientations. +- Added new models of the concept `RegionType` for getting linear regions in a set of 2D and 3D segments and on 2D and 3D polylines. +- Added the class `Polyline_graph` for extracting a set of polylines from a face graph, which splits this graph into a set of user-defined regions. +- Added new shapes to the Region Growing algorithm on a point set: circles in 2D, spheres in 3D, and cylinders in 3D. -### [3D Convex Hulls](https://doc.cgal.org/5.5/Manual/packages.html#PkgConvexHull3) +### [2D Straight Skeleton and Polygon Offsetting](https://doc.cgal.org/5.6/Manual/packages.html#PkgStraightSkeleton2) (major changes) +- Added weighted straight skeletons: weighted straight skeletons are a generalization of straight skeletons. Contour edges are assigned a positive weight, which can be understood as assigning a speed to the wavefront spawned from the contour edge. +- Added straight skeleton extrusion: this CGAL package now implements the extrusion of weighted straight skeletons of polygons with holes. The output is a closed, combinatorially 2-manifold surface triangle mesh. + See also the [news entry](https://www.cgal.org/2023/05/09/improved_straight_skeleton/). -- Added an [overload of the function `CGAL::convex_hull_3()`](https://doc.cgal.org/5.5/Convex_hull_3/group__PkgConvexHull3Functions.html#ga52fca4745c2ef0351063fbe66b035fd1), which writes the result in an indexed triangle set. +### [2D and 3D Linear Geometry Kernel](https://doc.cgal.org/5.6/Manual/packages.html#PkgKernel23) -### [2D Polygons](https://doc.cgal.org/5.5/Manual/packages.html#PkgPolygon2) +- Added the functor [`CompareAngle_3`](https://doc.cgal.org/5.6/Kernel_23/classKernel_1_1CompareAngle__3.html) to the concept [`Kernel`](https://doc.cgal.org/5.6/Kernel_23/classKernel.html) to compare an angle defined by three points to the cosinus of another angle. -- Add vertex, edge, and hole ranges. -- The concept [`GeneralPolygonWithHoles_2`](https://doc.cgal.org/5.5/Polygon/classGeneralPolygonWithHoles__2.html) now requires the nested type `Polygon_2` instead of `General_polygon_2`. +### [Combinatorial Maps](https://doc.cgal.org/5.6/Manual/packages.html#PkgCombinatorialMaps), [Generalized Maps](https://doc.cgal.org/5.6/Manual/packages.html#PkgGeneralizedMaps), and [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) -### [2D Regularized Boolean Set-Operations](https://doc.cgal.org/5.5/Manual/packages.html#PkgBooleanSetOperations2) -- The concept [`GeneralPolygonSetTraits_2`](https://doc.cgal.org/5.5/Boolean_set_operations_2/classGeneralPolygonSetTraits__2.html) now requires the nested type `Construct_polygon_with_holes_2` instead of `Construct_general_polygon_with_holes_2`. +- Added a version that uses indices instead of handles as dart and attribute descriptors. As the indices are integers convertible from and to `std::size_t`, they can be used as index into vectors which store properties. To use the index version, `Use_index` must be defined and be equal to `CGAL::Tag_true` in the item class. -### [Combinatorial Maps](https://doc.cgal.org/5.5/Manual/packages.html#PkgCombinatorialMaps) +### [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) -- Removed old code deprecated in CGAL 4.9 and 4.10 (global functions, and information associated with darts). +- Added the class [`Linear_cell_complex_incremental_builder_3`](https://doc.cgal.org/5.6/Linear_cell_complex/classCGAL_1_1Linear__cell__complex__incremental__builder__3.html). -### [2D Arrangements](https://doc.cgal.org/5.5/Manual/packages.html#PkgArrangementOnSurface2) -- Fixed the `intersect_2`, `compare_y_at_x_right`, and `compare_y_at_x_left` function objects of the traits class template [`Arr_geodesic_arc_on_sphere_traits_2`](https://doc.cgal.org/5.5/Arrangement_on_surface_2/classCGAL_1_1Arr__geodesic__arc__on__sphere__traits__2.html) that handles geodesic arcs on sphere and applied a small syntactical fix to the tracing traits. +### [2D Arrangements](https://doc.cgal.org/5.6/Manual/packages.html#PkgArrangementOnSurface2) -### [Tetrahedral Mesh Generation](https://doc.cgal.org/5.5/Manual/packages.html#PkgMesh3) +- Introduced an overload function template, namely `draw(arr)`, that renders arrangements based on the `Basic_viewer_qt` class template. As of now, only 2D arrangements on the plane induced by (i) segments, (ii) conics, and (iii) circular arcs or (linear) segments are supported. +- Improved the traits class template that handles conics, namely [`Arr_conic_traits_2`](https://doc.cgal.org/5.6/Arrangement_on_surface_2/classCGAL_1_1Arr__conic__traits__2.html). This includes the following: 1. Fixed a couple of bugs and slightly optimized some functions. 2. Introduced functionality that approximates conics with polylines. (This is used to draw conic curves.) 3. **Breaking change**: Changed the interface to generate conic curves. In the past, curves where generated directly using the constructors of the conic and x-monotone conic constructs. Now, they are constructed via function objects provided by the traits. This eliminates the constructions of temporary kernels. The old functionality is obsolete, but still supported for a limited number of versions. It depends on a static member function of the traits. In a future version this function will no longer be static, implying that the old functionality will no longer be supported. +- Introduced functionality that approximates circular segments with polylines. (This is used to draw conic curves.) -- Added the function [`remove_isolated_vertices()`](https://doc.cgal.org/5.5/Mesh_3/classCGAL_1_1Mesh__complex__3__in__triangulation__3.html#ace57c4e777da457c6e33b4f6e89949ce) as a post-processing step for the tetrahedral mesh generation. +### [Polygon Mesh Processing](https://doc.cgal.org/5.6/Manual/packages.html#PkgPolygonMeshProcessing) -### [Polygon Mesh Processing](https://doc.cgal.org/5.5/Manual/packages.html#PkgPolygonMeshProcessing) -- Added the function [`CGAL::Polygon_mesh_processing::orient_triangle_soup_with_reference_triangle_soup()`](https://doc.cgal.org/5.5/Polygon_mesh_processing/group__PMP__orientation__grp.html#ga855b1c55c201b91ab04eebd2811a87fd), which enables re-orienting the faces of a triangle soup based on the orientation of the nearest face in a reference triangle soup. -- Added the function [`CGAL::Polygon_mesh_processing::compatible_orientations()`](https://doc.cgal.org/5.5/Polygon_mesh_processing/group__PMP__orientation__grp.html#ga9ac9b9434084b64f3304df636c3178a3), which enables to retrieve the (in)compatibility of orientations of faces from different connected components. -- Added the function [`CGAL::Polygon_mesh_processing::tangential_relaxation()`](https://doc.cgal.org/5.5/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga136c659162e5360354db5879db7431b4), which applies an area-based tangential mesh smoothing to the vertices of a surface triangle mesh. -- Added the named parameter `visitor` to the function [`triangulate_hole()`](https://doc.cgal.org/5.5/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#gad2d3c43bce0ef90a16530478196d7f42), which enables to track progress with callbacks. -- Added more functions in the [visitor of the corefinement based methods](https://doc.cgal.org/5.5/Polygon_mesh_processing/classPMPCorefinementVisitor.html) to track progress. +- Added functions [`CGAL::Polygon_mesh_processing::region_growing_of_planes_on_faces()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PkgPolygonMeshProcessingRef.html#ga50dcd2f6295f584d2e378b57290ae2af) and [`CGAL::Polygon_mesh_processing::detect_corners_of_regions()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PkgPolygonMeshProcessingRef.html#gac8e445730d718a2fc49604e865017d2e), which enable partitioning a mesh into planar regions using the region growing algorithm from the [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) package. -### [Surface Mesh Simplification](https://doc.cgal.org/5.5/Manual/packages.html#PkgSurfaceMeshSimplification) -- Introduced four variations of the Garland-Heckbert simplification algorithm based on the probabilistic approach of Trettner and Kobbelt (Fast and Robust QEF Minimization using Probabilistic Quadrics): [`GarlandHeckbert_plane_policies`](https://doc.cgal.org/5.5/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1GarlandHeckbert__plane__policies.html), [`GarlandHeckbert_probabilistic_plane_policies`](https://doc.cgal.org/5.5/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1GarlandHeckbert__probabilistic__plane__policies.html), [`GarlandHeckbert_triangle_policies`](https://doc.cgal.org/5.5/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1GarlandHeckbert__triangle__policies.html), and [`GarlandHeckbert_probabilistic_triangle_policies`](https://doc.cgal.org/5.5/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1GarlandHeckbert__probabilistic__triangle__policies.html). -- The class `GarlandHeckbert_policies` has been deprecated, `GarlandHeckbert_plane_policies` replaces it. +- Added the functions [`CGAL::Polygon_mesh_processing::remesh_planar_patches()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga7fca6fa2db94560ab6d32e6a77fc35b6) and [`CGAL::Polygon_mesh_processing::remesh_almost_planar_patches()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga0e6da479548199a5d82c3cf0ed36e8a0), which can be used to remesh patches of coplanar faces in a mesh. -### [Point Set Processing](https://doc.cgal.org/5.5/Manual/packages.html#PkgPointSetProcessing3) +- Added the function [`CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#gaff62f9415d2fe96d1d3095351f156ced), which can be used to remesh a surface triangle mesh using the Delaunay refinement algorithm from the [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) package. -- A new optional named parameter, `min_points_per_cell` has been added to [`grid_simplify_point_set()`](https://doc.cgal.org/5.5/Point_set_processing_3/group__PkgPointSetProcessing3Algorithms.html#ga7757ef9b3900e42fde26f5a0ac56e20f). By adding a minimal number of points in a cell such that a point is retained, one can also filter out low density areas and outliers: in the case of densely sampled point clouds, this yields better results than using grid simplification and then outlier removal, while being very vast. The default value is `1` to keep the previous behavior as default. +- Added the function [`CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__geometric__repair__grp.html#ga48008d2b66de8a68a7068f29db15dad6), which can be used to remove badly shaped triangles faces in a mesh. -### [dD Spatial Searching](https://doc.cgal.org/5.5/Manual/packages.html#PkgSpatialSearchingD) +- Added the functions [`CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__intersection__grp.html#ga4909920dc48b8285e69feb845feb1e53) and [`CGAL::Polygon_mesh_processing::triangle_soup_self_intersections()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__intersection__grp.html#ga1c5fee17bd0d92d5a2fba77ed94d4b4d) to identify and report self-intersections in a triangle soup, similarly to existing functions on triangle meshes. -- Added the member function [`write_graphviz()`](https://doc.cgal.org/5.5/Spatial_searching/classCGAL_1_1Kd__tree.html#ac2851b5cafb8d5cce0dc5fb107c8f13f) to the class `Kd_tree` that writes the tree in a stream in the [Graphviz](https://graphviz.org/) format. +- Added the function [`CGAL::Polygon_mesh_processing::triangulate_polygons()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga8b7db6aa8c3e79526b594739ba926d82), which allows users to triangulate polygon soups. -### [CGAL and the Boost Graph Library (BGL)](https://doc.cgal.org/5.5/Manual/packages.html#PkgBGL) +- Added a named parameter to [`CGAL::Polygon_mesh_processing::smooth_shape()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga57fa999abe8dc557003482444df2a189) to disable the scaling, which otherwise aims to compensate volume loss during smoothing. -- Added the function [`invert_selection()`](https://doc.cgal.org/5.5/BGL/structCGAL_1_1Face__filtered__graph.html#aa428541ebbdd35f9a6e9a3ffd60178df) in the class [`Face_filtered_graph`](https://doc.cgal.org/5.5/BGL/structCGAL_1_1Face__filtered__graph.html), which toggles the selected status of a graph: selected faces are deselected, and unselected faces are selected. +- Deprecated the overloads of functions [`CGAL::Polygon_mesh_processing::triangulate_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga3abdf2d0558822e85f060966b69cae98), [`CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga9868fac4d9dca77462ad7828bc99d8a1), and [`CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga18eac756a8f8e5d5f73e645fd4e26cad) which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters. + +### [2D Convex Hulls](https://doc.cgal.org/5.6/Manual/packages.html#PkgConvexHull2) + +- **Breaking change**: The concept [`ConvexHullTraits_2`](https://doc.cgal.org/5.6/Convex_hull_2/classConvexHullTraits__2.html) no longer requires the functor `Less_signed_distance_to_line_2`, but requires the functor `Compare_signed_distance_to_line_2` instead. +- The long-deprecated classes `Convex_hull_projective_xy_traits_2`, `Convex_hull_projective_xz_traits_2`, and `Convex_hull_projective_yz_traits_2` have been removed. Users should use [`Projection_traits_xy_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__xy__3.html), [`Projection_traits_xz_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__xz__3.html), and [`Projection_traits_yz_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__yz__3.html) instead. + +### [2D Triangulations](https://doc.cgal.org/5.6/Manual/packages.html#PkgTriangulation2) + +- Added the function [`CGAL::mark_domain_in_triangulation()`](https://doc.cgal.org/5.6/Triangulation_2/group__PkgTriangulation2Miscellaneous.html#ga0409755d0eb89100810230443a85e7eb) to mark faces connected with non-constrained edges as inside of the domain based on the nesting level. + +### [2D Conforming Triangulations and Meshes](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh2) + +- Added new overloads to the function [`write_VTU()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2IO.html), with property maps for specifying the domain. +- Deprecated usage of boost parameters in favor of function named parameters in [`CGAL::lloyd_optimize_mesh_2()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2Functions.html#gafeaf59d3fa014da287f8514913b38d05). +- Deprecated two overloads of the function [`refine_Delaunay_mesh()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2Functions.html), and replaced them with versions using function named parameters. + +### [2D Hyperbolic Triangulations](https://doc.cgal.org/5.6/Manual/packages.html#PkgHyperbolicTriangulation2) + +- **Breaking change**: the concept [`HyperbolicTriangulationFaceBase_2`](https://doc.cgal.org/5.6/Hyperbolic_triangulation_2/classHyperbolicTriangulationFaceBase__2.html) has been modified to better reflect the triangulation's requirements and avoid a conflict with the requirements described by the concept `TriangulationDataStructure_2::Face`. The model [`CGAL::Hyperbolic_triangulation_face_base_2`](https://doc.cgal.org/5.6/Hyperbolic_triangulation_2/classCGAL_1_1Hyperbolic__triangulation__face__base__2.html) has been adapted correspondingly. + +### [3D Simplicial Mesh Data Structure](https://doc.cgal.org/5.6/Manual/packages.html#PkgSMDS3) (new package) + +- This new package wraps all the existing code that deals with a [`MeshComplex_3InTriangulation_3`](https://doc.cgal.org/5.6/SMDS_3/classMeshComplex__3InTriangulation__3.html) to describe 3D simplicial meshes, and makes the data structure independent from the [tetrahedral mesh generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) package. + +### [Tetrahedral Remeshing](https://doc.cgal.org/5.6/Manual/packages.html#PkgTetrahedralRemeshing) +- **Breaking change**: The template parameters of [`CGAL::Tetrahedral_remeshing::Remeshing_vertex_base_3`](https://doc.cgal.org/5.6/Tetrahedral_remeshing/group__PkgTetrahedralRemeshingClasses.html#ga7ef4f8c0c1ed715c34389ea4ee851a92) and [`CGAL::Tetrahedral_remeshing::Remeshing_cell_base_3`](https://doc.cgal.org/5.6/Tetrahedral_remeshing/classCGAL_1_1Tetrahedral__remeshing_1_1Remeshing__cell__base__3.html) have been modified. + +### [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) + +- Added two new named parameters to the named constructor [`CGAL::create_labeled_image_mesh_domain()`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Labeled__mesh__domain__3.html#aec3f58e9883a8036a1b3e379df7d8fa9) for automatic detection and protection of 1D-curves that lie at the intersection of three or more subdomains extracted from labeled images. +- Added [`CGAL::Sizing_field_with_aabb_tree`](https://doc.cgal.org/5.6/Mesh_3/structCGAL_1_1Sizing__field__with__aabb__tree.html), a geometry-aware sizing field for feature edges in polyhedral domains. +- Added new meshing criterion [`edge_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) to avoid subdividing sharp edges that are shorter than a prescribed size bound. +- Added new meshing criteria [`facet_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) and [`cell_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) to prevent Delaunay refinement from creating simplices smaller than a prescribed bound. +- Deprecated usage of boost parameters in favor of function named parameters. + +### [3D Periodic Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgPeriodic3Mesh3) + +- Periodic Mesh Generation now supports non-cubic domains. +- Deprecated usage of boost parameters in favor of function named parameters. + +### [Surface Mesh Simplification](https://doc.cgal.org/5.6/Manual/packages.html#PkgSurfaceMeshSimplification) +- The stop predicates [`Count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Count__stop__predicate.html) and [`Count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Count__ratio__stop__predicate.html) are renamed to [`Edge_count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Edge__count__stop__predicate.html) and [`Edge_count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Edge__count__ratio__stop__predicate.html). Older versions have been deprecated. +- Introduced [`Face_count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Face__count__stop__predicate.html) and [`Face_count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Face__count__ratio__stop__predicate.html), which can be used to stop the simplification algorithm based on a desired number of faces in the output, or a ratio between input and output face numbers. + +### [2D Regularized Boolean Set Operations](https://doc.cgal.org/5.6/Manual/packages.html#PkgBooleanSetOperations2) +- Exposed all required member functions of the [`GeneralPolygonWithHoles_2`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html) concept (e.g., [`clear_outer_boundary()`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html#a9f5f035047505a2ccab3e68770f51bc6), [`clear_holes()`](https://cgal.geometryfactory.com/CGAL/doc/master/Polygon/classGeneralPolygonWithHoles__2.html#a2a507be648f127ac605da8c670ea2580), and [`clear()`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html#a2ca4d9b43cc9216c1b2cdb080a915944) ). + +### Known Bug + +- MSVC 2015 is still supported by this version of CGAL, but the feature _Segment Cell Iterator_ of the class [`CGAL::Triangulation_3`](https://doc.cgal.org/5.6/Triangulation_3/classCGAL_1_1Triangulation__3.html) does not compile with MSVC 2015. diff --git a/Maintenance/public_release/announcement/mailing.eml b/Maintenance/public_release/announcement/mailing.eml index 23ea320c941..eaa3f34962c 100644 --- a/Maintenance/public_release/announcement/mailing.eml +++ b/Maintenance/public_release/announcement/mailing.eml @@ -1,130 +1,177 @@ -Subject: CGAL 5.5 Released, Computational Geometry Algorithms Library +Subject: CGAL 5.6 Released, Computational Geometry Algorithms Library Content-Type: text/plain; charset="utf-8" Body: -The CGAL Open Source Project is pleased to announce the release 5.5 of +The CGAL Open Source Project is pleased to announce the release 5.6 of CGAL, the Computational Geometry Algorithms Library. Besides fixes and general enhancement to existing packages, the -following has changed since CGAL 5.4: +following has changed since CGAL 5.5: -3D Alpha Wrapping (new package) +General Changes -- This component takes a 3D triangle mesh, soup, or point set as - input, and generates a valid (watertight, intersection-free, and - combinatorially 2-manifold) surface triangle mesh that contains the - input. The algorithm proceeds by shrink-wrapping and refining a 3D - Delaunay triangulation, starting from a loose bounding box of the - input. Two user-defined parameters, alpha and offset, offer control - over the maximum size of cavities where the shrink-wrapping process - can enter, and the tightness of the final surface mesh to the input, - respectively. Once combined, these parameters provide a means to - trade fidelity to the input for complexity of the output. +- Breaking change: Package-specific assertions, preconditions, and + postconditions (such as CGAL_triangulation_assertion) have been + removed. Corresponding CGAL-wide versions (such as CGAL_assertion) + should be used instead. - See also https://www.cgal.org/2022/05/18/alpha_wrap/. +Shape Detection (major changes) -2D Straight Skeleton and Polygon Offsetting (breaking change) +- Breaking change: The region growing part of the package have been + reworked to fix design issues introduced with the handling of + FaceGraph models. In particular, the notion of Item has been + introduced to reference an element in the input range of elements. + Region maps now operates on Item and no longer on the value type of + the input range. +- Breaking change: The method update() in the concept RegionType now + returns a Boolean instead of void, that is used inside the class + Region_growing for detecting if the input conditions for the new + region are satisfied. This change affects only user-defined types of + regions. +- Breaking change: The constructors of all models used together with + the region growing algorithm now enable users to provide parameters + through the named parameters mechanism. +- All fitting classes in the region growing framework are now using + better versions of the region conditions, more precise and faster, + including the correct normal orientations. +- Added new models of the concept RegionType for getting linear + regions in a set of 2D and 3D segments and on 2D and 3D polylines. +- Added the class Polyline_graph for extracting a set of polylines + from a face graph, which splits this graph into a set of + user-defined regions. +- Added new shapes to the Region Growing algorithm on a point set: + circles in 2D, spheres in 3D, and cylinders in 3D. -- Fix the output of the function - CGAL::create_exterior_skeleton_and_offset_polygons_with_holes_2() to - not take into account the offset of the outer frame. -- Fix the computation of the exterior offset of a polygon with holes - that was not computing the offset of the holes +2D Straight Skeleton and Polygon Offsetting (major changes) -3D Convex Hulls +- Added weighted straight skeletons: weighted straight skeletons are a + generalization of straight skeletons. Contour edges are assigned a + positive weight, which can be understood as assigning a speed to the + wavefront spawned from the contour edge. +- Added straight skeleton extrusion: this CGAL package now implements + the extrusion of weighted straight skeletons of polygons with holes. + The output is a closed, combinatorially 2-manifold surface triangle + mesh. See also the news entry. -- Added an overload of the function CGAL::convex_hull_3(), which - writes the result in an indexed triangle set. +Combinatorial Maps, Generalized Maps, and Linear Cell Complex -2D Polygons - -- Add vertex, edge, and hole ranges. -- The concept GeneralPolygonWithHoles_2 now requires the nested type - Polygon_2 instead of General_polygon_2. - -2D Regularized Boolean Set-Operations - -- The concept GeneralPolygonSetTraits_2 now requires the nested type - Construct_polygon_with_holes_2 instead of - Construct_general_polygon_with_holes_2. - -Combinatorial Maps - -- Removed old code deprecated in CGAL 4.9 and 4.10 (global functions, - and information associated with darts). +- Added a version that uses indices instead of handles as dart and + attribute descriptors. As the indices are integers convertible from + and to std::size_t, they can be used as index into vectors which + store properties. To use the index version, Use_index must be + defined and be equal to CGAL::Tag_true in the item class. 2D Arrangements -- Fixed the intersect_2, compare_y_at_x_right, and compare_y_at_x_left - function objects of the traits class template - Arr_geodesic_arc_on_sphere_traits_2 that handles geodesic arcs on - sphere and applied a small syntactical fix to the tracing traits. - -Tetrahedral Mesh Generation - -- Added the function remove_isolated_vertices() as a post-processing - step for the tetrahedral mesh generation. +- Introduced an overload function template, namely draw(arr), that + renders arrangements based on the Basic_viewer_qt class template. As + of now, only 2D arrangements on the plane induced by (i) + segments, (ii) conics, and (iii) circular arcs or (linear) segments + are supported. +- Improved the traits class template that handles conics, namely + Arr_conic_traits_2. This includes the following: 1. Fixed a couple + of bugs and slightly optimized some functions. 2. Introduced + functionality that approximates conics with polylines. (This is used + to draw conic curves.) 3. Breaking change: Changed the interface to + generate conic curves. In the past, curves where generated directly + using the constructors of the conic and x-monotone conic constructs. + Now, they are constructed via function objects provided by the + traits. This eliminates the constructions of temporary kernels. The + old functionality is obsolete, but still supported for a limited + number of versions. It depends on a static member function of the + traits. In a future version this function will no longer be static, + implying that the old functionality will no longer be supported. +- Introduced functionality that approximates circular segments with + polylines. (This is used to draw conic curves.) Polygon Mesh Processing +- Added functions + CGAL::Polygon_mesh_processing::region_growing_of_planes_on_faces() + and CGAL::Polygon_mesh_processing::detect_corners_of_regions(), + which enable partitioning a mesh into planar regions using the + region growing algorithm from the Shape Detection package. + +- Added the functions + CGAL::Polygon_mesh_processing::remesh_planar_patches() and + CGAL::Polygon_mesh_processing::remesh_almost_planar_patches(), which + can be used to remesh patches of coplanar faces in a mesh. + - Added the function - CGAL::Polygon_mesh_processing::orient_triangle_soup_with_reference_triangle_soup(), - which enables re-orienting the faces of a triangle soup based on the - orientation of the nearest face in a reference triangle soup. + CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing(), which + can be used to remesh a surface triangle mesh using the Delaunay + refinement algorithm from the 3D Mesh Generation package. + - Added the function - CGAL::Polygon_mesh_processing::compatible_orientations(), which - enables to retrieve the (in)compatibility of orientations of faces - from different connected components. + CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces(), + which can be used to remove badly shaped triangles faces in a mesh. + +- Added the functions + CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect() + and + CGAL::Polygon_mesh_processing::triangle_soup_self_intersections() to + identify and report self-intersections in a triangle soup, similarly + to existing functions on triangle meshes. + - Added the function - CGAL::Polygon_mesh_processing::tangential_relaxation(), which - applies an area-based tangential mesh smoothing to the vertices of a - surface triangle mesh. -- Added the named parameter visitor to the function - triangulate_hole(), which enables to track progress with callbacks. -- Added more functions in the visitor of the corefinement based - methods to track progress. + CGAL::Polygon_mesh_processing::triangulate_polygons(), which allows + users to triangulate polygon soups. -Surface Mesh Simplification +- Added a named parameter to + CGAL::Polygon_mesh_processing::smooth_shape() to disable the + scaling, which otherwise aims to compensate volume loss during + smoothing. -- Introduced four variations of the Garland-Heckbert simplification - algorithm based on the probabilistic approach of Trettner and - Kobbelt (Fast and Robust QEF Minimization using Probabilistic - Quadrics): GarlandHeckbert_plane_policies, - GarlandHeckbert_probabilistic_plane_policies, - GarlandHeckbert_triangle_policies, and - GarlandHeckbert_probabilistic_triangle_policies. -- The class GarlandHeckbert_policies has been deprecated, - GarlandHeckbert_plane_policies replaces it. - -Point Set Processing - -- A new optional named parameter, min_points_per_cell has been added - to grid_simplify_point_set(). By adding a minimal number of points - in a cell such that a point is retained, one can also filter out low - density areas and outliers: in the case of densely sampled point - clouds, this yields better results than using grid simplification - and then outlier removal, while being very vast. The default value - is 1 to keep the previous behavior as default. - -dD Spatial Searching - -- Added the member function write_graphviz() to the class Kd_tree that - writes the tree in a stream in the Graphviz format. - -CGAL and the Boost Graph Library (BGL) - -- Added the function invert_selection() in the class - Face_filtered_graph, which toggles the selected status of a graph: - selected faces are deselected, and unselected faces are selected. +- Deprecated the overloads of functions + CGAL::Polygon_mesh_processing::triangulate_hole(), + CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(), and + CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole() + which have output iterators for vertices and faces as parameter. + They are replaced by overloads with two additional named parameters. -See https://www.cgal.org/2022/07/15/cgal55/ for a -complete list of changes. +Tetrahedral Remeshing + +- Breaking change: The template parameters of + CGAL::Tetrahedral_remeshing::Remeshing_vertex_base_3 and + CGAL::Tetrahedral_remeshing::Remeshing_cell_base_3 have been + modified. -The same day, we also published CGAL-5.4.2 is the second bug-fix release for -CGAL-5.4. See https://www.cgal.org/2022/07/15/cgal5.4.2/. +3D Mesh Generation + +- Added two new named parameters to the named constructor + CGAL::create_labeled_image_mesh_domain() for automatic detection and + protection of 1D-curves that lie at the intersection of three or + more subdomains extracted from labeled images. +- Added CGAL::Sizing_field_with_aabb_tree, a geometry-aware sizing + field for feature edges in polyhedral domains. +- Added new meshing criterion edge_min_size to avoid subdividing sharp + edges that are shorter than a prescribed size bound. +- Added new meshing criteria facet_min_size and cell_min_size to + prevent Delaunay refinement from creating simplices smaller than a + prescribed bound. +- Deprecated usage of boost parameters in favor of function named + parameters. + + +Known Bug + +- MSVC 2015 is still supported by this version of CGAL, but the + feature Segment Cell Iterator of the class CGAL::Triangulation_3 + does not compile with MSVC 2015. + + +See https://www.cgal.org/2023/07/28/cgal56/ for a complete list of changes. + + +The development of CGAL will then now on the future CGAL-6.0 (planned +for December 2023), with bug-fixes regularly backported to the branches +for CGAL-5.5.x and CGAL-5.6.x. + +CGAL-6.0 will be the first release of CGAL requiring C++17 or later. It +will also support Qt6. The CGAL project is a collaborative effort to develop a robust, diff --git a/Maintenance/public_release/scripts/prepare_release b/Maintenance/public_release/scripts/prepare_release index 889c7e99da3..69c14d86133 100755 --- a/Maintenance/public_release/scripts/prepare_release +++ b/Maintenance/public_release/scripts/prepare_release @@ -42,12 +42,12 @@ printf "Copy documentation to doc_html/ and doc_html_online/...\n" [ -d "/srv/CGAL/www/${PUBLIC_RELEASE_NAME#CGAL-}/Manual" ] || mkdir -p "/srv/CGAL/www/${PUBLIC_RELEASE_NAME#CGAL-}/Manual" cp "$PUBLIC_RELEASE_DIR"/*(.) "${RELEASE_CANDIDATES_DIR}/$PUBLIC_RELEASE_NAME" -files=("$MANUAL_TESTS_DIR/$INTERNAL_RELEASE"/output2/*) +files=("$MANUAL_TESTS_DIR/$INTERNAL_RELEASE"/output1/*) if ((${#files[@]} == 0)); then printf "ERROR: documentation files are missing\n" error_code=1 else - rsync -a --exclude xml "$MANUAL_TESTS_DIR/$INTERNAL_RELEASE"/output2/* "$DEST_DIR/doc_html/" + rsync -a --exclude xml "$MANUAL_TESTS_DIR/$INTERNAL_RELEASE"/output1/* "$DEST_DIR/doc_html/" pushd "$DEST_DIR/doc_html/Manual/search" for i in g n c s i; do sed -i "s/..\/BGL$i/..\/BGL\/$i/g" *; done popd diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index 1744b4e575d..3747a4a8313 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -617,7 +617,8 @@ sub print_little_header(){

      Test Results of ${release_name} -jump to results

      +jump to results +compare results...

      The results of the tests are presented in a table ('y' = success, 'w' = warning, 't' = third party warning, 'o' = timeout, 'n' = failure, 'r' = a requirement is not found), diff --git a/Maintenance/test_handling/testresult.css b/Maintenance/test_handling/testresult.css index b48d35ee171..02e8ad65d0f 100644 --- a/Maintenance/test_handling/testresult.css +++ b/Maintenance/test_handling/testresult.css @@ -66,14 +66,14 @@ TD.requirements A:visited {color: rgb(100%,100%,65%)} SELECT { font-family: monospace; } -#permalink,#jump_to_results { +#permalink,#jump_to_results,#compare { font-size: 0.5em; font-weight: normal; } -#permalink::before,#jump_to_results::before{ +#permalink::before,#jump_to_results::before,#compare::before{ content: "(" } -#permalink::after,#jump_to_results::after{ +#permalink::after,#jump_to_results::after,#compare::after{ content: ")" } diff --git a/Maintenance/test_handling/testsuite_comparison/diff_testsuites.html b/Maintenance/test_handling/testsuite_comparison/diff_testsuites.html index 4ec2720540f..ab4842098e0 100644 --- a/Maintenance/test_handling/testsuite_comparison/diff_testsuites.html +++ b/Maintenance/test_handling/testsuite_comparison/diff_testsuites.html @@ -1,6 +1,9 @@ + + + Diff of Testsuites @@ -11,30 +14,30 @@ -

      +

      -
      +

      Note that the diff should be done from left to right, as red or yellow squares in the left testsuite that become green in the right testsuite will be ignored.

      I = Master
      Ic = integration

      -

      -
      -
      -
      +

      +
      +
      +
      -

      +
      diff --git a/Maintenance/test_handling/testsuite_comparison/diff_testsuites.js b/Maintenance/test_handling/testsuite_comparison/diff_testsuites.js index 567dad05351..07427241f39 100644 --- a/Maintenance/test_handling/testsuite_comparison/diff_testsuites.js +++ b/Maintenance/test_handling/testsuite_comparison/diff_testsuites.js @@ -11,7 +11,7 @@ //v1.7 function diff_testsuites(baseTest, newTest){ - var URL_suff='https://cgal.geometryfactory.com/~mgimeno/testsuite_comparison/list_of_suffixes.txt'; + var URL_suff='https://cgal.geometryfactory.com/~cgaltest/testsuite_comparison/list_of_suffixes.txt'; var URL_testsuite='https://cgal.geometryfactory.com/CGAL/Members/testsuite/'; //get the list of suffixes var xhr = new XMLHttpRequest(); diff --git a/Maintenance/test_handling/testsuite_comparison/print_diff.js b/Maintenance/test_handling/testsuite_comparison/print_diff.js index 9340d2c1013..d7da1086b8f 100644 --- a/Maintenance/test_handling/testsuite_comparison/print_diff.js +++ b/Maintenance/test_handling/testsuite_comparison/print_diff.js @@ -31,6 +31,11 @@ function print_diff(base, newtext){ && change != "equal"){ res[0]=base.charAt(base.length-1); res[1]=newtext.charAt(newtext.length-1); + if (res[0]=="w" && res[1]=="t") + { + res[0]=""; + res[1]=""; + } } //else if(change == "insert") { // res=newtext.charAt(newtext.length-1); diff --git a/Maintenance/test_handling/testsuite_comparison/testresult.css b/Maintenance/test_handling/testsuite_comparison/testresult.css new file mode 100644 index 00000000000..b7800bf1d59 --- /dev/null +++ b/Maintenance/test_handling/testsuite_comparison/testresult.css @@ -0,0 +1,67 @@ +body {color: black; background-color: #C0C0D0; font-family: sans-serif;} + +P { +width: 80ex +} + +A { + text-decoration: none; +} + +TABLE.result { font-weight: bold; background-color: white; padding: 1em; table-layout: fixed;} + +TABLE.summary TD { white-space: nowrap } +TABLE.result,TABLE.summary { border-collapse: collapse; } +TABLE.result TD,TABLE.summary TD { border-width: 1px; border-style: solid; } +TABLE.result TD { padding: 0;} +TABLE.result TD > a { font-weight: normal; font-family: monospace; display: block; padding: 0.2ex 0.5ex 0.2ex 0.5ex;} + +TD.highlight {background-color: rgb(80%,80%,80%)} +TD.os64bits {font-style:italic} +.cmaketag {font-weight: bold; color: rgb(100%,20%,20%);} + + +TD.ok {background-color: rgb(50%,100%,50%)} +TD.warning {background-color: rgb(100%,100%,50%)} +TD.error {background-color: rgb(100%,50%,50%)} +TD.na {background-color: white;} +TD.requirements { background-color: rgb(65%,65%,100%) } + +TH.ok {background-color: rgb(50%,100%,50%)} +TH.warning {background-color: rgb(100%,100%,50%)} +TH.error {background-color: rgb(100%,50%,50%)} +TH.requirements { background-color: rgb(65%,65%,100%) } + +TD.ok A {font-size:large; text-decoration: none} +TD.ok A:link {color: rgb(0%,0%,100%)} +TD.ok A:visited {color: rgb(0%,80%,100%)} + +TD.warning A {font-size:large; text-decoration: none} +TD.warning A:link {color: rgb(0%,0%,100%)} +TD.warning A:visited {color: rgb(80%,80%,100%)} + +TD.error A {font-size: large; text-decoration: none} +TD.error A:link {color: rgb(0%,0%,100%)} +TD.error A:visited {color: rgb(80%,0%,100%)} + +TD.requirements A {font-size: large; text-decoration: none} +TD.requirements A:link {color: rgb(0%,0%,100%)} +TD.requirements A:visited {color: rgb(100%,100%,65%)} + +SELECT { font-family: monospace; } + +#permalink,#jump_to_results { + font-size: 0.5em; + font-weight: normal; +} +#permalink::before,#jump_to_results::before{ + content: "(" +} +#permalink::after,#jump_to_results::after{ + content: ")" +} + +TABLE.result TD > a.package_name { + color: black; + font-weight: bold; +} diff --git a/Maintenance/test_handling/testsuite_comparison/worker.js b/Maintenance/test_handling/testsuite_comparison/worker.js index 8938ea93c38..28930fb20f0 100644 --- a/Maintenance/test_handling/testsuite_comparison/worker.js +++ b/Maintenance/test_handling/testsuite_comparison/worker.js @@ -34,7 +34,7 @@ onmessage=function(e){ } for(i=1; i"+i+": "+ myArray[i][0]+""]); + postMessage(["namesTable",""+i+""+ myArray[i][0]+""]); } postMessage(["namesTable", ""]); @@ -45,7 +45,8 @@ onmessage=function(e){ } postMessage(["testTable", ""]); for (var j=2; j"+ myArray[0][j]+": "]); + var p = myArray[0][j]; + postMessage(["testTable", "" + p + ""]); for(i=1; i #include #include -#include +#include //#include //#include //#include @@ -139,7 +139,7 @@ #include #include #include -#include +#include #include // CGAL @@ -197,7 +197,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/Mesh_3/benchmark/Mesh_3/concurrency.cpp b/Mesh_3/benchmark/Mesh_3/concurrency.cpp index 006c917b990..153f235d2b8 100644 --- a/Mesh_3/benchmark/Mesh_3/concurrency.cpp +++ b/Mesh_3/benchmark/Mesh_3/concurrency.cpp @@ -236,11 +236,10 @@ protected: #include #include +#include #include #include -#include #include -#include #include #include @@ -579,7 +578,7 @@ bool make_mesh_3D_images(const std::string &input_filename, // Domain typedef Kernel K; - typedef CGAL::Labeled_image_mesh_domain_3 Mesh_domain; + typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; // Triangulation #ifdef CGAL_CONCURRENT_MESH_3 @@ -600,7 +599,7 @@ bool make_mesh_3D_images(const std::string &input_filename, image.read(input_filename.c_str()); // Create domain - Mesh_domain domain(image); + Mesh_domain domain = Mesh_domain::create_labeled_image_mesh_domain(image); std::cerr << "done." << std::endl; Mesh_parameters params; @@ -686,10 +685,10 @@ bool make_mesh_implicit(double facet_approx, { // Domain #ifdef CGAL_MESH_3_IMPLICIT_WITH_FEATURES - typedef CGAL::Implicit_mesh_domain_3 Implicit_domain; + typedef CGAL::Labeled_mesh_domain_3 Implicit_domain; typedef CGAL::Mesh_domain_with_polyline_features_3 Mesh_domain; #else - typedef CGAL::Implicit_mesh_domain_3 Mesh_domain; + typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; #endif // Triangulation @@ -708,7 +707,11 @@ bool make_mesh_implicit(double facet_approx, // Create domain Sphere bounding_sphere(CGAL::ORIGIN, 10.0 * 10.0); - Mesh_domain domain(func, bounding_sphere/*, 1e-7*/); + + namespace p = CGAL::parameters; + Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain(p::function = func, + p::bounding_object = bounding_sphere + /*, p::relative_error_bound = 1e-7*/); #ifdef CGAL_MESH_3_IMPLICIT_WITH_FEATURES // Add 12 feature creases diff --git a/Mesh_3/doc/Mesh_3/CGAL/Gray_image_mesh_domain_3.h b/Mesh_3/doc/Mesh_3/CGAL/Gray_image_mesh_domain_3.h deleted file mode 100644 index 02428df510e..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Gray_image_mesh_domain_3.h +++ /dev/null @@ -1,80 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -\deprecated The class template `Gray_image_mesh_domain_3` is deprecated -since CGAL-4.13, in favor of the class template `Labeled_mesh_domain_3` and -its static function -`Labeled_mesh_domain_3::create_gray_image_mesh_domain()`. - -The class `Gray_image_mesh_domain_3` implements a domain described by a 3D -gray image. A 3D gray image is a grid of voxels, -where each voxel is associated with a gray level value. -This class is a model of the concept `MeshDomain_3`. -The domain to be discretized is the union of voxels that lie inside a surface -described by an isolevel value, called \a isovalue. The voxels lying inside the -domain have gray level values that are larger than the isovalue. - -This class includes a member function that provides, by interpolation, -a gray level value at any query point. -An intersection between a segment and bounding -surfaces is detected when both segment endpoints are associated with gray level -values which are on both sides of the isovalue. -The intersection is then constructed by bisection. -The bisection stops when the query segment is shorter than a given error bound -`e`. This error bound is given by `e=d`\f$ \times\f$`bound` where `d` is the -length of the diagonal of the bounding box (in world coordinates) and -`bound` is the argument passed to the constructor of `Labeled_image_mesh_domain_3`. - - -\tparam Image is the type of the input image. -This parameter must be `CGAL::Image_3`. - -\tparam BGT is a geometric traits class which provides -the basic operations to implement -intersection tests and intersection computations -through a bisection method. This parameter must be instantiated -with a model of the concept `BisectionGeometricTraits_3`. - -\tparam Image_word_type is the data type encoded in the `Image` -input file - - -\cgalModels `MeshDomain_3` - -\sa `BisectionGeometricTraits_3` -\sa `CGAL::make_mesh_3()`. - -*/ -template -class Gray_image_mesh_domain_3 -{ -public: - -/// \name Creation -/// @{ - -/*! -Construction from an image. -The object to be meshed is described by the voxels that have a gray-level -value higher than the input isovalue. -@param image the input image -@param iso_value the isovalue, inside `image`, - of the surface describing the boundary of the object to be meshed. -@param value_outside the value attached to voxels outside of the domain - to be meshed. It should be lower than `iso_value` -@param error_bound is relative to the size of the image. -*/ - Gray_image_mesh_domain_3( - const Image& image, - const Image_word_type iso_value, - const Image_word_type value_outside = 0., - const BGT::FT& error_bound = BGT::FT(1e-3)); - -/// @} - -}; /* end Labeled_image_mesh_domain_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Implicit_mesh_domain_3.h b/Mesh_3/doc/Mesh_3/CGAL/Implicit_mesh_domain_3.h deleted file mode 100644 index e2595b9d6fb..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Implicit_mesh_domain_3.h +++ /dev/null @@ -1,80 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -\deprecated The class template `Implicit_mesh_domain_3` is deprecated -since CGAL-4.13, in favor of the class template `Labeled_mesh_domain_3` and -its static function -`Labeled_mesh_domain_3::create_implicit_mesh_domain()`. - -The class `Implicit_mesh_domain_3` implements a domain whose bounding surface is -described -implicitly as the zero level set of a function. -The domain to be discretized is assumed to be the domain where -the function has negative values. -This class is a model of the concept `MeshDomain_3`. - - -\tparam Function provides the definition of the function. -This parameter stands for a model of the concept -`ImplicitFunction` described in the -surface mesh generation package. -The number types `Function::FT` -and `BGT::FT` are required to match. - -\tparam BGT is a geometric traits which provides the basic operations to implement -intersection tests and computations -through a bisection method. This parameter must be instantiated -with a model of the concept `BisectionGeometricTraits_3`. - -The constructor of `Implicit_mesh_domain_3` -takes as argument a bounding sphere which is required -to circumscribe the surface and to have its center inside the -domain. -This domain constructs intersection points -between -the surface and segments/rays/lines by -bisection. It needs an -`error_bound` such that the bisection process is stopped -when the query segment is smaller than the error bound. -The `error_bound` passed as argument to the domain constructor -is a relative error bound expressed as a ratio to the bounding sphere radius. - -\cgalModels `MeshDomain_3` - -\sa `BisectionGeometricTraits_3` -\sa `CGAL::make_mesh_3()`. - -*/ -template< typename Function, typename BGT > -class Implicit_mesh_domain_3 -{ -public: - -/// \name Creation -/// @{ - -/*! -`f` is the object of type `Function` that represents the implicit -surface. - -`bounding_sphere` is a bounding sphere of the implicit surface. The -value of `f` at the sphere center `c` must be -negative: \f$ f(c)<0\f$. - -`error_bound` is the relative error bound -used to compute intersection points between the implicit surface -and query segments. The -bisection is stopped when the length of the intersected -segment is less than the product of `error_bound` by the -radius of `bounding_sphere`. -*/ - Implicit_mesh_domain_3(Function f, - const BGT::Sphere_3& bounding_sphere, - const BGT::FT& error_bound = FT(1e-3)); - -/// @} - -}; /* end Implicit_mesh_domain_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Implicit_to_labeling_function_wrapper.h b/Mesh_3/doc/Mesh_3/CGAL/Implicit_to_labeling_function_wrapper.h deleted file mode 100644 index 9a5b38be16d..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Implicit_to_labeling_function_wrapper.h +++ /dev/null @@ -1,66 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -The class `Implicit_multi_domain_to_labeling_function_wrapper` is a helping class to get a function with integer values -labeling the components of a multi-domain. The multidomain is described through a set of functions {fi(p), i=1, ...n}. -Each component corresponds to a sign vector [s1, s2, ..., sn] where si is the sign of the function fi(p) at a point p of the component. -This wrapper class can be passed to `Labeled_mesh_domain_3` as first template parameter. - -\par Example -For example, the multidomain described by the three functions [f1,f2,f3] and the two sign vectors [-,-,+] and [+,-,+] - includes two components.
      -The first one matches the locus of points satisfying f1(p)<0 and f2(p)<0 and f3(p)>0.
      -The second one matches the locus of points satisfying f1(p)>0 and f2(p)<0 and f3(p)>0.
      - -\tparam Function provides the definition of the function. -This parameter stands for a model of the concept ImplicitFunction described in the surface mesh generation package. -The number types Function::FT and BGT::FT are required to match. - -\sa `Labeled_mesh_domain_3`. - -*/ -template -class Implicit_multi_domain_to_labeling_function_wrapper -{ -public: - /// \name Types - /// @{ - //! - typedef std::vector Function_vector; - //! - typedef typename Function::Point Point_3; - /// @} - - /// \name Creation - /// @{ - /*! - * \brief Construction from a vector of implicit functions. - * \param implicit_functions the vector of implicit functions. - * - * Position vectors are built automatically so that the union of components equals the union of the functions. - */ - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions); - - /*! - * \brief Construction from a vector of implicit functions and a vector of vector of signs. - * \param implicit_functions the vector of implicit functions. - * \param position_vectors the vector of vector of signs. Each vector of positions describes a component. - * \sa `Sign` - */ - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions, - const std::vector >& position_vectors); - - /*! - * \brief Construction from a vector of implicit functions and a vector of strings. - * \param implicit_functions the vector of implicit functions. - * \param position_strings the vector of strings. The strings contained in this vector must contain '+' or '-' only. Each string (vector of positions) describes a component. - */ - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions, - const std::vector& position_strings); -/// @} - -}; /* end Implicit_multi_domain_to_labeling_function_wrapper */ - -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Labeled_image_mesh_domain_3.h b/Mesh_3/doc/Mesh_3/CGAL/Labeled_image_mesh_domain_3.h deleted file mode 100644 index 9109b74f182..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Labeled_image_mesh_domain_3.h +++ /dev/null @@ -1,63 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -\deprecated The class template `Labeled_image_mesh_domain_3` is deprecated -since CGAL-4.13, in favor of the class template `Labeled_mesh_domain_3` and -its static function -`Labeled_mesh_domain_3::create_labeled_image_mesh_domain()`. - -The class `Labeled_image_mesh_domain_3` implements a domain described by a 3D labeled image. A 3D -labeled image is a grid of voxels, where each voxel is associated with an index -(a subdomain index) characterizing the subdomain in which the voxel lies. This -class is a model of the concept `MeshDomain_3`. The domain to be discretized -is the union of voxels that have an non-default index (different from the -default constructed value of the type `Image::Type`). - -This class includes a member function that provides, by interpolation, the index -of the subdomain in which any query point lies. An intersection between a segment and bounding -surfaces is detected when both segment endpoints are associated with different -values of subdomain indices. The intersection is then constructed by bisection. -The bisection stops when the query segment is shorter than a given error bound -`e`. This error bound is given by `e=d`\f$ \times\f$`bound` where `d` is the -length of the diagonal of the bounding box (in world coordinates) and -`bound` is the argument passed to the constructor of `Labeled_image_mesh_domain_3`. - - -\tparam Image is the type of the input image. -This parameter must be `CGAL::Image_3`. - -\tparam BGT is a geometric traits class which provides -the basic operations to implement -intersection tests and intersection computations -through a bisection method. This parameter must be instantiated -with a model of the concept `BisectionGeometricTraits_3`. - -\cgalModels `MeshDomain_3` - -An executable that uses `Labeled_image_mesh_domain_3` must be linked with -the CGAL_ImageIO library. - -\sa `BisectionGeometricTraits_3` -\sa `CGAL::make_mesh_3()`. - -*/ -template< typename Image, typename BGT > -class Labeled_image_mesh_domain_3 { -public: - -/// \name Creation -/// @{ - -/*! -Construction from an image. -The parameter `error_bound` is relative to the size of the image. -*/ - Labeled_Image_mesh_domain_3(const Image& image, - const BGT::FT& error_bound = FT(1e-3)); - -/// @} - -}; /* end Labeled_image_mesh_domain_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Mesh_3/parameters.h b/Mesh_3/doc/Mesh_3/CGAL/Mesh_3/parameters.h index 65fa962d512..acfb0b6efd8 100644 --- a/Mesh_3/doc/Mesh_3/CGAL/Mesh_3/parameters.h +++ b/Mesh_3/doc/Mesh_3/CGAL/Mesh_3/parameters.h @@ -60,9 +60,9 @@ unspecified_type manifold_with_boundary(); /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::exude()` allows the user to trigger a call to `exude_mesh_3()` in the + * The function `parameters::exude()` enables the user to trigger a call to `exude_mesh_3()` in the * `make_mesh_3()` and `refine_mesh_3()` mesh generation functions. - * It also allows the user to pass parameters + * It also enables the user to pass parameters * to the optimization function `exude_mesh_3()` through these mesh generation functions. * * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @@ -131,9 +131,9 @@ unspecified_type features(); /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::lloyd()` allows the user to trigger a call of + * The function `parameters::lloyd()` enables the user to trigger a call of * `lloyd_optimize_mesh_3()` in the mesh generation functions - * `make_mesh_3()` and `refine_mesh_3()`. It also allows the user to pass + * `make_mesh_3()` and `refine_mesh_3()`. It also enables the user to pass * parameters to the optimization function * `lloyd_optimize_mesh_3()` through these mesh generation functions. * @@ -210,7 +210,7 @@ unspecified_type lloyd(const Named_function_parameters& np = parameters::default /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::no_exude()` allows the user to tell the mesh generation functions + * The function `parameters::no_exude()` enables the user to tell the mesh generation functions * `make_mesh_3()` and `refine_mesh_3()` that no exudation must be done. * * \cgalHeading{Example} @@ -246,7 +246,7 @@ unspecified_type no_features(); /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::no_lloyd()` allows the user to tell the mesh generation functions + * The function `parameters::no_lloyd()` enables the user to tell the mesh generation functions * `make_mesh_3()` and `refine_mesh_3()` that no lloyd optimization must be done. * * \cgalHeading{Example} @@ -269,7 +269,7 @@ unspecified_type no_lloyd(); /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::no_odt()` allows the user to tell the mesh generation functions + * The function `parameters::no_odt()` enables the user to tell the mesh generation functions * `make_mesh_3()` and `refine_mesh_3()` that no ODT optimization must be done. * * \cgalHeading{Example} @@ -292,7 +292,7 @@ unspecified_type no_odt(); /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::no_perturb()` allows the user to tell mesh generation global functions + * The function `parameters::no_perturb()` enables the user to tell mesh generation global functions * `make_mesh_3()` and `refine_mesh_3()` that no perturbation must be done. * * \cgalHeading{Example} @@ -315,10 +315,10 @@ unspecified_type no_perturb(); /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::odt()` allows the user to trigger a call to + * The function `parameters::odt()` enables the user to trigger a call to * `CGAL::odt_optimize_mesh_3()` in * `CGAL::make_mesh_3()` and `CGAL::refine_mesh_3()` mesh optimization functions. It also - * allows the user to pass parameters to the optimization function + * enables the user to pass parameters to the optimization function * `odt_optimize_mesh_3()` through these mesh generation functions. * * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @@ -395,10 +395,10 @@ unspecified_type odt(const Named_function_parameters& np = parameters::default_v /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::perturb()` allows the user to trigger a call to + * The function `parameters::perturb()` enables the user to trigger a call to * `perturb_mesh_3()` in * `make_mesh_3()` and `refine_mesh_3()` mesh generation functions. It also - * allows the user to pass parameters + * enables the user to pass parameters * to the optimization function `perturb_mesh_3()` through these mesh generation functions. * * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" diff --git a/Mesh_3/doc/Mesh_3/CGAL/Mesh_cell_criteria_3.h b/Mesh_3/doc/Mesh_3/CGAL/Mesh_cell_criteria_3.h deleted file mode 100644 index bdba19131c8..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Mesh_cell_criteria_3.h +++ /dev/null @@ -1,69 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3MeshClasses - -The class `Mesh_cell_criteria_3` is a model of `MeshCellCriteria_3`. It provides, -for the mesh tetrahedra, -a uniform shape criteria -and a sizing field which may be a uniform or variable field. - -\tparam Tr must be identical to the nested type -`Triangulation` of the instance used as model of -`MeshComplex_3InTriangulation_3`. - -\cgalModels `MeshCellCriteria_3` - -\sa `MeshCriteria_3` -\sa `CGAL::Mesh_criteria_3` -\sa `CGAL::make_mesh_3()` - -*/ -template< typename Tr > -class Mesh_cell_criteria_3 { -public: - -/// \name Types -/// @{ - -/*! -Numerical type -*/ -typedef Tr::FT FT; - -/// @} - -/// \name Creation -/// @{ - -/*! -* Returns an object to serve as default criteria for cells. -* @param radius_edge_bound is the upper bound for the radius-edge ratio -* of the tetrahedra. -* @param radius_bound is a uniform upper bound -* for the circumradii of the tetrahedra in the mesh. See -* section \ref introsecparam for further details. -* @param min_radius_bound is a uniform lower bound for the -* circumradii of the tetrahedra in the mesh. -* Only cells with a circumradius larger than that -* bound will be refined. -* Note that if one parameter is set to 0, then its corresponding criteria is ignored. -*/ - Mesh_cell_criteria_3(const FT& radius_edge_bound, - const FT& radius_bound, - const FT& min_radius_bound = 0.); - -/*! -Returns an object to serve as default criteria for facets. The type `SizingField` must -be a model of the concept `MeshDomainField_3`. The behavior and semantic of the arguments are the same -as above, except that the radius bound parameter is a functional instead of a constant. -*/ - template - Mesh_cell_criteria_3(const FT& radius_edge_bound, - const SizingField& radius_bound, - const FT& min_radius_bound = 0.); - -/// @} - -}; /* end Mesh_cell_criteria_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Mesh_facet_criteria_3.h b/Mesh_3/doc/Mesh_3/CGAL/Mesh_facet_criteria_3.h deleted file mode 100644 index bfbd79dfe39..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Mesh_facet_criteria_3.h +++ /dev/null @@ -1,82 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3MeshClasses - -The class `Mesh_facet_criteria_3` is a model of `MeshFacetCriteria_3`. -It provides a uniform bound for the shape criterion, -a uniform or variable sizing field -for the size criterion and/or -a uniform or variable distance field -for the approximation error criterion. - -\tparam Tr must be identical to the nested type -`Triangulation` of the instance used as model of -`MeshComplex_3InTriangulation_3`. - -\cgalModels `MeshFacetCriteria_3` - -\sa `CGAL::Mesh_facet_topology` -\sa `MeshCriteria_3` -\sa `MeshFacetCriteria_3` -\sa `CGAL::Mesh_criteria_3` -\sa `MeshDomainField_3` -\sa `CGAL::make_mesh_3()` - -*/ -template< typename Tr > -class Mesh_facet_criteria_3 { -public: - -/// \name Types -/// @{ - -/*! -Numerical type -*/ -typedef Tr::Geom_traits::FT FT; - -/// @} - -/// \name Creation -/// @{ - -/*! -Returns an object to serve as criteria for facets. -\param angle_bound is the lower bound for the angle in degrees of the -surface mesh facets. -\param radius_bound is a uniform upper bound -for the radius of the surface Delaunay balls. -\param distance_bound is an upper bound for the center-center distances -of the surface mesh facets. -\param topology is the set of topological constraints -which have to be verified by each surface facet. See -section \ref Mesh_3DelaunayRefinement for further details. -Note that if one parameter is set to 0, then its corresponding criteria is ignored. -\param min_radius_bound is a uniform lower bound for the radius of -the surface Delaunay balls. Only facets with a radius larger than that -bound will be refined. -*/ - Mesh_facet_criteria_3(const FT& angle_bound, - const FT& radius_bound, - const FT& distance_bound, - Mesh_facet_topology topology = FACET_VERTICES_ON_SURFACE, - const FT& min_radius_bound = 0.); - -/*! -Returns an object to serve as criteria for facets. The types `SizingField` and -`DistanceField` must -be models of the concept `MeshDomainField_3`. The behavior and semantic of the arguments are the same -as above, except that the radius and distance bound parameters are functionals instead of constants. -*/ - template - Mesh_facet_criteria_3(const FT& angle_bound, - const SizingField& radius_bound, - const DistanceField& distance_bound, - Mesh_facet_topology topology = FACET_VERTICES_ON_SURFACE, - const FT& min_radius_bound = 0.); - -/// @} - -}; /* end Mesh_facet_criteria_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Mesh_polyhedron_3.h b/Mesh_3/doc/Mesh_3/CGAL/Mesh_polyhedron_3.h deleted file mode 100644 index 4ec7e8481fa..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Mesh_polyhedron_3.h +++ /dev/null @@ -1,34 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -The class `Mesh_polyhedron_3` provides a customized `Polyhedron_3` type. This type uses -as `PolyhedronItems_3` a customized type which adds data to the Vertex, Face and -Halfedge class. Those data are required to use our sharp features -detection algorithm. - -\tparam IGT stands for the geometric traits associated -to the meshing process. It should be a model of the two concepts -`PolyhedronTraits_3` and `IntersectionGeometricTraits_3`. - -\sa `CGAL::Polyhedron_3` -\sa `CGAL::Polyhedral_mesh_domain_with_features_3` - -*/ -template< typename IGT > -struct Mesh_polyhedron_3 { - -/// \name Types -/// @{ - -/*! -`CGAL::Polyhedron_3` type with customized `PolyhedronItems_3` -designed to handle sharp feature detection. -*/ -typedef unspecified_type type; - -/// @} - -}; /* end Mesh_polyhedron_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Mesh_triangulation_3.h b/Mesh_3/doc/Mesh_3/CGAL/Mesh_triangulation_3.h deleted file mode 100644 index cb8834e9040..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Mesh_triangulation_3.h +++ /dev/null @@ -1,57 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3MeshClasses - -The class `Mesh_triangulation_3` is a class template which provides the triangulation -type to be used for the 3D triangulation embedding the mesh. - -\tparam MD must be a model of `MeshDomain_3`. - -\tparam Gt must be a model of `MeshTriangulationTraits_3` or `Default` -and defaults to `Kernel_traits::%Kernel`. - -\tparam Concurrency_tag enables sequential versus parallel meshing and optimization algorithms. - Possible values are `Sequential_tag` (the default), `Parallel_tag`, - and `Parallel_if_available_tag`. - -\tparam Vertex_base must be a model of `MeshVertexBase_3` or `Default` -and defaults to `Mesh_vertex_base_3`. - -\tparam Cell_base must be a model of `MeshCellBase_3` or `Default` -and defaults to `Compact_mesh_cell_base_3`. - -\warning To improve the robustness of the meshing process, the input traits `Gt` - is wrapped with the traits class `Robust_weighted_circumcenter_filtered_traits_3`. - The class `Robust_weighted_circumcenter_filtered_traits_3` upgrades the functors - models of `Kernel::ConstructWeightedCircumcenter_3`, `Kernel::ComputeSquaredRadius_3`, - and `Kernel::ComputeSquaredRadiusSmallestOrthogonalSphere_3` that are - provided by `Gt` to use exact computations when the geometric configuration - is close to degenerate (e.g. almost coplanar points).
      - Users should therefore be aware that the traits class of the triangulation - will have type `Robust_weighted_circumcenter_filtered_traits_3`. - -\sa `make_mesh_3()` -\sa `Mesh_complex_3_in_triangulation_3` - -*/ -template< typename MD, typename Gt, - typename Concurrency_tag, - typename Vertex_base, - typename Cell_base > -struct Mesh_triangulation_3 { - -/// \name Types -/// @{ - -/*! -The triangulation type to be used for the 3D triangulation embedding the mesh. -This type is a wrapper around the type `CGAL::Regular_triangulation_3`, whose vertex -and cell base classes are respectively `Vertex_base` and `Cell_base`. -*/ -typedef unspecified_type type; - -/// @} - -}; /* end Mesh_triangulation_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_3.h deleted file mode 100644 index a084e25bfcf..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_3.h +++ /dev/null @@ -1,60 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -The class `Polyhedral_mesh_domain_3` implements -a domain defined by a simplicial polyhedral surface. - -The input polyhedral surface must be free of intersection. -It must include (at least) one closed connected component -that defines the boundary of the domain to be meshed. -Inside this bounding component, -the input polyhedral surface may contain -several other components (closed or not) -that will be represented in the final mesh. -This class is a model of the concept `MeshDomain_3`. - -\tparam Polyhedron stands for the type of the input polyhedral surface(s), -model of `FaceListGraph`. - -\tparam IGT stands for a geometric traits class -providing the types and functors required to implement -the intersection tests and intersection computations -for polyhedral boundary surfaces. This parameter has to be instantiated -with a model of the concept `IntersectionGeometricTraits_3`. - -\cgalModels `MeshDomain_3` - -\sa `IntersectionGeometricTraits_3` -\sa `CGAL::make_mesh_3()`. - -*/ -template< typename Polyhedron, typename IGT, typename TriangleAccessor > -class Polyhedral_mesh_domain_3 -{ -public: - -/// \name Creation -/// @{ - -/*! -Construction from a bounding polyhedral surface which must be closed, and free of intersections. -The inside of `bounding_polyhedron` will be meshed. -*/ -Polyhedral_mesh_domain_3(const Polyhedron& bounding_polyhedron); - -/*! -Construction from a polyhedral surface, and a bounding polyhedral surface,. -The first polyhedron must be entirely included inside `bounding_polyhedron`, which must be closed -and free of intersections. -Using this constructor allows to mesh a polyhedral surface which is not closed, or has holes. -The inside of `bounding_polyhedron` will be meshed. -*/ -Polyhedral_mesh_domain_3(const Polyhedron& polyhedron, - const Polyhedron& bounding_polyhedron); - -/// @} - -}; /* end Polyhedral_mesh_domain_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_with_features_3.h b/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_with_features_3.h deleted file mode 100644 index 8ee1140044c..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ /dev/null @@ -1,105 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -The class `Polyhedral_mesh_domain_with_features_3` implements a domain whose -boundary is a simplicial polyhedral surface. -This surface must be free of intersection. -It can either be closed, -included inside another polyhedral surface which is closed and free of intersection, -or open. In the latter case, the meshing process will only take care of the quality -of the 1D (features and boundaries) and 2D (surfaces) components of the mesh. - -It is a model of the concept `MeshDomainWithFeatures_3`. It also -provides a member function to automatically detect sharp features and boundaries from -the input polyhedral surface(s). - -\tparam IGT stands for a geometric traits class providing the types -and functors required to implement the intersection tests and intersection computations -for polyhedral boundary surfaces. This parameter has to be -instantiated with a model of the concept `IntersectionGeometricTraits_3`. - -\cgalModels `MeshDomainWithFeatures_3` - -\sa `CGAL::Mesh_domain_with_polyline_features_3` -\sa `CGAL::Polyhedral_mesh_domain_3` -\sa `CGAL::Mesh_polyhedron_3` -*/ -template< typename IGT > -class Polyhedral_mesh_domain_with_features_3 - : public CGAL::Mesh_domain_with_polyline_features_3< - CGAL::Polyhedral_mesh_domain_3< CGAL::Mesh_polyhedron_3::type, IGT> > - { -public: - -/// \name Types -/// @{ - -/*! -Numerical type. -*/ -typedef unspecified_type FT; - -/// @} - -/// \name Creation -/// @{ - -/*! -Constructs a `Polyhedral_mesh_domain_with_features_3` from a polyhedral surface of type `Polyhedron`. -The only requirement on type `Polyhedron` is that `CGAL::Mesh_polyhedron_3::%type` should -be constructible from `Polyhedron`. -No feature detection is done at this level. Note that a copy of `bounding_polyhedron` will be done. -The polyhedron `bounding_polyhedron` has to be closed and free of intersections. -Its interior of `bounding_polyhedron` will be meshed. -*/ -template -Polyhedral_mesh_domain_with_features_3(const Polyhedron& bounding_polyhedron); - - -/*! -Constructs a `Polyhedral_mesh_domain_with_features_3` from a polyhedral surface, and a bounding polyhedral surface. -`CGAL::Mesh_polyhedron_3::%type` should be constructible from `Polyhedron`. -The first polyhedron should be entirely included inside `bounding_polyhedron`, which has to be closed -and free of intersections. -Using this constructor allows to mesh a polyhedral surface which is not closed, or has holes. -The inside of `bounding_polyhedron` will be meshed. -*/ -template -Polyhedral_mesh_domain_with_features_3(const Polyhedron& polyhedron, - const Polyhedron& bounding_polyhedron); - -/*! -\deprecated Constructs a `Polyhedral_mesh_domain_with_features_3` from an off file. No feature -detection is done at this level. Users must read the file into a `Polyhedron_3` and call the -constructor above. -*/ -Polyhedral_mesh_domain_with_features_3(const std::string& filename); - -/// @} - -/// \name Operations -/// @{ - -/*! -Detects sharp features and boundaries of the internal bounding polyhedron (and the potential internal polyhedron) -and inserts them as features of the domain. `angle_bound` gives the maximum -angle (in degrees) between the two normal vectors of adjacent triangles. -For an edge of the polyhedron, if the angle between the two normal vectors of its -incident facets is bigger than the given bound, then the edge is considered as -a feature edge. -*/ -void detect_features(FT angle_bound=60); - - -/*! -Detects border edges of the bounding polyhedron and inserts them as features of the domain. -This function should be called alone only, and not before or after `detect_features()`. -*/ - void detect_borders(); - -/// @} - -}; /* end Polyhedral_mesh_domain_with_features_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/CGAL/Triangle_accessor_3.h b/Mesh_3/doc/Mesh_3/CGAL/Triangle_accessor_3.h deleted file mode 100644 index e72ee14e286..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Triangle_accessor_3.h +++ /dev/null @@ -1,49 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -The class `Triangle_accessor_3` is a model for the concept `TriangleAccessor_3`. It is -designed to serve as accessor for objects of type `Polyhedron_3`. - -\attention Actually, the class `Triangle_accessor_3` is a partial specialization of the class -template `template -Triangle_accessor_3`. One may give another partial -specialization of this class to handle one's own polyhedron data structure. - - -\tparam K is the geometric traits class. - -\cgalModels `TriangleAccessor_3` - -\sa `CGAL::Polyhedral_mesh_domain_3` - -*/ -template< CGAL::Polyhedron, typename K > -class Triangle_accessor_3 { -public: - -/// \name Types -/// @{ - -/*! -Triangle iterator. -*/ -typedef Polyhedron_3::Facet_const_iterator -Triangle_iterator; - -/*! -Triangle -handle. -*/ -typedef Polyhedron_3::Facet_const_handle Triangle_handle; - -/*! -Triangle type. -*/ -typedef K::Triangle_3 Triangle_3; - -/// @} - -}; /* end Triangle_accessor_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/Concepts/IntersectionGeometricTraits_3.h b/Mesh_3/doc/Mesh_3/Concepts/IntersectionGeometricTraits_3.h index a1b35060f85..6f09809fae9 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/IntersectionGeometricTraits_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/IntersectionGeometricTraits_3.h @@ -12,7 +12,7 @@ and construction of intersections between segments and triangles. \cgalHasModel All models of the `Kernel` concept. \sa `BisectionGeometricTraits_3` -\sa `CGAL::Polyhedral_mesh_domain_3` +\sa `CGAL::Polyhedral_mesh_domain_3` */ class IntersectionGeometricTraits_3 { @@ -53,9 +53,9 @@ Function object that constructs the intersection between a 3D segment and a 3D triangle. Partial model of `::Kernel::Intersect_3`. Provides the operators: -- `boost::optional< boost::variant< Point_3, Segment_3 > > operator()(Segment_3 seg, Triangle_3 tr)` +- `std::optional< std::variant< Point_3, Segment_3 > > operator()(Segment_3 seg, Triangle_3 tr)` -- `boost::optional< boost::variant< Point_3, Segment_3 > > operator()(Triangle_3 tr, Segment_3 seg)` +- `std::optional< std::variant< Point_3, Segment_3 > > operator()(Triangle_3 tr, Segment_3 seg)` which computes the intersection between the triangle and the segment. */ diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h index 028d9e70d9f..f1b619635db 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h @@ -41,10 +41,10 @@ and `is_facet_visited(1)` in parallel must be safe) Moreover, the parallel algorithms require an erase counter in each cell (see below). -\cgalRefines{SimplicialMeshCellBase_3,RegularTriangulationCellBaseWithWeightedCircumcenter_3,CopyConstructible} +\cgalRefines{SimplicialMeshCellBase_3,RegularTriangulationCellBaseWithWeightedCircumcenter_3} -\cgalHasModel `CGAL::Compact_mesh_cell_base_3` -\cgalHasModel `CGAL::Mesh_cell_base_3` +\cgalHasModel `CGAL::Compact_mesh_cell_base_3` +\cgalHasModel `CGAL::Mesh_cell_base_3` \sa `CGAL::make_mesh_3()` \sa `MeshDomain_3` diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshCellCriteria_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshCellCriteria_3.h index d3b0b83f0a6..efcab46d8d6 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshCellCriteria_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshCellCriteria_3.h @@ -26,7 +26,7 @@ public: /// @{ /*! -Handle type for the cells of the +%Handle type for the cells of the triangulation. Must match the `Cell_handle` type in the triangulation type used by the mesh generation function. */ @@ -48,7 +48,7 @@ the cell is good with regard to the criteria. In addition, an object of this type must contain an object of type `Cell_quality` if it represents a bad cell. `Cell_quality` must be accessible by `operator*()`. -Note that `boost::optional` is a natural model of this concept. +Note that `std::optional` is a natural model of this concept. */ typedef unspecified_type Is_cell_bad; diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshCriteria_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshCriteria_3.h index ea4a1f33ea3..07cd4f12acd 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshCriteria_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshCriteria_3.h @@ -16,9 +16,10 @@ The concept `MeshCriteria_3` encapsulates these concepts. \sa `MeshFacetCriteria_3` \sa `MeshCellCriteria_3` +\sa `MeshCriteriaWithFeatures_3` \sa `CGAL::make_mesh_3()` \sa `CGAL::refine_mesh_3()` -\sa `MeshCriteriaWithFeatures_3` + */ diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshDomainField_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshDomainField_3.h index 644a3a46046..c90469bf835 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshDomainField_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshDomainField_3.h @@ -5,7 +5,7 @@ The concept `MeshDomainField_3` describes a scalar field which could be queried at any point of the space. -\cgalHasModel `CGAL::Mesh_constant_domain_field_3` +\cgalHasModel `CGAL::Mesh_constant_domain_field_3` \sa `MeshDomain_3` \sa `MeshDomainWithFeatures_3` diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshDomainWithFeatures_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshDomainWithFeatures_3.h index 18e97b9a275..8e91075c581 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshDomainWithFeatures_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshDomainWithFeatures_3.h @@ -17,7 +17,7 @@ between two ordered points on the same curve. \cgalRefines{MeshDomain_3} -\cgalHasModel `CGAL::Mesh_domain_with_polyline_features_3` +\cgalHasModel `CGAL::Mesh_domain_with_polyline_features_3` \cgalHasModel `CGAL::Polyhedral_mesh_domain_with_features_3` \sa `MeshDomain_3` @@ -47,7 +47,7 @@ Point type. typedef unspecified_type Point_3; /*! -Type of indices for curves (i.e. \f$ 1\f$-dimensional features) +Type of indices for curves (i.e., \f$ 1\f$-dimensional features) of the input domain. Must be a model of CopyConstructible, Assignable, DefaultConstructible and LessThanComparable. The default constructed value must be the value of an edge which @@ -56,7 +56,7 @@ does not approximate a 1-dimensional feature of the input domain. typedef unspecified_type Curve_index; /*! -Type of indices for corners (i.e.\f$ 0\f$--dimensional features) +Type of indices for corners (i.e., \f$ 0\f$--dimensional features) of the input domain. Must be a model of CopyConstructible, Assignable, DefaultConstructible and LessThanComparable. diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshDomain_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshDomain_3.h index 240f9b0f1fb..16c37b7e611 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshDomain_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshDomain_3.h @@ -29,7 +29,7 @@ A segment, ray or line is said to intersect properly the domain boundary if it includes points which are strictly inside and strictly outside the domain (resp. the subdomain). -\cgalHasModel `CGAL::Polyhedral_mesh_domain_3` +\cgalHasModel `CGAL::Polyhedral_mesh_domain_3` \cgalHasModel `CGAL::Labeled_mesh_domain_3` \sa `MeshVertexBase_3` @@ -138,7 +138,7 @@ A function object to query whether a point is in the input domain or not. In the positive case, it outputs the subdomain which includes the query point. Provides the operator: -`boost::optional operator()(Point_3 p)` +`std::optional operator()(Point_3 p)` */ typedef unspecified_type Is_in_domain; @@ -148,11 +148,11 @@ intersection queries between the surface patches of the domain and objects of type `Segment_3`, `Ray_3` or `Line_3`. Provides the operators: -`boost::optional operator()(Segment_3 s)` +`std::optional operator()(Segment_3 s)` -`boost::optional operator()(Ray_3 r)` +`std::optional operator()(Ray_3 r)` -`boost::optional operator()(Line_3 l)` +`std::optional operator()(Line_3 l)` The return type of the operators tell whether or not the query intersects a surface patch. In the positive case, it provides (through operator*()) the diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshEdgeCriteria_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshEdgeCriteria_3.h index 4c044751069..50b9374fa98 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshEdgeCriteria_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshEdgeCriteria_3.h @@ -46,7 +46,7 @@ typedef unspecified_type FT; /*! -Returns the value of the sizing field (i.e.\ the maximum edge length) at point `p`. +Returns the value of the sizing field (i.e., the maximum edge length) at point `p`. */ FT sizing_field(const Point_3& p); diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshFacetCriteria_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshFacetCriteria_3.h index 325dedeff05..f25f9a0f4f3 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshFacetCriteria_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshFacetCriteria_3.h @@ -55,7 +55,7 @@ the facet is good with regard to the criteria. In addition, an object of this type must contain an object of type `Facet_quality` if it represents a bad facet. `Facet_quality` must be accessible by -`operator*()`. Note that `boost::optional` is +`operator*()`. Note that `std::optional` is a natural model of this concept. */ typedef unspecified_type Is_facet_bad; diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshPolyline_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshPolyline_3.h index bfe6e4b8d98..b2a0fb4fa9c 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshPolyline_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshPolyline_3.h @@ -2,7 +2,7 @@ \ingroup PkgMesh3SecondaryConcepts \cgalConcept -The concept `MeshPolyline_3` implements a container of points designed to represent a polyline (i.e.\ a sequence of points). +The concept `MeshPolyline_3` implements a container of points designed to represent a polyline (i.e., a sequence of points). Types and functions provided in this concept are such as standard template library containers are natural models of this concept. diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshTriangulationTraits_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshTriangulationTraits_3.h index 99b7a9d8270..26d3d9403dd 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshTriangulationTraits_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshTriangulationTraits_3.h @@ -334,11 +334,11 @@ public: /*! A constructor object that must provide the function operators: - `boost::optional< boost::variant< T... > > operator()(Segment_3 s, Plane_3 p)` + `std::optional< std::variant< T... > > operator()(Segment_3 s, Plane_3 p)` - `boost::optional< boost::variant< T... > > operator()(Ray_3 r, Iso_cuboid i)` + `std::optional< std::variant< T... > > operator()(Ray_3 r, Iso_cuboid i)` - `boost::optional< boost::variant< T... > > operator()(Segment_3 s, Iso_cuboid i)` + `std::optional< std::variant< T... > > operator()(Segment_3 s, Iso_cuboid i)` which returns the intersection region of two geometrical objects. */ diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshVertexBase_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshVertexBase_3.h index 4739741b01c..a80d9c5b28f 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshVertexBase_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshVertexBase_3.h @@ -22,7 +22,7 @@ each cell (see below). \cgalRefines{SimplicialMeshVertexBase_3,RegularTriangulationVertexBase_3,SurfaceMeshVertexBase_3} -\cgalHasModel `CGAL::Mesh_vertex_base_3` +\cgalHasModel `CGAL::Mesh_vertex_base_3` \sa `CGAL::make_mesh_3()` \sa `CGAL::refine_mesh_3()` diff --git a/Mesh_3/doc/Mesh_3/Concepts/TriangleAccessor_3.h b/Mesh_3/doc/Mesh_3/Concepts/TriangleAccessor_3.h deleted file mode 100644 index 03f9ff4880a..00000000000 --- a/Mesh_3/doc/Mesh_3/Concepts/TriangleAccessor_3.h +++ /dev/null @@ -1,66 +0,0 @@ -/*! -\ingroup PkgMesh3SecondaryConcepts -\cgalConcept - -The concept `TriangleAccessor_3` represents an accessor to a triangulated polyhedral -surface, intersection free and without boundaries. - -\cgalHasModel `CGAL::Triangle_accessor_3,K>` - -\sa `CGAL::Polyhedral_mesh_domain_3` -\sa `CGAL::make_mesh_3()` - -*/ - -class TriangleAccessor_3 { -public: - -/// \name Types -/// @{ - -/*! -Triangle type. Must be a model of DefaultConstructible and -CopyConstructible. -*/ -typedef unspecified_type Triangle_3; - -/*! -Triangle iterator type. Must be a model of InputIterator. -*/ -typedef unspecified_type Triangle_iterator; - -/*! -Handle to a `Triangle_3`. Must be -constructible from `Triangle_iterator`. It may be `Triangle_Iterator` itself. -*/ -typedef unspecified_type Triangle_handle; - -/*! -Polyhedron type. -*/ -typedef unspecified_type Polyhedron; - -/// @} - -/// \name Operations -/// @{ - -/*! -Returns a `Triangle_iterator` to visit the triangles of polyhedron `p`. -*/ -Triangle_iterator triangles_begin(Polyhedron p); - -/*! -Returns the past-the-end iterator for the above iterator. -*/ -Triangle_iterator triangles_end(Polyhedron p); - -/*! -Returns a `Triangle_3` -object from handle `h`. -*/ -Triangle_3 triangle(Triangle_handle h); - -/// @} - -}; /* end TriangleAccessor_3 */ diff --git a/Mesh_3/doc/Mesh_3/Doxyfile.in b/Mesh_3/doc/Mesh_3/Doxyfile.in index af31a706c75..18c58c248e6 100644 --- a/Mesh_3/doc/Mesh_3/Doxyfile.in +++ b/Mesh_3/doc/Mesh_3/Doxyfile.in @@ -1,10 +1,22 @@ @INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} +# custom options for this package + +EXTRACT_ALL = false +HIDE_UNDOC_CLASSES = true +HIDE_UNDOC_MEMBERS = true +WARN_IF_UNDOCUMENTED = false # macros to be used inside the code ALIASES += "cgalDescribePolylineType=A polyline is defined as a sequence of points, each pair of contiguous points defines a segment of the polyline. If the first and last points of the polyline are identical, the polyline is closed." INPUT += \ + ${CGAL_Mesher_level_INCLUDE_DIR}/CGAL/Mesh_optimization_return_code.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_triangulation_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_polyhedron_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polyhedral_mesh_domain_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polyhedral_mesh_domain_with_features_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polyhedral_complex_mesh_domain_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Implicit_to_labeling_function_wrapper.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_domain_with_polyline_features_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_3/generate_label_weights.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Sizing_field_with_aabb_tree.h \ @@ -17,6 +29,10 @@ INPUT += \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/make_mesh_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Labeled_mesh_domain_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_criteria_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_constant_domain_field_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_cell_criteria_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_facet_criteria_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_edge_criteria_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_facet_topology.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_vertex_base_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_cell_base_3.h \ diff --git a/Mesh_3/doc/Mesh_3/Mesh_3.txt b/Mesh_3/doc/Mesh_3/Mesh_3.txt index 521e98a0e1f..abe63982656 100644 --- a/Mesh_3/doc/Mesh_3/Mesh_3.txt +++ b/Mesh_3/doc/Mesh_3/Mesh_3.txt @@ -296,7 +296,7 @@ also inserts a small set of auxiliary vertices that belong to the triangulation but are isolated from the complex at the end of the meshing process. These so-called \em isolated vertices belong to the triangulation but not to any cell -of the `C3T3`. They can be removed using the function `remove_isolated_vertices()`. +of the `C3T3`. They can be removed using the function `remove_isolated_vertices()` of `CGAL::Mesh_complex_3_in_triangulation_3`. \section Mesh_3_section_interface Interface @@ -494,7 +494,7 @@ protecting ball centers that are consecutive on a 1-feature. This parameter has The four additional parameters are optimization parameters. They control which optimization processes are performed -and allow the user to tune the parameters of the activated optimization processes. +and enable the user to tune the parameters of the activated optimization processes. These parameters have internal types which are not described but the library provides global functions to generate appropriate values of these types: @@ -679,7 +679,7 @@ View of 3D meshes produced from a polyhedral domain with a nested surface. The following code creates a polyhedral domain, with only one polyhedron, and no "bounding polyhedron", so the volumetric part of the domain will be empty. -This allows to remesh a surface, and is equivalent to the function `make_surface_mesh()`. +This enables to remesh a surface, and is equivalent to the function `make_surface_mesh()`. \cgalExample{Mesh_3/remesh_polyhedral_surface.cpp} @@ -725,7 +725,7 @@ to the voxels surface, causing an aliasing effect. A solution to generate a smooth and accurate output surface was described by Stalling et al in \cgalCite{stalling1998weighted}. It consists in generating a second input image, made of integer coefficients called *weights*, and use those weights to define smoother domain boundaries. -The 3D image of weights can be generated using `CGAL::Mesh_3::generate_weights()` as shown in +The 3D image of weights can be generated using `CGAL::Mesh_3::generate_label_weights()` as shown in the following example. \cgalExample{Mesh_3/mesh_3D_weighted_image.cpp} @@ -1428,6 +1428,6 @@ and Mariette Yvinec. It appeared first in the release 3.8 of \cgal. In 2013, Clément Jamin made the meshing and optimization algorithms parallel on multi-core shared-memory architectures. -\todo Add reference to paper or research report when it is available. + */ } /* namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/PackageDescription.txt b/Mesh_3/doc/Mesh_3/PackageDescription.txt index 553358a202b..e063c6eeee7 100644 --- a/Mesh_3/doc/Mesh_3/PackageDescription.txt +++ b/Mesh_3/doc/Mesh_3/PackageDescription.txt @@ -27,7 +27,7 @@ /// \defgroup PkgMesh3Functions Mesh Generation Functions /// \ingroup PkgMesh3Ref /// The two main functions to generate a mesh are `make_mesh_3()` and `refine_mesh_3()`. -/// The other functions allow to optimize an existing mesh. +/// The other functions enable to optimize an existing mesh. /// \defgroup PkgMesh3Parameters Parameter Functions /// \ingroup PkgMesh3Ref @@ -41,7 +41,6 @@ /*! \addtogroup PkgMesh3Ref -\todo check generated documentation \cgalPkgDescriptionBegin{3D Mesh Generation,PkgMesh3} \cgalPkgPicture{Mesh_3/fig/multilabel_mesher_small.jpg} \cgalPkgSummaryBegin @@ -82,34 +81,29 @@ related to the template parameters of some models of the main concepts: - `MeshVertexBase_3` - `MeshDomainField_3` - `MeshPolyline_3` -- `TriangleAccessor_3` \cgalCRPSection{Classes} -- `CGAL::Mesh_triangulation_3` -- `CGAL::Mesh_vertex_base_3` -- `CGAL::Compact_mesh_cell_base_3` -- `CGAL::Mesh_cell_base_3` +- `CGAL::Mesh_triangulation_3` +- `CGAL::Mesh_vertex_base_3` +- `CGAL::Compact_mesh_cell_base_3` +- `CGAL::Mesh_cell_base_3` - `CGAL::Mesh_criteria_3` - `CGAL::Mesh_cell_criteria_3` - `CGAL::Mesh_facet_criteria_3` - `CGAL::Mesh_edge_criteria_3` -- `CGAL::Mesh_constant_domain_field_3` +- `CGAL::Mesh_constant_domain_field_3` The following classes are models of domain concepts and their associated classes: - `CGAL::Labeled_mesh_domain_3` -- `CGAL::Polyhedral_mesh_domain_3` +- `CGAL::Polyhedral_mesh_domain_3` - `CGAL::Polyhedral_mesh_domain_with_features_3` - `CGAL::Polyhedral_complex_mesh_domain_3` -- `CGAL::Mesh_domain_with_polyline_features_3` +- `CGAL::Mesh_domain_with_polyline_features_3` - `CGAL::Mesh_polyhedron_3` -- `CGAL::Triangle_accessor_3,K>` - `CGAL::Implicit_multi_domain_to_labeling_function_wrapper` -- `CGAL::Implicit_mesh_domain_3` (deprecated) -- `CGAL::Labeled_image_mesh_domain_3` (deprecated) -- `CGAL::Gray_image_mesh_domain_3` (deprecated) The following functors are available for feature detection: diff --git a/Mesh_3/doc/Mesh_3/dependencies b/Mesh_3/doc/Mesh_3/dependencies index be614f85b31..3219d3896f4 100644 --- a/Mesh_3/doc/Mesh_3/dependencies +++ b/Mesh_3/doc/Mesh_3/dependencies @@ -10,8 +10,8 @@ Triangulation_3 Periodic_3_triangulation_3 TDS_3 Polyhedron +Surface_mesh Miscellany Mesh_2 Polygon_mesh_processing SMDS_3 - diff --git a/Mesh_3/doc/Mesh_3/examples.txt b/Mesh_3/doc/Mesh_3/examples.txt index ce8dbbb1b34..d9c2eb95d71 100644 --- a/Mesh_3/doc/Mesh_3/examples.txt +++ b/Mesh_3/doc/Mesh_3/examples.txt @@ -20,9 +20,12 @@ \example Mesh_3/mesh_optimization_example.cpp \example Mesh_3/mesh_optimization_lloyd_example.cpp \example Mesh_3/mesh_polyhedral_domain.cpp +\example Mesh_3/mesh_polyhedral_domain_sm.cpp \example Mesh_3/mesh_polyhedral_complex.cpp +\example Mesh_3/mesh_polyhedral_complex_sm.cpp \example Mesh_3/remesh_polyhedral_surface.cpp \example Mesh_3/mesh_polyhedral_domain_with_features.cpp +\example Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp \example Mesh_3/mesh_polyhedral_domain_with_features_sizing.cpp \example Mesh_3/mesh_polyhedral_domain_with_surface_inside.cpp \example Mesh_3/mesh_polyhedral_domain_with_lipschitz_sizing.cpp diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index dbcd3ea7cfa..0b59088e04a 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -49,6 +49,9 @@ target_link_libraries(mesh_hybrid_mesh_domain PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_sphere.cpp") target_link_libraries(mesh_implicit_sphere PUBLIC CGAL::Eigen3_support) +create_single_source_cgal_program("mesh_implicit_ellipsoid.cpp") +target_link_libraries(mesh_implicit_ellipsoid PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("mesh_implicit_sphere_variable_size.cpp") target_link_libraries(mesh_implicit_sphere_variable_size PUBLIC CGAL::Eigen3_support) diff --git a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp index fb528891cd1..32a612b7b1d 100644 --- a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp @@ -99,9 +99,9 @@ public: { Is_in_domain(const Hybrid_domain& domain) : r_domain_(domain) {} - boost::optional operator()(const K::Point_3& p) const + std::optional operator()(const K::Point_3& p) const { - boost::optional subdomain_index = + std::optional subdomain_index = r_domain_.implicit_domain.is_in_domain_object()(p); if(subdomain_index) return 2; else return r_domain_.polyhedron_domain.is_in_domain_object()(p); diff --git a/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h b/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h index d30acbcb141..1e5ee765731 100644 --- a/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h +++ b/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h @@ -437,7 +437,7 @@ public: // CHECKING - // the following trivial is_valid allows + // the following trivial is_valid enables // the user of derived cell base classes // to add their own purpose checking bool is_valid(bool = false, int = 0) const diff --git a/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h b/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h deleted file mode 100644 index 99bc1e6b313..00000000000 --- a/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2009 INRIA Sophia-Antipolis (France). -// Copyright (c) 2012 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Stephane Tayeb, Laurent Rineau -// - -#ifndef CGAL_GRAY_IMAGE_MESH_DOMAIN_3_H -#define CGAL_GRAY_IMAGE_MESH_DOMAIN_3_H - -#include - -#include - -#include -#include -#include -#include - -namespace CGAL { - -/** - * @class Gray_image_mesh_domain_3 - * - * - */ -template, - typename Subdomain_index = int> -class -CGAL_DEPRECATED_MSG -( "The class template `CGAL::Gray_image_mesh_domain_3` is now deprecated. " - "Use the static member function template " - "`Labeled_mesh_domain_3::create_gray_image_mesh_domain` instead.") -Gray_image_mesh_domain_3 - : public Labeled_mesh_domain_3 -{ -public: - typedef Image_word_type_ Image_word_type; - typedef Mesh_3::Image_to_labeled_function_wrapper Wrapper; - - typedef Labeled_mesh_domain_3 Base; - - typedef typename Base::Sphere_3 Sphere_3; - typedef typename Base::FT FT; - typedef BGT Geom_traits; - typedef CGAL::Bbox_3 Bbox_3; - - /// Constructor - Gray_image_mesh_domain_3(const Image& image, - const Image_word_type iso_value, - const Image_word_type value_outside = 0., - const FT& error_bound = FT(1e-3), - CGAL::Random* p_rng = nullptr) - : Base(parameters::function = Wrapper(image, - Transform(iso_value), - Transform(iso_value)(value_outside)), - parameters::bounding_object = Mesh_3::internal::compute_bounding_box(image), - parameters::relative_error_bound = error_bound, - parameters::p_rng = p_rng) - { - CGAL_assertion(Transform(iso_value)(value_outside) == 0); - } - - Gray_image_mesh_domain_3(const Image& image, - const Transform& transform, - const Image_word_type value_outside = 0., - const FT& error_bound = FT(1e-3), - CGAL::Random* p_rng = nullptr) - : Base(parameters::function = Wrapper(image, transform, transform(value_outside)), - parameters::bounding_object = Mesh_3::internal::compute_bounding_box(image), - parameters::relative_error_bound = error_bound, - parameters::p_rng = p_rng) - { - CGAL_assertion(transform(value_outside) == 0); - } - - /// Destructor - virtual ~Gray_image_mesh_domain_3() {} -}; // end class Gray_image_mesh_domain_3 - -} // end namespace CGAL - -#include - - -#endif // CGAL_GRAY_IMAGE_MESH_DOMAIN_3_H diff --git a/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h b/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h deleted file mode 100644 index 62c9eb47b5c..00000000000 --- a/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2009 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Stéphane Tayeb -// -//****************************************************************************** -// File Description : -// class Implicit_mesh_domain_3. See class description. -//****************************************************************************** - -#ifndef CGAL_IMPLICIT_MESH_DOMAIN_3_H -#define CGAL_IMPLICIT_MESH_DOMAIN_3_H - -#include - -#include - -#include -#include -#include -#include - -namespace CGAL { - - -/** - * @class Implicit_mesh_domain_3 - * - * Implements mesh_traits for a domain defined as the negative values of - * an implicit function. - */ -template > -class -CGAL_DEPRECATED_MSG -( "The class template `CGAL::Implicit_mesh_domain_3` is now deprecated. " - "Use the static member function template " - "`Labeled_mesh_domain_3::create_implicit_image_mesh_domain` instead.") -Implicit_mesh_domain_3 - : public Labeled_mesh_domain_3 -{ -public: - /// Base type - typedef Labeled_mesh_domain_3 Base; - - /// Public types - typedef typename Base::Sphere_3 Sphere_3; - typedef typename Base::FT FT; - typedef BGT Geom_traits; - - /** - * Constructor - * @param f the function which negative values defines the domain - * @param bounding_sphere a bounding sphere of the domain - * @param error_bound the error bound relative to the sphere radius - */ - Implicit_mesh_domain_3(Function_ f, - const Sphere_3& bounding_sphere, - const FT& error_bound = FT(1e-6), - CGAL::Random* p_rng = nullptr) - : Base(parameters::function = Wrapper(f), parameters::bounding_object = bounding_sphere, parameters::relative_error_bound = error_bound, - parameters::null_subdomain_index = Null_subdomain_index(), parameters::p_rng = p_rng) {} - - /// Destructor - virtual ~Implicit_mesh_domain_3() {} - - using Base::bbox; -private: - // Disabled copy constructor & assignment operator - typedef Implicit_mesh_domain_3 Self; - Implicit_mesh_domain_3(const Self& src); - Self& operator=(const Self& src); - -}; // end class Implicit_mesh_domain_3 - - -} // end namespace CGAL - -#include - -#endif // CGAL_IMPLICIT_MESH_DOMAIN_3_H 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 0be7ea4e741..7e3af3de705 100644 --- a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -140,7 +140,32 @@ private: }; // end class Implicit_to_labeling_function_wrapper + + /*! +\ingroup PkgMesh3Domains + +The class `Implicit_multi_domain_to_labeling_function_wrapper` is a helping class to get a function with integer values +labeling the components of a multidomain. The multidomain is described through a set of functions {fi(p), i=1, ...n}. +Each component corresponds to a sign vector [s1, s2, ..., sn] where si is the sign of the function fi(p) at a point p of the component. +This wrapper class can be passed to `Labeled_mesh_domain_3` as first template parameter. + +\par Example +For example, the multidomain described by the three functions [f1,f2,f3] and the two sign vectors [-,-,+] and [+,-,+] + includes two components.
      +The first one matches the locus of points satisfying f1(p)<0 and f2(p)<0 and f3(p)>0.
      +The second one matches the locus of points satisfying f1(p)>0 and f2(p)<0 and f3(p)>0.
      + +\tparam Function provides the definition of the function. +This parameter stands for a model of the concept `ImplicitFunction` described in the surface mesh generation package. +The number types `Function::FT` and `BGT::FT` are required to match. + +\sa `CGAL::Labeled_mesh_domain_3`. +*/ +#ifdef DOXYGEN_RUNNING +template +#else template +#endif class Implicit_multi_domain_to_labeling_function_wrapper { template @@ -159,10 +184,20 @@ class Implicit_multi_domain_to_labeling_function_wrapper }; public: - typedef int return_type; - typedef ImplicitFunction Function; - typedef typename Implicit_function_traits::Point Point_3; - typedef std::vector Function_vector; + /// \name Types + /// @{ + +#ifdef DOXYGEN_RUNNING + typedef typename Function::Point Point_3; +#else + typedef ImplicitFunction Function; + typedef typename Implicit_function_traits::Point Point_3; + typedef int return_type; +#endif + + typedef std::vector Function_vector; + + /// @} private: std::vector funcs; @@ -170,13 +205,24 @@ private: std::vector bmasks; public: - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector >& vps) - : funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false)) + /// \name Creation + /// @{ + + /*! + * \brief Construction from a vector of implicit functions and a vector of vector of signs. + * + * \param implicit_functions the vector of implicit functions. + * \param position_vectors the vector of vector of signs. Each vector of positions describes a component. + * + * \sa `Sign` + */ + Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions, const std::vector >& position_vectors) + : funcs(implicit_functions), bmasks(position_vectors.size(), Bmask(funcs.size() * 2, false)) { CGAL_assertion(funcs.size() != 0); std::size_t mask_index = 0; - for (std::vector >::const_iterator mask_iter = vps.begin(), mask_end_iter = vps.end(); + for (std::vector >::const_iterator mask_iter = position_vectors.begin(), mask_end_iter = position_vectors.end(); mask_iter != mask_end_iter; ++mask_iter) { @@ -198,9 +244,15 @@ public: } std::sort(bmasks.begin(), bmasks.end()); } + /*! + * \brief Construction from a vector of implicit functions. - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf) - : funcs(vf) + * \param implicit_functions the vector of implicit functions. + * + * Position vectors are built automatically so that the union of components equals the union of the functions. + */ + Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions) + : funcs(implicit_functions) { CGAL_assertion(funcs.size() != 0); @@ -225,13 +277,19 @@ public: std::sort(bmasks.begin(), bmasks.end()); } - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector& vps) - : funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false)) + /*! + * \brief Construction from a vector of implicit functions and a vector of strings. + * + * \param implicit_functions the vector of implicit functions. + * \param position_strings the vector of strings. The strings contained in this vector must contain '+' or '-' only. Each string (vector of positions) describes a component. + */ + Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions, const std::vector& position_strings) + : funcs(implicit_functions), bmasks(position_strings.size(), Bmask(funcs.size() * 2, false)) { CGAL_assertion(funcs.size() != 0); std::size_t mask_index = 0; - for (std::vector::const_iterator mask_iter = vps.begin(), mask_end_iter = vps.end(); + for (std::vector::const_iterator mask_iter = position_strings.begin(), mask_end_iter = position_strings.end(); mask_iter != mask_end_iter; ++mask_iter) { @@ -254,6 +312,8 @@ public: std::sort(bmasks.begin(), bmasks.end()); } + /// @} + return_type operator() (const Point_3& p) const { Bmask bmask(funcs.size() * 2, false); @@ -279,9 +339,7 @@ public: } }; -} // end namespace CGAL - - +} // end namespace CGAL #if defined(BOOST_MSVC) # pragma warning(pop) diff --git a/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h deleted file mode 100644 index d9bd487410a..00000000000 --- a/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2009 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Stephane Tayeb -// -//****************************************************************************** -// File Description : -// -// -//****************************************************************************** - -#ifndef CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H -#define CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H - -#include - -#include - -#include -#include -#include -#include -#include -#include - -namespace CGAL { - -/** - * @class Labeled_image_mesh_domain_3 - * - * - */ -template -class -CGAL_DEPRECATED_MSG -( "The class template `CGAL::Labeled_image_mesh_domain_3` is now deprecated. " - "Use the static member function template " - "`Labeled_mesh_domain_3::create_labeled_image_mesh_domain` instead.") -Labeled_image_mesh_domain_3 - : public Labeled_mesh_domain_3 -{ -public: - typedef Image_word_type_ Image_word_type; - typedef typename Default::Get - - >::type Wrapper; - typedef typename Default::Get::type Null; - - typedef Labeled_mesh_domain_3 Base; - - typedef typename Base::Sphere_3 Sphere_3; - typedef typename Base::FT FT; - typedef BGT Geom_traits; - typedef CGAL::Bbox_3 Bbox_3; - typedef CGAL::Identity Identity; - - /// Constructor - Labeled_image_mesh_domain_3(const Image& image, - const FT& error_bound = FT(1e-3), - Subdomain_index value_outside = 0, - Null null = Null(), - CGAL::Random* p_rng = nullptr) - : Base(parameters::function = Wrapper(image, Identity(), value_outside), - parameters::bounding_object = compute_bounding_box(image), - parameters::relative_error_bound = error_bound, - parameters::null_subdomain_index = null, - parameters::p_rng = p_rng) - {} - - Labeled_image_mesh_domain_3(const Image& image, - const FT error_bound, - CGAL::Random* p_rng) - : Base(parameters::function = Wrapper(image), - parameters::bounding_object = compute_bounding_box(image), - parameters::relative_error_bound = error_bound, - parameters::p_rng = p_rng) - {} - - /// Destructor - virtual ~Labeled_image_mesh_domain_3() {} - - using Base::bbox; - -private: - /// Returns a box enclosing image `im` - Bbox_3 compute_bounding_box(const Image& im) const - { - return Bbox_3(-im.vx()+im.tx(), - -im.vy()+im.ty(), - -im.vz()+im.tz(), - double(im.xdim()+1)*im.vx()+im.tx(), - double(im.ydim()+1)*im.vy()+im.ty(), - double(im.zdim()+1)*im.vz()+im.tz()); - } -}; // end class Labeled_image_mesh_domain_3 - - - -} // end namespace CGAL - -#include - -#endif // CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H diff --git a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h index 50d211ccc1d..99f7d003957 100644 --- a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h @@ -47,7 +47,7 @@ #ifdef CGAL_MESH_3_VERBOSE # include #endif -#include +#include #include #include @@ -336,12 +336,14 @@ Let `p` be a Point. `CGAL::Implicit_multi_domain_to_labeling_function_wrapper` is a good candidate for this template parameter if there are several components to mesh. -The function type can be any model of the concept `Callable` compatible with the signature `Subdomain_index(const Point_3&)`: it can be a function, a function object, a lambda expression... that takes a `%Point_3` as argument, and returns a type convertible to `Subdomain_index`. +The function type can be any model of the concept `Callable` compatible with the signature +`Subdomain_index(const %Point_3&)`: it can be a function, a function object, a lambda expression... +that takes a `%Point_3` as argument, and returns a type convertible to `Subdomain_index`. \cgalModels `MeshDomain_3` -\sa `Implicit_multi_domain_to_labeling_function_wrapper` -\sa `CGAL::make_mesh_3()`. +\sa `CGAL::Implicit_multi_domain_to_labeling_function_wrapper` +\sa `CGAL::make_mesh_3()` */ template > class Labeled_mesh_domain_3 #ifndef DOXYGEN_RUNNING -: protected details::Labeled_mesh_domain_3_impl + : protected details::Labeled_mesh_domain_3_impl #endif { public: @@ -381,12 +383,12 @@ public: /// The number type (a field type) of the geometric traits class typedef typename Geom_traits::FT FT; ///@} -#else - typedef boost::optional Subdomain; +#else // DOXYGEN_RUNNING + typedef std::optional Subdomain; // Type of indexes for cells of the input complex typedef Surface_patch_index_ Surface_patch_index; - typedef boost::optional Surface_patch; + typedef std::optional Surface_patch; // Type of indexes to characterize the lowest dimensional face of the input // complex on which a vertex lie @@ -428,7 +430,7 @@ public: typedef typename BGT::FT FT; typedef BGT Geom_traits; using Impl_details::construct_pair_functor; -#endif +#endif // DOXYGEN_RUNNING /// \name Creation /// @{ @@ -451,16 +453,19 @@ public: * \cgalParamDefault{FT(1e-3)} * \cgalParamNEnd * \cgalNamedParamsEnd + * * \cgalHeading{Example} * From the example (\ref Mesh_3/mesh_implicit_domains_2.cpp): * \snippet Mesh_3/mesh_implicit_domains_2.cpp Domain creation - * */ template Labeled_mesh_domain_3(const Function& function, const Bounding_object& bounding_object, - const CGAL_NP_CLASS& np = parameters::default_values(), - typename std::enable_if>::type* = nullptr) + const CGAL_NP_CLASS& np = parameters::default_values() +#ifndef DOXYGEN_RUNNING + , typename std::enable_if>::type* = nullptr +#endif // DOXYGEN_RUNNING + ) :Impl_details(function, bounding_object, parameters::choose_parameter(parameters::get_parameter(np, internal_np::error_bound), FT(1e-3)), @@ -496,7 +501,7 @@ public: template #if !defined(BOOST_MSVC) CGAL_DEPRECATED -#endif +#endif // BOOST_MSVC Labeled_mesh_domain_3(const Function& function, const Bounding_object& bounding_object, double error_bound, @@ -505,8 +510,8 @@ public: bounding_object, parameters::relative_error_bound(error_bound)) {} -#endif -#endif +#endif // CGAL_NO_DEPRECATED_CODE +#endif // DOXYGEN_RUNNING /// \name Creation of domains from 3D images /// @{ @@ -1115,7 +1120,7 @@ public: { const auto clipped = CGAL::intersection(query, r_domain_.bbox_); if(clipped) - if(const Segment_3* s = boost::get(&*clipped)) + if(const Segment_3* s = std::get_if(&*clipped)) return this->operator()(*s); return Surface_patch(); @@ -1148,7 +1153,7 @@ public: Intersection operator()(const Segment_3& s) const { #ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 - CGAL_precondition(r_domain_.do_intersect_surface_object()(s) != boost::none); + CGAL_precondition(r_domain_.do_intersect_surface_object()(s) != std::nullopt); #endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 return this->operator()(s.source(),s.target()); } @@ -1243,7 +1248,7 @@ public: { const auto clipped = CGAL::intersection(query, r_domain_.bbox_); if(clipped) - if(const Segment_3* s = boost::get(&*clipped)) + if(const Segment_3* s = std::get_if(&*clipped)) return this->operator()(*s); return Intersection(); @@ -1278,14 +1283,14 @@ public: * where lies a vertex with dimension 2 and index `index`. */ Surface_patch_index surface_patch_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } /* * Returns the index of the subdomain containing a vertex * with dimension 3 and index `index`. */ Subdomain_index subdomain_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } // ----------------------------------- // Backward Compatibility diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index fa30efc12ca..6d67d3d627c 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -36,10 +36,10 @@ #include #endif -#include #include #include #include +#include #ifdef CGAL_LINKED_WITH_TBB # include @@ -375,10 +375,10 @@ template class C3T3_helpers_base { protected: - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; typedef typename Tr::Facet Facet; @@ -447,7 +447,7 @@ template class C3T3_helpers_base { protected: - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Vertex_handle Vertex_handle; @@ -622,14 +622,14 @@ class C3T3_helpers typedef typename Base::Lock_data_structure Lock_data_structure; typedef typename C3T3::Triangulation Tr; typedef Tr Triangulation; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::Vector_3 Vector_3; - typedef typename Gt::Plane_3 Plane_3; - typedef typename Gt::Tetrahedron_3 Tetrahedron; + typedef typename GT::Vector_3 Vector_3; + typedef typename GT::Plane_3 Plane_3; + typedef typename GT::Tetrahedron_3 Tetrahedron; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Facet Facet; @@ -640,8 +640,8 @@ class C3T3_helpers typedef typename C3T3::Subdomain_index Subdomain_index; typedef typename C3T3::Index Index; - typedef boost::optional Surface_patch; - typedef boost::optional Subdomain; + typedef std::optional Surface_patch; + typedef std::optional Subdomain; typedef std::vector Cell_vector; typedef std::set Cell_set; @@ -680,7 +680,7 @@ public: // ----------------------------------- // Public interface // ----------------------------------- - typedef boost::optional Update_mesh; + typedef std::optional Update_mesh; using Base::try_lock_point; using Base::try_lock_vertex; @@ -1115,17 +1115,17 @@ private: const bool update_c3t3, const bool update_surface_center) const { - typedef typename C3T3::Triangulation::Geom_traits Gt; - typedef typename Gt::Segment_3 Segment_3; - typedef typename Gt::Ray_3 Ray_3; - typedef typename Gt::Line_3 Line_3; + typedef typename C3T3::Triangulation::Geom_traits GT; + typedef typename GT::Segment_3 Segment_3; + typedef typename GT::Ray_3 Ray_3; + typedef typename GT::Line_3 Line_3; // Nothing to do for infinite facets if ( c3t3_.triangulation().is_infinite(facet) ) return Surface_patch(); // Functors - typename Gt::Is_degenerate_3 is_degenerate = + typename GT::Is_degenerate_3 is_degenerate = c3t3_.triangulation().geom_traits().is_degenerate_3_object(); // Get dual of facet @@ -1674,7 +1674,7 @@ private: /** * Returns the least square plane from v, using adjacent surface points */ - std::pair, Bare_point> + std::pair, Bare_point> get_least_square_surface_plane(const Vertex_handle& v, Surface_patch_index index = Surface_patch_index()) const; @@ -1683,15 +1683,15 @@ private: * @param v The vertex from which p was moved * @param p The point to project * @param index The index of the surface patch where v lies, if known. - * @return a `boost::optional` with the projected point if the projection - * was possible, or `boost::none`. + * @return a `std::optional` with the projected point if the projection + * was possible, or `std::nullopt`. * * `p` is projected using the normal of least square fitting plane * on `v` incident surface points. If `index` is specified, only * surface points that are on the same surface patch are used to compute * the fitting plane. */ - boost::optional + std::optional project_on_surface_if_possible(const Vertex_handle& v, const Bare_point& p, Surface_patch_index index = Surface_patch_index()) const; @@ -2466,7 +2466,7 @@ update_mesh_no_topo_change(const Vertex_handle& old_vertex, << " " << new_position << ")" << std::endl; #endif - typename Gt::Construct_opposite_vector_3 cov = tr_.geom_traits().construct_opposite_vector_3_object(); + typename GT::Construct_opposite_vector_3 cov = tr_.geom_traits().construct_opposite_vector_3_object(); //backup metadata std::set cells_backup; @@ -2674,7 +2674,7 @@ C3T3_helpers:: rebuild_restricted_delaunay(OutdatedCells& outdated_cells, Moving_vertices_set& moving_vertices) { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); typename OutdatedCells::iterator first_cell = outdated_cells.begin(); typename OutdatedCells::iterator last_cell = outdated_cells.end(); @@ -2774,7 +2774,7 @@ rebuild_restricted_delaunay(OutdatedCells& outdated_cells, ++it ) { const Weighted_point& initial_position = tr_.point(*it); - boost::optional opt_new_pos = project_on_surface(*it, cp(initial_position)); + std::optional opt_new_pos = project_on_surface(*it, cp(initial_position)); if ( opt_new_pos ) { @@ -2804,9 +2804,9 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, ForwardIterator last_cell, Moving_vertices_set& moving_vertices) { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = tr_.geom_traits().construct_vector_3_object(); - typename Gt::Equal_3 equal = tr_.geom_traits().equal_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = tr_.geom_traits().construct_vector_3_object(); + typename GT::Equal_3 equal = tr_.geom_traits().equal_3_object(); Update_c3t3 updater(domain_,c3t3_); @@ -2886,7 +2886,7 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, { Vertex_handle vh = it->first; const Weighted_point& initial_position = tr_.point(vh); - boost::optional opt_new_pos = project_on_surface(vh, cp(initial_position), it->second); + std::optional opt_new_pos = project_on_surface(vh, cp(initial_position), it->second); if ( opt_new_pos ) { @@ -2942,9 +2942,9 @@ move_point(const Vertex_handle& old_vertex, << " " << move << ")\n"; #endif - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); Cell_vector incident_cells_; incident_cells_.reserve(64); @@ -2993,9 +2993,9 @@ move_point(const Vertex_handle& old_vertex, << " " << move << ")\n"; #endif - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); Cell_vector incident_cells_; incident_cells_.reserve(64); @@ -3057,9 +3057,9 @@ move_point(const Vertex_handle& old_vertex, } //======= /Get incident cells ========== - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); const Weighted_point& position = tr_.point(old_vertex); const Weighted_point& new_position = cwp(translate(cp(position), move)); @@ -3366,14 +3366,14 @@ project_on_surface_aux(const Bare_point& p, const Bare_point& ref_point, const Vector_3& projection_vector) const { - typedef typename Gt::Segment_3 Segment_3; + typedef typename GT::Segment_3 Segment_3; // Build a segment directed as projection_direction, - typename Gt::Compute_squared_distance_3 sq_distance = tr_.geom_traits().compute_squared_distance_3_object(); - typename Gt::Compute_squared_length_3 sq_length = tr_.geom_traits().compute_squared_length_3_object(); - typename Gt::Construct_scaled_vector_3 scale = tr_.geom_traits().construct_scaled_vector_3_object(); - typename Gt::Is_degenerate_3 is_degenerate = tr_.geom_traits().is_degenerate_3_object(); - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Compute_squared_distance_3 sq_distance = tr_.geom_traits().compute_squared_distance_3_object(); + typename GT::Compute_squared_length_3 sq_length = tr_.geom_traits().compute_squared_length_3_object(); + typename GT::Construct_scaled_vector_3 scale = tr_.geom_traits().construct_scaled_vector_3_object(); + typename GT::Is_degenerate_3 is_degenerate = tr_.geom_traits().is_degenerate_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); typename MD::Construct_intersection construct_intersection = domain_.construct_intersection_object(); @@ -3419,7 +3419,7 @@ project_on_surface_aux(const Bare_point& p, template -std::pair::Plane_3>, +std::pair::Plane_3>, typename C3T3_helpers::Bare_point> C3T3_helpers:: get_least_square_surface_plane(const Vertex_handle& v, @@ -3427,7 +3427,7 @@ get_least_square_surface_plane(const Vertex_handle& v, { typedef typename C3T3::Triangulation::Triangle Triangle; - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Get incident facets Facet_vector facets; @@ -3466,7 +3466,7 @@ get_least_square_surface_plane(const Vertex_handle& v, // In some cases point is not a real surface point if ( triangles.empty() ) - return std::make_pair(boost::none, Bare_point(ORIGIN)); + return std::make_pair(std::nullopt, Bare_point(ORIGIN)); // Compute least square fitting plane Plane_3 plane; @@ -3492,7 +3492,7 @@ project_on_surface(const Vertex_handle& v, const Bare_point& p, Surface_patch_index index) const { - boost::optional opt_point = + std::optional opt_point = project_on_surface_if_possible(v, p, index); if(opt_point) return *opt_point; else return p; @@ -3500,7 +3500,7 @@ project_on_surface(const Vertex_handle& v, template -boost::optional::Bare_point> +std::optional::Bare_point> C3T3_helpers:: project_on_surface_if_possible(const Vertex_handle& v, const Bare_point& p, @@ -3509,15 +3509,15 @@ project_on_surface_if_possible(const Vertex_handle& v, // @todo should call below if it's available... // return domain_.project_on_surface(p); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Equal_3 equal = tr_.geom_traits().equal_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Equal_3 equal = tr_.geom_traits().equal_3_object(); // Get plane - std::pair, Bare_point> pl_rp + std::pair, Bare_point> pl_rp = get_least_square_surface_plane(v, index); - boost::optional opt_plane = pl_rp.first; - if(!opt_plane) return boost::none; + std::optional opt_plane = pl_rp.first; + if(!opt_plane) return std::nullopt; // Project const Weighted_point& position = tr_.point(v); diff --git a/Mesh_3/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h b/Mesh_3/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h index 4e9393a01e5..3e6824d27ea 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h +++ b/Mesh_3/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h @@ -45,8 +45,8 @@ public: typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; int nb_weighted_points; std::vector points; @@ -59,9 +59,9 @@ public: Cell_criteria_visitor_with_balls(const Tr& tr, const Cell_handle& ch) : Base(tr, ch) { - typename Gt::Compare_weighted_squared_radius_3 compare_sq_radius = + typename GT::Compare_weighted_squared_radius_3 compare_sq_radius = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Squared_radius_orthogonal_sphere sq_radius_ortho_sphere = + typename GT::Squared_radius_orthogonal_sphere sq_radius_ortho_sphere = tr.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); const Weighted_point& p = tr.point(ch, 0); diff --git a/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h b/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h index 8efaf67f799..5df9393ce5d 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h +++ b/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h @@ -57,9 +57,9 @@ std::vector> detect_features_in_image_with_know_word_type(const CGAL::Image_3& image, CGAL::Image_3& weights) { - using Gt = typename CGAL::Kernel_traits

      ::Kernel; + using GT = typename CGAL::Kernel_traits

      ::Kernel; using Point_3 = P; - using Vector_3 = typename Gt::Vector_3; + using Vector_3 = typename GT::Vector_3; using Polyline_type = std::vector; using Polylines = std::vector; @@ -86,7 +86,7 @@ detect_features_in_image_with_know_word_type(const CGAL::Image_3& image, using CGAL::IMAGEIO::static_evaluate; - using Del = CGAL::Delaunay_triangulation_3; + using Del = CGAL::Delaunay_triangulation_3; using Cell_handle = typename Del::Cell_handle; using Vertex_handle = typename Del::Vertex_handle; Del triangulation; diff --git a/Mesh_3/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h b/Mesh_3/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h index ec638dd29ef..0db721cd9d9 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h +++ b/Mesh_3/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h @@ -50,8 +50,8 @@ public: typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; int wp_nb_; double radius_ortho_shpere; @@ -68,13 +68,13 @@ public: , radius_ortho_shpere(0.) , ratio(0.) { - typename Gt::Compare_weighted_squared_radius_3 compare_sq_radius = + typename GT::Compare_weighted_squared_radius_3 compare_sq_radius = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = tr.geom_traits().compute_weight_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Squared_radius_orthogonal_sphere sq_radius_ortho_sphere = + typename GT::Squared_radius_orthogonal_sphere sq_radius_ortho_sphere = tr.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); Weighted_point wp1 = tr.point(fh.first, (fh.second+1)&3); diff --git a/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h b/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h index f709f4b4f1a..74dbb09b2ca 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h +++ b/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h @@ -44,7 +44,7 @@ template Facet_vector; typedef typename std::vector Cell_vector; - typedef typename Gt::FT FT; - typedef typename Gt::Point_2 Point_2; - typedef typename Gt::Vector_3 Vector_3; - typedef typename Gt::Tetrahedron_3 Tetrahedron_3; - typedef typename Gt::Plane_3 Plane_3; - typedef typename Gt::Aff_transformation_3 Aff_transformation_3; + typedef typename GT::FT FT; + typedef typename GT::Point_2 Point_2; + typedef typename GT::Vector_3 Vector_3; + typedef typename GT::Tetrahedron_3 Tetrahedron_3; + typedef typename GT::Plane_3 Plane_3; + typedef typename GT::Aff_transformation_3 Aff_transformation_3; public: typedef SizingField Sizing_field; @@ -261,7 +261,7 @@ private: { const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); Facet_vector incident_facets; incident_facets.reserve(64); @@ -306,8 +306,8 @@ private: const C3T3& c3t3, const Sizing_field& sizing_field) const { - typename Gt::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); const Weighted_point position = c3t3.triangulation().point(v); const Bare_point& p = cp(position); @@ -329,8 +329,8 @@ private: const C3T3& c3t3, const Sizing_field& sizing_field) const { - typename Gt::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); const Weighted_point& position = c3t3.triangulation().point(v); const Bare_point& p = cp(position); @@ -409,10 +409,10 @@ private: { CGAL_precondition(std::distance(first,last) >= 3); - typename Gt::Compute_area_3 area = c3t3.triangulation().geom_traits().compute_area_3_object(); - typename Gt::Construct_centroid_3 centroid = c3t3.triangulation().geom_traits().construct_centroid_3_object(); - typename Gt::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); + typename GT::Compute_area_3 area = c3t3.triangulation().geom_traits().compute_area_3_object(); + typename GT::Construct_centroid_3 centroid = c3t3.triangulation().geom_traits().construct_centroid_3_object(); + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); // Vertex current position const Weighted_point& vertex_weighted_position = c3t3.triangulation().point(v); @@ -460,8 +460,8 @@ private: const Bare_point& reference_point, const C3T3& c3t3) const { - typename Gt::Construct_base_vector_3 base = c3t3.triangulation().geom_traits().construct_base_vector_3_object(); - typename Gt::Construct_orthogonal_vector_3 orthogonal_vector = c3t3.triangulation().geom_traits().construct_orthogonal_vector_3_object(); + typename GT::Construct_base_vector_3 base = c3t3.triangulation().geom_traits().construct_base_vector_3_object(); + typename GT::Construct_orthogonal_vector_3 orthogonal_vector = c3t3.triangulation().geom_traits().construct_orthogonal_vector_3_object(); Vector_3 u = base(plane, 1); u = u / CGAL::sqrt(u*u); @@ -542,12 +542,12 @@ private: const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_tetrahedron_3 tetrahedron = tr.geom_traits().construct_tetrahedron_3_object(); - typename Gt::Construct_translated_point_3 translate = tr.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); - typename Gt::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object(); + typename GT::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_tetrahedron_3 tetrahedron = tr.geom_traits().construct_tetrahedron_3_object(); + typename GT::Construct_translated_point_3 translate = tr.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); + typename GT::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object(); Cell_circulator current_cell = tr.incident_cells(edge); Cell_circulator done = current_cell; 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 019cb18589c..0a3d73f0341 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h @@ -66,9 +66,9 @@ template class Mesh_global_optimizer_base { protected: - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Lock_data_structure Lock_data_structure; // The sizing field info is stored inside the move vector because it is computed @@ -125,9 +125,9 @@ class Mesh_global_optimizer_base { protected: - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Lock_data_structure Lock_data_structure; typedef tbb::concurrent_vector > Moves_vector; @@ -238,7 +238,7 @@ class Mesh_global_optimizer using Base::increment_frozen_points; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -247,8 +247,8 @@ class Mesh_global_optimizer typedef typename Tr::Edge Edge; typedef typename Tr::Vertex Vertex; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename std::vector Cell_vector; typedef typename std::vector Vertex_vector; @@ -378,7 +378,7 @@ private: Moves_vector_ & m_moves; bool m_do_freeze; Vertex_conc_vector & m_vertices_not_moving_any_more; - const Gt & m_gt; + const GT & m_gt; public: // Constructor @@ -387,7 +387,7 @@ private: Moves_vector_ &moves, bool do_freeze, Vertex_conc_vector &vertices_not_moving_any_more, - const Gt >) + const GT >) : m_mgo(mgo), m_sizing_field(sizing_field), m_moves(moves), @@ -409,8 +409,8 @@ private: // operator() void operator()(const Vertex_handle& oldv) const { - typename Gt::Construct_point_3 cp = m_gt.construct_point_3_object(); - typename Gt::Construct_translated_point_3 translate = m_gt.construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = m_gt.construct_point_3_object(); + typename GT::Construct_translated_point_3 translate = m_gt.construct_translated_point_3_object(); Vector_3 move = m_mgo.compute_move(oldv); if ( CGAL::NULL_VECTOR != move ) @@ -449,13 +449,13 @@ private: class Compute_sizing_field_value { MGO & m_mgo; - const Gt & m_gt; + const GT & m_gt; Local_list_ & m_local_lists; public: // Constructor Compute_sizing_field_value(MGO &mgo, - const Gt >, + const GT >, Local_list_ &local_lists) : m_mgo(mgo), m_gt(gt), @@ -472,7 +472,7 @@ private: // operator() void operator()(Vertex& v) const { - typename Gt::Construct_point_3 cp = m_gt.construct_point_3_object(); + typename GT::Construct_point_3 cp = m_gt.construct_point_3_object(); Vertex_handle vh = Tr::Triangulation_data_structure::Vertex_range::s_iterator_to(v); @@ -825,8 +825,8 @@ compute_moves(Moving_vertices_set& moving_vertices) else #endif // CGAL_LINKED_WITH_TBB { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); // Get move for each moving vertex typename Moving_vertices_set::iterator vit = moving_vertices.begin(); @@ -877,10 +877,10 @@ typename Mesh_global_optimizer::Vector_3 Mesh_global_optimizer:: compute_move(const Vertex_handle& v) { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_squared_length_3 sq_length = tr_.geom_traits().compute_squared_length_3_object(); - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_vector_3 vector = tr_.geom_traits().construct_vector_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_length_3 sq_length = tr_.geom_traits().compute_squared_length_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_vector_3 vector = tr_.geom_traits().construct_vector_3_object(); Cell_vector incident_cells; incident_cells.reserve(64); @@ -1059,7 +1059,7 @@ fill_sizing_field() else #endif //CGAL_LINKED_WITH_TBB { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Fill map with local size for(typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin(); @@ -1193,8 +1193,8 @@ typename Mesh_global_optimizer::FT Mesh_global_optimizer:: sq_circumradius_length(const Cell_handle& cell, const Vertex_handle& v) const { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_squared_distance_3 sq_distance = tr_.geom_traits().compute_squared_distance_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_distance_3 sq_distance = tr_.geom_traits().compute_squared_distance_3_object(); const Bare_point circumcenter = tr_.dual(cell); const Weighted_point& position = tr_.point(cell, cell->index(v)); diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h index e1d52d202f2..03e3262ef6b 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h @@ -88,10 +88,10 @@ class Mesh_sizing_field typename Tr::Concurrency_tag> { // Types - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; @@ -169,7 +169,7 @@ fill(const std::map& value_map) { typedef typename Tr::Finite_vertices_iterator Fvi; - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); for ( Fvi vit = tr_.finite_vertices_begin(); vit != tr_.finite_vertices_end(); ++ vit ) { @@ -196,7 +196,7 @@ typename Mesh_sizing_field::FT Mesh_sizing_field:: operator()(const Bare_point& p, const Cell_handle& c) const { - typename Gt::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); + typename GT::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); #ifdef CGAL_MESH_3_SIZING_FIELD_INEXACT_LOCATE //use the inexact locate (much faster than locate) to get a hint @@ -239,8 +239,8 @@ typename Mesh_sizing_field::FT Mesh_sizing_field:: interpolate_on_cell_vertices(const Bare_point& p, const Cell_handle& cell) const { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_volume_3 volume = tr_.geom_traits().compute_volume_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Compute_volume_3 volume = tr_.geom_traits().compute_volume_3_object(); // Interpolate value using tet vertices values const FT& va = cell->vertex(0)->meshing_info(); @@ -275,9 +275,9 @@ typename Mesh_sizing_field::FT Mesh_sizing_field:: interpolate_on_facet_vertices(const Bare_point& p, const Cell_handle& cell) const { - typename Gt::Compute_area_3 area = tr_.geom_traits().compute_area_3_object(); + typename GT::Compute_area_3 area = tr_.geom_traits().compute_area_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Find infinite vertex and put it in k0 int k0 = 0; int k1 = 1; diff --git a/Mesh_3/include/CGAL/Mesh_3/Odt_move.h b/Mesh_3/include/CGAL/Mesh_3/Odt_move.h index a2cbcc78cc5..4ec48adaf2e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Odt_move.h +++ b/Mesh_3/include/CGAL/Mesh_3/Odt_move.h @@ -34,7 +34,7 @@ template Facet_vector; typedef typename std::vector Cell_vector; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; public: typedef SizingField Sizing_field; @@ -66,8 +66,8 @@ public: // Compute move const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); Vector_3 move = CGAL::NULL_VECTOR; FT sum_volume(0); @@ -117,8 +117,8 @@ private: const Tr& tr, const Sizing_field& sizing_field) const { - typename Gt::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); - typename Gt::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object(); + typename GT::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); + typename GT::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object(); Bare_point c = centroid(tr.tetrahedron(cell)); FT s = sizing_field(c, std::make_pair(cell, true)); @@ -195,8 +195,8 @@ private: // const Tr& tr, // const Sizing_field& sizing_field) const // { -// typename Gt::Compute_area_3 area = tr.geom_traits().compute_area_3_object(); -// typename Gt::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); +// typename GT::Compute_area_3 area = tr.geom_traits().compute_area_3_object(); +// typename GT::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); // // Bare_point c = centroid(tr.triangle(facet)); // FT s = sizing_field(c, facet.first->vertex(0)); @@ -211,9 +211,9 @@ private: // const Tr& tr, // const Sizing_field& sizing_field) const // { -// typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); -// typename Gt::Construct_midpoint_3 midpoint = tr.geom_traits().construct_midpoint_3_object(); -// typename Gt::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); +// typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); +// typename GT::Construct_midpoint_3 midpoint = tr.geom_traits().construct_midpoint_3_object(); +// typename GT::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); // // const Weighted_point& wp1 = tr.point(cell, vertex_index_1); // const Weighted_point& wp2 = tr.point(cell, vertex_index_2); @@ -251,8 +251,8 @@ private: // // Vector_3 normal_outside(const Facet& f, const C3T3& c3t3) const // { -// typename Gt::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); -// typename Gt::Construct_normal_3 normal = c3t3.triangulation().geom_traits().construct_normal_3_object(); +// typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); +// typename GT::Construct_normal_3 normal = c3t3.triangulation().geom_traits().construct_normal_3_object(); // // const Cell_handle& cell = f.first; // const int& i = f.second; 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 31dab91f2b6..9062dc1894f 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 @@ -53,7 +53,7 @@ #ifndef CGAL_NO_ASSERTIONS # include // for float_prior #endif -#include +#include #include #include #include @@ -118,8 +118,8 @@ public: typedef typename Tr::Weighted_point Weighted_point; typedef typename Weighted_point::Weight Weight; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename C3T3::Cell_handle Cell_handle; typedef typename C3T3::Vertex_handle Vertex_handle; @@ -394,7 +394,7 @@ private: /// Returns the radius of the ball of vertex `v`. FT get_radius(const Vertex_handle& v) const { - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = c3t3_.triangulation().geom_traits().compute_weight_3_object(); const Weighted_point& v_wp = c3t3_.triangulation().point(v); @@ -584,7 +584,7 @@ insert_corners() Index p_index = domain_.index_from_corner_index(cit->first); #if CGAL_MESH_3_PROTECTION_DEBUG & 1 - std::cerr << "** treat corner #" << CGAL::IO::oformat(p_index) << std::endl; + std::cerr << "\n** treat corner #" << CGAL::IO::oformat(p_index) << std::endl; #endif // Get weight (the ball radius is given by the 'query_size' function) @@ -639,6 +639,13 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index, { using CGAL::Mesh_3::internal::weight_modifier; +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 + std::cerr << "insert_point( (" << p + << "), w=" << w + << ", dim=" << dim + << ", index=" << CGAL::IO::oformat(index) << ")\n"; +#endif + // Convert the dimension if it was set to a negative value (marker for special balls). if(dim < 0) dim = -1 - dim; @@ -649,7 +656,7 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index, // Insert point CGAL_assertion_code(size_type nb_vertices_before = c3t3_.triangulation().number_of_vertices()); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); const Weighted_point wp = cwp(p,w*weight_modifier); @@ -715,16 +722,17 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, << "), w=" << w << ", dim=" << dim << ", index=" << CGAL::IO::oformat(index) << ")\n"; + std::cerr << "triangulation dimension is " << c3t3_.triangulation().dimension() << std::endl; #endif const Tr& tr = c3t3_.triangulation(); - typename Gt::Compute_squared_distance_3 sq_distance = + typename GT::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); - typename Gt::Compare_weighted_squared_radius_3 cwsr = + typename GT::Compare_weighted_squared_radius_3 cwsr = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = tr.geom_traits().construct_weighted_point_3_object(); bool add_handle_to_unchecked = false; // add or not the new vertex to the set 'unchecked_vertices' @@ -749,8 +757,8 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, #endif // if sq_d < nearest_vh's weight - while ( cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER && - ! is_special(nearest_vh) ) + while ( ! is_special(nearest_vh) && + cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER ) { CGAL_assertion( minimal_size_ > 0 || sq_d > 0 ); @@ -839,7 +847,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, #if CGAL_MESH_3_PROTECTION_DEBUG & 1 std::cerr << "smart_insert_point: weight " << w << " reduced to " << min_sq_d - << "\n (near existing point: " << nearest_point << " )\n"; + << " (near existing point: " << nearest_point << " )\n"; #endif w = min_sq_d; add_handle_to_unchecked = true; @@ -860,38 +868,35 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, else // tr.dimension() <= 2 { // change size of existing balls which include p - bool restart = true; - while ( restart ) + for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(), + end = tr.finite_vertices_end() ; it != end ; ++it ) { - restart = false; - for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(), - end = tr.finite_vertices_end() ; it != end ; ++it ) + const Weighted_point& it_wp = tr.point(it); + FT sq_d = tr.min_squared_distance(p, cp(it_wp)); + if ( cwsr(it_wp, - sq_d) == CGAL::SMALLER ) { - const Weighted_point& it_wp = tr.point(it); - FT sq_d = tr.min_squared_distance(p, cp(it_wp)); - if ( cwsr(it_wp, - sq_d) == CGAL::SMALLER ) + bool special_ball = false; + if(minimal_weight_ != Weight() && sq_d < minimal_weight_) { - bool special_ball = false; - if(minimal_weight_ != Weight() && sq_d > minimal_weight_) { - sq_d = minimal_weight_; - w = minimal_weight_; - special_ball = true; - insert_a_special_ball = true; - } - if( ! is_special(it) ) { - *out++ = it; - change_ball_size(it, sq_d, special_ball); - restart = true; - } - break; + sq_d = minimal_weight_; + w = minimal_weight_; + special_ball = true; + insert_a_special_ball = true; + } + + if( ! is_special(it) ) { + *out++ = it; + change_ball_size(it, sq_d, special_ball); } } } + // Change w in order to be sure that no existing point will be included in (p,w) FT min_sq_d = w; +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 typename Tr::Point nearest_point; - // Change w in order to be sure that no existing point will be included - // in (p,w) +#endif + for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(), end = tr.finite_vertices_end() ; it != end ; ++it ) { @@ -899,7 +904,9 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, FT sq_d = tr.min_squared_distance(p, cp(it_wp)); if(sq_d < min_sq_d) { min_sq_d = sq_d; +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 nearest_point = c3t3_.triangulation().point(it); +#endif } } @@ -908,7 +915,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, #if CGAL_MESH_3_PROTECTION_DEBUG & 1 std::cerr << "smart_insert_point: weight " << w << " reduced to " << min_sq_d - << "\n (near existing point: " << nearest_point << " )\n"; + << " (near existing point: " << nearest_point << " )\n"; #endif w = min_sq_d; add_handle_to_unchecked = true; @@ -927,6 +934,11 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, } if( w < minimal_weight_) { +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 + std::cerr << "smart_insert_point: weight " << w + << " was smaller than minimal weight (" << minimal_weight_ << ")\n"; +#endif + w = minimal_weight_; insert_a_special_ball = true; } @@ -962,7 +974,7 @@ insert_balls_on_edges() if ( ! is_treated(curve_index) ) { #if CGAL_MESH_3_PROTECTION_DEBUG & 1 - std::cerr << "** treat curve #" << curve_index << std::endl; + std::cerr << "\n** treat curve #" << curve_index << std::endl; #endif const Bare_point& p = std::get<1>(*fit).first; const Bare_point& q = std::get<2>(*fit).first; @@ -978,7 +990,7 @@ insert_balls_on_edges() } else { - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); // Even if the curve is a cycle, it can intersect other curves at @@ -1032,7 +1044,7 @@ typename Protect_edges_sizing_field::Vertex_handle Protect_edges_sizing_field:: get_vertex_corner_from_point(const Bare_point& p, const Index&) const { - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); // Get vertex_handle associated to corner (dim=0) point @@ -1476,13 +1488,13 @@ bool Protect_edges_sizing_field:: do_balls_intersect(const Vertex_handle& va, const Vertex_handle& vb) const { - typename Gt::Construct_sphere_3 sphere = + typename GT::Construct_sphere_3 sphere = c3t3_.triangulation().geom_traits().construct_sphere_3_object(); - typename Gt::Do_intersect_3 do_intersect = + typename GT::Do_intersect_3 do_intersect = c3t3_.triangulation().geom_traits().do_intersect_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3_.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = c3t3_.triangulation().geom_traits().compute_weight_3_object(); const Weighted_point& wa = c3t3_.triangulation().point(va); @@ -1522,7 +1534,7 @@ change_ball_size(const Vertex_handle& v, const FT squared_size, const bool speci } // Store point data - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3_.triangulation().geom_traits().construct_point_3_object(); Index index = c3t3_.index(v); @@ -1530,7 +1542,7 @@ change_ball_size(const Vertex_handle& v, const FT squared_size, const bool speci Bare_point p = cp(c3t3_.triangulation().point(v)); // intentional copy // Remove v from the set of corners - boost::optional corner_index = boost::make_optional(false, Corner_index()); + std::optional corner_index; if ( c3t3_.is_in_complex(v) ) { corner_index = c3t3_.corner_index(v); @@ -1541,7 +1553,7 @@ change_ball_size(const Vertex_handle& v, const FT squared_size, const bool speci // Change v size c3t3_.triangulation().remove(v); - CGAL_assertion_code(typename Gt::Construct_weighted_point_3 cwp = + CGAL_assertion_code(typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object();) CGAL_assertion_code(const Weighted_point wp = cwp(p,w);) CGAL_assertion_code(Tr& tr = c3t3_.triangulation()); @@ -1730,9 +1742,9 @@ is_sampling_dense_enough(const Vertex_handle& v1, const Vertex_handle& v2, using CGAL::Mesh_3::internal::min_intersection_factor; CGAL_precondition(c3t3_.curve_index(v1,v2) == curve_index); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3_.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = c3t3_.triangulation().geom_traits().compute_weight_3_object(); // Get sizes 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 c5f9155d366..44e4f82b82d 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h @@ -672,7 +672,7 @@ scan_triangulation_impl() typedef typename Tr::All_cells_iterator All_cells_iterator; // WITH PARALLEL_FOR - // Copy cells into an std::vector to allow the use of tbb::parallel_for + // Copy cells into an std::vector to enable the use of tbb::parallel_for // which requires random-access. // Note that we're using all_cells_begin() instead of finite_cells_begin() // because it's faster to do the is_infinite() test in parallel. @@ -750,7 +750,7 @@ Refine_cells_3:: number_of_bad_elements_impl() { typedef typename MD::Subdomain_index Subdomain_index; - typedef boost::optional Subdomain; + typedef std::optional Subdomain; typedef typename Tr::Finite_cells_iterator Finite_cell_iterator; int count = 0; @@ -927,7 +927,7 @@ void Refine_cells_3:: treat_new_cell(const Cell_handle& cell) { - typedef boost::optional Subdomain; + typedef std::optional Subdomain; // treat cell const Subdomain subdomain = r_oracle_.is_in_domain_object()(r_tr_.dual(cell)); 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 8322c3d8630..b4e2af50375 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include @@ -243,10 +243,10 @@ class Refine_facets_3_base typedef typename Tr::Cell_handle Cell_handle; typedef typename Triangulation_mesher_level_traits_3::Zone Zone; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::Segment_3 Segment_3; - typedef typename Gt::Ray_3 Ray_3; - typedef typename Gt::Line_3 Line_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::Segment_3 Segment_3; + typedef typename GT::Ray_3 Ray_3; + typedef typename GT::Line_3 Line_3; public: Refine_facets_3_base(Tr& tr, Complex3InTriangulation3& c3t3, @@ -397,7 +397,7 @@ protected: typedef typename MeshDomain::Surface_patch_index Surface_patch_index; typedef typename MeshDomain::Index Index; - typedef typename boost::optional< + typedef typename std::optional< std::tuple > Facet_properties; @@ -892,8 +892,8 @@ private: typedef typename Tr::Cell_handle Cell_handle; typedef typename MeshDomain::Surface_patch_index Surface_patch_index; typedef typename MeshDomain::Index Index; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::Ray_3 Ray_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::Ray_3 Ray_3; private: // Disabled copy constructor @@ -1052,7 +1052,7 @@ Refine_facets_3:: number_of_bad_elements_impl() { typedef typename MD::Subdomain_index Subdomain_index; - typedef boost::optional Subdomain; + typedef std::optional Subdomain; typedef typename Tr::Finite_facets_iterator Finite_facet_iterator; int count = 0, count_num_bad_surface_facets = 0; @@ -1148,9 +1148,9 @@ number_of_bad_elements_impl() const Subdomain mc_subdomain = this->r_oracle_.is_in_domain_object()(this->r_tr_.dual(mc)); std::cerr << "*** Is in complex? c is marked in domain: " << this->r_c3t3_.is_in_complex(c) - << " / c is really in subdomain: " << c_subdomain + << " / c is really in subdomain: " << oformat(c_subdomain) << " / mc is marked in domain: " << this->r_c3t3_.is_in_complex(mc) - << " / mc is really in subdomain: " << mc_subdomain + << " / mc is really in subdomain: " << oformat(mc_subdomain) << std::endl; @@ -1625,15 +1625,15 @@ compute_facet_properties(const Facet& facet, CGAL_assertion( r_tr_.dimension() == 3 ); // types - typedef boost::optional Surface_patch; + typedef std::optional Surface_patch; typedef typename MD::Intersection Intersection; // Functor - typename Gt::Is_degenerate_3 is_degenerate = + typename GT::Is_degenerate_3 is_degenerate = r_tr_.geom_traits().is_degenerate_3_object(); - typename Gt::Compare_xyz_3 compare_xyz = + typename GT::Compare_xyz_3 compare_xyz = r_tr_.geom_traits().compare_xyz_3_object(); - typename Gt::Construct_segment_3 construct_segment = + typename GT::Construct_segment_3 construct_segment = r_tr_.geom_traits().construct_segment_3_object(); #ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 typename MD::Do_intersect_surface do_intersect_surface = @@ -1734,7 +1734,7 @@ is_facet_encroached(const Facet& facet, const Weighted_point& point) const { typedef typename MD::Subdomain_index Subdomain_index; - typedef boost::optional Subdomain; + typedef std::optional Subdomain; if ( r_tr_.is_infinite(facet) || ! this->is_facet_on_surface(facet) ) return false; @@ -1787,13 +1787,13 @@ Refine_facets_3_base:: is_encroached_facet_refinable(Facet& facet) const { typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; - typename Gt::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = + typename GT::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = r_tr_.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = r_tr_.geom_traits().compute_weight_3_object(); - typename Gt::Compare_weighted_squared_radius_3 compare = + typename GT::Compare_weighted_squared_radius_3 compare = r_tr_.geom_traits().compare_weighted_squared_radius_3_object(); const Cell_handle& c = facet.first; diff --git a/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h b/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h index 584e148f726..4bb670cbaa9 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h @@ -418,14 +418,14 @@ tr_intersection(const typename K::Triangle_3 &t, typedef typename K::Point_3 Point_3; - typename K::Construct_vertex_3 vertex_on = - k.construct_vertex_3_object(); - + typename K::Do_intersect_3 do_intersect = + k.do_intersect_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); - typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); + typename K::Construct_vertex_3 vertex_on = + k.construct_vertex_3_object(); typename Mesh_3::Vector_plane_orientation_3_static_filter vector_plane_orient; @@ -439,17 +439,24 @@ tr_intersection(const typename K::Triangle_3 &t, const Point_3& q = point_on(r,1); const Orientation ray_direction = vector_plane_orient(p, q, a, b, c); - - if(ray_direction == COPLANAR) return result_type(); + if(ray_direction == COPLANAR) + return result_type(); const Orientation abcp = orientation(a,b,c,p); + if(abcp == COPLANAR) // p belongs to the triangle's supporting plane + { + if(do_intersect(t, p)) + return result_type(p); + else + return result_type(); + } - if(abcp == COPLANAR) return result_type(); // p belongs to the triangle's - // supporting plane - - if(ray_direction == abcp) return result_type(); - // The ray lies entirely in one of the two open halfspaces defined by the - // triangle's supporting plane. + if(ray_direction == abcp) + { + // The ray lies entirely in one of the two open halfspaces defined by the + // triangle's supporting plane. + return result_type(); + } // Here we know that the ray crosses the plane (abc) diff --git a/Mesh_3/include/CGAL/Mesh_3/Sizing_grid.h b/Mesh_3/include/CGAL/Mesh_3/Sizing_grid.h index 9fe82752715..ac261599db8 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sizing_grid.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sizing_grid.h @@ -31,12 +31,12 @@ namespace CGAL { namespace Mesh_3 { -template +template class Sizing_grid_node { public: - typedef typename Gt::Point_3 Point; - typedef typename Gt::FT FT; + typedef typename GT::Point_3 Point; + typedef typename GT::FT FT; FT m_init_size; FT m_size; @@ -108,14 +108,14 @@ template class Sizing_grid { public: - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Bare_point Bare_point; - typedef typename Gt::Vector_3 Vector; - typedef Sizing_grid_node Node; + typedef typename GT::Vector_3 Vector; + typedef Sizing_grid_node Node; typedef typename std::pair Constraint; private: diff --git a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h index 9554a14cc0e..876d2079ce8 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h @@ -316,8 +316,8 @@ class Sliver_perturber_base { protected: typedef typename Tr::Vertex_handle Vertex_handle; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename std::vector Bad_vertices_vector; typedef typename Tr::Lock_data_structure Lock_data_structure; @@ -344,8 +344,8 @@ class Sliver_perturber_base { protected: typedef typename Tr::Vertex_handle Vertex_handle; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename tbb::concurrent_vector Bad_vertices_vector; typedef typename Tr::Lock_data_structure Lock_data_structure; @@ -436,7 +436,7 @@ class Sliver_perturber typename C3T3::Triangulation, Concurrency_tag> Base; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Cell_handle Cell_handle; typedef typename Base::Vertex_handle Vertex_handle; @@ -449,7 +449,7 @@ class Sliver_perturber typedef typename std::vector Vertex_vector; typedef typename Base::Bad_vertices_vector Bad_vertices_vector; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; // Helper typedef class C3T3_helpers C3T3_helpers; @@ -1260,7 +1260,7 @@ perturb_vertex( PVertex pv , bool *could_lock_zone ) const { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); #ifdef CGAL_CONCURRENT_MESH_3_PROFILING static Profile_branch_counter_3 bcounter( diff --git a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h index 2084e58ce33..bcf2ff2fea2 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h +++ b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h @@ -38,8 +38,8 @@ #include #include -#include +#include #include #include // std::setprecision #include // std::cerr/cout @@ -106,8 +106,8 @@ protected: typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; typedef std::vector Cell_vector; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename std::vector Bad_vertices_vector; typedef typename Tr::Lock_data_structure Lock_data_structure; @@ -196,8 +196,8 @@ protected: typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; typedef std::vector Cell_vector; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename tbb::concurrent_vector Bad_vertices_vector; typedef typename Tr::Lock_data_structure Lock_data_structure; @@ -352,9 +352,9 @@ private: // Types typedef typename Base::Queue_value_type Queue_value_type; typedef typename Base::Cell_vector Cell_vector; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Base::FT FT; - typedef typename Gt::Tetrahedron_3 Tetrahedron_3; + typedef typename GT::Tetrahedron_3 Tetrahedron_3; typedef typename C3T3::Cells_in_complex_iterator Cell_iterator; typedef std::vector Facet_vector; @@ -497,7 +497,7 @@ private: /** * Returns the umbrella of internal_facets vector */ - boost::optional + std::optional get_umbrella(const Facet_vector& internal_facets, const Vertex_handle& v) const; @@ -1046,14 +1046,14 @@ pump_vertex(const Vertex_handle& pumped_vertex, if (could_lock_zone && *could_lock_zone == false) return false; - typename Gt::Compare_weighted_squared_radius_3 compare_sq_radius = + typename GT::Compare_weighted_squared_radius_3 compare_sq_radius = tr_.geom_traits().compare_weighted_squared_radius_3_object(); // If best_weight <= pumped_vertex weight, nothing to do const Weighted_point& pumped_vertex_wp = tr_.point(pumped_vertex); if ( compare_sq_radius(pumped_vertex_wp, - best_weight) == CGAL::LARGER ) // best_weight > v's weight { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); const Weighted_point& old_position = tr_.point(pumped_vertex); Weighted_point new_point(cp(old_position), best_weight); @@ -1116,8 +1116,8 @@ expand_prestar(const Cell_handle& cell_to_add, Pre_star& pre_star, Sliver_values& criterion_values) const { - typename Gt::Compute_weight_3 cw = tr_.geom_traits().compute_weight_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Compute_weight_3 cw = tr_.geom_traits().compute_weight_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Delete first facet of pre_star Facet start_facet = pre_star.front()->second; @@ -1333,13 +1333,13 @@ get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const } // end while(... can pump...) #ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER - typename Gt::Compare_weighted_squared_radius_3 compare_sq_radius = + typename GT::Compare_weighted_squared_radius_3 compare_sq_radius = tr_.geom_traits().compare_weighted_squared_radius_3_object(); const Weighted_point& vwp = tr_.point(v); if ( compare_sq_radius(vwp, - best_weight) == CGAL::LARGER ) // best_weight > v's weight { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); const Weighted_point& wpv = tr_.point(v); Weighted_point wp(cp(wpv), best_weight); check_pre_star(pre_star_copy, wp, v); @@ -1352,7 +1352,7 @@ get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const template -boost::optional::Umbrella > +std::optional::Umbrella > Slivers_exuder:: get_umbrella(const Facet_vector& facets, // internal_facets of conflict zone const Vertex_handle& /* v, no longer used */) const @@ -1388,7 +1388,7 @@ get_umbrella(const Facet_vector& facets, // internal_facets of conflict zone { std::size_t count = (*uit).second.second; if(count == 2) //there will be more than 3 after insertion - return boost::none; //non-manifold configuration + return std::nullopt; //non-manifold configuration umbrella.insert(uit, std::make_pair(oe, @@ -1564,8 +1564,8 @@ update_mesh(const Weighted_point& new_point, Boundary_facets_from_outside boundary_facets_from_outside = get_boundary_facets_from_outside(boundary_facets); - boost::optional umbrella = get_umbrella(internal_facets, old_vertex); - if(umbrella == boost::none) + std::optional umbrella = get_umbrella(internal_facets, old_vertex); + if(umbrella == std::nullopt) return false; //abort pumping this vertex // Delete old cells from queue (they aren't in the triangulation anymore) diff --git a/Mesh_3/include/CGAL/Mesh_3/Triangle_accessor_primitive.h b/Mesh_3/include/CGAL/Mesh_3/Triangle_accessor_primitive.h index a3436fbdb91..a5a13232909 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Triangle_accessor_primitive.h +++ b/Mesh_3/include/CGAL/Mesh_3/Triangle_accessor_primitive.h @@ -24,13 +24,13 @@ namespace CGAL { namespace Mesh_3 { -template +template class Triangle_accessor_primitive { public: typedef typename TriangleAccessor::Triangle_handle Id; - typedef typename Gt::Triangle_3 Datum; - typedef typename Gt::Point_3 Point; + typedef typename GT::Triangle_3 Datum; + typedef typename GT::Point_3 Point; Triangle_accessor_primitive(const Id& h) : handle_(h) {} @@ -55,15 +55,15 @@ private: Id handle_; }; -//template -//class Triangle_accessor_primitive,Gt>, Gt> +//template +//class Triangle_accessor_primitive,GT>, GT> //{ -// typedef class Triangle_accessor,Gt> Triangle_accessor; +// typedef class Triangle_accessor,GT> Triangle_accessor; // //public: // typedef typename Triangle_accessor::Triangle_iterator Id; -// typedef typename Gt::Triangle_3 Datum; -// typedef typename Gt::Point_3 Point; +// typedef typename GT::Triangle_3 Datum; +// typedef typename GT::Point_3 Point; // // Triangle_accessor_primitive(const Id& h) // : handle_(h) {} diff --git a/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h b/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h index 6459aaeb047..db2dde5b6d3 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h @@ -43,17 +43,17 @@ namespace Mesh_3 { template class Triangulation_helpers { - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; // If `Tr` is not a triangulation that has defined Bare_point, // use Point_3 as defined in the traits class. typedef typename boost::mpl::eval_if_c< CGAL::internal::Has_nested_type_Bare_point::value, typename CGAL::internal::Bare_point_type, - boost::mpl::identity + boost::mpl::identity >::type Bare_point; // 'Point' is either a bare point or a weighted point, depending on the triangulation. @@ -190,7 +190,7 @@ no_topological_change(Tr& tr, if(std::is_same::value) return false; - typename Gt::Construct_opposite_vector_3 cov = + typename GT::Construct_opposite_vector_3 cov = tr.geom_traits().construct_opposite_vector_3_object(); bool np = true; @@ -382,7 +382,7 @@ inside_protecting_balls(const Tr& tr, const Vertex_handle v, const Bare_point& p) const { - typename Gt::Compare_weighted_squared_radius_3 cwsr = + typename GT::Compare_weighted_squared_radius_3 cwsr = tr.geom_traits().compare_weighted_squared_radius_3_object(); Vertex_handle nv = tr.nearest_power_vertex(p, v->cell()); @@ -416,8 +416,8 @@ get_sq_distance_to_closest_vertex(const Tr& tr, // There is no need to use tr.min_squared_distance() here because we are computing // distances between 'v' and a neighboring vertex within a common cell, which means // that even if we are using a periodic triangulation, the distance is correctly computed. - typename Gt::Compute_squared_distance_3 csqd = tr.geom_traits().compute_squared_distance_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_distance_3 csqd = tr.geom_traits().compute_squared_distance_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); Vertex_container treated_vertices; FT min_sq_dist = std::numeric_limits::infinity(); @@ -477,8 +477,8 @@ get_sq_distance_to_closest_vertex(const Tr& tr, // There is no need to use tr.min_squared_distance() here because we are computing // distances between 'v' and a neighboring vertex within a common cell, which means // that even if we are using a periodic triangulation, the distance is correctly computed. - typename Gt::Compute_squared_distance_3 csqd = tr.geom_traits().compute_squared_distance_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_distance_3 csqd = tr.geom_traits().compute_squared_distance_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); Vertex_container treated_vertices; FT min_sq_dist = std::numeric_limits::infinity(); @@ -524,9 +524,9 @@ Triangulation_helpers:: well_oriented(const Tr& tr, const Cell_vector& cells_tos) const { - typedef typename Tr::Geom_traits Gt; - typename Gt::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typedef typename Tr::Geom_traits GT; + typename GT::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); typename Cell_vector::const_iterator it = cells_tos.begin(); for( ; it != cells_tos.end() ; ++it) @@ -570,9 +570,9 @@ well_oriented(const Tr& tr, const Cell_vector& cells_tos, const Point_getter& pg) const { - typedef typename Tr::Geom_traits Gt; - typename Gt::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typedef typename Tr::Geom_traits GT; + typename GT::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); typename Cell_vector::const_iterator it = cells_tos.begin(); for( ; it != cells_tos.end() ; ++it) diff --git a/Mesh_3/include/CGAL/Mesh_3/Triangulation_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Triangulation_sizing_field.h index 547365f9a1e..aa607e7b088 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Triangulation_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Triangulation_sizing_field.h @@ -43,18 +43,18 @@ template class Triangulation_sizing_field { // Types - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; - typedef Triangulation_vertex_base_with_info_3 Vbb; - typedef Regular_triangulation_vertex_base_3 Vb; - typedef Triangulation_cell_base_3 Cbb; + typedef Triangulation_vertex_base_with_info_3 Vbb; + typedef Regular_triangulation_vertex_base_3 Vb; + typedef Triangulation_cell_base_3 Cbb; typedef Regular_triangulation_cell_base_3< - Gt, Cbb, Discard_hidden_points> Cb; + GT, Cbb, Discard_hidden_points> Cb; typedef Triangulation_data_structure_3 Tds; - typedef Regular_triangulation_3 Compact_triangulation; + typedef Regular_triangulation_3 Compact_triangulation; typedef Compact_triangulation Ctr; typedef typename Tr::Vertex_handle Vertex_handle; @@ -181,8 +181,8 @@ typename Triangulation_sizing_field::FT Triangulation_sizing_field:: interpolate_on_cell_vertices(const Weighted_point& p, const CCell_handle& cell) const { - typename Gt::Construct_point_3 cp = ctr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_volume_3 volume = ctr_.geom_traits().compute_volume_3_object(); + typename GT::Construct_point_3 cp = ctr_.geom_traits().construct_point_3_object(); + typename GT::Compute_volume_3 volume = ctr_.geom_traits().compute_volume_3_object(); // Interpolate value using tet vertices values const FT& va = cell->vertex(0)->info(); @@ -217,8 +217,8 @@ typename Triangulation_sizing_field::FT Triangulation_sizing_field:: interpolate_on_facet_vertices(const Weighted_point& p, const CCell_handle& cell) const { - typename Gt::Construct_point_3 cp = ctr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_area_3 area = ctr_.geom_traits().compute_area_3_object(); + typename GT::Construct_point_3 cp = ctr_.geom_traits().construct_point_3_object(); + typename GT::Compute_area_3 area = ctr_.geom_traits().compute_area_3_object(); // Find infinite vertex and put it in k0 int k0 = 0; diff --git a/Mesh_3/include/CGAL/Mesh_3/Uniform_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Uniform_sizing_field.h index 273ba6b6f37..3e552737ee6 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Uniform_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Uniform_sizing_field.h @@ -27,9 +27,9 @@ namespace Mesh_3 { template class Uniform_sizing_field { - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; public: // Vertices of mesh triangulation do not need to be updated diff --git a/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h b/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h index d2dfef196e0..ec3e5761a9a 100644 --- a/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h +++ b/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h @@ -96,25 +96,25 @@ void initialize_triangulation_from_labeled_image(C3T3& c3t3, TransformOperator transform = CGAL::Identity()) { typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Segment Segment_3; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; - typedef typename Gt::Vector_3 Vector_3; + typedef typename GT::Vector_3 Vector_3; typedef MeshDomain Mesh_domain; Tr& tr = c3t3.triangulation(); - typename Gt::Compare_weighted_squared_radius_3 cwsr = + typename GT::Compare_weighted_squared_radius_3 cwsr = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = tr.geom_traits().construct_weighted_point_3_object(); if(protect_features) { @@ -159,8 +159,8 @@ void initialize_triangulation_from_labeled_image(C3T3& c3t3, : domain.is_in_domain_object()( seed_cell->weighted_circumcenter(tr.geom_traits())); - if ( seed_label != boost::none - && seed_cell_label != boost::none + if ( seed_label != std::nullopt + && seed_cell_label != std::nullopt && *seed_label == *seed_cell_label) continue; //this means the connected component has already been initialized diff --git a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h index 5fed977c7ef..c5a148d78fa 100644 --- a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h +++ b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h @@ -395,8 +395,8 @@ class Cell_criteria_visitor_with_features typedef Criterion_visitor Base; typedef Cell_criteria_visitor_with_features Self; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename Tr::Weighted_point Weighted_point; @@ -414,11 +414,11 @@ public: , ratio_(0) , size_ratio_(0.5*0.5*4.) { - typename Gt::Compare_weighted_squared_radius_3 compare = + typename GT::Compare_weighted_squared_radius_3 compare = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = tr.geom_traits().compute_weight_3_object(); - typename Gt::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = + typename GT::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = tr.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); int k1 = 0; @@ -560,8 +560,8 @@ class Cell_criterion_visitor_with_radius_lower_bound typedef Cell_criteria_visitor_with_features Base; typedef Cell_criterion_visitor_with_radius_lower_bound Self; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; public: typedef typename Base::Quality Cell_quality; diff --git a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_criteria.h b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_criteria.h index 268bffcc4c1..a3564c1b946 100644 --- a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_criteria.h +++ b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_criteria.h @@ -22,7 +22,7 @@ -#include +#include #include namespace CGAL { @@ -41,7 +41,7 @@ class Abstract_criterion public: typedef FT Quality; - typedef boost::optional Is_bad; + typedef std::optional Is_bad; typedef typename Visitor_::Handle Handle; /// Destructor @@ -81,7 +81,7 @@ protected: public: typedef std::pair Quality; - typedef boost::optional Is_bad; + typedef std::optional Is_bad; // Constructor diff --git a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h index ed57357bda9..4e42d381005 100644 --- a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h +++ b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h @@ -102,14 +102,14 @@ protected: CGAL_assertion (f.first->is_facet_on_surface(f.second)); CGAL_assertion (B_ != 0); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::Compute_squared_area_3 Area; - typedef typename Gt::Compute_squared_distance_3 Distance; - typedef typename Gt::Construct_point_3 Construct_point_3; - typedef typename Gt::Construct_triangle_3 Construct_triangle_3; + typedef typename GT::Compute_squared_area_3 Area; + typedef typename GT::Compute_squared_distance_3 Distance; + typedef typename GT::Construct_point_3 Construct_point_3; + typedef typename GT::Construct_triangle_3 Construct_triangle_3; Area area = tr.geom_traits().compute_squared_area_3_object(); Distance distance = tr.geom_traits().compute_squared_distance_3_object(); @@ -127,7 +127,7 @@ protected: const FT d12 = distance(p1,p2); const FT d13 = distance(p1,p3); const FT d23 = distance(p2,p3); - const FT min_d123 = details::min_3(d12,d13,d23); + const FT min_d123 = details::min_3(d12,d13,d23); const FT aspect_ratio = 4 * triangle_area * min_d123 / (d12*d13*d23); @@ -193,11 +193,11 @@ protected: CGAL_assertion(f.first->is_facet_on_surface(f.second)); CGAL_assertion (B_ != 0); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Bare_point Bare_point; - typename Gt::Construct_weighted_circumcenter_3 weighted_circumcenter = + typename GT::Construct_weighted_circumcenter_3 weighted_circumcenter = tr.geom_traits().construct_weighted_circumcenter_3_object(); const Weighted_point& p1 = tr.point(f.first, (f.second+1)&3); @@ -264,11 +264,11 @@ protected: { CGAL_assertion (f.first->is_facet_on_surface(f.second)); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Bare_point Bare_point; - typename Gt::Construct_weighted_circumcenter_3 weighted_circumcenter = + typename GT::Construct_weighted_circumcenter_3 weighted_circumcenter = tr.geom_traits().construct_weighted_circumcenter_3_object(); const Weighted_point& p1 = tr.point(f.first, (f.second+1)&3); @@ -346,11 +346,11 @@ protected: { CGAL_assertion (f.first->is_facet_on_surface(f.second)); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); const Weighted_point& wp1 = tr.point(f.first, (f.second+1)&3); const Bare_point& p1 = cp(wp1); @@ -426,11 +426,11 @@ protected: CGAL_assertion (f.first->is_facet_on_surface(f.second)); CGAL_assertion (B_ != 0); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); const Weighted_point& wp1 = tr.point(f.first, (f.second+1)&3); const Bare_point p1 = cp(wp1); @@ -653,8 +653,8 @@ class Facet_criterion_visitor_with_features typedef Mesh_3::Criterion_visitor Base; typedef Facet_criterion_visitor_with_features Self; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; public: typedef typename Base::Quality Facet_quality; @@ -672,15 +672,15 @@ public: , angle_ratio_(0.5*0.5*4.) , size_ratio_(0.4*0.4*4.) { - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Cell_handle Cell_handle; - typename Gt::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = + typename GT::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = tr.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = tr.geom_traits().compute_weight_3_object(); - typename Gt::Compare_weighted_squared_radius_3 compare = + typename GT::Compare_weighted_squared_radius_3 compare = tr.geom_traits().compare_weighted_squared_radius_3_object(); const Cell_handle& c = fh.first; @@ -817,8 +817,8 @@ class Facet_criterion_visitor_with_radius_lower_bound typedef Facet_criterion_visitor_with_features Base; typedef Facet_criterion_visitor_with_radius_lower_bound Self; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; public: typedef typename Base::Quality Facet_quality; 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 1f94745c004..787b443489c 100644 --- a/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h +++ b/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h @@ -29,15 +29,13 @@ #include #include -#include // for std::prev -#include - #include #include #include #include +#include namespace CGAL { namespace Mesh_3 { @@ -452,7 +450,7 @@ polylines_to_protect InterpolationFunctor interpolate, PolylineInputIterator existing_polylines_begin, PolylineInputIterator existing_polylines_end, - boost::optional scalar_interpolation_value = boost::none, + std::optional scalar_interpolation_value = std::nullopt, int prec = 10) { typedef typename DomainFunctor::result_type Domain_type; @@ -587,7 +585,7 @@ polylines_to_protect pixel[1], pixel[2]); square[ii][jj].domain = domain_fct(square[ii][jj].word); - if(scalar_interpolation_value != boost::none) { + if(scalar_interpolation_value != std::nullopt) { square[ii][jj].word = Image_word_type(square[ii][jj].word - (*scalar_interpolation_value)); @@ -736,7 +734,7 @@ case_1_2_1: square[1][0], null); Isoline_equation equation = - (scalar_interpolation_value == boost::none) ? + (scalar_interpolation_value == std::nullopt) ? Isoline_equation(1, -1, -1, 0) : Isoline_equation(v00, v10, v01, v11); insert_curve_in_graph.insert_curve(equation, @@ -746,7 +744,7 @@ case_1_2_1: p00, p10 - p00, p01 - p00); - if(scalar_interpolation_value == boost::none) { + if(scalar_interpolation_value == std::nullopt) { equation = Isoline_equation(0, -1, -1, 1); } insert_curve_in_graph.insert_curve(equation, @@ -873,7 +871,7 @@ case_1_2_1: square[1][1], null); vertex_descriptor bottom = g_manip.split(square[0][0], square[1][0], null); - if(scalar_interpolation_value == boost::none) { + if(scalar_interpolation_value == std::nullopt) { g_manip.try_add_edge(top, bottom); } else { insert_curve_in_graph.insert_curve(Isoline_equation(v00, v10, @@ -892,7 +890,7 @@ case_1_2_1: CGAL_assertion(square[1][0].domain==square[0][1].domain); CGAL_assertion(square[0][0].domain!=square[0][1].domain); - if(scalar_interpolation_value != boost::none) { + if(scalar_interpolation_value != std::nullopt) { // Compute the squared distance between the two branches of // the hyperbola. const double discrimant = double(v00) * v11 - double(v01) * v10; @@ -965,7 +963,7 @@ case_1_2_1: square[1][1], null); Isoline_equation equation = - (scalar_interpolation_value == boost::none) ? + (scalar_interpolation_value == std::nullopt) ? Isoline_equation(1, -1, 1, 1) : Isoline_equation(v00, v10, v01, v11); diff --git a/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h b/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h index 335bd89291c..6ecabd1aa90 100644 --- a/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h +++ b/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h @@ -36,9 +36,9 @@ template Base; typedef typename Base::Tetrahedron_3 Tetrahedron_3; typedef typename Base::Cell_vector Cell_vector; - typedef typename Base::Gt Gt; + typedef typename Base::GT GT; public: typedef typename Base::Cell_handle Cell_handle; @@ -163,7 +163,7 @@ class Radius_ratio_criterion { protected: typedef Sliver_criterion Base; - typedef typename Base::Gt Gt; + typedef typename Base::GT GT; typedef typename Base::Tetrahedron_3 Tetrahedron_3; typedef typename Base::Cell_vector Cell_vector; typedef Radius_ratio_criterion RR_criterion; diff --git a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h index de2148d7f11..c37712db458 100644 --- a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h +++ b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h @@ -34,7 +34,7 @@ #endif #endif -#include +#include #include #include #include @@ -115,16 +115,16 @@ typename Tr::Geom_traits::FT edge_sq_length(const typename Tr::Edge& e, const Tr& tr) { - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; // There is no need to use tr.min_squared_distance() here because we are computing // distances between vertices within a common cell, which means that even // if we are using a periodic triangulation, the distance is correctly computed. - typename Gt::Compute_squared_distance_3 sq_distance = + typename GT::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); const Weighted_point& wp = tr.point(e.first, e.second); @@ -393,9 +393,9 @@ protected: typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -450,15 +450,15 @@ protected: const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = tr.geom_traits().construct_weighted_point_3_object(); - typename Gt::Compute_squared_length_3 sq_length = + typename GT::Compute_squared_length_3 sq_length = tr.geom_traits().compute_squared_length_3_object(); - typename Gt::Construct_translated_point_3 translate = + typename GT::Construct_translated_point_3 translate = tr.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_vector_3 vector = + typename GT::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); // create a helper @@ -551,9 +551,9 @@ protected: typedef typename Base::Vertex_handle Vertex_handle; typedef typename Base::Cell_handle Cell_handle; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -653,9 +653,9 @@ private: { const Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_translated_point_3 translate = + typename GT::Construct_translated_point_3 translate = c3t3.triangulation().geom_traits().construct_translated_point_3_object(); unsigned int index = cell->index(v); @@ -727,9 +727,9 @@ protected: typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -830,7 +830,7 @@ private: CGAL_precondition(cell->has_vertex(v)); const typename C3T3::Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); const int i = cell->index(v); @@ -878,9 +878,9 @@ protected: typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -985,9 +985,9 @@ private: // There is no need to use tr.min_squared_distance() here because we are computing // distances between vertices within a common cell, which means that even // if we are using a periodic triangulation, the distance is correctly computed. - typename Gt::Compute_squared_distance_3 sq_distance = + typename GT::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); const int i = cell->index(v); @@ -1047,9 +1047,9 @@ private: { const typename C3T3::Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Compute_approximate_dihedral_angle_3 approx_dihedral_angle = + typename GT::Compute_approximate_dihedral_angle_3 approx_dihedral_angle = tr.geom_traits().compute_approximate_dihedral_angle_3_object(); const Weighted_point& wp1 = tr.point(cell, k1); @@ -1075,7 +1075,7 @@ private: { const typename C3T3::Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); int k1 = (i+1)&3; int k2 = (i+2)&3; @@ -1114,9 +1114,9 @@ protected: typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; @@ -1177,7 +1177,7 @@ protected: Vector_3 random_vector_fixed_size(const C3T3& c3t3, const FT& vector_sq_size) const { - typename Gt::Compute_squared_length_3 sq_length = + typename GT::Compute_squared_length_3 sq_length = c3t3.triangulation().geom_traits().compute_squared_length_3_object(); Vector_3 rnd_vector(random_ft(),random_ft(),random_ft()); @@ -1242,9 +1242,9 @@ protected: typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -1319,13 +1319,13 @@ private: { typedef Triangulation_helpers Th; - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = c3t3.triangulation().geom_traits().construct_weighted_point_3_object(); - typename Gt::Construct_translated_point_3 translate = + typename GT::Construct_translated_point_3 translate = c3t3.triangulation().geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_vector_3 vector = + typename GT::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); modified_vertices.clear(); diff --git a/Mesh_3/include/CGAL/Mesh_cell_base_3.h b/Mesh_3/include/CGAL/Mesh_cell_base_3.h index b52243fbbc2..33f7f5448cf 100644 --- a/Mesh_3/include/CGAL/Mesh_cell_base_3.h +++ b/Mesh_3/include/CGAL/Mesh_cell_base_3.h @@ -123,15 +123,14 @@ of the concept `RegularTriangulationCellBaseWithWeightedCircumcenter_3` and defa \sa `CGAL::Compact_mesh_cell_base_3` */ -template< class GT, - class MD, - class Cb= CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3< - GT, CGAL::Regular_triangulation_cell_base_3 > > +template > > class Mesh_cell_base_3 -: public Mesh_3::Mesh_surface_cell_base_3 #ifndef DOXYGEN_RUNNING -, public Mesh_cell_base_3_base< - typename Mesh_3::Mesh_surface_cell_base_3::Tds::Concurrency_tag> + : public Mesh_3::Mesh_surface_cell_base_3, + public Mesh_cell_base_3_base::Tds::Concurrency_tag> #endif { typedef typename GT::FT FT; @@ -161,7 +160,6 @@ public: typedef Mesh_cell_base_3 Other; }; - // Constructors Mesh_cell_base_3() : Base() , subdomain_index_() @@ -223,6 +221,9 @@ public: bool is_cache_valid() const { return sliver_cache_validity_; } void reset_cache_validity() const { sliver_cache_validity_ = false; } + /// \name I/O + ///@{ + static std::string io_signature() { @@ -231,6 +232,8 @@ public: + Get_io_signature()(); } + /// @} + #ifdef CGAL_INTRUSIVE_LIST public: Cell_handle next_intrusive() const { return next_intrusive_; } @@ -246,8 +249,9 @@ public: } #endif // CGAL_INTRUSIVE_LIST - /// For the determinism of Compact_container iterators + /// \name Determinism ///@{ + typedef Tag_true Has_timestamp; std::size_t time_stamp() const { @@ -256,6 +260,7 @@ public: void set_time_stamp(const std::size_t& ts) { time_stamp_ = ts; } + ///@} private: diff --git a/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h b/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h index 7038044ec46..b8bfd6cfdcf 100644 --- a/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h @@ -27,11 +27,42 @@ namespace CGAL { -template > +/*! +\ingroup PkgMesh3MeshClasses + +The class `Mesh_cell_criteria_3` is a model of `MeshCellCriteria_3`. It provides, +for the mesh tetrahedra, +a uniform shape criterion +and a sizing field which may be a uniform or variable field. + +\tparam Tr must be identical to the nested type +`Triangulation` of the instance used as model of +`MeshComplex_3InTriangulation_3`. + +\cgalModels `MeshCellCriteria_3` + +\sa `MeshCriteria_3` +\sa `CGAL::Mesh_criteria_3` +\sa `CGAL::make_mesh_3()` +*/ +template +#endif + > class Mesh_cell_criteria_3 { public: + /// \name Types + /// @{ + + /*! + Numerical type + */ + typedef typename Tr::Geom_traits::FT FT; + + /// @} + typedef Visitor_ Visitor; typedef typename Visitor::Cell_quality Cell_quality; typedef typename Visitor::Is_cell_bad Is_cell_bad; @@ -41,16 +72,28 @@ private: typedef Mesh_3::Criteria Criteria; typedef typename Tr::Cell_handle Cell_handle; - typedef typename Tr::Geom_traits::FT FT; typedef Mesh_cell_criteria_3 Self; public: - /** - * @brief Constructor - * @param radius_edge_bound the radius-edge bound - * @param radius_bound the radius bound (tet sizing) + /// \name Creation +/// @{ + + /*! + * Returns an object to serve as default criteria for cells. + * @param radius_edge_bound is the upper bound for the radius-edge + * ratio of the tetrahedra. + * @param radius_bound is a uniform upper bound + for the circumradii of the tetrahedra in the mesh + * + * @param min_radius_bound is a uniform lower bound for the + * circumradii of the tetrahedra in the mesh. + * Only cells with a circumradius larger than that + * bound will be refined. + * + * See Section \ref introsecparam for further details. + * Note that if one parameter is set to 0, then its corresponding criterion is ignored. */ Mesh_cell_criteria_3(const FT& radius_edge_bound, const FT& radius_bound, @@ -68,13 +111,25 @@ public: // Nb: SFINAE to avoid wrong matches with built-in numerical types // as int. + + /*! + Returns an object to serve as default criteria for facets. + @tparam SizingField must be a model of the concept + `MeshDomainField_3`. + + The behavior and semantic of the arguments are the same + as above, except that the radius bound parameter is a functional + instead of a constant. + */ template - Mesh_cell_criteria_3(const FT& radius_edge_bound, - const Sizing_field& radius_bound, - const FT& min_radius_bound = 0., - std::enable_if_t< + Mesh_cell_criteria_3(const FT& radius_edge_bound + ,const Sizing_field& radius_bound + ,const FT& min_radius_bound = 0. +#ifndef DOXYGEN_RUNNING + ,std::enable_if_t< Mesh_3::Is_mesh_domain_field_3::value >* = 0 +#endif ) { if (FT(0) != min_radius_bound) @@ -86,7 +141,9 @@ public: init_radius_edge(radius_edge_bound); } - /// Destructor + /// @} + + // Destructor ~Mesh_cell_criteria_3() { } /** @@ -99,10 +156,12 @@ public: return criteria_(tr, cell); } +#ifndef DOXYGEN_RUNNING void add(Abstract_criterion* criterion) { criteria_.add(criterion); } +#endif private: void init_radius_edge(const FT& radius_edge_bound) diff --git a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h index 68cb73899a8..46b23a408c3 100644 --- a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h +++ b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h @@ -37,7 +37,7 @@ namespace CGAL { * a piecewise constant field, i.e. a sizing field with a constant size on each subpart * of the domain. * -* @tparam Gt is the geometric traits class. It must match the type `Triangulation::Geom_traits`, +* @tparam GT is the geometric traits class. It must match the type `Triangulation::Geom_traits`, * where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used * in the meshing process. * @@ -46,7 +46,7 @@ namespace CGAL { * * @cgalModels `MeshDomainField_3` */ -template +template class Mesh_constant_domain_field_3 { public: @@ -56,18 +56,19 @@ public: /*! * Numerical type. */ - typedef typename Gt::FT FT; + typedef typename GT::FT FT; /*! + * Point type. */ #ifdef DOXYGEN_RUNNING - typedef Gt::Point_3 Point_3; + typedef GT::Point_3 Point_3; #else typedef typename boost::mpl::eval_if_c< - internal::Has_nested_type_Bare_point::value, - typename internal::Bare_point_type, - boost::mpl::identity + internal::Has_nested_type_Bare_point::value, + typename internal::Bare_point_type, + boost::mpl::identity >::type Point_3; #endif @@ -107,6 +108,7 @@ public: return d_; } + /*! * Sets the size such that `operator()` for any query point * of dimension `dim` and index `index` returns `size`. 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 00aa58d54cd..b23f4e6a05a 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,7 @@ #include #include -#include +#include #include namespace CGAL { @@ -61,7 +61,7 @@ public: Polyline() {} ~Polyline() {} - /// Add a point at the end of the polyline + /// adds a point at the end of the polyline void add_point(const Point_3& p) { if( points_.empty() || p != end_point() ) { @@ -69,27 +69,27 @@ public: } } - /// Returns the starting point of the polyline + /// returns the starting point of the polyline const Point_3& start_point() const { CGAL_assertion( ! points_.empty() ); return points_.front(); } - /// Returns the ending point of the polyline + /// returns the ending point of the polyline const Point_3& end_point() const { CGAL_assertion( ! points_.empty() ); return points_.back(); } - /// Returns `true` if the polyline is not degenerated + /// returns `true` if the polyline is not degenerate bool is_valid() const { return points_.size() > 1; } - /// Returns `true` if polyline is a loop + /// returns `true` if polyline is a loop bool is_loop() const { return start_point() == end_point(); @@ -200,7 +200,7 @@ public: } - /// Returns the angle at the first point. + /// returns the angle at the first point. /// \pre The polyline must be a loop. Angle angle_at_first_point() const { CGAL_precondition(is_loop()); @@ -210,7 +210,7 @@ public: return angle(prev, first, next_p); } - /// Returns the length of the polyline + /// returns the length of the polyline FT length() const { //TODO: cache result @@ -226,7 +226,7 @@ public: return result; } - /// Returns signed geodesic distance between `p` and `q`. + /// returns the signed geodesic distance between `p` and `q`. FT signed_geodesic_distance(const Point_3& p, const Point_3& q) const { // Locate p & q on polyline @@ -258,7 +258,7 @@ public: } - /// Returns a point at geodesic distance `distance` from p along the + /// returns a point at geodesic distance `distance` from p along the /// polyline. The polyline is oriented from starting point to end point. /// The distance could be negative. Point_3 point_at(const Point_3& p, FT distance) const @@ -331,7 +331,7 @@ private: return (points_.end() - 2); } - /// Returns an iterator on the starting point of the segment of the + /// returns an iterator on the starting point of the segment of the /// polyline which contains p /// if end_point_first is true, then --end is returned instead of begin /// if p is the starting point of a loop. @@ -451,7 +451,7 @@ public: }; // end class Polyline -template +template struct Mesh_domain_segment_of_curve_primitive{ typedef typename std::iterator_traits::value_type Map_value_type; typedef typename Map_value_type::first_type Curve_id; @@ -463,7 +463,7 @@ struct Mesh_domain_segment_of_curve_primitive{ typedef typename std::iterator_traits< typename Polyline::const_iterator>::value_type Point; - typedef typename Gt::Segment_3 Datum; + typedef typename GT::Segment_3 Datum; Id id_; @@ -516,35 +516,31 @@ struct Display_incidences_to_curves_aux { /*! \ingroup PkgMesh3Domains -The class `Mesh_domain_with_polyline_features_3` is designed to allow the user +The class `Mesh_domain_with_polyline_features_3` enables the user to add some 0- and 1-dimensional features into any model of the `MeshDomain_3` concept. The 1-dimensional features are described as polylines whose endpoints are the added corners. -\tparam MeshDomain is the type -of the domain which should be extended. -It has to be a model of the `MeshDomain_3` concept. +\tparam MD is the type of the domain which is extended. It has to be a model of the `MeshDomain_3` concept. \cgalModels `MeshDomainWithFeatures_3` -\sa `MeshDomain_3` \sa `MeshPolyline_3` -\sa `CGAL::Implicit_mesh_domain_3` -\sa `CGAL::Polyhedral_mesh_domain_3` -\sa `CGAL::Labeled_image_mesh_domain_3` - +\sa `CGAL::Polyhedral_mesh_domain_3` */ -template < typename MeshDomain > +template < typename MD > class Mesh_domain_with_polyline_features_3 - : public MeshDomain + : public MD { - typedef Mesh_domain_with_polyline_features_3 Self; + typedef Mesh_domain_with_polyline_features_3 Self; + public: -/// \name Types -/// @{ - typedef typename MeshDomain::Surface_patch_index Surface_patch_index; - typedef typename MeshDomain::Subdomain_index Subdomain_index; + /// \name Types + /// @{ + + typedef typename MD::Surface_patch_index Surface_patch_index; + typedef typename MD::Subdomain_index Subdomain_index; typedef int Curve_index; typedef int Corner_index; @@ -552,50 +548,46 @@ public: typedef unspecified_type Index; #else typedef typename Mesh_3::internal::Index_generator_with_features< - typename MeshDomain::Subdomain_index, + typename MD::Subdomain_index, Surface_patch_index, Curve_index, Corner_index>::type Index; #endif typedef CGAL::Tag_true Has_features; - typedef typename MeshDomain::R::FT FT; -/// @} + typedef typename MD::R::FT FT; -#ifndef DOXYGEN_RUNNING + /// @} #ifndef CGAL_NO_DEPRECATED_CODE - typedef Curve_index Curve_segment_index; + typedef Curve_index Curve_segment_index; #endif - typedef typename MeshDomain::R Gt; - typedef Gt R; - typedef typename MeshDomain::Point_3 Point_3; -#endif // DOXYGEN_RUNNING + typedef typename MD::R GT; + typedef GT R; + typedef typename MD::Point_3 Point_3; -/// \name Creation -/// Constructors. Forwards the arguments to the constructor -/// of the base class. -/// @{ + /// \name Creation + /// @{ + // forwards the arguments to the constructor of the base class. template Mesh_domain_with_polyline_features_3(const T& ...o) - : MeshDomain(o...) + : MD(o...) , current_corner_index_(1) , current_curve_index_(1) , curves_aabb_tree_is_built(false) {} Mesh_domain_with_polyline_features_3(const Mesh_domain_with_polyline_features_3&) = default; -/// @} + /// @} -/// \name Operations -/// @{ - - /// @cond DEVELOPERS + /// \name Operations /// @{ - /// Add a 0-dimensional feature in the domain. + /// @cond DEVELOPERS + + /// adds a 0-dimensional feature in the domain. Corner_index add_corner(const Point_3& p); /// Overload where the last parameter `out` is not `CGAL::Emptyset_iterator()`. @@ -605,8 +597,9 @@ public: IndicesOutputIterator out /*= CGAL::Emptyset_iterator()*/); /*! - Add 0-dimensional features in the domain. The value type of `InputIterator` must - be `Point_3`. + adds 0-dimensional features in the domain. + + The value type of `InputIterator` must be `Point_3`. */ template void @@ -639,11 +632,13 @@ public: add_features_with_context(InputIterator first, InputIterator end, IndicesOutputIterator out /*= CGAL::Emptyset_iterator()*/); - /// @} - /// \endcond + + /// @endcond + /*! - Add 1-dimensional features in the domain. `InputIterator` value type must - be a model of the concept `MeshPolyline_3`. + adds 1-dimensional features in the domain. + + The value type of `InputIterator` must be a model of the concept `MeshPolyline_3`. */ template void @@ -651,16 +646,17 @@ public: { add_features(first, end, CGAL::Emptyset_iterator()); } /// @cond DEVELOPERS - /// Undocumented function, kept for backward-compatibility with existing - /// code + + /// Undocumented function, kept for backward-compatibility with existing code template void add_features_with_context(InputIterator first, InputIterator end) { add_features_with_context(first, end, CGAL::Emptyset_iterator()); } + /// @endcond /*! - Add 1-dimensional features (curves) from the range `[first, end)` in the domain with their incidences + adds 1-dimensional features (curves) from the range `[first, end)` in the domain with their incidences with 2-dimensional features (patches) of the domain. \tparam InputIterator input iterator over curves @@ -693,57 +689,57 @@ public: incident_patches_indices_pmap, CGAL::Emptyset_iterator()); } -/// @} -/// \name Implementation of the concept MeshDomainWithFeatures_3 -/// The following methods implement the requirement of the concept -/// `MeshDomainWithFeatures_3`. -/// @{ + /// @} - /// Implements `MeshDomainWithFeatures_3::get_corners()`. - /// OutputIterator value type is std::pair + /// \name Implementation of the concept MeshDomainWithFeatures_3 + /// The following methods implement the requirements of the concept + /// `MeshDomainWithFeatures_3`. + /// @{ + + /// implements `MeshDomainWithFeatures_3::get_corners()`. + /// OutputIterator is `std::pair` template OutputIterator get_corners(OutputIterator out) const; - /// Implements `MeshDomainWithFeatures_3::get_curves()`. + /// implements `MeshDomainWithFeatures_3::get_curves()`. /// OutputIterator value type is std::tuple, std::pair > template OutputIterator get_curves(OutputIterator out) const; - /// Implements `MeshDomainWithFeatures_3::curve_segment_length()`. + /// implements `MeshDomainWithFeatures_3::curve_segment_length()`. FT curve_segment_length(const Point_3& p, const Point_3 q, const Curve_index& curve_index, CGAL::Orientation orientation) const; - /// Implements `MeshDomainWithFeatures_3::curve_length()`. + /// implements `MeshDomainWithFeatures_3::curve_length()`. FT curve_length(const Curve_index& curve_index) const; - /// Implements `MeshDomainWithFeatures_3::construct_point_on_curve()`. + /// implements `MeshDomainWithFeatures_3::construct_point_on_curve()`. Point_3 construct_point_on_curve(const Point_3& starting_point, const Curve_index& curve_index, FT distance) const; - /// Implements `MeshDomainWithFeatures_3::distance_sign_along_loop()`. + /// implements `MeshDomainWithFeatures_3::distance_sign_along_loop()`. CGAL::Sign distance_sign_along_loop(const Point_3& p, const Point_3& q, const Point_3& r, const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::distance_sign()`. + /// implements `MeshDomainWithFeatures_3::distance_sign()`. CGAL::Sign distance_sign(const Point_3& p, const Point_3& q, const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::is_loop()`. + /// implements `MeshDomainWithFeatures_3::is_loop()`. bool is_loop(const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::is_curve_segment_covered()`. + /// implements `MeshDomainWithFeatures_3::is_curve_segment_covered()`. bool is_curve_segment_covered(const Curve_index& index, CGAL::Orientation orientation, const Point_3& c1, const Point_3& c2, const FT sq_r1, const FT sq_r2) const; - /** * Returns the index to be stored in a vertex lying on the surface identified * by `index`. @@ -758,11 +754,11 @@ public: Index index_from_subdomain_index(const Subdomain_index& index) const { return Index(index); } - /// Returns an `Index` from a `Curve_index` + /// returns an `Index` from a `Curve_index` Index index_from_curve_index(const Curve_index& index) const { return Index(index); } - /// Returns an `Index` from a `Corner_index` + /// returns an `Index` from a `Corner_index` Index index_from_corner_index(const Corner_index& index) const { return Index(index); } @@ -771,22 +767,22 @@ public: * where lies a vertex with dimension 2 and index `index`. */ Surface_patch_index surface_patch_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } /** * Returns the index of the subdomain containing a vertex * with dimension 3 and index `index`. */ Subdomain_index subdomain_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } - /// Returns a `Curve_index` from an `Index` + /// returns a `Curve_index` from an `Index` Curve_index curve_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } - /// Returns a `Corner_index` from an `Index` + /// returns a `Corner_index` from an `Index` Corner_index corner_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } /// @cond DEVELOPERS #ifndef CGAL_NO_DEPRECATED_CODE @@ -830,29 +826,29 @@ public: Curve_index insert_edge(InputIterator first, InputIterator end); /// @endcond -/// @} + /// @} private: void compute_corners_incidences(); - /// Returns Index associated to p (p must be the coordinates of a corner + /// returns Index associated to p (p must be the coordinates of a corner /// point) Index point_corner_index(const Point_3& p) const; private: typedef std::map Corners; - typedef Mesh_3::internal::Polyline Polyline; + typedef Mesh_3::internal::Polyline Polyline; typedef std::map Edges; typedef std::map Edges_incidences; typedef std::map > Corners_tmp_incidences; typedef std::map Corners_incidences; typedef Mesh_3::internal::Mesh_domain_segment_of_curve_primitive< - Gt, + GT, typename Edges::const_iterator> Curves_primitives; - typedef CGAL::AABB_traits AABB_curves_traits; Corners corners_; @@ -916,9 +912,11 @@ public: timer.stop(); std::cerr << " done (" << timer.time() * 1000 << " ms)" << std::endl; #endif - } // end build_curves_aabb_tree() + } // build_curves_aabb_tree() + /// @endcond -}; // end class Mesh_domain_with_polyline_features_3 + +}; // class Mesh_domain_with_polyline_features_3 @@ -1546,9 +1544,6 @@ is_curve_segment_covered(const Curve_index& index, c1, c2, sq_r1, sq_r2); } - - } //namespace CGAL - #endif // CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H diff --git a/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h b/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h index 8846555dc6b..ca001d12072 100644 --- a/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h @@ -85,6 +85,7 @@ namespace internal { } // end namespace internal } // end namespace Mesh_3 + /*! \ingroup PkgMesh3MeshClasses @@ -96,16 +97,16 @@ provides a bound for the size criterion. \sa `MeshCriteria_3` \sa `CGAL::Mesh_criteria_3` \sa `MeshDomainField_3` - */ template < typename Tr > class Mesh_edge_criteria_3 { private: typedef Mesh_edge_criteria_3 Self; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; public: + /// \name Types /// @{ /*! @@ -121,7 +122,8 @@ public: /// \name Creation /// @{ /*! - * Returns an object to serve as criteria for edges. + * returns an object to serve as criteria for edges. + * * \param length_bound is an upper bound * for the length of the edges which are used to discretize the curves. * \param min_length_bound is a desired lower bound @@ -131,12 +133,13 @@ public: * break all the surface topology guarantees of the meshing algorithm. * It is not guaranteed to be exactly respected in the output mesh. * - * Note that if one parameter is set to 0, then its corresponding criterion is ignored. + * \note If one parameter is set to 0, then its corresponding criterion is ignored. */ Mesh_edge_criteria_3(const FT& length_bound, const FT& min_length_bound = 0) + : p_size_(new Mesh_3::internal::Sizing_field_container< - Mesh_constant_domain_field_3 , + Mesh_constant_domain_field_3 , FT, Point_3, Index>(length_bound)) @@ -145,17 +148,19 @@ public: // Nb: SFINAE to avoid wrong matches with built-in numerical types // as int. + /*! - * @tparam SizingField a model of `MeshDomainField_3` - * - * Returns an object to serve as criteria for edges. + * returns an object to serve as criteria for edges. * The behavior and semantic of the argument are the same * as above, except that the `length_bound` * parameter is a functional instead of a constant. + * + * @tparam SizingField a model of `MeshDomainField_3` */ template < typename SizingField > Mesh_edge_criteria_3 ( + const SizingField& length_bound, const FT& min_length_bound = 0 #ifndef DOXYGEN_RUNNING diff --git a/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h b/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h index bc5a9cbbb85..916e1073ac8 100644 --- a/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h @@ -27,11 +27,49 @@ namespace CGAL { -template > +/*! + \ingroup PkgMesh3MeshClasses + + The class `Mesh_facet_criteria_3` is a model of `MeshFacetCriteria_3`. + It provides a uniform bound for the shape criterion, + a uniform or variable sizing field + for the size criterion and/or + a uniform or variable distance field + for the approximation error criterion. + + \tparam Tr must be identical to the nested type + `Triangulation` of the instance used as model of + `MeshComplex_3InTriangulation_3`. + + \cgalModels `MeshFacetCriteria_3` + + \sa `MeshCriteria_3` + \sa `MeshFacetCriteria_3` + \sa `MeshDomainField_3` + \sa `CGAL::Mesh_facet_topology` + \sa `CGAL::Mesh_criteria_3` + \sa `CGAL::make_mesh_3()` + +*/ +template +#endif + > class Mesh_facet_criteria_3 { public: + + /// \name Types + /// @{ + + /*! + Numerical type + */ + typedef typename Tr::Geom_traits::FT FT; + + /// @} + typedef Visitor_ Visitor; typedef typename Visitor::Facet_quality Facet_quality; typedef typename Visitor::Is_facet_bad Is_facet_bad; @@ -41,20 +79,56 @@ private: typedef Mesh_3::Criteria Criteria; typedef typename Tr::Facet Facet; - typedef typename Tr::Geom_traits::FT FT; + typedef Mesh_facet_criteria_3 Self; public: typedef CGAL::Tag_true Has_manifold_criterion; - /** - * @brief Constructor - */ - template < typename Sizing_field, typename Sizing_field2 > + /// \name Creation + /// @{ + +#ifdef DOXYGEN_RUNNING + /*! + returns an object to serve as criteria for facets. + + \param angle_bound is the lower bound for the angles in degrees of the + surface mesh facets. + \param radius_bound is a uniform upper bound + for the radius of the surface Delaunay balls. + \param distance_bound is an upper bound for the center-center distances + of the surface mesh facets. + \param topology is the set of topological constraints + which have to be verified by each surface facet. See + section \ref Mesh_3DelaunayRefinement for further details. + \param min_radius_bound is a uniform lower bound for the radius of + the surface Delaunay balls. Only facets with a radius larger than that + bound will be refined. + + @note If one parameter is set to 0, then its corresponding + criterion is ignored. + */ Mesh_facet_criteria_3(const FT& angle_bound, - const Sizing_field & radius_bound, - const Sizing_field2& distance_bound, + const FT& radius_bound, + const FT& distance_bound, + const Mesh_facet_topology topology = FACET_VERTICES_ON_SURFACE, + const FT& min_radius_bound = 0.); + +#endif + + + /*! + Returns an object to serve as criteria for facets. The types `SizingField` and + `DistanceField` must + be models of the concept `MeshDomainField_3`. The behavior and semantic of the arguments are the same + as above, except that the radius and distance bound parameters are + functionals instead of constants. + */ + template < typename SizingField, typename DistanceField > + Mesh_facet_criteria_3(const FT& angle_bound, + const SizingField & radius_bound, + const DistanceField& distance_bound, const Mesh_facet_topology topology = FACET_VERTICES_ON_SURFACE, const FT& min_radius_bound = 0.) { @@ -65,19 +139,23 @@ public: init_aspect(angle_bound); init_radius(radius_bound, - Mesh_3::Is_mesh_domain_field_3()); + Mesh_3::Is_mesh_domain_field_3()); init_distance(distance_bound, - Mesh_3::Is_mesh_domain_field_3()); + Mesh_3::Is_mesh_domain_field_3()); init_topo(topology); } -/// Destructor + /// @} + + + // Destructor ~Mesh_facet_criteria_3() { } /** * @brief returns whether the facet `facet` is bad or not. + * * @param tr the triangulation within which `facet` lives * @param facet the facet */ diff --git a/Mesh_3/include/CGAL/Mesh_polyhedron_3.h b/Mesh_3/include/CGAL/Mesh_polyhedron_3.h index 4461e5ec478..454c0c94aff 100644 --- a/Mesh_3/include/CGAL/Mesh_polyhedron_3.h +++ b/Mesh_3/include/CGAL/Mesh_polyhedron_3.h @@ -209,13 +209,45 @@ public: } // end namespace Mesh_3 +/*! +\ingroup PkgMesh3Domains -template +The class `Mesh_polyhedron_3` provides a customized `Polyhedron_3` type. This type uses +as `PolyhedronItems_3` a customized type which adds data to the `Vertex`, `Face` and +`Halfedge` classes. Those data are required to use the detection of sharp features. + +\tparam IGT stands for the geometric traits associated +to the meshing process. It must be a model of the two concepts +`PolyhedronTraits_3` and `IntersectionGeometricTraits_3`. + +\sa `CGAL::Polyhedron_3` +\sa `CGAL::Polyhedral_mesh_domain_with_features_3` + +*/ +#ifdef DOXYGEN_RUNNING +template struct Mesh_polyhedron_3 { - typedef Polyhedron_3 > type; + /// \name Types + /// @{ + + /*! + `CGAL::Polyhedron_3` type with customized `PolyhedronItems_3` designed to handle sharp feature detection. + */ + typedef unspecified_type type; + + /// @} +}; +#else +template +struct Mesh_polyhedron_3 +{ + typedef Polyhedron_3 > type; typedef type Type; }; +#endif + } // end namespace CGAL #endif // CGAL_MESH_POLYHEDRON_3_H diff --git a/Mesh_3/include/CGAL/Mesh_triangulation_3.h b/Mesh_3/include/CGAL/Mesh_triangulation_3.h index 2970dc92b58..db6db640c79 100644 --- a/Mesh_3/include/CGAL/Mesh_triangulation_3.h +++ b/Mesh_3/include/CGAL/Mesh_triangulation_3.h @@ -77,7 +77,7 @@ public: // because of Periodic_3_mesh_3: they are functions for which both triangulations // have fundamentally different implementations (usually, Periodic_3_mesh_3 // does not know the offset of a point and must brute-force check for all - // possibilities). To allow Periodic_3_mesh_3 to use Mesh_3's files, + // possibilities). To enable Periodic_3_mesh_3 to use Mesh_3's files, // each mesh triangulation implements its own version. const Bare_point& get_closest_point(const Bare_point& /*p*/, const Bare_point& q) const @@ -124,44 +124,93 @@ public: } }; -// Struct Mesh_triangulation_3 -// + +/*! +\ingroup PkgMesh3MeshClasses + +The class `Mesh_triangulation_3` is a class template which provides the triangulation +type to be used for the 3D triangulation embedding the mesh. + +\tparam MD must be a model of `MeshDomain_3`. + +\tparam GT must be a model of `MeshTriangulationTraits_3` or `Default` +and defaults to `Kernel_traits::%Kernel`. + +\tparam ConcurrencyTag enables sequential versus parallel meshing and optimization algorithms. + Possible values are `Sequential_tag` (the default), `Parallel_tag`, + and `Parallel_if_available_tag`. + +\tparam VertexBase must be a model of `MeshVertexBase_3` or `Default` +and defaults to `Mesh_vertex_base_3`. + +\tparam CellBase must be a model of `MeshCellBase_3` or `Default` +and defaults to `Compact_mesh_cell_base_3`. + +\warning To improve the robustness of the meshing process, the input traits `GT` + is wrapped with the traits class `Robust_weighted_circumcenter_filtered_traits_3`. + The class `Robust_weighted_circumcenter_filtered_traits_3` upgrades the functors + models of `Kernel::ConstructWeightedCircumcenter_3`, `Kernel::ComputeSquaredRadius_3`, + and `Kernel::ComputeSquaredRadiusSmallestOrthogonalSphere_3` that are + provided by `GT` to use exact computations when the geometric configuration + is close to degenerate (e.g. almost coplanar points).

      + Users should therefore be aware that the traits class of the triangulation + will have type `Robust_weighted_circumcenter_filtered_traits_3`. + +\sa `make_mesh_3()` +\sa `Mesh_complex_3_in_triangulation_3` + +*/ template + class GT = Default, + class ConcurrencyTag = Sequential_tag, + class VertexBase = Default, + class CellBase = Default> struct Mesh_triangulation_3 { private: - using K = typename Default::Lazy_get >::type; + using K = typename Default::Lazy_get >::type; using Geom_traits = typename details::Mesh_geom_traits_generator::type; using Indices_tuple = Mesh_3::internal::Indices_tuple_t; using Vertex_base = typename Default::Get< - Vertex_base_, + VertexBase, Mesh_vertex_generator_3 >::type; using Cell_base = typename Default::Get< - Cell_base_, + CellBase, Compact_mesh_cell_generator_3 >::type; using Concurrency_tag = - typename Default::Get::type; + typename Default::Get::type; struct Tds : public Triangulation_data_structure_3 {}; using Triangulation = Mesh_3_regular_triangulation_3_wrapper; public: +#ifndef DOXYGEN_RUNNING using type = Triangulation; using Type = type; -}; // end struct Mesh_triangulation_3 -} // end namespace CGAL +#else + /// \name Types + /// @{ + + /*! + The triangulation type to be used for the 3D triangulation embedding the mesh. + This type is a wrapper around the type `CGAL::Regular_triangulation_3`, whose vertex + and cell base classes are respectively `VertexBase` and `CellBase`. + */ + typedef unspecified_type type; + + /// @} +#endif // DOXYGEN_RUNNING +}; + +} // end namespace CGAL #include 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 ce6de8775be..4a975d8f70e 100644 --- a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h @@ -85,7 +85,7 @@ surface, the sub-domain indices on both sides are known. \tparam Polyhedron stands for the type of the input polyhedral surface(s), model of `FaceListGraph`. -\tparam IGT_ stands for a geometric traits class +\tparam IGT stands for a geometric traits class providing the types and functors required to implement the intersection tests and intersection computations for polyhedral boundary surfaces. This parameter has to be instantiated @@ -93,56 +93,57 @@ with a model of the concept `IntersectionGeometricTraits_3`. \cgalModels `MeshDomainWithFeatures_3` -\sa `IntersectionGeometricTraits_3` -\sa `CGAL::make_mesh_3()`. -\sa `CGAL::Mesh_domain_with_polyline_features_3` -\sa `CGAL::Polyhedral_mesh_domain_3` -\sa `CGAL::Mesh_polyhedron_3` +\sa `CGAL::make_mesh_3()` +\sa `CGAL::Mesh_domain_with_polyline_features_3` +\sa `CGAL::Polyhedral_mesh_domain_3` +\sa `CGAL::Mesh_polyhedron_3` */ +#ifdef DOXYGEN_RUNNING +template < class IGT, + class Polyhedron = typename Mesh_polyhedron_3::type> +class Polyhedral_complex_mesh_domain_3 + : public Mesh_domain_with_polyline_features_3< + Polyhedral_mesh_domain_3 > +#else template < class IGT_, class Polyhedron_ = typename Mesh_polyhedron_3::type, - class TriangleAccessor=CGAL::Default - > + class TriangleAccessor = CGAL::Default> class Polyhedral_complex_mesh_domain_3 : public Mesh_domain_with_polyline_features_3< Polyhedral_mesh_domain_3< Polyhedron_, IGT_, - CGAL::Default, - int, //Use_patch_id_tag - Tag_true > >//Use_exact_intersection_tag + TriangleAccessor, + int, // Use_patch_id_tag + Tag_true > >// Use_exact_intersection_tag +#endif { public: - /// The base class + // The base class typedef Polyhedron_ Polyhedron; typedef Mesh_domain_with_polyline_features_3< - Polyhedral_mesh_domain_3< - Polyhedron, IGT_, CGAL::Default, - int, Tag_true > > Base; - /// @cond DEVELOPERS + Polyhedral_mesh_domain_3< + Polyhedron, IGT_, TriangleAccessor, int, Tag_true > > Base; + private: - typedef IGT_ IGT; + /// @cond DEVELOPERS typedef Polyhedral_mesh_domain_3 BaseBase; typedef Polyhedral_complex_mesh_domain_3 Self; /// @endcond public: - /*! - Numerical type. - */ + // Numerical type typedef typename Base::FT FT; - /// The polyhedron type + // The polyhedron type typedef Polyhedron Polyhedron_type; - /// \name Index types - /// @{ - /// The types are `int` or types compatible with `int`. + // The types are `int` or types compatible with `int`. typedef typename Base::Corner_index Corner_index; typedef typename Base::Curve_index Curve_index; typedef typename Base::Surface_patch_index Surface_patch_index; typedef typename Base::Subdomain_index Subdomain_index; - /// @} /// @cond DEVELOPERS typedef typename Base::Ray_3 Ray_3; @@ -154,6 +155,7 @@ public: typedef typename Base::AABB_primitive AABB_primitive; typedef typename Base::AABB_primitive_id AABB_primitive_id; typedef typename Base::Surface_patch_index Patch_id; + // Backward compatibility #ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX typedef Surface_patch_index Surface_index; @@ -178,15 +180,18 @@ protected: boost::setS, // this avoids parallel edges boost::vecS, boost::undirectedS, - typename IGT::Point_3, + typename IGT_::Point_3, Set_of_indices> Featured_edges_copy_graph; /// @endcond public: - /// Constructor - /*! Constructs a domain defined by a set of polyhedral surfaces, - describing a polyhedral complex. + /// \name Creation + /// @{ + + /*! + constructs a domain defined by a set of polyhedral surfaces, describing a polyhedral complex. + @param begin first iterator on the input polyhedral surfaces @param end past the end iterator on the input polyhedral surfaces @param indices_begin first iterator on the pairs of subdomain indices @@ -206,15 +211,14 @@ public: */ template - Polyhedral_complex_mesh_domain_3 - ( InputPolyhedraIterator begin, - InputPolyhedraIterator end, - InputPairOfSubdomainIndicesIterator indices_begin, - InputPairOfSubdomainIndicesIterator indices_end + Polyhedral_complex_mesh_domain_3(InputPolyhedraIterator begin, + InputPolyhedraIterator end, + InputPairOfSubdomainIndicesIterator indices_begin, + InputPairOfSubdomainIndicesIterator indices_end #ifndef DOXYGEN_RUNNING - , CGAL::Random* p_rng = nullptr + , CGAL::Random* p_rng = nullptr #endif - ) + ) : Base(p_rng) , patch_indices(indices_begin, indices_end) , borders_detected_(false) @@ -246,7 +250,10 @@ public: this->build(); } + /// @} + /// @cond DEVELOPERS + Polyhedral_complex_mesh_domain_3 ( CGAL::Random* p_rng = nullptr @@ -258,17 +265,15 @@ public: const std::vector& polyhedra() const { return stored_polyhedra; } - /// @endcond - /// @cond DEVELOPERS /*! * construct_initial_points_object() is one of the very first functions called - * when make_mesh_3 starts + * when make_mesh_3 starts. * BEFORE make_mesh_3 starts, we have to make sure that (at least) the borders have * been detected, and the polyhedral complex internal data structures initialized * So, this function is overloaded to make sure they are (checking that - * borders_detected_ is false is enough) - * Then, call the base class function + * borders_detected_ is false is enough). + * Then, call the base class function. */ typename BaseBase::Construct_initial_points construct_initial_points_object() const { @@ -281,9 +286,13 @@ public: void detect_features(FT angle_in_degree, std::vector& p, const bool dont_protect);//if true, features will not be protected + + void detect_borders(std::vector& p, const bool dont_protect); + /// @endcond + /*! - Detects sharp features and boundaries of the polyhedral components of the complex + detects sharp features and boundaries of the polyhedral components of the complex (including potential internal polyhedra), and inserts them as features of the domain. `angle_bound` gives the maximum angle (in degrees) between the two normal vectors of adjacent triangles. @@ -295,13 +304,10 @@ public: detect_features(angle_bound, stored_polyhedra, false/*do protect*/); } - /// @cond DEVELOPERS - void detect_borders(std::vector& p, const bool dont_protect); - /// @endcond /*! - Detects border edges of the polyhedral components of the complex, + detects border edges of the polyhedral components of the complex, and inserts them as features of the domain. - This function should be called alone only, and not before or after `detect_features()`. + This function should only be called alone, and not before or after `detect_features()`. */ void detect_borders() { detect_borders(stored_polyhedra, false/*do protect*/); @@ -365,11 +371,10 @@ public: this->boundary_polyhedra_ids.push_back(poly_id); } } - /// @endcond - /// @cond DEVELOPERS template - void add_vertices_to_c3t3_on_patch_without_feature_edges(C3t3& c3t3) const { + void add_vertices_to_c3t3_on_patch_without_feature_edges(C3t3& c3t3) const + { #ifdef CGAL_MESH_3_VERBOSE std::cout << "add_vertices_to_c3t3_on_patch_without_feature_edges..."; std::cout.flush(); @@ -378,7 +383,7 @@ public: typedef typename C3t3::Triangulation Tr; typedef typename Tr::Weighted_point Weighted_point; - typedef typename IGT::Sphere_3 Sphere_3; + typedef typename IGT_::Sphere_3 Sphere_3; typedef typename Polyhedron::Vertex_const_handle Vertex_const_handle; Tr& tr = c3t3.triangulation(); @@ -519,13 +524,13 @@ public: Is_in_domain(const Polyhedral_complex_mesh_domain_3& domain) : r_domain_(domain) {} - boost::optional shoot_a_ray_1(const Ray_3 ray) const { + std::optional shoot_a_ray_1(const Ray_3 ray) const { return r_domain_.bounding_aabb_tree_ptr()-> first_intersected_primitive(ray); } #if USE_ALL_INTERSECTIONS - boost::optional shoot_a_ray_2(const Ray_3 ray) const { + std::optional shoot_a_ray_2(const Ray_3 ray) const { const Point_3& p = ray.source(); typedef typename AABB_tree:: template Intersection_and_primitive_id::Type Inter_and_prim; @@ -533,18 +538,18 @@ public: r_domain_.bounding_aabb_tree_ptr()-> all_intersections(ray, std::back_inserter(all_intersections)); if(all_intersections.empty()) - return boost::none; + return std::nullopt; else { for(const Inter_and_prim& i_p: all_intersections) { - if(boost::get( &i_p.first) == 0) return AABB_primitive_id(); + if(std::get_if( &i_p.first) == 0) return AABB_primitive_id(); } auto it = std::min_element (all_intersections.begin(), all_intersections.end(), [p](const Inter_and_prim& a, const Inter_and_prim& b) { - const Point_3& pa = boost::get(a.first); - const Point_3& pb = boost::get(b.first); + const Point_3& pa = std::get(a.first); + const Point_3& pb = std::get(b.first); return compare_distance_to_point(p, pa, pb) == CGAL::SMALLER; }); @@ -565,8 +570,8 @@ public: } // Shoot ray - typename IGT::Construct_ray_3 ray = IGT().construct_ray_3_object(); - typename IGT::Construct_vector_3 vector = IGT().construct_vector_3_object(); + typename IGT_::Construct_ray_3 ray = IGT_().construct_ray_3_object(); + typename IGT_::Construct_vector_3 vector = IGT_().construct_vector_3_object(); while(true) { Random_points_on_sphere_3 random_point(1.); @@ -575,13 +580,13 @@ public: #define USE_ALL_INTERSECTIONS 0 #if USE_ALL_INTERSECTIONS - boost::optional opt = shoot_a_ray_2(ray_shot); + std::optional opt = shoot_a_ray_2(ray_shot); #else // first_intersected_primitive - boost::optional opt = shoot_a_ray_1(ray_shot); + std::optional opt = shoot_a_ray_1(ray_shot); #endif // first_intersected_primitive // for(int i = 0; i < 20; ++i) { // const Ray_3 ray_shot2 = ray(p, vector(CGAL::ORIGIN,*random_point)); - // boost::optional opt2 = shoot_a_ray_1(ray_shot2); + // std::optional opt2 = shoot_a_ray_1(ray_shot2); // if(opt != opt2) { // if(!opt && *opt2 == 0) continue; // if(!opt2 && *opt == 0) continue; @@ -598,7 +603,7 @@ public: Surface_patch_index face_id = r_domain_.make_surface_index(*opt); const std::pair& pair = r_domain_.incident_subdomains_indices(face_id); - const typename IGT::Triangle_3 triangle = + const typename IGT_::Triangle_3 triangle = BaseBase::template Primitive_type::datum(*opt); const Point_3& a = triangle[0]; const Point_3& b = triangle[1]; @@ -723,7 +728,7 @@ detect_features(FT angle_in_degree, G_copy g_copy; typedef typename boost::graph_traits::vertex_descriptor graph_vertex_descriptor; - typedef std::map P2vmap; // TODO: replace this map by and unordered_map P2vmap p2vmap; diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 2d9bf625f57..450826da13f 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -36,13 +36,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include @@ -79,41 +79,71 @@ max_length(const Bbox_3& b) // ----------------------------------- // Geometric traits generator // ----------------------------------- -template < typename Gt, +template < typename GT, typename Use_exact_intersection_construction_tag > struct IGT_generator {}; -template < typename Gt > -struct IGT_generator +template < typename GT > +struct IGT_generator { #ifdef CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS - typedef CGAL::Mesh_3::Robust_intersection_traits_3_new type; + typedef CGAL::Mesh_3::Robust_intersection_traits_3_new type; #else // NOT CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS - typedef CGAL::Mesh_3::Robust_intersection_traits_3 type; + typedef CGAL::Mesh_3::Robust_intersection_traits_3 type; #endif // NOT CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS typedef type Type; }; -template < typename Gt > -struct IGT_generator +template < typename GT > +struct IGT_generator { - typedef Gt type; + typedef GT type; typedef type Type; }; } // end namespace details } // end namespace Mesh_3 -/** - * @class Polyhedral_mesh_domain_3 - * - * - */ -template +#else // DOXYGEN_RUNNING +template +#endif // DOXYGEN_RUNNING class Polyhedral_mesh_domain_3 { public: @@ -123,7 +153,7 @@ public: typedef Patch_id_ Patch_id; - /// Geometric object types + // Geometric object types typedef typename IGT::Point_3 Point_3; typedef typename IGT::Segment_3 Segment_3; typedef typename IGT::Ray_3 Ray_3; @@ -134,25 +164,25 @@ public: //------------------------------------------------------- // Index Types //------------------------------------------------------- - /// Type of indexes for cells of the input complex + // Type of indexes for cells of the input complex typedef int Subdomain_index; - typedef boost::optional Subdomain; + typedef std::optional Subdomain; - /// Type of indexes for surface patch of the input complex + // Type of indexes for surface patch of the input complex typedef typename boost::property_map >::type Face_patch_id_pmap; typedef typename boost::property_traits< Face_patch_id_pmap>::value_type Surface_patch_index; - typedef boost::optional Surface_patch; - /// Type of indexes to characterize the lowest dimensional face of the input - /// complex on which a vertex lie + typedef std::optional Surface_patch; + + // Type of indexes to characterize the lowest dimensional face of the input + // complex on which a vertex lie typedef typename Mesh_3::internal::Index_generator< Subdomain_index, Surface_patch_index>::type Index; typedef std::tuple Intersection; - typedef typename IGT::FT FT; // Kernel_traits compatibility @@ -197,8 +227,6 @@ public: typedef typename AABB_traits::Bounding_box Bounding_box; public: - - /// Default constructor Polyhedral_mesh_domain_3(CGAL::Random* p_rng = nullptr) : tree_() , bounding_tree_(&tree_) @@ -206,27 +234,43 @@ public: { } - /** - * @brief Constructor. Construction from a polyhedral surface - * @param polyhedron the polyhedron describing the polyhedral surface - */ - Polyhedral_mesh_domain_3(const Polyhedron& p, - CGAL::Random* p_rng = nullptr) + /// \name Creation + /// @{ + + /*! + Construction from a bounding polyhedral surface which must be closed, and free of intersections. + The inside of `bounding_polyhedron` will be meshed. + */ + Polyhedral_mesh_domain_3(const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : tree_() , bounding_tree_(&tree_) // the bounding tree is tree_ , p_rng_(p_rng) { - this->add_primitives(p); - if(! is_triangle_mesh(p)) { + this->add_primitives(bounding_polyhedron); + if(! is_triangle_mesh(bounding_polyhedron)) { std::cerr << "Your input polyhedron must be triangulated!\n"; CGAL_error_msg("Your input polyhedron must be triangulated!"); } this->build(); } + /*! + Construction from a polyhedral surface, and a bounding polyhedral surface. + The first polyhedron must be entirely included inside `bounding_polyhedron`, which must be closed + and free of intersections. + Using this constructor enables to mesh a polyhedral surface which is not closed, or has holes. + The inside of `bounding_polyhedron` will be meshed. + */ Polyhedral_mesh_domain_3(const Polyhedron& p, - const Polyhedron& bounding_polyhedron, - CGAL::Random* p_rng = nullptr) + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : tree_() , bounding_tree_(new AABB_tree_) , p_rng_(p_rng) @@ -241,22 +285,25 @@ public: this->build(); } - /** - * Constructor. - * + /*! * Constructor from a sequence of polyhedral surfaces, and a bounding * polyhedral surface. * - * @param InputPolyhedraPtrIterator must an iterator of a sequence of - * pointers to polyhedra + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` and value type `Polyhedron*` * - * @param bounding_polyhedron reference to the bounding surface + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra + * @param bounding_polyhedron the bounding surface */ template Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin, InputPolyhedraPtrIterator end, - const Polyhedron& bounding_polyhedron, - CGAL::Random* p_rng = nullptr) + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : p_rng_(p_rng) , delete_rng_(false) { @@ -274,20 +321,24 @@ public: this->build(); } - /** - * Constructor. - * - * Constructor from a sequence of polyhedral surfaces, without bounding - * surface. The domain will always answer false to "is_in_domain" + /*! + * Constructor from a sequence of polyhedral surfaces, without a bounding + * surface. The domain will always answer `false` to `is_in_domain()` * queries. * - * @param InputPolyhedraPtrIterator must an iterator of a sequence of - * pointers to polyhedra + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` and value type `Polyhedron*` + * + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra */ template - Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin, - InputPolyhedraPtrIterator end, - CGAL::Random* p_rng = nullptr) + Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin + , InputPolyhedraPtrIterator end +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : p_rng_(p_rng) { if(begin != end) { @@ -299,7 +350,9 @@ public: bounding_tree_ = 0; } - /// Destructor + /// @} + + // Destructor ~Polyhedral_mesh_domain_3() { if(bounding_tree_ != 0 && bounding_tree_ != &tree_) { delete bounding_tree_; @@ -311,9 +364,9 @@ public: } /** - * Constructs a set of \ccc{n} points on the surface, and output them to - * the output iterator \ccc{pts} whose value type is required to be - * \ccc{std::pair}. + * constructs a set of `n` points on the surface, and output them to + * the output iterator `pts` whose value type is required to be + * `std::pair`. */ struct Construct_initial_points { @@ -342,9 +395,9 @@ public: /** - * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the + * Returns true if point `p` is in the domain. If `p` is in the * domain, the parameter index is set to the index of the subdomain - * including $p$. It is set to the default value otherwise. + * including `p`. It is set to the default value otherwise. */ struct Is_in_domain { @@ -363,16 +416,16 @@ public: return tree_.closest_point(p); } - /// Allowed query types + // Allowed query types typedef boost::mpl::vector Allowed_query_types; /** - * Returns true is the element \ccc{type} intersect properly any of the - * surface patches describing the either the domain boundary or some + * Returns `true` if the element `type` intersects properly any of the + * surface patches describing either the domain boundary or some * subdomain boundary. - * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}. + * `Type` is either `Segment_3`, `Ray_3` or `Line_3`. * Parameter index is set to the index of the intersected surface patch - * if \ccc{true} is returned and to the default \ccc{Surface_patch_index} + * if `true` is returned and to the default `Surface_patch_index` * value otherwise. */ struct Do_intersect_surface @@ -388,7 +441,7 @@ public: { CGAL_MESH_3_PROFILER(std::string("Mesh_3 profiler: ") + std::string(CGAL_PRETTY_FUNCTION)); - boost::optional primitive_id = r_domain_.tree_.any_intersected_primitive(q); + std::optional primitive_id = r_domain_.tree_.any_intersected_primitive(q); if ( primitive_id ) { r_domain_.cache_primitive(q, *primitive_id); @@ -408,12 +461,12 @@ public: } /** - * Returns a point in the intersection of the primitive \ccc{type} + * Returns a point in the intersection of the primitive `type` * with some boundary surface. - * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}. - * The integer \ccc{dimension} is set to the dimension of the lowest + * `Type1` is either `Segment_3`, `Ray_3` or `Line_3`. + * The integer `dimension` is set to the dimension of the lowest * dimensional face in the input complex containing the returned point, and - * \ccc{index} is set to the index to be stored at a mesh vertex lying + * `index` is set to the index to be stored at a mesh vertex lying * on this face. */ struct Construct_intersection @@ -430,7 +483,7 @@ public: CGAL_MESH_3_PROFILER(std::string("Mesh_3 profiler: ") + std::string(CGAL_PRETTY_FUNCTION)); typedef typename AABB_tree_::template Intersection_and_primitive_id::Type Intersection_and_primitive_id; - typedef boost::optional AABB_intersection; + typedef std::optional AABB_intersection; typedef Point_3 Bare_point; AABB_intersection intersection; @@ -447,7 +500,7 @@ public: { #ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 CGAL_precondition(r_domain_.do_intersect_surface_object()(q) - != boost::none); + != std::nullopt); #endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 intersection = r_domain_.tree_.any_intersection(q); @@ -459,7 +512,7 @@ public: // intersection may be either a point or a segment if ( const Bare_point* p_intersect_pt = - boost::get( &(intersection->first) ) ) + std::get_if( &(intersection->first) ) ) { return Intersection(*p_intersect_pt, r_domain_.index_from_surface_patch_index( @@ -467,7 +520,7 @@ public: 2); } else if ( const Segment_3* p_intersect_seg = - boost::get(&(intersection->first))) + std::get_if(&(intersection->first))) { CGAL_MESH_3_PROFILER("Mesh_3 profiler: Intersection is a segment"); @@ -533,14 +586,14 @@ public: * where lies a vertex with dimension 2 and index `index`. */ Surface_patch_index surface_patch_index(const Index& index) const - { return boost::get(index); } + { return std::get(index); } /** * Returns the index of the subdomain containing a vertex * with dimension 3 and index `index`. */ Subdomain_index subdomain_index(const Index& index) const - { return boost::get(index); } + { return std::get(index); } // ----------------------------------- // Backward Compatibility @@ -607,7 +660,7 @@ private: AABB_tree_* bounding_tree_; // cache queries and intersected primitive - typedef typename boost::make_variant_over::type Cached_query; + typedef std::variant Cached_query; struct Query_cache { Query_cache() : has_cache(false) {} @@ -691,13 +744,14 @@ Construct_initial_points::operator()(OutputIterator pts, typename IGT::Construct_vector_3 vector = IGT().construct_vector_3_object(); const Bounding_box bbox = r_domain_.tree_.bbox(); - const Point_3 center( FT( (bbox.xmin() + bbox.xmax()) / 2), - FT( (bbox.ymin() + bbox.ymax()) / 2), - FT( (bbox.zmin() + bbox.zmax()) / 2) ); + Point_3 center( FT( (bbox.xmin() + bbox.xmax()) / 2), + FT( (bbox.ymin() + bbox.ymax()) / 2), + FT( (bbox.zmin() + bbox.zmax()) / 2) ); CGAL::Random& rng = *(r_domain_.p_rng_ != 0 ? r_domain_.p_rng_ : new Random(0)); + Random_points_on_sphere_3 random_point(1., rng); int i = n; @@ -727,6 +781,15 @@ Construct_initial_points::operator()(OutputIterator pts, % (n - i) % n; # endif + + // If the source of the ray is on the surface, every ray will return its source + // so change the source to a random point in the bounding box + if(std::get<0>(intersection) == ray_shot.source()) + { + center = Point_3(rng.get_double(bbox.xmin(), bbox.xmax()), + rng.get_double(bbox.ymin(), bbox.ymax()), + rng.get_double(bbox.zmin(), bbox.zmax())); + } } ++random_point; } diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h index acaf3455321..593c0624258 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h @@ -57,23 +57,56 @@ namespace CGAL { -/** - * @class Polyhedral_mesh_domain_with_features_3 - * - * - */ -template < class IGT_, - class Polyhedron_ = typename Mesh_polyhedron_3::type, - class TriangleAccessor= CGAL::Default, - class Patch_id=int, - class Use_exact_intersection_construction_tag = Tag_true > +/*! +\ingroup PkgMesh3Domains + +The class `Polyhedral_mesh_domain_with_features_3` implements a domain whose +boundary is a simplicial polyhedral surface. + +This surface must be free of intersections. It can either be closed, +included inside another polyhedral surface which is closed and free of intersections, +or open. In the latter case, the meshing process will only take care of the quality +of the 1D (features and boundaries) and 2D (surfaces) components of the mesh. + +It is a model of the concept `MeshDomainWithFeatures_3`. It also provides +a member function to automatically detect sharp features and boundaries from +the input polyhedral surface(s). + +\tparam IGT stands for a geometric traits class providing the types +and functors required to implement the intersection tests and intersection computations +for polyhedral boundary surfaces. This parameter has to be +instantiated with a model of the concept +`IntersectionGeometricTraits_3`. + +\tparam Polyhedron stands for the type of the input polyhedral surface(s), model of `FaceListGraph`. + +\cgalModels `MeshDomainWithFeatures_3` + +\sa `CGAL::Mesh_domain_with_polyline_features_3` +\sa `CGAL::Polyhedral_mesh_domain_3` +\sa `CGAL::Mesh_polyhedron_3` +*/ +#ifdef DOXYGEN_RUNNING +template ::type> class Polyhedral_mesh_domain_with_features_3 : public Mesh_domain_with_polyline_features_3< - Polyhedral_mesh_domain_3< Polyhedron_, - IGT_, - TriangleAccessor, - Patch_id, - Use_exact_intersection_construction_tag > > + Polyhedral_mesh_domain_3 > +#else +template ::type, + class TriangleAccessor = CGAL::Default, + class Patch_id = int, + class Use_exact_intersection_construction_tag = Tag_true> +class Polyhedral_mesh_domain_with_features_3 + : public Mesh_domain_with_polyline_features_3< + Polyhedral_mesh_domain_3 > +#endif { typedef Mesh_domain_with_polyline_features_3< Polyhedral_mesh_domain_3< @@ -97,8 +130,9 @@ public: typedef typename Base::Surface_patch_index Surface_patch_index; typedef typename Base::Subdomain_index Subdomain_index; + // Backward-compatibility #ifndef CGAL_NO_DEPRECATED_CODE - typedef Curve_index Curve_segment_index; ///< Backward-compatibility + typedef Curve_index Curve_segment_index; #endif typedef typename boost::property_map Bare_polyline; typedef Mesh_3::Polyline_with_context Polyline_with_context; - /// Constructors - Polyhedral_mesh_domain_with_features_3(const Polyhedron& p, - CGAL::Random* p_rng = nullptr) + + /// \name Creation + /// @{ + + /*! + Constructor from a polyhedral surface. + No feature detection is done at this level. Note that a copy of `bounding_polyhedron` will be done. + The polyhedron `bounding_polyhedron` has to be closed and free of intersections. + The interior of `bounding_polyhedron` will be meshed. + */ + Polyhedral_mesh_domain_with_features_3(const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.resize(1); - stored_polyhedra[0] = p; + stored_polyhedra[0] = bounding_polyhedron; get(face_patch_id_t(), stored_polyhedra[0]); this->add_primitives(stored_polyhedra[0]); this->build(); } #ifndef CGAL_NO_DEPRECATED_CODE - + /*! + \deprecated Constructor from an OFF file. No feature detection is done at this level. + Users must read the file into a `Polyhedron` and call the constructor above. + */ CGAL_DEPRECATED - Polyhedral_mesh_domain_with_features_3(const std::string& filename, - CGAL::Random* p_rng = nullptr) + Polyhedral_mesh_domain_with_features_3(const std::string& filename +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { load_from_file(filename.c_str()); } +#ifndef DOXYGEN_RUNNING // The following is needed, because otherwise, when a "const char*" is // passed, the constructors templates are a better match, than the // constructor with `std::string`. @@ -153,31 +207,56 @@ public: { load_from_file(filename); } +#endif // DOXYGEN_RUNNING #endif // not CGAL_NO_DEPRECATED_CODE - Polyhedral_mesh_domain_with_features_3(const Polyhedron& p, - const Polyhedron& bounding_p, - CGAL::Random* p_rng = nullptr) + /*! + Constructor from a polyhedral surface, and a bounding polyhedral surface. + The first polyhedron should be entirely included inside `bounding_polyhedron`, which has to be closed + and free of intersections. + Using this constructor enables to mesh a polyhedral surface which is not closed, or has holes. + The inside of `bounding_polyhedron` will be meshed. + */ + Polyhedral_mesh_domain_with_features_3(const Polyhedron& polyhedron, + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.resize(2); - stored_polyhedra[0] = p; - stored_polyhedra[1] = bounding_p; + stored_polyhedra[0] = polyhedron; + stored_polyhedra[1] = bounding_polyhedron; get(face_patch_id_t(), stored_polyhedra[0]); get(face_patch_id_t(), stored_polyhedra[1]); this->add_primitives(stored_polyhedra[0]); this->add_primitives(stored_polyhedra[1]); - if(CGAL::is_empty(bounding_p)) { + if(CGAL::is_empty(bounding_polyhedron)) { this->set_surface_only(); } else { this->add_primitives_to_bounding_tree(stored_polyhedra[1]); } } + /*! + * Constructor from a sequence of polyhedral surfaces, without a bounding + * surface. The domain will always answer `false` to `is_in_domain()` + * queries. + * + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` with value type `Polyhedron*` + * + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra + */ template Polyhedral_mesh_domain_with_features_3(InputPolyhedraPtrIterator begin, - InputPolyhedraPtrIterator end, - CGAL::Random* p_rng = nullptr) + InputPolyhedraPtrIterator end +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.reserve(std::distance(begin, end)); @@ -190,11 +269,25 @@ public: this->build(); } + /*! + * Constructor from a sequence of polyhedral surfaces, and a bounding + * polyhedral surface. + * + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` with value type `Polyhedron*` + * + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra + * @param bounding_polyhedron the bounding surface + */ template Polyhedral_mesh_domain_with_features_3(InputPolyhedraPtrIterator begin, InputPolyhedraPtrIterator end, - const Polyhedron& bounding_polyhedron, - CGAL::Random* p_rng = nullptr) + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.reserve(std::distance(begin, end)+1); @@ -216,21 +309,44 @@ public: this->build(); } - /// Destructor + /// @} + + // Destructor ~Polyhedral_mesh_domain_with_features_3() {} - /// Detect features + // Detect features void initialize_ts(Polyhedron& p); + void detect_borders(std::vector& p); + void detect_features(FT angle_in_degree, std::vector& p); - void detect_features(FT angle_in_degree = FT(60)) + + /// \name Operations + /// @{ + + /*! + detects sharp features and boundaries of the internal bounding polyhedron (and the potential + internal polyhedra) and inserts them as features of the domain. + + @param angle_bound gives the maximum angle (in degrees) between the two normal vectors of adjacent triangles. + For an edge of a polyhedron, if the angle between the two normal vectors of its + incident facets is bigger than the given bound, then the edge is considered as + a feature edge. + */ + void detect_features(FT angle_bound = FT(60)) { - detect_features(angle_in_degree, stored_polyhedra); + detect_features(angle_bound, stored_polyhedra); } - void detect_borders(std::vector& p); + /*! + detects border edges of the bounding polyhedron and inserts them as features of the domain. + + This function should only be called alone, and not before or after `detect_features()`. + */ void detect_borders() { detect_borders(stored_polyhedra); }; + /// @} + template void add_features(InputIterator first, InputIterator end) diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index b3a0379c989..a71bef61734 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -52,7 +52,7 @@ namespace CGAL { * protecting ball will intersect a surface patch to which the * corresponding vertex does not belong. * -* @tparam GeomTraits is the geometric traits class. It must match the type `Triangulation::Geom_traits`, +* @tparam GT is the geometric traits class. It must match the type `Triangulation::Geom_traits`, * where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used * in the meshing process. * @tparam MeshDomain is the type of the domain. It must be a model of `MeshDomainWithFeatures_3`, @@ -61,7 +61,7 @@ namespace CGAL { * @cgalModels `MeshDomainField_3` */ -template struct Sizing_field_with_aabb_tree { - using FT = typename GeomTraits::FT; - using Point_3 = typename GeomTraits::Point_3; + using FT = typename GT::FT; + using Point_3 = typename GT::Point_3; using Index = typename MeshDomain::Index; private: @@ -89,7 +89,7 @@ private: typedef std::vector Corners_incident_patches; typedef std::vector Curves_incident_patches; - typedef GeomTraits Kernel_; + typedef GT Kernel_; typedef CGAL::Delaunay_triangulation_3 Dt; using Input_facets_AABB_tree = typename CGAL::Default::Get< @@ -284,11 +284,11 @@ public: } } - boost::optional + std::optional closest_point_on_surfaces(const Point_3& p, const Patches_ids& patch_ids_to_ignore) const { - boost::optional result{}; + std::optional result{}; if(d_ptr->aabb_tree.empty()) return result; for(std::size_t i = 0; i < d_ptr->kd_trees_ptrs.size(); ++i) { const auto patch_id = static_cast(i + d_ptr->min_patch_id); @@ -391,7 +391,7 @@ public: const auto closest_point_and_primitive = closest_point_on_surfaces(p, ids); - if(closest_point_and_primitive != boost::none) { + if(closest_point_and_primitive != std::nullopt) { result = (std::min)(FT(0.9 / CGAL::sqrt(CGAL::Mesh_3::internal::weight_modifier) * CGAL_NTS @@ -445,7 +445,7 @@ public: if(!d_ptr->aabb_tree.empty()) { //Compute distance to surface patches const auto closest_point_and_primitive = closest_point_on_surfaces(p, ids); - if(closest_point_and_primitive == boost::none) { + if(closest_point_and_primitive == std::nullopt) { #ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY std::cerr << result << " (projection not found) ids:"; for(Patch_index i : ids) { @@ -532,8 +532,8 @@ public: d_ptr->domain.curves_aabb_tree().traversal(p, curves_projection_traits); //Compute distance to the curve on which p lies - typedef typename GeomTraits::Segment_3 Segment_3; - typedef typename GeomTraits::Plane_3 Plane_3; + typedef typename GT::Segment_3 Segment_3; + typedef typename GT::Plane_3 Plane_3; const typename Input_curves_AABB_tree_::Point_and_primitive_id& ppid = d_ptr->domain.curves_aabb_tree().closest_point_and_primitive(p); @@ -567,7 +567,7 @@ public: const auto int_res = CGAL::intersection(prim.datum(), curr_ortho_plane); if (int_res) { - if (const Point_3* pp = boost::get(&*int_res)) + if (const Point_3* pp = std::get_if(&*int_res)) { FT new_sqd = CGAL::squared_distance(p, *pp); FT dist = CGAL::abs(d_ptr->domain.signed_geodesic_distance(p, *pp, curve_id)); diff --git a/Mesh_3/include/CGAL/Triangle_accessor_3.h b/Mesh_3/include/CGAL/Triangle_accessor_3.h index 03e8313e687..4e336aea354 100644 --- a/Mesh_3/include/CGAL/Triangle_accessor_3.h +++ b/Mesh_3/include/CGAL/Triangle_accessor_3.h @@ -19,7 +19,6 @@ #include - #include #include #include @@ -33,7 +32,6 @@ class Triangle_accessor_3 { typedef typename Polyhedron::Error_bad_match Error_bad_match; }; - template < class K,class Items, template < class T, class I, class A> class T_HDS, @@ -41,9 +39,12 @@ template < class K,class Items, class Triangle_accessor_3, K > { typedef Polyhedron_3 Polyhedron; + public: typedef typename K::Triangle_3 Triangle_3; + typedef typename Polyhedron::Facet_const_iterator Triangle_iterator; + typedef typename Polyhedron::Facet_const_handle Triangle_handle; Triangle_accessor_3() { } @@ -68,8 +69,7 @@ public: } }; - - template +template class Triangle_accessor_3 >, K > { typedef Graph_with_descriptor_with_graph > Polyhedron; @@ -108,8 +108,6 @@ public: } }; - } // end namespace CGAL - #endif // POLYHEDRON_TRIANGLE_ACCESSOR_H diff --git a/Mesh_3/include/CGAL/refine_mesh_3.h b/Mesh_3/include/CGAL/refine_mesh_3.h index b4823d073f4..922c063aec1 100644 --- a/Mesh_3/include/CGAL/refine_mesh_3.h +++ b/Mesh_3/include/CGAL/refine_mesh_3.h @@ -170,11 +170,11 @@ private: * of 1-dimensional exposed features. * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below. * They control which optimization processes are performed - * and allow the user to tune the parameters of the optimization processes. + * and enable the user to tune the parameters of the optimization processes. * Individual optimization parameters are not described here as they are * internal types (see instead the documentation page of each optimizer). * For each optimization algorithm, there exist two global functions - * that allow to enable or disable the optimizer. + * that enable/disable the optimizer. * * \cgalNamedParamsBegin * \cgalParamSectionBegin{Topological options (manifoldness)} @@ -310,7 +310,7 @@ void refine_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& cri * done at the end of refinement process * @param reset_c3t3 if `true`, a new C3T3 will be construct from param c3t3. * The new c3t3 keeps only the vertices (as NON-weighted points with their - * dimension and Index) of the triangulation. That allows to refine a mesh + * dimension and Index) of the triangulation. That enables to refine a mesh * which has been exuded. * @param mesh_3_options is a struct object used to pass non-documented options, * for debugging purpose. diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 2a8e19e1c38..b0e9e250c27 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -30,17 +30,14 @@ create_single_source_cgal_program( "test_without_detect_features.cpp" ) if(CGAL_ImageIO_USE_ZLIB) create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_image_deprecated.cpp" ) create_single_source_cgal_program( "test_meshing_3D_image_with_features.cpp" ) create_single_source_cgal_program( "test_meshing_3D_gray_image.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_gray_image_deprecated.cpp" ) create_single_source_cgal_program( "test_min_size_criteria.cpp") else() message(STATUS "NOTICE: The test 'test_meshing_3D_image' requires the ZLIB library, and will not be compiled.") endif() create_single_source_cgal_program( "test_meshing_implicit_function.cpp" ) -create_single_source_cgal_program( "test_meshing_implicit_function_deprecated.cpp" ) create_single_source_cgal_program( "test_meshing_polyhedral_complex.cpp" ) create_single_source_cgal_program( "test_meshing_polyhedron.cpp" ) create_single_source_cgal_program( "test_meshing_polylines_only.cpp" ) @@ -66,12 +63,9 @@ foreach(target test_mesh_criteria_creation test_without_detect_features test_meshing_3D_image - test_meshing_3D_image_deprecated test_meshing_3D_image_with_features test_meshing_3D_gray_image - test_meshing_3D_gray_image_deprecated test_meshing_implicit_function - test_meshing_implicit_function_deprecated test_meshing_polyhedral_complex test_meshing_polyhedron test_meshing_polylines_only diff --git a/Mesh_3/test/Mesh_3/XML_exporter.h b/Mesh_3/test/Mesh_3/XML_exporter.h index 8ecb25600b6..5be7055d320 100644 --- a/Mesh_3/test/Mesh_3/XML_exporter.h +++ b/Mesh_3/test/Mesh_3/XML_exporter.h @@ -185,7 +185,7 @@ public: m_xml_fstream << " " << std::endl; // Save current pointer position - std::ofstream::streampos pos = m_xml_fstream.tellp(); + std::streampos pos = m_xml_fstream.tellp(); // Close the XML file (temporarily) so that the XML file is always correct m_xml_fstream << "" << std::endl; // Restore the pointer position so that the next "add_element" will overwrite diff --git a/Mesh_3/test/Mesh_3/implicit_functions.cpp b/Mesh_3/test/Mesh_3/implicit_functions.cpp deleted file mode 100644 index 0ede1606d8b..00000000000 --- a/Mesh_3/test/Mesh_3/implicit_functions.cpp +++ /dev/null @@ -1,303 +0,0 @@ -///////////////// Code for functions of famous surfaces ///////////////// - - -// Sphere (r=1) - -double sphere_function (double x, double y, double z) { - double x2=x*x, y2=y*y, z2=z*z; - - return x2+y2+z2-1; -} - - -// Ellipsoid (r=1) - -double ellipsoid_function (double x, double y, double z) { - double x2=x*x, y2=y*y, z2=z*z; - - return x2+2*y2+4*z2-1; -} - - -// Torus (r=2) - -double torus_function (double x, double y, double z) { - double x2=x*x, y2=y*y, z2=z*z; - double x4=x2*x2, y4=y2*y2, z4=z2*z2; - - return x4 + y4 + z4 + 2 *x2* y2 + 2* - x2*z2 + 2*y2* z2 - 5 *x2 + 4* y2 - 5*z2+4; -} - - -// "Chair" (r=6) - -double chair_function (double x, double y, double z) { - double x2=x*x, y2=y*y, z2=z*z; - double x4=x2*x2, y4=y2*y2, z4=z2*z2; - - return x4-1.2*x2*y2+3.6*x2*z2-7.50*x2+y4+3.6*y2*z2-7.50*y2+.2*z4-7.50*z2+64.0625-16.0*z*y2+16.0*x2*z; -} - - -// "Tanglecube" (r=4) - -double tanglecube_function (double x, double y, double z) { - double x2=x*x, y2=y*y, z2=z*z; - double x4=x2*x2, y4=y2*y2, z4=z2*z2; - - return x4 - 5*x2 + y4 - 5*y2 + z4 - 5*z2 + 11.8; -} - -double cube_function (double x, double y, double z){ - if( x < 1 && -x < 1 && - y < 1 && -y < 1 && - z < 1 && -z < 1 ) - return -1.; - return 1.; -} - -// Barth's octic surface (degree 8) - -double octic_function (double x, double y, double z) { // r=2 - double x2=x*x, y2=y*y, z2=z*z; - double x4=x2*x2, y4=y2*y2, z4=z2*z2; - double x6=x4*x2, y6=y4*y2, z6=z4*z2; - double x8=x4*x4, y8=y4*y4, z8=z4*z4; - - return 43.30495169 *x2* y2 + 43.30495169 *x2* z2 + 43.30495169 *y2 * z2 + 44.36067980 *x6* y2 + 44.36067980* x6 * z2 + 66.54101970* x4* y4 + 66.54101970* x4 * z4 + 44.36067980 *x2 * y6 - 11.70820393* x2 - 11.70820393* y2 - 11.70820393* z2 + 37.65247585 *x4 + 37.65247585 *y4 + 37.65247585* z4 + 11.09016995* x8 + 11.09016995 *y8 + 11.09016995* z8 + 133.0820394 *x2* y4* z2 + 133.0820394 *x2 * y2 * z4 + 44.36067980* x2 * z6 + 44.36067980 *y6 * z2 + 66.54101970 *y4 * z4 + 44.36067980 *y2 * z6 + 133.0820394* x4* y2 * z2 - 91.95742756 *x4 * y2 - 91.95742756 *x4 *z2 - 91.95742756* x2 * y4 - 91.95742756 *x2 *z4 - 91.95742756* y4 * z2 - 183.9148551* x2 *y2 *z2 - 30.65247585 *x6 - 30.65247585* y6 - 91.95742756 *y2 * z4 - 30.65247585* z6 + 1.618033988; -} - - -// "Heart" - -double heart_function (double x, double y, double z) { // radius = 2 - - return (2*x*x+y*y+z*z-1)*(2*x*x+y*y+z*z-1)*(2*x*x+y*y+z*z-1) - (0.1*x*x+y*y)*z*z*z; -} - - -// Klein's bottle - -double klein_function (double x, double y, double z) { // radius = 4 - - return (x*x+y*y+z*z+2*y-1)*((x*x+y*y+z*z-2*y-1)*(x*x+y*y+z*z-2*y-1)-8*z*z)+16*x*z*(x*x+y*y+z*z-2*y-1); -} - - -// Ring - -double ring_function (double x, double y, double z) { // radius = ? - double e=0.1; - - double f1 = x*x+y*y+z*z-1; - double f2 = x; - - f1 = f1*f1-e*e; - f2 = f2*f2-e*e; - - if (f1 < 0 && f2 < 0) - return -1.; - else if (f1 > 0 || f2 > 0) - return 1.; - else - return 0.; -} - - -// False knot - -double false_knot_function (double x, double y, double z) { // radius = 1 - double d=1.2, e=0.1; - - double f1 = x*(x*x-z*z)-2*x*z*z-y*y+d*d-x*x-z*z-y*y; - - double m2 = z*(x*x-z*z)+2*x*x*z; - double f2 = 4*y*y*(d*d-x*x-z*z-y*y) - m2*m2; - - f1 = f1*f1-e*e; - f2 = f2*f2-e*e; - - if (f1 < 0 && f2 < 0) - return -1.; - else if (f1 > 0 || f2 > 0) - return 1.; - else - return 0.; -} - - -// Knot 1 - -void puiss(double& x, double& y, int n) { - - double xx = 1, yy = 0; - - while(n>0) { - if (n&1) { - double xxx = xx, yyy = yy; - xx = xxx*x - yyy*y; - yy = xxx*y + yyy*x; - } - - double xxx = x, yyy = y; - x=xxx*xxx-yyy*yyy; - y=2*xxx*yyy; - - n/=2; - } - - x = xx; - y = yy; -} - - - -double knot1_function (double a, double b, double c) { // radius = 4 - double e=0.1; - - double x, y, z, t, den; - den=1+a*a+b*b+c*c; - x=2*a/den; - y=2*b/den; - z=2*c/den; - t=(1-a*a-b*b-c*c)/den; - - double x3=x, y3=y, z2=z, t2=t; - puiss(x3,y3,3); - puiss(z2,t2,2); - - double f1 = z2-x3; - double f2 = t2-y3; - - f1 = f1*f1; - f2 = f2*f2; - e=e*e/(den-1); - - if (f1+f2-e < 0) - return -1.; - else if (f1+f2-e > 0) - return 1.; - else - return 0.; -} - -/* -double knot1_function (double x, double y, double z) { // radius = 4 - double e=0.1; - - double c1, c2, c3, c4, den; - den=1+x*x+y*y+z*z; - c1=2*x/den; - c2=2*y/den; - c3=2*z/den; - c4=(1-x*x-y*y-z*z)/den; - - double f1 = c1*(c1*c1-c2*c2)-2*c1*c2*c2-c3*c3+c4*c4; - double f2 = c2*(c1*c1-c2*c2)+2*c1*c1*c2-2*c3*c4; - - f1 = f1*f1; - f2 = f2*f2; - e=e*e/(den-1); - - if (f1+f2-e < 0) - return -1.; - else if (f1+f2-e > 0) - return 1.; - else - return 0.; -} -*/ - -double knot1_surf1_function (double x, double y, double z) { // radius = 4 - double c1, c2, c3, c4, den; - den=1+x*x+y*y+z*z; - c1=2*x/den; - c2=2*y/den; - c3=2*z/den; - c4=(1-x*x-y*y-z*z)/den; - - return c1*(c1*c1-c2*c2)-2*c1*c2*c2-c3*c3+c4*c4; -} - - -double knot1_surf2_function (double x, double y, double z) { // radius = 4 - double c1, c2, c3, c4, den; - den=1+x*x+y*y+z*z; - c1=2*x/den; - c2=2*y/den; - c3=2*z/den; - c4=(1-x*x-y*y-z*z)/den; - - return c2*(c1*c1-c2*c2)+2*c1*c1*c2-2*c3*c4; -} - - -// Knot 2 - -double knot2_function (double a, double b, double c) { // radius = 4 - double e=0.025; - - double x, y, z, t, den; - den=1+a*a+b*b+c*c; - x=2*a/den; - y=2*b/den; - z=2*c/den; - t=(1-a*a-b*b-c*c)/den; - - double x7=x, y7=y, x13=x, y13=y; - puiss(x7,y7,7); - puiss(x13,y13,13); - - double z3=z, t3=t; - puiss(z3,t3,3); - - double f1t = (z3-x7)*(z3-x7+100*x13) - (t3-y7)*(t3-y7+100*y13); - double f2t = (z3-x7)*(t3-y7+100*y13) + (t3-y7)*(z3-x7+100*x13); - double f1 = f1t*(z3-x7-100*x13) - f2t*(t3-y7-100*y13); - double f2 = f1t*(t3-y7-100*y13) + f2t*(z3-x7-100*x13); - - f1 = f1*f1; - f2 = f2*f2; - e=e*e/(den-1); - - if (f1+f2-e < 0) - return -1.; - else if (f1+f2-e > 0) - return 1.; - else - return 0.; -} - - -// Knot 3 - - -double knot3_function (double a, double b, double c) { // radius = 4 - double e=0.025; - - double x, y, z, t, den; - den=1+a*a+b*b+c*c; - x=2*a/den; - y=2*b/den; - z=2*c/den; - t=(1-a*a-b*b-c*c)/den; - - double x19=x, y19=y, z17=z, t17=t; - puiss(x19,y19,19); - puiss(z17,t17,17); - - double f1 = z17-x19; - double f2 = t17-y19; - - f1 = f1*f1; - f2 = f2*f2; - e=e*e/(den-1); - - if (f1+f2-e < 0) - return -1.; - else if (f1+f2-e > 0) - return 1.; - else - return 0.; -} diff --git a/Mesh_3/test/Mesh_3/implicit_functions.h b/Mesh_3/test/Mesh_3/implicit_functions.h deleted file mode 100644 index f5293a87028..00000000000 --- a/Mesh_3/test/Mesh_3/implicit_functions.h +++ /dev/null @@ -1,36 +0,0 @@ -///////////////// Definitions of several famous surfaces ///////////////// -double sphere_function (double, double, double); // (c=(0,0,0), r=1) -double ellipsoid_function (double, double, double); // (c=(0,0,0), r=1) -double torus_function (double, double, double); // (c=(0,0,0), r=2) -double chair_function (double, double, double); // (c=(0,0,0), r=6) -double tanglecube_function (double, double, double); // (c=(0,0,0), r=4) -double octic_function (double, double, double); // (c=(0,0,0), r=2) -double heart_function (double, double, double); // (c=(0,0,0), r=2) -double klein_function (double, double, double); // (c=(0,0,0), r=4) -double ring_function (double, double, double); // (c=(0,0,0), r=?) -double false_knot_function (double, double, double); // (c=(0,0,0), r=1) -double knot1_function (double, double, double); // (c=(0,0,0), r=4) -double knot2_function (double, double, double); // (c=(0,0,0), r=4) -double knot3_function (double, double, double); // (c=(0,0,0), r=4) -double cube_function (double, double, double); // (c=(0,0,0), r=2) - - -template -double sphere_function (double x, double y, double z) // (c=(0,0,0), r=Sq_radius) -{ - double x2=x*x, y2=y*y, z2=z*z; - return (x2+y2+z2)/Sq_radius - 1; -} - - - -template -class FT_to_point_function_wrapper : public CGAL::cpp98::unary_function -{ - typedef FT (*Implicit_function)(FT, FT, FT); - Implicit_function function; -public: - typedef P Point; - FT_to_point_function_wrapper(Implicit_function f) : function(f) {} - FT operator()(Point p) const { return function(p.x(), p.y(), p.z()); } -}; diff --git a/Mesh_3/test/Mesh_3/test_criteria.cpp b/Mesh_3/test/Mesh_3/test_criteria.cpp index 317fcb5f3e9..a10460ceee2 100644 --- a/Mesh_3/test/Mesh_3/test_criteria.cpp +++ b/Mesh_3/test/Mesh_3/test_criteria.cpp @@ -49,8 +49,8 @@ struct Tester typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; C3t3 c3t3_; // Cells & facets diff --git a/Mesh_3/test/Mesh_3/test_labeled_mesh_domain_3.cpp b/Mesh_3/test/Mesh_3/test_labeled_mesh_domain_3.cpp index 25a468bbf6f..e5e5cf7f04f 100644 --- a/Mesh_3/test/Mesh_3/test_labeled_mesh_domain_3.cpp +++ b/Mesh_3/test/Mesh_3/test_labeled_mesh_domain_3.cpp @@ -205,7 +205,7 @@ private: Intersection i = construct_intersection(s); assert(std::get<0>(i) != Point_3(1., 0., 0.)); Index ii = std::get<1>(i); - assert(boost::get(&ii)); + assert(std::get_if(&ii)); assert(std::get<2>(i) == 2); } @@ -213,7 +213,7 @@ private: Segment_3 s(Point_3(1.5, 1.5, 0.), Point_3(1.5, 0., 0.)); Intersection i = construct_intersection(s); Index ii = std::get<1>(i); - assert(boost::get(&ii)); + assert(std::get_if(&ii)); assert(std::get<2>(i) == 0); } @@ -222,7 +222,7 @@ private: Intersection i = construct_intersection(r); assert(std::get<0>(i) != Point_3(1., 0., 0.)); Index ii = std::get<1>(i); - assert(boost::get(&ii)); + assert(std::get_if(&ii)); assert(std::get<2>(i) == 2); } @@ -230,7 +230,7 @@ private: Ray_3 r(Point_3(1.5, 0., 0.), Vector_3(0., 1., 0.)); Intersection i = construct_intersection(r); Index ii = std::get<1>(i); - assert(boost::get(&ii)); + assert(std::get_if(&ii)); assert(std::get<2>(i) == 0); } @@ -239,7 +239,7 @@ private: Intersection i = construct_intersection(l); assert(std::get<0>(i) != Point_3(1., 0., 0.)); Index ii = std::get<1>(i); - assert(boost::get(&ii)); + assert(std::get_if(&ii)); assert(std::get<2>(i) == 2); } @@ -247,7 +247,7 @@ private: Line_3 l(Point_3(1.5, 0., 0.), Point_3(1.5, 0.5, 0.)); Intersection i = construct_intersection(l); Index ii = std::get<1>(i); - assert(boost::get(&ii)); + assert(std::get_if(&ii)); assert(std::get<2>(i) == 0); } } diff --git a/Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp b/Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp index fe31c62f6a4..f0371d3a96d 100644 --- a/Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp +++ b/Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp @@ -24,7 +24,7 @@ typedef CGAL::Parallel_if_available_tag Concurrency_tag; typedef CGAL::Mesh_triangulation_3::type Tr; -typedef Tr::Geom_traits Gt; +typedef Tr::Geom_traits GT; typedef CGAL::Mesh_complex_3_in_triangulation_3(domain, criteria, no_perturb(), no_exude()); - Gt::Construct_weighted_circumcenter_3 w_circumcenter = + GT::Construct_weighted_circumcenter_3 w_circumcenter = c3t3.triangulation().geom_traits().construct_weighted_circumcenter_3_object(); int return_code = 0; diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image_deprecated.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image_deprecated.cpp deleted file mode 100644 index b2ba365111f..00000000000 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image_deprecated.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#include - -#include "test_meshing_utilities.h" - -#include -#include -#include - -#include - -// To avoid verbose function and named parameters call -using namespace CGAL::parameters; - -template -struct Greater_than { - typedef T argument_type; - Greater_than(const T& second) : second(second) {} - bool operator()(const T& first) const { - return std::greater()(first, second); - } - T second; -}; - -template -struct Image_tester : public Tester -{ -public: - void image() const - { - typedef float Image_word_type; - typedef CGAL::Image_3 Image; - typedef CGAL::Gray_image_mesh_domain_3< - Image, - K_e_i, - Image_word_type, - Greater_than > Mesh_domain; - - typedef typename CGAL::Mesh_triangulation_3< - Mesh_domain, - CGAL::Kernel_traits::Kernel, - Concurrency_tag>::type Tr; - typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; - typedef CGAL::Mesh_criteria_3 Mesh_criteria; - - CGAL_USE_TYPE(typename Mesh_domain::Surface_patch_index); - - //------------------------------------------------------- - // Data generation - //------------------------------------------------------- - Image image; - if (!image.read(CGAL::data_file_path("images/skull_2.9.inr"))) - { - std::cout << "Image reading error. Exit test.\n"; - return; - } - - std::cout << "\tSeed is\t" - << CGAL::get_default_random().get_seed() << std::endl; - - // Domain - Mesh_domain domain(image, - 2.9f, //isovalue - 0.f, //value_outside - 1e-3, //error_bound - &CGAL::get_default_random());//random generator for determinism - - // Mesh criteria - Mesh_criteria criteria(facet_angle = 30, - facet_size = 6, - facet_distance = 2, - facet_topology = CGAL::MANIFOLD, - cell_radius_edge_ratio = 3, - cell_size = 8); - - // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - no_perturb(), - no_exude(), - mesh_3_options(number_of_initial_points = 30), - non_manifold() - ); - - // Verify - this->verify_c3t3_volume(c3t3, 1236086 * 0.95, 1236086 * 1.05); - this->verify(c3t3, domain, criteria, Bissection_tag()); - } -}; - - -int main() -{ - Image_tester<> test_epic; - std::cerr << "Mesh generation from a 3D image:\n"; - test_epic.image(); - -#ifdef CGAL_LINKED_WITH_TBB - Image_tester test_epic_p; - std::cerr << "Parallel mesh generation from a 3D image:\n"; - test_epic_p.image(); -#endif - - return EXIT_SUCCESS; -} diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp deleted file mode 100644 index 2883524ccc8..00000000000 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#define CGAL_MESH_3_VERBOSE 1 -#include - -#include "test_meshing_utilities.h" - -#include -#include -#include - -template -struct Image_tester : public Tester -{ -public: - void image() const - { - typedef CGAL::Image_3 Image; - typedef CGAL::Labeled_image_mesh_domain_3 Mesh_domain; - - typedef typename CGAL::Mesh_triangulation_3< - Mesh_domain, - CGAL::Kernel_traits::Kernel, - Concurrency_tag>::type Tr; - typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; - - typedef CGAL::Mesh_criteria_3 Mesh_criteria; - typedef typename Mesh_criteria::Facet_criteria Facet_criteria; - typedef typename Mesh_criteria::Cell_criteria Cell_criteria; - - //------------------------------------------------------- - // Data generation - //------------------------------------------------------- - Image image; - image.read(CGAL::data_file_path("images/liver.inr.gz")); - - std::cout << "\tSeed is\t" - << CGAL::get_default_random().get_seed() << std::endl; - Mesh_domain domain(image, 1e-6, &CGAL::get_default_random()); - - // Set mesh criteria - Facet_criteria facet_criteria(25, 20*image.vx(), 5*image.vx()); - Cell_criteria cell_criteria(4, 25*image.vx()); - Mesh_criteria criteria(facet_criteria, cell_criteria); - - // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - CGAL::parameters::no_exude(), - CGAL::parameters::no_perturb()); - - // Verify - this->verify_c3t3_volume(c3t3, 1772330*0.95, 1772330*1.05); - this->verify(c3t3,domain,criteria, Bissection_tag()); - - typedef typename Mesh_domain::Surface_patch_index Patch_id; - static_assert(CGAL::Output_rep::is_specialized); - CGAL_USE_TYPE(Patch_id); - } - -}; - -int main() -{ - Image_tester<> test_epic; - std::cerr << "Mesh generation from a 3D image:\n"; - test_epic.image(); - -#ifdef CGAL_LINKED_WITH_TBB - Image_tester test_epic_p; - std::cerr << "Parallel mesh generation from a 3D image:\n"; - test_epic_p.image(); -#endif - - return EXIT_SUCCESS; -} 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 deleted file mode 100644 index 7877b7558d5..00000000000 --- a/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include -#include - -#include "test_meshing_utilities.h" - -#include - -template -struct Implicit_tester : public Tester -{ - typedef typename K::Point_3 Point; - typedef typename K::FT FT; - static FT sphere_function (const Point& p) - { - const FT x2=p.x()*p.x(), y2=p.y()*p.y(), z2=p.z()*p.z(); - return x2+y2+z2-1; - } - - void implicit() const - { - typedef FT (Function)(const Point&); - typedef CGAL::Implicit_mesh_domain_3 Mesh_domain; - - typedef typename CGAL::Mesh_triangulation_3< - Mesh_domain, - typename CGAL::Kernel_traits::Kernel, - Concurrency_tag>::type Tr; - typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; - - typedef CGAL::Mesh_criteria_3 Mesh_criteria; - typedef typename Mesh_criteria::Facet_criteria Facet_criteria; - typedef typename Mesh_criteria::Cell_criteria Cell_criteria; - - typedef typename K::Sphere_3 Sphere_3; - - typedef typename Mesh_domain::Surface_patch_index Surface_patch_index; - - //------------------------------------------------------- - // Data generation - //------------------------------------------------------- - std::cout << "\tSeed is\t" - << CGAL::get_default_random().get_seed() << std::endl; - - Mesh_domain domain(Implicit_tester::sphere_function, - Sphere_3(CGAL::ORIGIN,2.), - 1e-3, - &CGAL::get_default_random()); - - // Set mesh criteria - Facet_criteria facet_criteria(0, 0, 0.3); - Cell_criteria cell_criteria(0, 0.5); - Mesh_criteria criteria(facet_criteria, cell_criteria); - - std::vector initial_points; - initial_points.push_back(Point(1,0,0)); - initial_points.push_back(Point(0,1,0)); - initial_points.push_back(Point(0,0,1)); - initial_points.push_back(Point(-1,0,0)); - initial_points.push_back(Point(0,-1,0)); - initial_points.push_back(Point(0,0,-1)); - - // Mesh generation - C3t3 c3t3; - c3t3.insert_surface_points(initial_points.begin(), - initial_points.end(), - domain.index_from_surface_patch_index(Surface_patch_index(0,1))); - - CGAL::refine_mesh_3(c3t3, domain, criteria, - CGAL::parameters::no_exude(), - CGAL::parameters::no_perturb()); - - CGAL::remove_far_points_in_mesh_3(c3t3); - -#ifdef CGAL_LINKED_WITH_TBB - // Parallel - if (std::is_convertible::value) - { - this->verify(c3t3, domain, criteria, Bissection_tag(), 40, 65, 60, 110); - } - else -#endif //CGAL_LINKED_WITH_TBB - { - // Verify - this->verify(c3t3, domain, criteria, Bissection_tag(), 50, 58, 80, 90); - } - } -}; - - -int main() -{ - Implicit_tester test_epic; - std::cerr << "Mesh generation from an implicit function:\n"; - test_epic.implicit(); - -#ifdef CGAL_LINKED_WITH_TBB - Implicit_tester test_epic_p; - std::cerr << "Parallel mesh generation from an implicit function:\n"; - test_epic_p.implicit(); -#endif - return EXIT_SUCCESS; -} diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp index 09021df2d4c..9d43786e1a1 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp @@ -31,9 +31,9 @@ struct Polyhedron_tester : public Tester { void polyhedron() const { - typedef K Gt; - typedef CGAL::Polyhedron_3 Polyhedron; - typedef CGAL::Polyhedral_mesh_domain_3 Mesh_domain; + typedef K GT; + typedef CGAL::Polyhedron_3 Polyhedron; + typedef CGAL::Polyhedral_mesh_domain_3 Mesh_domain; static_assert(std::is_same< typename Mesh_domain::Surface_patch_index, diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp index 7258d647ac3..ac77144de61 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp @@ -75,9 +75,9 @@ struct Polyhedron_with_features_tester : public Tester } void operator()() const { - typedef CGAL::Mesh_3::Robust_intersection_traits_3 Gt; - typedef typename CGAL::Mesh_polyhedron_3::type Polyhedron; - typedef CGAL::Polyhedral_mesh_domain_with_features_3 GT; + typedef typename CGAL::Mesh_polyhedron_3::type Polyhedron; + typedef CGAL::Polyhedral_mesh_domain_with_features_3 Mesh_domain; diff --git a/Mesh_3/test/Mesh_3/test_meshing_utilities.h b/Mesh_3/test/Mesh_3/test_meshing_utilities.h index 1851c14737f..2e7571eb41d 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_utilities.h +++ b/Mesh_3/test/Mesh_3/test_meshing_utilities.h @@ -333,13 +333,13 @@ struct Tester else { std::cerr << "\nc1 circumcenter: " << tr.dual(c1); std::cerr << "\nc1 is in domain: " - << domain.is_in_domain_object()(tr.dual(c1)); + << CGAL::IO::oformat(domain.is_in_domain_object()(tr.dual(c1))); } if(tr.is_infinite(c2)) std::cerr << "\nc2 is infinite"; else { std::cerr << "\nc2 circumcenter: "<< tr.dual(c2); std::cerr << "\nc2 is in domain: " - << domain.is_in_domain_object()(tr.dual(c2)); + << CGAL::IO::oformat(domain.is_in_domain_object()(tr.dual(c2))); } std::cerr << std::endl; assert(false); diff --git a/Mesh_3/test/Mesh_3/test_min_size_criteria.cpp b/Mesh_3/test/Mesh_3/test_min_size_criteria.cpp index 427030c4c70..d42bef33f80 100644 --- a/Mesh_3/test/Mesh_3/test_min_size_criteria.cpp +++ b/Mesh_3/test/Mesh_3/test_min_size_criteria.cpp @@ -37,7 +37,7 @@ public: Concurrency_tag>::type; using C3t3 = CGAL::Mesh_complex_3_in_triangulation_3; - using Gt = typename Tr::Geom_traits; + using GT = typename Tr::Geom_traits; using FT = typename Tr::Geom_traits::FT; using Bare_point = typename Tr::Bare_point; @@ -79,8 +79,8 @@ public: CGAL::parameters::no_perturb()); const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Compute_squared_radius_3 sq_radius = tr.geom_traits().compute_squared_radius_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_radius_3 sq_radius = tr.geom_traits().compute_squared_radius_3_object(); double max_sq_facet_radius = 0.; double max_sq_cell_radius = 0.; 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_traversal_traits_with_join.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h index d2cfbd99436..b44438f24e8 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h @@ -17,7 +17,7 @@ #include -#include +#include namespace CGAL { @@ -69,7 +69,7 @@ class First_intersection_traits public: typedef - boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > + std::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > Result; public: First_intersection_traits(const AABBTraits& traits) @@ -124,7 +124,7 @@ public: void intersection(const Query& query, const Primitive& primitive) { - boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > + std::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > intersection = m_traits.intersection_object()(query, primitive); if(intersection) @@ -211,7 +211,7 @@ public: { if( m_traits.do_intersect_object()(query, primitive) ) { - m_result = boost::optional(primitive.id()); + m_result = std::optional(primitive.id()); m_is_found = true; } } @@ -221,12 +221,12 @@ public: return m_traits.do_intersect_object()(query, node.bbox()); } - boost::optional result() const { return m_result; } + std::optional result() const { return m_result; } bool is_intersection_found() const { return m_is_found; } private: bool m_is_found; - boost::optional m_result; + std::optional m_result; const AABBTraits& m_traits; }; 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..aabc398f739 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 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #ifdef CGAL_HAS_THREADS #include @@ -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 @@ -252,7 +252,7 @@ public: /// `do_intersect` predicates are defined /// in the traits class `AABBTraits`. template - boost::optional any_intersected_primitive(const Query& query) const; + std::optional any_intersected_primitive(const Query& query) const; ///@} @@ -276,7 +276,7 @@ public: /// for which `do_intersect` predicates /// and intersections are defined in the traits class AABBTraits. template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > any_intersection(const Query& query) const; ///@} @@ -764,7 +764,7 @@ public: template template - boost::optional< typename AABB_tree_with_join::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_tree_with_join::template Intersection_and_primitive_id::Type > AABB_tree_with_join::any_intersection(const Query& query) const { using namespace CGAL::internal::AABB_tree_with_join; @@ -776,7 +776,7 @@ public: template template - boost::optional::Primitive_id> + std::optional::Primitive_id> AABB_tree_with_join::any_intersected_primitive(const Query& query) const { using namespace CGAL::internal::AABB_tree_with_join; diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h index ffbb4e4249f..8a9ed4a7455 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h @@ -168,12 +168,10 @@ protected: typename Kernel::Orientation_2 f_orient = ker.orientation_2_object(); Traits_2 traits; - std::list xobjs; - std::list::iterator xobj_it; + std::list> xobjs; typename Traits_2::Make_x_monotone_2 f_make_x_monotone = traits.make_x_monotone_2_object(); Curve_2 arc; - X_monotone_curve_2 xarc; do { @@ -517,12 +515,11 @@ protected: // convolution cycle. xobjs.clear(); f_make_x_monotone (arc, std::back_inserter(xobjs)); - for (xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) { - assign_success = CGAL::assign (xarc, *xobj_it); - CGAL_assertion (assign_success); - CGAL_USE(assign_success); - *oi++ = Labeled_curve_2 (xarc, - X_curve_label (xarc.is_directed_right(), + for (auto xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) { + const X_monotone_curve_2* xarc = std::get_if(&(*xobj_it)); + CGAL_assertion(xarc!=nullptr); + *oi++ = Labeled_curve_2 (*xarc, + X_curve_label (xarc->is_directed_right(), cycle_id, curve_index++)); } } @@ -571,18 +568,17 @@ protected: xobjs.clear(); f_make_x_monotone (arc, std::back_inserter(xobjs)); - xobj_it = xobjs.begin(); + auto xobj_it = xobjs.begin(); while (xobj_it != xobjs.end()) { - assign_success = CGAL::assign (xarc, *xobj_it); - CGAL_assertion (assign_success); - CGAL_USE(assign_success); + const X_monotone_curve_2* xarc = std::get_if(&(*xobj_it)); + CGAL_assertion (xarc != nullptr); ++xobj_it; bool is_last = (xobj_it == xobjs.end()); - *oi++ = Labeled_curve_2 (xarc, - X_curve_label (xarc.is_directed_right(), + *oi++ = Labeled_curve_2 (*xarc, + X_curve_label (xarc->is_directed_right(), cycle_id, curve_index++, is_last)); } diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h index 8db0bd9849a..72a3c3758ac 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h @@ -297,11 +297,8 @@ public: OutputIterator oi) const { typedef std::pair Intersection_base_point; - typedef boost::variant + typedef std::variant Intersection_base_result; - typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; // In case the curves are adjacent in their curve sequence, we do // not have to compute their intersection (we already know that they @@ -317,24 +314,22 @@ public: // Attach labels to the intersection objects. for (const auto& xection : xections) { const Intersection_base_point* base_pt = - boost::get(&xection); + std::get_if(&xection); if (base_pt != nullptr) { // Attach an invalid label to an itersection point. - *oi++ = Intersection_result(std::make_pair(Point_2(base_pt->first), - base_pt->second)); + *oi++ = std::make_pair(Point_2(base_pt->first), base_pt->second); continue; } const Base_x_monotone_curve_2* base_xcv = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(base_xcv != nullptr); // Attach a merged label to the overlapping curve. - *oi++ = - Intersection_result(X_monotone_curve_2(*base_xcv, - X_curve_label(cv1.label(), - cv2.label()))); + *oi++ = X_monotone_curve_2(*base_xcv, + X_curve_label(cv1.label(), + cv2.label())); } return oi; diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h index ca77157ec5c..2220f1f536e 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h @@ -117,7 +117,7 @@ protected: Algebraic a, b, c; unsigned int curve_index(0); - std::list xobjs; + std::list> xobjs; Traits_2 traits; auto nt_traits = traits.nt_traits(); @@ -127,8 +127,6 @@ protected: auto alg_ker = traits.alg_kernel(); auto f_equal = alg_ker->equal_2_object(); - bool assign_success; - do { // Get a circulator for the next vertex (in the proper orientation). if (forward) ++next; @@ -185,13 +183,11 @@ protected: f_make_x_monotone(arc, std::back_inserter(xobjs)); for (auto xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) { - X_monotone_curve_2 xarc; - assign_success = CGAL::assign(xarc, *xobj_it); - CGAL_assertion (assign_success); - CGAL_USE(assign_success); + const X_monotone_curve_2* xarc = std::get_if(&(*xobj_it)); + CGAL_assertion (xarc!=nullptr); - *oi++ = Labeled_curve_2(xarc, X_curve_label(xarc.is_directed_right(), - cycle_id, curve_index)); + *oi++ = Labeled_curve_2(*xarc, X_curve_label(xarc->is_directed_right(), + cycle_id, curve_index)); curve_index++; } } @@ -237,15 +233,13 @@ protected: auto xobj_it = xobjs.begin(); while (xobj_it != xobjs.end()) { - X_monotone_curve_2 xarc; - assign_success = CGAL::assign(xarc, *xobj_it); - CGAL_assertion (assign_success); - CGAL_USE(assign_success); + const X_monotone_curve_2* xarc = std::get_if(&(*xobj_it)); + CGAL_assertion (xarc!=nullptr); ++xobj_it; is_last = (xobj_it == xobjs.end()); - *oi++ = Labeled_curve_2(xarc, X_curve_label(xarc.is_directed_right(), + *oi++ = Labeled_curve_2(*xarc, X_curve_label(xarc->is_directed_right(), cycle_id, curve_index, is_last)); curve_index++; 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/HDS_items.h b/Nef_2/include/CGAL/Nef_2/HDS_items.h index e0b342e9e68..12e1d32d873 100644 --- a/Nef_2/include/CGAL/Nef_2/HDS_items.h +++ b/Nef_2/include/CGAL/Nef_2/HDS_items.h @@ -19,10 +19,10 @@ #include #include #include -#include +#include #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -62,7 +62,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Traits::Point Point; // geometric embedding @@ -73,7 +73,7 @@ private: Halfedge_handle _h; Face_handle _f; Point _p; - boost::optional _ivit; + std::optional _ivit; Mark _m; GenPtr _i; public: @@ -127,7 +127,7 @@ public: iv_iterator ivit() const { return *_ivit; } void set_ivit(iv_iterator it) { _ivit = it; } - void reset_ivit() { _ivit = boost::none; } + void reset_ivit() { _ivit = std::nullopt; } }; @@ -151,7 +151,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename std::list::iterator fc_iterator; @@ -162,7 +162,7 @@ protected: Halfedge_handle opp, prv, nxt; Vertex_handle _v; Face_handle _f; - boost::optional _fcit; + std::optional _fcit; Mark _m; GenPtr _i; public: @@ -223,7 +223,7 @@ public: fc_iterator fcit() const { return *_fcit; } void set_fcit(fc_iterator it) { _fcit = it; } - void reset_fcit() { _fcit = boost::none; } + void reset_fcit() { _fcit = std::nullopt; } bool is_hole_entry() const /*{\Mop returns true iff |\Mvar| is entry point into a hole face @@ -248,7 +248,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Traits::Mark Mark; // mark information diff --git a/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h b/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h index 7748f4b1f61..5a685f9e310 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h @@ -28,7 +28,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif #include @@ -137,7 +137,7 @@ typedef size_t Size_type; /*{\Mtypemember The size type.}*/ typedef void* GenPtr; #else -typedef boost::any GenPtr; +typedef std::any GenPtr; #endif diff --git a/Nef_2/include/CGAL/Nef_2/PM_decorator.h b/Nef_2/include/CGAL/Nef_2/PM_decorator.h index 914a6a58d6a..6cc528c7dab 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_decorator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_decorator.h @@ -19,7 +19,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include diff --git a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h index a1aced0e3ff..947239b9c05 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h +++ b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h @@ -23,7 +23,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 13 @@ -92,7 +92,7 @@ struct PMO_from_segs { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::access(G.info(v)) = e; #else - *boost::any_cast(&G.info(v)) = e; + *std::any_cast(&G.info(v)) = e; #endif } @@ -102,7 +102,7 @@ struct PMO_from_segs { return geninfo::access(G.info(v)); #else return - boost::any_cast(G.info(v)); + std::any_cast(G.info(v)); #endif } @@ -112,7 +112,7 @@ struct PMO_from_segs { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(G.info(v)); #else - G.info(v)=boost::any(); + G.info(v)=std::any(); #endif } @@ -674,7 +674,7 @@ void discard_info(Vertex_handle v) const #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(v)); #else - info(v)=boost::any(); + info(v)=std::any(); #endif } @@ -684,7 +684,7 @@ vertex_info& ginfo(Vertex_handle v) const return geninfo::access(info(v)); #else return - *boost::any_cast(&info(v)); + *std::any_cast(&info(v)); #endif } @@ -729,8 +729,8 @@ void discard_info(Halfedge_handle e) const geninfo::clear(info(e)); geninfo::clear(info(twin(e))); #else - info(e)=boost::any(); - info(twin(e))=boost::any(); + info(e)=std::any(); + info(twin(e))=std::any(); #endif } @@ -740,7 +740,7 @@ halfedge_info& ginfo(Halfedge_handle e) const return geninfo::access(info(e)); #else return - *boost::any_cast(&info(e)); + *std::any_cast(&info(e)); #endif } @@ -782,7 +782,7 @@ void discard_info(Face_handle f) const #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(f)); #else - info(f)=boost::any(); + info(f)=std::any(); #endif } @@ -792,7 +792,7 @@ face_info& ginfo(Face_handle f) const return geninfo::access(info(f)); #else return - *boost::any_cast(&info(f)); + *std::any_cast(&info(f)); #endif } 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..0e2d063b9cd 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_point_locator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_point_locator.h @@ -28,7 +28,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #ifdef CGAL_USE_LEDA_LIBRARY @@ -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 "<::const_access(CT.info(v)).first; #else return - boost::any_cast(CT.info(v)).first; + std::any_cast(CT.info(v)).first; #endif } @@ -507,7 +507,7 @@ protected: return geninfo::const_access(CT.info(e)).first; #else return - boost::any_cast(CT.info(e)).first; + std::any_cast(CT.info(e)).first; #endif } @@ -517,7 +517,7 @@ protected: return geninfo::const_access(CT.info(e)).second; #else return - boost::any_cast(CT.info(e)).second; + std::any_cast(CT.info(e)).second; #endif } @@ -584,10 +584,10 @@ protected: f = geninfo::access(info(e_from)).second; #else f = - boost::any_cast(info(source(e))).second; + std::any_cast(info(source(e))).second; else f = - boost::any_cast(info(e_from)).second; + std::any_cast(info(e_from)).second; #endif mark(e) = _DP.mark(f); #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO @@ -968,7 +968,7 @@ PM_point_locator:: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(CT.info(vit)); #else - CT.info(vit)=boost::any(); + CT.info(vit)=std::any(); #endif } Halfedge_iterator eit, eend = CT.halfedges_end(); @@ -976,7 +976,7 @@ PM_point_locator:: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(CT.info(eit)); #else - CT.info(eit)=boost::any(); + CT.info(eit)=std::any(); #endif } CT.clear(); diff --git a/Nef_2/include/CGAL/Nef_2/gen_point_location.h b/Nef_2/include/CGAL/Nef_2/gen_point_location.h index c479a9af62a..1430b785ae0 100644 --- a/Nef_2/include/CGAL/Nef_2/gen_point_location.h +++ b/Nef_2/include/CGAL/Nef_2/gen_point_location.h @@ -27,7 +27,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif @@ -55,7 +55,7 @@ class GenericLocation { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif public: /*{\Mtypes}*/ @@ -89,7 +89,7 @@ public: return geninfo::const_access(value); #else return - *boost::any_cast(&value); + *std::any_cast(&value); #endif } /*{\Mconversion converts |\Mvar| into a node.\\ @@ -105,7 +105,7 @@ public: return geninfo::const_access(value); #else return - *boost::any_cast(&value); + *std::any_cast(&value); #endif } /*{\Mconversion converts |\Mvar| into an edge.\\ @@ -159,8 +159,8 @@ public: case NODE: geninfo::clear(value); break; case EDGE: geninfo::clear(value); break; #else - case NODE: value=boost::any(); break; - case EDGE: value=boost::any(); break; + case NODE: value=std::any(); break; + case EDGE: value=std::any(); break; #endif case NIL: break; } @@ -174,14 +174,14 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::access(value) = geninfo::const_access(L.value); #else - *boost_any_cast(&value) = boost::any_cast(L.value); + *boost_any_cast(&value) = std::any_cast(L.value); #endif break; case EDGE: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::access(value) = geninfo::const_access(L.value); #else - *boost::any_cast(&value) = boost::any_cast(L.value); + *std::any_cast(&value) = std::any_cast(L.value); #endif break; case NIL: break; diff --git a/Nef_2/include/CGAL/Nef_2/geninfo.h b/Nef_2/include/CGAL/Nef_2/geninfo.h index 08273c2e23e..eb723de0fcd 100644 --- a/Nef_2/include/CGAL/Nef_2/geninfo.h +++ b/Nef_2/include/CGAL/Nef_2/geninfo.h @@ -17,7 +17,7 @@ #define CGAL_DEPRECATED_HEADER "" #define CGAL_DEPRECATED_MESSAGE_DETAILS \ - "Something like boost::any or boost::variant should be used instead." + "Something like std::any or std::variant should be used instead." #include #include diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h index 99b71db68a1..c35cfd303f5 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h @@ -34,9 +34,9 @@ struct Exact_intersect_xy_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional + std::optional operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -55,18 +55,18 @@ struct Exact_intersect_xy_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(p2.x(),p2.y(),0))); + return std::make_optional(variant_type(Point_3(p2.x(),p2.y(),0))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3(p2.x(),p2.y(),0), + return std::make_optional(variant_type(Segment_3(Point_3(p2.x(),p2.y(),0), Point_3(q2.x(),q2.y(),0) ) )); } }; @@ -80,9 +80,9 @@ struct Exact_intersect_xy_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional operator() (Segment_3 s3, Segment_3 t3) + std::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -102,18 +102,18 @@ struct Exact_intersect_xy_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(p2.hx(),p2.hy(),0,p2.hw()))); + return std::make_optional(variant_type(Point_3(p2.hx(),p2.hy(),0,p2.hw()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),p2.hy(),0,p2.hw()), + return std::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),p2.hy(),0,p2.hw()), Point_3 (q2.hx(),q2.hy(),0,q2.hw())) )); } }; diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h index 7d77eaae669..b68849ee87e 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h @@ -33,9 +33,9 @@ struct Exact_intersect_xz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional + std::optional operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -54,18 +54,18 @@ struct Exact_intersect_xz_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(p2.x(),0,p2.y()))); + return std::make_optional(variant_type(Point_3(p2.x(),0,p2.y()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3(p2.x(),0,p2.y()), + return std::make_optional(variant_type(Segment_3(Point_3(p2.x(),0,p2.y()), Point_3(q2.x(),0,q2.y()) ) )); } }; @@ -79,9 +79,9 @@ struct Exact_intersect_xz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional operator() (Segment_3 s3, Segment_3 t3) + std::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -101,18 +101,18 @@ struct Exact_intersect_xz_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(p2.hx(),0,p2.hy(),p2.hw()))); + return std::make_optional(variant_type(Point_3(p2.hx(),0,p2.hy(),p2.hw()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),0,p2.hy(),p2.hw()), + return std::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),0,p2.hy(),p2.hw()), Point_3 (q2.hx(),0,q2.hy(),q2.hw())) )); } diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h index a98b74fd144..6b396bf9dd9 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h @@ -34,9 +34,9 @@ struct Exact_intersect_yz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional + std::optional operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -55,18 +55,18 @@ struct Exact_intersect_yz_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(0,p2.x(),p2.y()))); + return std::make_optional(variant_type(Point_3(0,p2.x(),p2.y()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3(0,p2.x(),p2.y()), + return std::make_optional(variant_type(Segment_3(Point_3(0,p2.x(),p2.y()), Point_3(0,q2.x(),q2.y()) ) )); } }; @@ -80,9 +80,9 @@ struct Exact_intersect_yz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional operator() (Segment_3 s3, Segment_3 t3) + std::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -102,18 +102,18 @@ struct Exact_intersect_yz_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(0,p2.hx(),p2.hy(),p2.hw()))); + return std::make_optional(variant_type(Point_3(0,p2.hx(),p2.hy(),p2.hw()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3 (0,p2.hx(),p2.hy(),p2.hw()), + return std::make_optional(variant_type(Segment_3(Point_3 (0,p2.hx(),p2.hy(),p2.hw()), Point_3 (0,q2.hx(),q2.hy(),q2.hw())) )); } }; diff --git a/Nef_3/include/CGAL/Nef_3/Halfedge.h b/Nef_3/include/CGAL/Nef_3/Halfedge.h index b4fc7065740..01c8df55785 100644 --- a/Nef_3/include/CGAL/Nef_3/Halfedge.h +++ b/Nef_3/include/CGAL/Nef_3/Halfedge.h @@ -31,7 +31,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -42,7 +42,7 @@ class Halfedge_base #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Vector_3 Vector_3; diff --git a/Nef_3/include/CGAL/Nef_3/SFace.h b/Nef_3/include/CGAL/Nef_3/SFace.h index 3ee882271d6..c723b2cd4d0 100644 --- a/Nef_3/include/CGAL/Nef_3/SFace.h +++ b/Nef_3/include/CGAL/Nef_3/SFace.h @@ -29,7 +29,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -39,7 +39,7 @@ class SFace_base { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Vertex_handle Vertex_handle; diff --git a/Nef_3/include/CGAL/Nef_3/SHalfedge.h b/Nef_3/include/CGAL/Nef_3/SHalfedge.h index 19339312f20..2191e73bbe6 100644 --- a/Nef_3/include/CGAL/Nef_3/SHalfedge.h +++ b/Nef_3/include/CGAL/Nef_3/SHalfedge.h @@ -30,7 +30,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -40,7 +40,7 @@ class SHalfedge_base { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Sphere_circle Sphere_circle; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_FM_decorator.h b/Nef_3/include/CGAL/Nef_3/SNC_FM_decorator.h index 6f60c188570..6cbc6be0ed8 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_FM_decorator.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_FM_decorator.h @@ -18,7 +18,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include @@ -413,7 +413,7 @@ protected: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO Edge_of[geninfo::access(info(e_min->twin()->source()->twin()->source()))]; #else - Edge_of[ boost::any_cast(info(e_min->twin()->source()->twin()->source())) ]; + Edge_of[ std::any_cast(info(e_min->twin()->source()->twin()->source())) ]; #endif CGAL_assertion( e_below != SHalfedge_handle() ); CGAL_NEF_TRACEN(" edge below " << debug(e_below)); @@ -652,7 +652,7 @@ create_facet_objects(const Plane_3& plane_supporting_facet, #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO Edge_of[geninfo::access(info(l->incident_sface()->center_vertex()))]; #else - Edge_of[ boost::any_cast(info(l->incident_sface()->center_vertex())) ]; + Edge_of[ std::any_cast(info(l->incident_sface()->center_vertex())) ]; #endif CGAL_assertion( e_below != SHalfedge_handle() ); diff --git a/Nef_3/include/CGAL/Nef_3/SNC_SM_overlayer.h b/Nef_3/include/CGAL/Nef_3/SNC_SM_overlayer.h index 8c45ba71566..2c29bca697c 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_SM_overlayer.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_SM_overlayer.h @@ -23,7 +23,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include diff --git a/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h b/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h index 83f89e413b3..47e85c817ae 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h @@ -32,7 +32,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -118,7 +118,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif SNC_const_decorator() : sncp_(0) {} diff --git a/Nef_3/include/CGAL/Nef_3/SNC_decorator.h b/Nef_3/include/CGAL/Nef_3/SNC_decorator.h index 61dcbb983ef..281fb0d0dcd 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_decorator.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_decorator.h @@ -36,7 +36,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -157,7 +157,7 @@ class SNC_decorator : public SNC_const_decorator { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif SNC_decorator() : Base(), sncp_() {} diff --git a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h index 9aa445f38a1..c546843ffc5 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h @@ -37,7 +37,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif #include @@ -963,7 +963,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif using Base::visit_shell_objects; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_simplify.h b/Nef_3/include/CGAL/Nef_3/SNC_simplify.h index 573b58fb172..7948da55da5 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_simplify.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_simplify.h @@ -169,7 +169,7 @@ class SNC_simplify_base : public SNC_decorator { } 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_3/include/CGAL/Nef_3/SNC_structure.h b/Nef_3/include/CGAL/Nef_3/SNC_structure.h index 27a3c5c414d..8806122cadb 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_structure.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_structure.h @@ -34,7 +34,7 @@ #include #include -#include +#include #include namespace CGAL { @@ -384,13 +384,13 @@ public: expensive operation.}*/ SNC_structure() : - boundary_item_(boost::none), sm_boundary_item_(boost::none), + boundary_item_(std::nullopt), sm_boundary_item_(std::nullopt), vertices_(), halfedges_(), halffacets_(), volumes_(), shalfedges_(), shalfloops_(), sfaces_() {} ~SNC_structure() { CGAL_NEF_TRACEN("~SNC_structure: clearing "< bool is_boundary_object(H h) const - { return boundary_item_[h]!=boost::none; } + { return boundary_item_[h]!=std::nullopt; } template bool is_sm_boundary_object(H h) const - { return sm_boundary_item_[h]!=boost::none; } + { return sm_boundary_item_[h]!=std::nullopt; } template Object_iterator& boundary_item(H h) @@ -462,12 +462,12 @@ public: template void undef_boundary_item(H h) - { CGAL_assertion(boundary_item_[h]!=boost::none); - boundary_item_[h] = boost::none; } + { CGAL_assertion(boundary_item_[h]!=std::nullopt); + boundary_item_[h] = std::nullopt; } template void undef_sm_boundary_item(H h) - { CGAL_assertion(sm_boundary_item_[h]!=boost::none); - sm_boundary_item_[h] = boost::none; } + { CGAL_assertion(sm_boundary_item_[h]!=std::nullopt); + sm_boundary_item_[h] = std::nullopt; } void reset_iterator_hash(Object_iterator it) { SVertex_handle sv; @@ -1035,7 +1035,7 @@ public: protected: void pointer_update(const Self& D); - typedef boost::optional Optional_object_iterator ; + typedef std::optional Optional_object_iterator ; private: Generic_handle_map boundary_item_; Generic_handle_map sm_boundary_item_; diff --git a/Nef_3/include/CGAL/Nef_3/Vertex.h b/Nef_3/include/CGAL/Nef_3/Vertex.h index 0a1d7bc280e..fdccc06bd03 100644 --- a/Nef_3/include/CGAL/Nef_3/Vertex.h +++ b/Nef_3/include/CGAL/Nef_3/Vertex.h @@ -30,7 +30,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -41,7 +41,7 @@ class Vertex_base { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Point_3 Point_3; 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_const_decorator.h b/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h index e1e1762dc8f..eb83d34928f 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h @@ -32,7 +32,7 @@ #define CGAL_NEF_DEBUG 67 #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -75,7 +75,7 @@ typedef size_t Size_type; #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else -typedef boost::any GenPtr; +typedef std::any GenPtr; #endif diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h b/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h index 4328b38f44c..8576d4488c8 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h @@ -31,7 +31,7 @@ #include #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -84,7 +84,7 @@ typedef typename Sphere_kernel::Aff_transformation_3 Aff_transformation_3; #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else -typedef boost::any GenPtr; +typedef std::any GenPtr; #endif typedef typename Map::SVertex SVertex; typedef typename Map::SVertex_handle SVertex_handle; diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h b/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h index 7c09b4eaf0c..994c6a41b80 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h @@ -34,7 +34,7 @@ namespace CGAL { /*{\Manpage {SM_io_parser}{Decorator_}{IO of embedded maps}{IO}}*/ /*{\Mdefinition An instance |\Mvar| of the data type |\Mname| is a -decorator to provide input and output of a embedded map. |\Mtype| is +decorator to provide input and output of an embedded map. |\Mtype| is generic with respect to the |Decorator_| parameter. |Decorator_| has to be a decorator model of our |SM_decorator| concept.}*/ diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_items.h b/Nef_S2/include/CGAL/Nef_S2/SM_items.h index d1141a21311..4508f4cc115 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_items.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_items.h @@ -27,7 +27,7 @@ #include #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -45,7 +45,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Sphere_point Sphere_point; @@ -127,7 +127,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Sphere_circle Sphere_circle; @@ -228,7 +228,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Sphere_circle Sphere_circle; @@ -306,7 +306,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Object_handle Object_handle; diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h b/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h index 52c94bad708..24496cae987 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h @@ -23,7 +23,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include @@ -106,7 +106,7 @@ struct SMO_from_segs { return geninfo::access(G.info(v)); #else return - boost::any_cast( G.info(v) ); + std::any_cast( G.info(v) ); #endif } @@ -122,7 +122,7 @@ struct SMO_from_segs { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(G.info(v)); #else - G.info(v)=boost::any(); + G.info(v)=std::any(); #endif } @@ -141,7 +141,7 @@ struct SMO_from_segs { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(G.info(v)); #else - G.info(v)=boost::any(); + G.info(v)=std::any(); #endif } @@ -564,7 +564,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(v)); #else - info(v)=boost::any(); + info(v)=std::any(); #endif } @@ -574,7 +574,7 @@ public: return geninfo::access(info(v)); #else return - *boost::any_cast(&info(v)); + *std::any_cast(&info(v)); #endif } @@ -618,8 +618,8 @@ public: geninfo::clear(info(e)); geninfo::clear(info(e->twin())); #else - info(e)=boost::any(); - info(e->twin())=boost::any(); + info(e)=std::any(); + info(e->twin())=std::any(); #endif } @@ -629,7 +629,7 @@ public: return geninfo::access(info(e)); #else return - *boost::any_cast(&info(e)); + *std::any_cast(&info(e)); #endif } @@ -671,7 +671,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(f)); #else - info(f)=boost::any(); + info(f)=std::any(); #endif } @@ -681,7 +681,7 @@ public: return geninfo::access(info(f)); #else return - *boost::any_cast(&info(f)); + *std::any_cast(&info(f)); #endif } 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..2e982c5e1f7 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_point_locator.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_point_locator.h @@ -21,7 +21,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include @@ -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 "< #else -#include +#include #endif #include #include @@ -213,7 +213,7 @@ public: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(v)); #else - info(v)=boost::any(); + info(v)=std::any(); #endif } @@ -223,7 +223,7 @@ public: return geninfo::access(info(v)); #else return - *boost::any_cast(&info(v)); + *std::any_cast(&info(v)); #endif } @@ -258,8 +258,8 @@ public: geninfo::clear(info(e)); geninfo::clear(info(e->twin())); #else - info(e)=boost::any(); - info(e->twin())=boost::any(); + info(e)=std::any(); + info(e->twin())=std::any(); #endif } @@ -269,7 +269,7 @@ public: return geninfo::access(info(e)); #else return - *boost::any_cast(&info(e)); + *std::any_cast(&info(e)); #endif } @@ -288,7 +288,7 @@ public: return geninfo::const_access(info(e)); #else return - *boost::any_cast(&info(e)); + *std::any_cast(&info(e)); #endif } const Mark& incident_mark(SHalfedge_const_handle e) const diff --git a/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h b/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h index 4c89dbf4ecd..aaa74f14fe4 100644 --- a/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h +++ b/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h @@ -30,7 +30,7 @@ #define CGAL_NEF_DEBUG 109 #include -#include +#include #include namespace CGAL { @@ -128,7 +128,7 @@ public: typedef std::list Object_list; typedef typename Object_list::iterator Object_iterator; typedef typename Object_list::const_iterator Object_const_iterator; - typedef boost::optional Optional_object_iterator ; + typedef std::optional Optional_object_iterator ; typedef Generic_handle_map Handle_to_iterator_map; typedef Sphere_map* Constructor_parameter; @@ -226,7 +226,7 @@ public: construction means cloning an isomorphic structure and is thus an expensive operation.}*/ - Sphere_map(bool = false) : boundary_item_(boost::none), + Sphere_map(bool = false) : boundary_item_(std::nullopt), svertices_(), sedges_(), sfaces_(), shalfloop_() {} ~Sphere_map() noexcept(!CGAL_ASSERTIONS_ENABLED) @@ -236,7 +236,7 @@ public: ); } - Sphere_map(const Self& D) : boundary_item_(boost::none), + Sphere_map(const Self& D) : boundary_item_(std::nullopt), svertices_(D.svertices_), sedges_(D.sedges_), sfaces_(D.sfaces_), @@ -258,7 +258,7 @@ public: void clear() { - boundary_item_.clear(boost::none); + boundary_item_.clear(std::nullopt); svertices_.destroy(); sfaces_.destroy(); while ( shalfedges_begin() != shalfedges_end() ) @@ -268,7 +268,7 @@ public: template bool is_sm_boundary_object(H h) const - { return boundary_item_[h]!=boost::none; } + { return boundary_item_[h]!=std::nullopt; } template Object_iterator& sm_boundary_item(H h) @@ -280,8 +280,8 @@ public: template void undef_sm_boundary_item(H h) - { CGAL_assertion(boundary_item_[h]!=boost::none); - boundary_item_[h] = boost::none; } + { CGAL_assertion(boundary_item_[h]!=std::nullopt); + boundary_item_[h] = std::nullopt; } void reset_sm_iterator_hash(Object_iterator it) { SVertex_handle sv; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h b/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h index 09ed5664c46..d62b8215cc5 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h @@ -182,7 +182,7 @@ typename typeset_intersection()(obj,*this); } - //TODO: convert boost::variant + //TODO: convert std::variant }; diff --git a/Number_types/include/CGAL/Exact_integer.h b/Number_types/include/CGAL/Exact_integer.h index 3ba3fb9816a..86b13dd3dc6 100644 --- a/Number_types/include/CGAL/Exact_integer.h +++ b/Number_types/include/CGAL/Exact_integer.h @@ -40,7 +40,7 @@ typedef unspecified_type Exact_integer; #else // not DOXYGEN_RUNNING -typedef internal::Exact_ring_selector::Type Exact_integer; +using Exact_integer = internal::Exact_NT_backend::Integer; #endif // not DOXYGEN_RUNNING diff --git a/Number_types/include/CGAL/Exact_rational.h b/Number_types/include/CGAL/Exact_rational.h index f07c61d42a9..7b53700b5b4 100644 --- a/Number_types/include/CGAL/Exact_rational.h +++ b/Number_types/include/CGAL/Exact_rational.h @@ -42,7 +42,7 @@ typedef unspecified_type Exact_rational; #else // not DOXYGEN_RUNNING -typedef internal::Exact_field_selector::Type Exact_rational; +using Exact_rational = internal::Exact_NT_backend::Rational; #endif diff --git a/Number_types/include/CGAL/Number_types/internal/Exact_type_selector.h b/Number_types/include/CGAL/Number_types/internal/Exact_type_selector.h index f0d8e961c32..b0f645eb3a6 100644 --- a/Number_types/include/CGAL/Number_types/internal/Exact_type_selector.h +++ b/Number_types/include/CGAL/Number_types/internal/Exact_type_selector.h @@ -156,25 +156,27 @@ constexpr ENT_backend_choice Default_exact_nt_backend = static_cast -struct Exact_field_selector -{ - using Type = typename Exact_NT_backend::Rational; -}; +struct Exact_field_selector; template < typename > -struct Exact_ring_selector -{ - using Type = typename Exact_NT_backend::Integer; +struct Exact_ring_selector; + +#define CGAL_EXACT_SELECTORS_SPECS(X) \ +template <> \ +struct Exact_ring_selector \ +{ \ + using Type = typename Exact_NT_backend::Ring_for_float; \ +}; \ +\ +template <> \ +struct Exact_field_selector \ +{ \ + using Type = typename Exact_NT_backend::Rational; \ }; -template <> -struct Exact_ring_selector -{ - using Type = typename Exact_NT_backend::Ring_for_float; -}; - -template <> -struct Exact_ring_selector : Exact_ring_selector { }; +CGAL_EXACT_SELECTORS_SPECS(double) +CGAL_EXACT_SELECTORS_SPECS(float) +CGAL_EXACT_SELECTORS_SPECS(int) template <> struct Exact_field_selector @@ -188,6 +190,10 @@ template <> struct Exact_field_selector > { typedef Quotient Type; }; +template <> +struct Exact_ring_selector > +{ typedef Quotient Type; }; + // And we specialize for the following types : #ifdef CGAL_USE_GMP template <> @@ -249,6 +255,10 @@ struct Exact_ring_selector template <> struct Exact_field_selector { typedef leda_real Type; }; + +template <> +struct Exact_ring_selector +{ typedef leda_real Type; }; #endif #ifdef CGAL_USE_CORE @@ -277,6 +287,26 @@ struct Exact_field_selector::Rational> template <> struct Exact_ring_selector::Rational> { typedef Exact_NT_backend::Rational Type; }; + + +#ifdef CGAL_USE_GMP +template <> +struct Exact_field_selector::Integer> +{ typedef Exact_NT_backend::Rational Type; }; + +template <> +struct Exact_ring_selector::Integer> +{ typedef Exact_NT_backend::Integer Type; }; + +template <> +struct Exact_field_selector::Rational> +{ typedef Exact_NT_backend::Rational Type; }; + +template <> +struct Exact_ring_selector::Rational> +{ typedef Exact_NT_backend::Rational Type; }; +#endif + #endif #ifndef CGAL_NO_DEPRECATED_CODE @@ -287,4 +317,6 @@ struct Exact_type_selector : Exact_field_selector< ET > {}; } } // namespace CGAL::internal +#undef CGAL_EXACT_SELECTORS_SPECS + #endif // CGAL_INTERNAL_EXACT_TYPE_SELECTOR_H diff --git a/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h b/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h index 80e67f1ea86..a4daeef3828 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h +++ b/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h @@ -41,9 +41,9 @@ namespace Intern{ * * Extensions provide suitable specializations of \c CGAL::Fraction_traits. * They are decomposable iff their coefficient type is. - * The denominator \e d of a Extension \e ext is a low common multiple + * The denominator \e d of an extension \e ext is a low common multiple * (see \c CGAL::Fraction_traits::Common_factor for details) of the - * denominators of its coefficients. The numerator is the Extenion + * denominators of its coefficients. The numerator is the extenion * \e d*ext with a fraction-free coefficient type. * * This works for nested Sqrt_extensions, too. diff --git a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h index c49303dd42d..4a562530c75 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -92,7 +92,7 @@ template <> class Interval_optional_caching< ::CGAL::Tag_true > { protected: - typedef boost::optional< std::pair > Cached_interval; + typedef std::optional< std::pair > Cached_interval; mutable Cached_interval interval_; void invalidate_interval() {interval_=Cached_interval();} bool is_cached() const {return (interval_?true:false);} diff --git a/Number_types/include/CGAL/boost_mp.h b/Number_types/include/CGAL/boost_mp.h index 3dcaadcad21..b98980acbc5 100644 --- a/Number_types/include/CGAL/boost_mp.h +++ b/Number_types/include/CGAL/boost_mp.h @@ -20,8 +20,18 @@ // easy solution. // MSVC had trouble with versions <= 1.69: // https://github.com/boostorg/multiprecision/issues/98 +// +// Disable also on Windows 32 bits +// because CGAL/cpp_float.h assumes _BitScanForward64 is available +// See https://learn.microsoft.com/en-us/cpp/intrinsics/bitscanforward-bitscanforward64 +// +// Disable also with PowerPC processors, with Boost<1.80 because of that bug: +// https://github.com/boostorg/multiprecision/pull/421 +// #if !defined CGAL_DO_NOT_USE_BOOST_MP && \ - (!defined _MSC_VER || BOOST_VERSION >= 107000) + (!defined _MSC_VER || BOOST_VERSION >= 107000) && \ + (!defined _WIN32 || defined _WIN64) && \ + (BOOST_VERSION >= 108000 || (!defined _ARCH_PPC && !defined _ARCH_PPC64)) #define CGAL_USE_BOOST_MP 1 #include diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index 400d76fdd1c..b3dd989c766 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -63,6 +63,8 @@ create_single_source_cgal_program("_test_valid_finite_float.cpp") create_single_source_cgal_program("to_interval_test.cpp") create_single_source_cgal_program("unsigned.cpp") create_single_source_cgal_program("utilities.cpp") +create_single_source_cgal_program("Exact_rational.cpp") +create_single_source_cgal_program("Mpzf_new.cpp") find_package( GMP ) if( GMP_FOUND AND NOT CGAL_DISABLE_GMP ) diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h index 16fe600bb34..979ec116b10 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h @@ -35,7 +35,7 @@ #include #include #include -#include +#include // STL #include @@ -764,7 +764,7 @@ public: // signed distance from t to the intersection of line(a,b) and line(t,s) // the pair::first is false if sign==-1 and true otherwise - std::pair > + std::pair > signed_distance_from_intersection(Vertex_handle a, Vertex_handle b, Vertex_handle t, Vertex_handle s) const { const Point& pa = a->point(); @@ -776,24 +776,24 @@ public: // signed distance from t to the intersection of line(a,b) and line(t,s) // the pair::first is false if sign==-1 and true otherwise - std::pair > + std::pair > compute_signed_distance_from_intersection( const Point& pa, const Point& pb, const Point& pt, const Point& ps) const { FT Dabt = compute_signed_distance(pa, pb, pt); if (Dabt == FT(0)) - return std::make_pair(true,boost::make_optional(FT(0))); + return std::make_pair(true,std::make_optional(FT(0))); Line lab = geom_traits().construct_line_2_object()( pa, geom_traits().construct_vector_2_object()(pa, pb)); Line lts = geom_traits().construct_line_2_object()( pt, geom_traits().construct_vector_2_object()(pt, ps)); - boost::optional Dqt; + std::optional Dqt; const auto result = intersection(lab, lts); if (result) { - const Point* iq = boost::get(&(*result)); + const Point* iq = std::get_if(&(*result)); if (iq) Dqt = CGAL::approximate_sqrt(geom_traits().compute_squared_distance_2_object()(*iq, pt)); } @@ -996,24 +996,24 @@ public: std::cout <<"( " << (edge).priority() << ") ( " << a << " , " << b << " )" << std::endl; } - bool is_p_infinity(const std::pair >& p) const + bool is_p_infinity(const std::pair >& p) const { - return p.first && p.second==boost::none; + return p.first && p.second==std::nullopt; } - bool is_m_infinity(const std::pair >& p) const + bool is_m_infinity(const std::pair >& p) const { - return !p.first && p.second==boost::none; + return !p.first && p.second==std::nullopt; } - bool is_infinity(const std::pair >& p) const + bool is_infinity(const std::pair >& p) const { - return p.second==boost::none; + return p.second==std::nullopt; } - std::pair > m_infinity() const + std::pair > m_infinity() const { - return std::pair >(false,boost::optional()); + return std::pair >(false,std::optional()); } template // value_type = Edge @@ -1028,9 +1028,9 @@ public: Edge ab = twin_edge(*it); Vertex_handle a = source_vertex(ab); Vertex_handle b = target_vertex(ab); - std::pair > D = signed_distance_from_intersection(a, b, target, source); + std::pair > D = signed_distance_from_intersection(a, b, target, source); if (!D.first ) { - CGAL_assertion(D.second!=boost::none); + CGAL_assertion(D.second!=std::nullopt); multi_ind.insert(Rec_edge_2(ab, *D.second)); } } @@ -1053,11 +1053,11 @@ public: Vertex_handle c = target_vertex(bc); Vertex_handle d = target_vertex(cd); - std::pair > Dac=m_infinity(); + std::pair > Dac=m_infinity(); if (a != c && is_triangle_ccw(a, b, c)) Dac = signed_distance_from_intersection(a, c, target, source); - std::pair > Dbd=m_infinity(); + std::pair > Dbd=m_infinity(); if (b != d && is_triangle_ccw(b, c, d)) Dbd = signed_distance_from_intersection(b, d, target, source); 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..279f21dec86 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` @@ -198,7 +198,7 @@ public: /// \name /// A point-offset pair (`p`,`off`) is said to be in conflict with a -/// cell `c` iff `dt`.`side_of_circle(c, p, off)` returns +/// face `f` iff `dt`.`side_of_circle(f, p, off)` returns /// `ON_BOUNDED_SIDE`. The set of faces that are in conflict with /// (`p`,`off`) is star-shaped. /// @{ @@ -309,7 +309,7 @@ public: Checks the combinatorial validity of the triangulation and the validity of its geometric embedding (see Section \ref P2Triangulation2secintro). Also checks that all the - circumscribing circles of cells are empty. + circumscribing circles of faces are empty. When `verbose` is set to true, messages describing the first invalidity encountered are printed. @@ -321,9 +321,9 @@ public: /*! \cgalAdvancedFunction \cgalAdvancedBegin - Checks the combinatorial and geometric validity of the cell (see + Checks the combinatorial and geometric validity of the face (see Section \ref P2Triangulation2secintro). Also checks that the - circumscribing circle of cells is empty. + circumscribing circle of faces is empty. When `verbose` is set to true, messages are printed to give a precise indication of the kind of invalidity encountered. 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/doc/Periodic_2_triangulation_2/PackageDescription.txt b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/PackageDescription.txt index 57f1542511d..dcffaea8da8 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/PackageDescription.txt +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/PackageDescription.txt @@ -65,10 +65,10 @@ concepts `Periodic_2TriangulationFaceBase_2` and A triangulation is stored as a collection of vertices and faces that are linked together through incidence and adjacency relations. Each face gives access to its three incident vertices and to its three -adjacent cells. Each vertex gives access to one of its incident +adjacent faces. Each vertex gives access to one of its incident faces. -The three vertices of a cell are indexed with 0, 1, and 2 in positive +The three vertices of a face are indexed with 0, 1, and 2 in positive orientation, the positive orientation being defined by the orientation of the underlying space \f$ \mathbb T_c^3\f$. The neighbors of a face are also indexed with 0, 1, 2 in such a way that the neighbor indexed diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt index 9ccf261174a..4186679f40e 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt @@ -134,7 +134,7 @@ A periodic triangulation is said to be `locally valid` iff data structure, is `locally valid` (see Chapter \ref Chapter_2D_Triangulation_Data_Structure) -(c) Any cell has its vertices ordered according to positive +(c) Any face has its vertices ordered according to positive orientation. See \cgalFigureRef{P2Triangulation2figorient}. \section P2T2_Delaunay Delaunay Triangulation @@ -264,7 +264,7 @@ to support periodicity: the vertex and face must be models of `Periodic_2TriangulationVertexBase_2` and `Periodic_2TriangulationFaceBase_2`. A model of such concept is `CGAL::Triangulation_data_structure_2`. It is parameterized by a vertex base class and a face base class, which gives the -possibility to customize the vertices and cells used by the triangulation data +possibility to customize the vertices and faces used by the triangulation data structure, and hence by the geometric triangulation using it. Basic models of the vertex and face concepts are provided: `CGAL::Periodic_2_triangulation_vertex_base_2` and `CGAL::Periodic_2_triangulation_face_base_2`. @@ -272,7 +272,7 @@ and `CGAL::Periodic_2_triangulation_face_base_2`. A default value for the triangulation data structure parameter is provided in all the triangulation classes, so it does not need to be specified by the user unless he wants to use a different triangulation data -structure or a different vertex or cell base class. +structure or a different vertex or face base class. \subsection P2T2FlexDesign Flexibility of the Design diff --git a/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/p2t2_find_conflicts.cpp b/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/p2t2_find_conflicts.cpp index 0491e319a8c..b3bc862f308 100644 --- a/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/p2t2_find_conflicts.cpp +++ b/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/p2t2_find_conflicts.cpp @@ -27,24 +27,21 @@ int main() // Gets the conflict region of 100 random points // in the Delaunay tetrahedralization for (int i = 0; i != 100; ++i) - { - Point p = (*rnd++); + { + Point p = (*rnd++); - // Locate the point - Delaunay::Locate_type lt; - int li; - Face_handle f = T.locate(p, lt, li); - if (lt == Delaunay::VERTEX) - continue; // Point already exists + // Locate the point + Delaunay::Locate_type lt; + int li; + Face_handle f = T.locate(p, lt, li); + if (lt == Delaunay::VERTEX) + continue; // Point already exists - // Get the cells that conflict with p in a vector V, - // and a facet on the boundary of this hole in f. - std::vector V; + // Get the faces that conflict with p in a vector V. + std::vector V; - T.get_conflicts(p, - std::back_inserter(V), // Conflict cells in V - f); - } + T.get_conflicts(p, std::back_inserter(V), f); + } std::cout << "Final triangulation has " << T.number_of_vertices() << " vertices." << std::endl; diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h index a4ca4e36a30..2d2e3878f82 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h @@ -119,12 +119,21 @@ public: /// Unique_vertex_iterator iterates over exactly one representative. typedef Periodic_2_triangulation_unique_vertex_iterator_2 Unique_vertex_iterator; + /// Iterator over the canonical edges, i.e. for each set of periodic copies the + /// Unique_edge_iterator iterates over exactly one representative. + typedef Periodic_2_triangulation_unique_edge_iterator_2 + Unique_edge_iterator; + /// Iterator over the canonical faces, i.e. for each set of periodic copies the + /// Unique_face_iterator iterates over exactly one representative. + typedef Periodic_2_triangulation_unique_face_iterator_2 + Unique_face_iterator; /// \name For compatibility with the Triangulation_2 class // \{ typedef Face_iterator Finite_faces_iterator; typedef Edge_iterator Finite_edges_iterator; typedef Vertex_iterator Finite_vertices_iterator; + typedef Vertex_iterator All_vertices_iterator; typedef Face_iterator All_faces_iterator; // \} @@ -381,10 +390,11 @@ public: /// Checks whether the triangulation is a valid simplicial complex in the one cover. bool is_triangulation_in_1_sheet() const; - /// Convert a 9 sheeted cover (used for sparse triangulations) to a single sheeted cover. + /// Converts a 9 sheeted cover (used for sparse triangulations) to a single sheeted cover. /// \pre !is_1_cover(); void convert_to_1_sheeted_covering(); - /// Convert a single sheeted cover (used for dense triangulations) to a 9 sheeted cover. + + /// Converts a single sheeted cover (used for dense triangulations) to a 9 sheeted cover. /// \pre is_1_cover(); void convert_to_9_sheeted_covering(); // \} @@ -676,6 +686,32 @@ public: Periodic_2_triangulation_2_internal::Domain_tester(this)); } + Unique_edge_iterator unique_edges_begin() const + { + return CGAL::filter_iterator(edges_end(), + Periodic_2_triangulation_2_internal::Domain_tester(this), + edges_begin()); + } + /// past-the-end iterator over the canonical edges + Unique_edge_iterator unique_edges_end() const + { + return CGAL::filter_iterator(edges_end(), + Periodic_2_triangulation_2_internal::Domain_tester(this)); + } + + Unique_face_iterator unique_faces_begin() const + { + return CGAL::filter_iterator(faces_end(), + Periodic_2_triangulation_2_internal::Domain_tester(this), + faces_begin()); + } + /// past-the-end iterator over the non-virtual vertices + Unique_face_iterator unique_faces_end() const + { + return CGAL::filter_iterator(faces_end(), + Periodic_2_triangulation_2_internal::Domain_tester(this)); + } + // \} /// \name Geometric iterators //\{ @@ -972,6 +1008,32 @@ public: return Offset(); } + // Gets the canonicalized offsets of a face. + void get_offsets(Face_handle fh, + Offset& off0, Offset& off1, Offset& off2) const + { + Offset face_off0 = int_to_off(fh->offset(0)); + Offset face_off1 = int_to_off(fh->offset(1)); + Offset face_off2 = int_to_off(fh->offset(2)); + Offset diff_off((face_off0.x() == 1 && face_off1.x() == 1 && face_off2.x() == 1) ? -1 : 0, + (face_off0.y() == 1 && face_off1.y() == 1 && face_off2.y() == 1) ? -1 : 0); + off0 = combine_offsets(get_offset(fh, 0), diff_off); + off1 = combine_offsets(get_offset(fh, 1), diff_off); + off2 = combine_offsets(get_offset(fh, 2), diff_off); + } + + // Gets the canonicalized offsets of an edge. + void get_offsets(const Edge& e, + Offset& off0, Offset& off1) const + { + Offset edge_off0 = int_to_off(e.first->offset(cw(e.second))); + Offset edge_off1 = int_to_off(e.first->offset(ccw(e.second))); + Offset diff_off((edge_off0.x() == 1 && edge_off1.x() == 1) ? -1 : 0, + (edge_off0.y() == 1 && edge_off1.y() == 1) ? -1 : 0); + off0 = combine_offsets(get_offset(e.first, cw(e.second)), diff_off); + off1 = combine_offsets(get_offset(e.first, ccw(e.second)), diff_off); + } + /// Converts an offset to a bit pattern where bit1==offx and bit0==offy. int off_to_int(const Offset & off) const { @@ -986,13 +1048,12 @@ public: return Offset((i >> 1) & 1, i & 1); } - // \} - // Protected functions of Periodic_2_triangulation_2 - /// Const accessor to the virtual vertices reverse map, - /// used to optimize point location for periodic copies. - const Virtual_vertex_reverse_map &virtual_vertices_reverse() const + /// Tests whether a vertex is a periodic copy of a vertex in the 3-cover. + bool is_virtual(Vertex_handle v) const { - return _virtual_vertices_reverse; + if (is_1_cover()) + return false; + return (_virtual_vertices.find(v) != _virtual_vertices.end()); } /// [Undoc] Returns the non-virtual copy of the vertex. @@ -1007,15 +1068,6 @@ public: return vh; } - - /// Tests whether a vertex is a periodic copy of a vertex in the 3-cover. - bool is_virtual(Vertex_handle v) - { - if (is_1_cover()) - return false; - return (_virtual_vertices.find(v) != _virtual_vertices.end()); - } - const std::vector& periodic_copies(const Vertex_handle v) const { CGAL_precondition(number_of_sheets() != make_array(1, 1) ); @@ -1024,6 +1076,77 @@ public: return _virtual_vertices_reverse.find(v)->second; } + // Protected functions of Periodic_2_triangulation_2 + /// Const accessor to the virtual vertices reverse map, + /// used to optimize point location for periodic copies. + const Virtual_vertex_reverse_map& virtual_vertices_reverse() const + { + return _virtual_vertices_reverse; + } + + // check whether pos points onto a unique edge or not. + // If we are computing in 1-sheeted covering this should + // always be true. + bool is_canonical(Face_handle fh) const + { + if(is_1_cover()) + return true; + + Offset off0, off1, off2; + get_offsets(fh, off0, off1, off2); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical triangle. + if (off0.x() > 1) return false; + if (off0.y() > 1) return false; + if (off1.x() > 1) return false; + if (off1.y() > 1) return false; + if (off2.x() > 1) return false; + if (off2.y() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x() & off2.x(); + int offy = off0.y() & off1.y() & off2.y(); + + return (offx == 0 && offy == 0); + } + + bool is_canonical(const Edge& e) const + { + if(is_1_cover()) + return true; + + // fetch all offsets + Offset off0, off1; + get_offsets(e, off0, off1); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical edge. + if (off0.x() > 1) return false; + if (off0.y() > 1) return false; + if (off1.x() > 1) return false; + if (off1.y() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x(); + int offy = off0.y() & off1.y(); + + return (offx == 0 && offy == 0); + } + + // checks whether pos points onto a vertex inside the original domain + bool is_canonical(Vertex_handle vh) const + { + return !is_virtual(vh); + } + +public: template Stream& draw_triangulation(Stream& os) const { diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_iterators_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_iterators_2.h index afa1a55fce5..c3e7fb1164a 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_iterators_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_iterators_2.h @@ -14,13 +14,11 @@ #include - #include #include #include -namespace CGAL -{ +namespace CGAL { template < class T > class Periodic_2_triangulation_triangle_iterator_2 @@ -66,7 +64,7 @@ public: { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->faces_end() && !is_canonical() ) + while (pos != _t->faces_end() && !_t->is_canonical(pos) ) ++pos; } } @@ -88,7 +86,7 @@ public: { ++pos; } - while (pos != _t->faces_end() && !is_canonical()); + while (pos != _t->faces_end() && !_t->is_canonical(pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -112,7 +110,7 @@ public: { --pos; } - while (pos != _t->faces_begin() && !is_canonical()); + while (pos != _t->faces_begin() && !_t->is_canonical(pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -172,37 +170,6 @@ private: mutable Periodic_triangle periodic_triangle; // current triangle. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() - { - // fetch all offsets - Offset off0, off1, off2; - get_edge_offsets(off0, off1, off2); - - if (_t->number_of_sheets() != make_array(1, 1)) - { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - if (off2.x() > 1) return false; - if (off2.y() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x() & off2.x(); - int offy = off0.y() & off1.y() & off2.y(); - - return (offx == 0 && offy == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() @@ -217,7 +184,7 @@ private: ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->faces_end() && !is_canonical()); + && pos != _t->faces_end() && !_t->is_canonical(pos)); } else { @@ -241,7 +208,7 @@ private: { --pos; } - while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(pos)); _off = get_drawing_offsets(); } else @@ -256,25 +223,6 @@ private: } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1, - Offset &off2) const - { - Offset face_off0 = _t->int_to_off(pos->offset(0)); - Offset face_off1 = _t->int_to_off(pos->offset(1)); - Offset face_off2 = _t->int_to_off(pos->offset(2)); - Offset diff_off((face_off0.x() == 1 - && face_off1.x() == 1 - && face_off2.x() == 1) ? -1 : 0, - (face_off0.y() == 1 - && face_off1.y() == 1 - && face_off2.y() == 1) ? -1 : 0); - off0 = _t->combine_offsets(_t->get_offset(pos, 0), diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos, 1), diff_off); - off2 = _t->combine_offsets(_t->get_offset(pos, 2), diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() @@ -284,10 +232,10 @@ private: // intersect the boundary of the periodic domain. In UNIQUE mode // this means that the offset with respect to drawing should // differ in some entries. Otherwise we consider the offsets - // internally stored inside the cell telling us that this cell + // internally stored inside the face telling us that this face // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0, off1, off2); + _t->get_offsets(pos, off0, off1, off2); else { CGAL_assertion(_it == T::STORED_COVER_DOMAIN); @@ -319,7 +267,7 @@ private: { CGAL_assertion(pos != typename T::Face_handle()); Offset off0, off1, off2; - get_edge_offsets(off0, off1, off2); + _t->get_offsets(pos, off0, off1, off2); Offset transl_off = Offset((((_off >> 1) & 1) == 1 ? -1 : 0), (((_off ) & 1) == 1 ? -1 : 0)); if (_it == T::STORED_COVER_DOMAIN) @@ -385,7 +333,7 @@ public: { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->edges_end() && !is_canonical() ) + while (pos != _t->edges_end() && !_t->is_canonical(*pos) ) ++pos; } } @@ -407,7 +355,7 @@ public: { ++pos; } - while (pos != _t->edges_end() && !is_canonical()); + while (pos != _t->edges_end() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -431,7 +379,7 @@ public: { --pos; } - while (pos != _t->edges_begin() && !is_canonical()); + while (pos != _t->edges_begin() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -490,35 +438,6 @@ private: mutable Periodic_segment periodic_segment; // current segment. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() - { - // fetch all offsets - Offset off0, off1; - get_edge_offsets(off0, off1); - - if (_t->number_of_sheets() != make_array(1, 1)) - { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x(); - int offy = off0.y() & off1.y(); - - return (offx == 0 && offy == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() @@ -533,7 +452,7 @@ private: ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->edges_end() && !is_canonical()); + && pos != _t->edges_end() && !_t->is_canonical(*pos)); } else { @@ -557,7 +476,7 @@ private: { --pos; } - while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(*pos)); _off = get_drawing_offsets(); } else @@ -572,20 +491,6 @@ private: } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1) const - { - Offset cell_off0 = _t->int_to_off(pos->first->offset(_t->cw(pos->second))); - Offset cell_off1 = _t->int_to_off(pos->first->offset(_t->ccw(pos->second))); - Offset diff_off((cell_off0.x() == 1 && cell_off1.x() == 1) ? -1 : 0, - (cell_off0.y() == 1 && cell_off1.y() == 1) ? -1 : 0); - off0 = _t->combine_offsets(_t->get_offset(pos->first, _t->cw(pos->second)), - diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos->first, _t->ccw(pos->second)), - diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() @@ -595,10 +500,10 @@ private: // intersect the boundary of the periodic domain. In UNIQUE mode // this means that the offset with respect to drawing should // differ in some entries. Otherwise we consider the offsets - // internally stored inside the cell telling us that this cell + // internally stored inside the face telling us that this face // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0, off1); + _t->get_offsets(*pos, off0, off1); else { CGAL_assertion(_it == T::STORED_COVER_DOMAIN); @@ -618,7 +523,7 @@ private: { CGAL_assertion(pos->first != typename T::Face_handle()); Offset off0, off1; - get_edge_offsets(off0, off1); + _t->get_offsets(*pos, off0, off1); Offset transl_off = Offset((((_off >> 1) & 1) == 1 ? -1 : 0), (( _off & 1) == 1 ? -1 : 0)); if (_it == T::STORED_COVER_DOMAIN) @@ -681,7 +586,7 @@ public: { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->vertices_end() && !is_canonical() ) + while (pos != _t->vertices_end() && !_t->is_canonical(pos) ) ++pos; } } @@ -705,7 +610,7 @@ public: { ++pos; } - while (pos != _t->vertices_end() && !is_canonical()); + while (pos != _t->vertices_end() && !_t->is_canonical(pos)); break; default: CGAL_assertion(false); @@ -727,7 +632,7 @@ public: { --pos; } - while (pos != _t->vertices_begin() && !is_canonical()); + while (pos != _t->vertices_begin() && !_t->is_canonical(pos)); break; default: CGAL_assertion(false); @@ -785,14 +690,6 @@ private: mutable Periodic_point periodic_point; // current point. private: - // check whether pos points onto a vertex inside the original - // domain. If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() - { - return (_t->get_offset(pos).is_null()); - } - Periodic_point construct_periodic_point() const { CGAL_assertion(pos != typename T::Vertex_handle()); @@ -801,23 +698,91 @@ private: } }; -namespace Periodic_2_triangulation_2_internal -{ +namespace Periodic_2_triangulation_2_internal { + +// returns `true` if the simplex is not canonical, and has to be filtered out template class Domain_tester { - const T *t; + typedef typename T::Offset Offset; - public: - Domain_tester() {} - Domain_tester(const T *tr) : t(tr) {} + const T *t; - bool operator()(const typename T::Vertex_iterator & v) const +public: + Domain_tester() {} + Domain_tester(const T *tr) : t(tr) {} + + bool operator()(const typename T::Vertex_iterator v) const + { + return !(t->get_offset(v).is_null()); + } + + bool operator()(const typename T::Edge_iterator e) const + { + Offset eo_0 = t->int_to_off(e->first->offset(t->cw(e->second))); + Offset eo_1 = t->int_to_off(e->first->offset(t->ccw(e->second))); + + Offset diff_off((eo_0.x() == 1 && eo_1.x() == 1) ? -1 : 0, + (eo_0.y() == 1 && eo_1.y() == 1) ? -1 : 0); + Offset off0 = t->combine_offsets(t->get_offset(e->first, t->cw(e->second)), diff_off); + Offset off1 = t->combine_offsets(t->get_offset(e->first, t->ccw(e->second)), diff_off); + + if (t->number_of_sheets() != make_array(1, 1)) { - return (t->get_offset(v) != typename T::Offset(0, 0)); + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical edge. + if (off0.x() > 1) return true; + if (off0.y() > 1) return true; + if (off1.x() > 1) return true; + if (off1.y() > 1) return true; } + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x(); + int offy = off0.y() & off1.y(); + + return (offx != 0 || offy != 0); + } + + bool operator()(const typename T::Face_iterator f) const + { + Offset fo_0 = t->int_to_off(f->offset(0)); + Offset fo_1 = t->int_to_off(f->offset(1)); + Offset fo_2 = t->int_to_off(f->offset(2)); + + Offset diff_off((fo_0.x() == 1 && fo_1.x() == 1 && fo_2.x() == 1) ? -1 : 0, + (fo_0.y() == 1 && fo_1.y() == 1 && fo_2.y() == 1) ? -1 : 0); + Offset off0 = t->combine_offsets(t->get_offset(f, 0), diff_off); + Offset off1 = t->combine_offsets(t->get_offset(f, 1), diff_off); + Offset off2 = t->combine_offsets(t->get_offset(f, 2), diff_off); + + if (t->number_of_sheets() != make_array(1, 1)) + { + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical triangle. + if (off0.x() > 1) return true; + if (off0.y() > 1) return true; + if (off1.x() > 1) return true; + if (off1.y() > 1) return true; + if (off2.x() > 1) return true; + if (off2.y() > 1) return true; + } + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x() & off2.x(); + int offy = off0.y() & off1.y() & off2.y(); + + return (offx != 0 || offy != 0); + } }; -} + +} // Periodic_2_triangulation_2_internal // Iterates over the vertices in a periodic triangulation that are // located inside the original cube. @@ -830,7 +795,6 @@ template class Periodic_2_triangulation_unique_vertex_iterator_2 : public Filter_iterator > { - typedef typename T::Vertex_handle Vertex_handle; typedef typename T::Vertex_iterator Vertex_iterator; @@ -838,8 +802,8 @@ class Periodic_2_triangulation_unique_vertex_iterator_2 typedef Filter_iterator Base; typedef Periodic_2_triangulation_unique_vertex_iterator_2 Self; -public: +public: Periodic_2_triangulation_unique_vertex_iterator_2() : Base() {} Periodic_2_triangulation_unique_vertex_iterator_2(const Base &b) : Base(b) {} @@ -872,6 +836,108 @@ public: } }; -} //namespace CGAL +// Iterates over the canonical edges in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Edge_iterator and this iterator +template +class Periodic_2_triangulation_unique_edge_iterator_2 + : public Filter_iterator > +{ + typedef typename T::Edge Edge; + typedef typename T::Edge_iterator Edge_iterator; + + typedef typename Periodic_2_triangulation_2_internal::Domain_tester Tester; + + typedef Filter_iterator Base; + typedef Periodic_2_triangulation_unique_edge_iterator_2 Self; + +public: + Periodic_2_triangulation_unique_edge_iterator_2() : Base() {} + Periodic_2_triangulation_unique_edge_iterator_2(const Base &b) : Base(b) {} + + Self & operator++() + { + Base::operator++(); + return *this; + } + Self & operator--() + { + Base::operator--(); + return *this; + } + Self operator++(int) + { + Self tmp(*this); + ++(*this); + return tmp; + } + Self operator--(int) + { + Self tmp(*this); + --(*this); + return tmp; + } + + operator Edge() const + { + return Base::base(); + } +}; + +// Iterates over the canonical faces in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Face_iterator and this iterator +template +class Periodic_2_triangulation_unique_face_iterator_2 + : public Filter_iterator > +{ + typedef typename T::Face_handle Face_handle; + typedef typename T::Face_iterator Face_iterator; + + typedef typename Periodic_2_triangulation_2_internal::Domain_tester Tester; + + typedef Filter_iterator Base; + typedef Periodic_2_triangulation_unique_face_iterator_2 Self; + +public: + Periodic_2_triangulation_unique_face_iterator_2() : Base() {} + Periodic_2_triangulation_unique_face_iterator_2(const Base &b) : Base(b) {} + + Self & operator++() + { + Base::operator++(); + return *this; + } + Self & operator--() + { + Base::operator--(); + return *this; + } + Self operator++(int) + { + Self tmp(*this); + ++(*this); + return tmp; + } + Self operator--(int) + { + Self tmp(*this); + --(*this); + return tmp; + } + + operator Face_handle() const + { + return Base::base(); + } +}; + +} // namespace CGAL #endif // CGAL_PERIODIC_2_TRIANGULATION_ITERATORS_2_H diff --git a/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/include/interface_test.h b/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/include/interface_test.h index efbd3cf0be4..c69f2858ef9 100644 --- a/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/include/interface_test.h +++ b/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/include/interface_test.h @@ -208,6 +208,8 @@ void test_iterators() Vertex_handle vh2 = t.insert(Point(0.7, 0.7)); CGAL_USE(vh2); + std::cout << "Cover = " << t.number_of_sheets()[0] << " " << t.number_of_sheets()[1] << std::endl; + // vertices size_t size = 0; for (typename T::Vertex_iterator vit = t_const.vertices_begin(); @@ -217,19 +219,19 @@ void test_iterators() } assert(size == t_const.number_of_stored_vertices()); size = 0; + for (typename T::Vertex_iterator vit = t_const.all_vertices_begin(); + vit != t_const.all_vertices_end(); ++vit) + { + ++size; + } + assert(size == t_const.number_of_stored_vertices()); + size = 0; for (typename T::Unique_vertex_iterator uvit = t_const.unique_vertices_begin(); uvit != t_const.unique_vertices_end(); ++uvit) { ++size; } assert(size == t_const.number_of_vertices()); - size = 0; - for (typename T::Vertex_iterator vit = t_const.all_vertices_begin(); - vit != t_const.all_vertices_end(); ++vit) - { - ++size; - } - assert(size == t_const.number_of_stored_vertices()); // edges size = 0; @@ -246,6 +248,13 @@ void test_iterators() ++size; } assert(size == t_const.number_of_stored_edges()); + size = 0; + for (typename T::Unique_edge_iterator uvit = t_const.unique_edges_begin(); + uvit != t_const.unique_edges_end(); ++uvit) + { + ++size; + } + assert(size == t_const.number_of_edges()); // faces size = 0; @@ -262,6 +271,13 @@ void test_iterators() ++size; } assert(size == t_const.number_of_stored_faces()); + size = 0; + for (typename T::Unique_face_iterator uvit = t_const.unique_faces_begin(); + uvit != t_const.unique_faces_end(); ++uvit) + { + ++size; + } + assert(size == t_const.number_of_faces()); /// Geometric iterators for (typename T::Periodic_point_iterator ppit = t_const.periodic_points_begin(); 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 c851268390e..df3be1a4851 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 @@ -52,7 +52,7 @@ #ifndef CGAL_NO_ASSERTIONS # include // for float_prior #endif -#include +#include #include #include #include @@ -988,7 +988,7 @@ dump_dummy_points(const std::string filename) const for(; vit!=vend; ++vit) { Index index = c3t3_.index(vit); - const int* i = boost::get(&index); + const int* i = std::get_if(&index); if(i && *i == 0) dummy_out << cp(c3t3_.triangulation().point(vit)) << std::endl; } @@ -1002,7 +1002,7 @@ try_to_remove_dummy_vertex(const Vertex_handle dummy_vertex) const { // 'dummy_vertex' must correspond to a dummy point CGAL_precondition_code(Index index = c3t3_.index(dummy_vertex);) - CGAL_precondition_code(if(const int* i = boost::get(&index)) {) + CGAL_precondition_code(if(const int* i = std::get_if(&index)) {) CGAL_precondition(*i == 0); CGAL_precondition_code(}) @@ -1347,7 +1347,7 @@ try_to_solve_close_dummy_point(Vertex_handle& protection_vertex, { // dummy_vertex must be a dummy point CGAL_precondition_code(Index index = c3t3_.index(dummy_vertex);) - CGAL_precondition_code(if(const int* i = boost::get(&index)) {) + CGAL_precondition_code(if(const int* i = std::get_if(&index)) {) CGAL_precondition(*i == 0); CGAL_precondition_code(}) @@ -1615,7 +1615,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, Vertex_handle v = ch->vertex(li); Index existing_vertex_index = c3t3_.index(v); - const int* i = boost::get(&existing_vertex_index); + const int* i = std::get_if(&existing_vertex_index); if(i && *i == 0) { @@ -1684,14 +1684,14 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, << "at distance: " << sq_d << std::endl; Index nearest_vh_index = c3t3_.index(nearest_vh); - int* i = boost::get(&nearest_vh_index); + int* i = std::get_if(&nearest_vh_index); if(i && *i == 0) std::cerr << "Nearest power vertex is a dummy point" << std::endl; #endif // This will never happen for a dummy point - while(cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER && - ! is_special(nearest_vh)) + while(! is_special(nearest_vh) && + cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER) { CGAL_assertion(minimal_size_ > 0 || sq_d > 0); @@ -1752,7 +1752,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, #ifdef CGAL_PERIODIC_PROTECTION_ATTEMPT_TO_REMOVE_DUMMY_PTS Index v_index = c3t3_.index(v); - const int* id = boost::get(&v_index); + const int* id = std::get_if(&v_index); bool is_v_dummy_vertex(id && *id == 0); #endif @@ -1799,7 +1799,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, << c3t3_.triangulation().point(nearest_vertex) << ")\n"; Index nearest_vertex_index = c3t3_.index(nearest_vertex); - i = boost::get(&nearest_vertex_index); + i = std::get_if(&nearest_vertex_index); if(i && *i == 0) std::cerr << "reduced due to dummy" << std::endl; #endif @@ -2494,7 +2494,7 @@ change_ball_size(Vertex_handle& v, const FT squared_size, const bool special_bal const Bare_point p = cp(c3t3_.triangulation().point(v)); // intentional copy // Remove v from the set of corners - boost::optional corner_index = boost::make_optional(false, Corner_index()); + std::optional corner_index; if(c3t3_.is_in_complex(v)) { corner_index = c3t3_.corner_index(v); diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h index c6399eeaa0f..c1001de10c5 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h @@ -169,6 +169,13 @@ public: typedef Facet_iterator All_facets_iterator; typedef Edge_iterator All_edges_iterator; typedef Vertex_iterator All_vertices_iterator; + + typedef Periodic_3_triangulation_unique_cell_iterator_3 + Unique_cell_iterator; + typedef Periodic_3_triangulation_unique_facet_iterator_3 + Unique_facet_iterator; + typedef Periodic_3_triangulation_unique_edge_iterator_3 + Unique_edge_iterator; typedef Periodic_3_triangulation_unique_vertex_iterator_3 Unique_vertex_iterator; @@ -397,26 +404,14 @@ public: } const Covering_sheets& number_of_sheets() const { return _cover; } - const std::pair original_vertex(const Vertex_handle v) const - { - return (virtual_vertices.find(v) == virtual_vertices.end()) ? - std::make_pair(v,Offset()) : virtual_vertices.find(v)->second; - } - const std::vector& periodic_copies(const Vertex_handle v) const - { - CGAL_precondition(number_of_sheets() != CGAL::make_array(1,1,1)); - CGAL_precondition(virtual_vertices.find(v) == virtual_vertices.end()); - CGAL_assertion( - virtual_vertices_reverse.find(v) != virtual_vertices_reverse.end()); - return virtual_vertices_reverse.find(v)->second; - } bool is_triangulation_in_1_sheet() const; - void convert_to_1_sheeted_covering(); + virtual void update_cover_data_after_converting_to_27_sheeted_covering() { } void convert_to_27_sheeted_covering(); +public: size_type number_of_cells() const { if(is_1_cover()) return _tds.number_of_cells(); else return _tds.number_of_cells()/27; @@ -460,14 +455,6 @@ public: _cover = cover; } -public: - bool is_virtual(Vertex_handle v) - { - if(is_1_cover()) - return false; - return (virtual_vertices.find(v) != virtual_vertices.end()); - } - public: // Offset converters int off_to_int(const Offset& off) const @@ -549,6 +536,232 @@ public: c->set_offsets(o0i,o1i,o2i,o3i); } +public: + // undocumented access functions + Offset get_offset(Cell_handle ch, int i) const + { + if(is_1_cover()) + return int_to_off(ch->offset(i)); + + Virtual_vertex_map_it it = virtual_vertices.find(ch->vertex(i)); + if(it != virtual_vertices.end()) + return combine_offsets(it->second.second, int_to_off(ch->offset(i))); + else + return combine_offsets(Offset(), int_to_off(ch->offset(i))); + } + + Offset get_offset(Vertex_handle vh) const + { + if(is_1_cover()) + return Offset(); + + Virtual_vertex_map_it it = virtual_vertices.find(vh); + if(it != virtual_vertices.end()) + return it->second.second; + else + return Offset(); + } + + // Get the canonicalized offsets of a cell. + void get_offsets(Cell_handle ch, + Offset& off0, Offset& off1, Offset& off2, Offset& off3) const + { + Offset cell_off0 = int_to_off(ch->offset(0)); + Offset cell_off1 = int_to_off(ch->offset(1)); + Offset cell_off2 = int_to_off(ch->offset(2)); + Offset cell_off3 = int_to_off(ch->offset(3)); + Offset diff_off((cell_off0.x() == 1 && cell_off1.x() == 1 && + cell_off2.x() == 1 && cell_off3.x() == 1) ? -1 : 0, + (cell_off0.y() == 1 && cell_off1.y() == 1 && + cell_off2.y() == 1 && cell_off3.y() == 1) ? -1 : 0, + (cell_off0.z() == 1 && cell_off1.z() == 1 && + cell_off2.z() == 1 && cell_off3.z() == 1) ? -1 : 0); + off0 = combine_offsets(get_offset(ch,0), diff_off); + off1 = combine_offsets(get_offset(ch,1), diff_off); + off2 = combine_offsets(get_offset(ch,2), diff_off); + off3 = combine_offsets(get_offset(ch,3), diff_off); + } + + // Gets the canonicalized offsets of a face. + void get_offsets(const Facet& f, + Offset& off0, Offset& off1, Offset& off2) const + { + Offset cell_off0 = int_to_off(f.first->offset((f.second+1)&3)); + Offset cell_off1 = int_to_off(f.first->offset((f.second+2)&3)); + Offset cell_off2 = int_to_off(f.first->offset((f.second+3)&3)); + Offset diff_off((cell_off0.x() == 1 && cell_off1.x() == 1 && cell_off2.x() == 1) ? -1 : 0, + (cell_off0.y() == 1 && cell_off1.y() == 1 && cell_off2.y() == 1) ? -1 : 0, + (cell_off0.z() == 1 && cell_off1.z() == 1 && cell_off2.z() == 1) ? -1 : 0); + off0 = combine_offsets(get_offset(f.first, (f.second+1)&3), diff_off); + off1 = combine_offsets(get_offset(f.first, (f.second+2)&3), diff_off); + off2 = combine_offsets(get_offset(f.first, (f.second+3)&3), diff_off); + } + + // Gets the canonicalized offsets of an edge. + void get_offsets(const Edge& e, + Offset& off0, Offset& off1) const + { + Offset cell_off0 = int_to_off(e.first->offset(e.second)); + Offset cell_off1 = int_to_off(e.first->offset(e.third)); + Offset diff_off((cell_off0.x()==1 && cell_off1.x()==1) ? -1 : 0, + (cell_off0.y()==1 && cell_off1.y()==1) ? -1 : 0, + (cell_off0.z()==1 && cell_off1.z()==1) ? -1 : 0); + off0 = combine_offsets(get_offset(e.first, e.second), diff_off); + off1 = combine_offsets(get_offset(e.first, e.third), diff_off); + } + +public: + Offset combine_offsets(const Offset& o_c, const Offset& o_t) const + { + Offset o_ct(_cover[0]*o_t.x(), _cover[1]*o_t.y(), _cover[2]*o_t.z()); + return o_c + o_ct; + } + +public: + Offset neighbor_offset(Cell_handle ch, int i, Cell_handle nb) const; + + Offset neighbor_offset(Cell_handle ch, int i) const + { + return neighbor_offset(ch, i, ch->neighbor(i)); + } + +public: + /// Tests whether a vertex is a periodic copy of a vertex in the 3-cover. + bool is_virtual(Vertex_handle vh) const + { + if(is_1_cover()) + return false; + return (virtual_vertices.find(vh) != virtual_vertices.end()); + } + + /// Returns the non-virtual (i.e. canonical) copy of the vertex. + Vertex_handle get_original_vertex(Vertex_handle vh) const + { + if(is_1_cover()) + return vh; + + Virtual_vertex_map_it it = virtual_vertices.find(vh); + if(it != virtual_vertices.end()) + return it->second.first; + else + return vh; + } + + const std::pair original_vertex(const Vertex_handle v) const + { + return (virtual_vertices.find(v) == virtual_vertices.end()) ? + std::make_pair(v,Offset()) : virtual_vertices.find(v)->second; + } + + const std::vector& periodic_copies(const Vertex_handle v) const + { + CGAL_precondition(number_of_sheets() != CGAL::make_array(1,1,1)); + CGAL_precondition(virtual_vertices.find(v) == virtual_vertices.end()); + CGAL_assertion( + virtual_vertices_reverse.find(v) != virtual_vertices_reverse.end()); + return virtual_vertices_reverse.find(v)->second; + } + +public: + bool is_canonical(Cell_handle ch) const + { + if(is_1_cover()) + return true; + + Offset off0, off1, off2, off3; + get_offsets(ch, off0, off1, off2, off3); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical triangle. + if (off0.x() > 1) return false; + if (off0.y() > 1) return false; + if (off0.z() > 1) return false; + if (off1.x() > 1) return false; + if (off1.y() > 1) return false; + if (off1.z() > 1) return false; + if (off2.x() > 1) return false; + if (off2.y() > 1) return false; + if (off2.z() > 1) return false; + if (off3.x() > 1) return false; + if (off3.y() > 1) return false; + if (off3.z() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x() & off2.x() & off3.x(); + int offy = off0.y() & off1.y() & off2.y() & off3.y(); + int offz = off0.z() & off1.z() & off2.z() & off3.z(); + + return (offx == 0 && offy == 0 && offz == 0); + } + + bool is_canonical(const Edge& e) const + { + if(is_1_cover()) + return true; + + Offset off0, off1; + get_offsets(e, off0, off1); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical edge. + if (off0.x() > 1) return false; + if (off0.y() > 1) return false; + if (off0.z() > 1) return false; + if (off1.x() > 1) return false; + if (off1.y() > 1) return false; + if (off1.z() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x(); + int offy = off0.y() & off1.y(); + int offz = off0.z() & off1.z(); + + return (offx == 0 && offy == 0 && offz == 0); + } + + bool is_canonical(const Facet& f) const + { + if(is_1_cover()) + return true; + + Offset off0, off1, off2; + get_offsets(f, off0, off1, off2); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical triangle. + if(off0.x() > 1) return false; + if(off0.y() > 1) return false; + if(off0.z() > 1) return false; + if(off1.x() > 1) return false; + if(off1.y() > 1) return false; + if(off1.z() > 1) return false; + if(off2.x() > 1) return false; + if(off2.y() > 1) return false; + if(off2.z() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the facet is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x() & off2.x(); + int offy = off0.y() & off1.y() & off2.y(); + int offz = off0.z() & off1.z() & off2.z(); + + return (offx == 0 && offy == 0 && offz == 0); + } + + /// Tests whether a vertex belongs to the original (canonical) domain. + bool is_canonical(Vertex_handle vh) const + { + return !is_virtual(vh); + } + public: /** @name Wrapping the traits */ // Note that calling functors with "construct_point(p), offset" and not @@ -988,6 +1201,14 @@ public: // end of geometric functions public: + // These functions give the pair (vertex, offset) that corresponds to the + // i-th vertex of cell ch or vertex vh, respectively. + void get_vertex(Cell_handle ch, int i, Vertex_handle& vh, Offset& off) const; + void get_vertex(Vertex_handle vh_i, Vertex_handle& vh, Offset& off) const; + + // Auxiliary functions + Cell_handle get_cell(const Vertex_handle* vh) const; + /** @name Queries */ bool is_vertex(const Point& p, Vertex_handle& v) const; @@ -1305,6 +1526,14 @@ public: std::vector insert_generic_dummy_points(); protected: + template + Offset get_location_offset(const Conflict_tester& tester, + Cell_handle c) const; + + template + Offset get_location_offset(const Conflict_tester& tester, + Cell_handle c, bool& found) const; + // this is needed for compatibility reasons template @@ -1474,6 +1703,8 @@ public: return _tds.facets_end(); } + // Finite iterators (= all iterators, for periodic triangulations) + Cell_iterator finite_cells_begin() const { return _tds.cells_begin(); } @@ -1502,6 +1733,8 @@ public: return _tds.facets_end(); } + // All iterators (= finite, for periodic triangulations) + All_cells_iterator all_cells_begin() const { return _tds.cells_begin(); } @@ -1530,6 +1763,16 @@ public: return _tds.facets_end(); } + // Unique iterators + + Unique_cell_iterator unique_cells_begin() const { + return CGAL::filter_iterator(cells_end(), Domain_tester(this), + cells_begin()); + } + Unique_cell_iterator unique_cells_end() const { + return CGAL::filter_iterator(cells_end(), Domain_tester(this)); + } + Unique_vertex_iterator unique_vertices_begin() const { return CGAL::filter_iterator(vertices_end(), Domain_tester(this), vertices_begin()); @@ -1538,6 +1781,22 @@ public: return CGAL::filter_iterator(vertices_end(), Domain_tester(this)); } + Unique_edge_iterator unique_edges_begin() const { + return CGAL::filter_iterator(edges_end(), Domain_tester(this), + edges_begin()); + } + Unique_edge_iterator unique_edges_end() const { + return CGAL::filter_iterator(edges_end(), Domain_tester(this)); + } + + Unique_facet_iterator unique_facets_begin() const { + return CGAL::filter_iterator(facets_end(), Domain_tester(this), + facets_begin()); + } + Unique_facet_iterator unique_facets_end() const { + return CGAL::filter_iterator(facets_end(), Domain_tester(this)); + } + // Geometric iterators Periodic_tetrahedron_iterator periodic_tetrahedra_begin( Iterator_type it = STORED) const { @@ -1576,6 +1835,7 @@ public: } // Circulators + Cell_circulator incident_cells(const Edge& e) const { return _tds.incident_cells(e); } @@ -1695,75 +1955,6 @@ public: } }; -public: - // undocumented access functions - Offset get_offset(Cell_handle ch, int i) const - { - if(is_1_cover()) - return int_to_off(ch->offset(i)); - - Virtual_vertex_map_it it = virtual_vertices.find(ch->vertex(i)); - if(it != virtual_vertices.end()) - return combine_offsets(it->second.second, int_to_off(ch->offset(i))); - else - return combine_offsets(Offset(), int_to_off(ch->offset(i))); - } - - Offset get_offset(Vertex_handle vh) const - { - if(is_1_cover()) - return Offset(); - - Virtual_vertex_map_it it = virtual_vertices.find(vh); - if(it != virtual_vertices.end()) - return it->second.second; - else - return Offset(); - } - - Vertex_handle get_original_vertex(Vertex_handle vh) const - { - if(is_1_cover()) - return vh; - - Virtual_vertex_map_it it = virtual_vertices.find(vh); - if(it != virtual_vertices.end()) - return it->second.first; - else - return vh; - } - - Offset combine_offsets(const Offset& o_c, const Offset& o_t) const - { - Offset o_ct(_cover[0]*o_t.x(), _cover[1]*o_t.y(), _cover[2]*o_t.z()); - return o_c + o_ct; - } - - // These functions give the pair (vertex, offset) that corresponds to the - // i-th vertex of cell ch or vertex vh, respectively. - void get_vertex(Cell_handle ch, int i, Vertex_handle& vh, Offset& off) const; - void get_vertex(Vertex_handle vh_i, Vertex_handle& vh, Offset& off) const; - -protected: - // Auxiliary functions - Cell_handle get_cell(const Vertex_handle* vh) const; - - template - Offset get_location_offset(const Conflict_tester& tester, - Cell_handle c) const; - - template - Offset get_location_offset(const Conflict_tester& tester, - Cell_handle c, bool& found) const; - - Offset neighbor_offset(Cell_handle ch, int i, Cell_handle nb) const; - -public: - Offset neighbor_offset(Cell_handle ch, int i) const - { - return neighbor_offset(ch, i, ch->neighbor(i)); - } - protected: /** @name Friends */ friend std::istream& operator>> <> @@ -1788,51 +1979,6 @@ protected: return construct_periodic_point(p); } -public: - bool is_canonical(const Facet& f) const - { - if(number_of_sheets() == CGAL::make_array(1,1,1)) - return true; - - Offset cell_off0 = int_to_off(f.first->offset((f.second+1)&3)); - Offset cell_off1 = int_to_off(f.first->offset((f.second+2)&3)); - Offset cell_off2 = int_to_off(f.first->offset((f.second+3)&3)); - Offset diff_off((cell_off0.x() == 1 - && cell_off1.x() == 1 - && cell_off2.x() == 1) ? -1 : 0, - (cell_off0.y() == 1 - && cell_off1.y() == 1 - && cell_off2.y() == 1) ? -1 : 0, - (cell_off0.z() == 1 - && cell_off1.z() == 1 - && cell_off2.z() == 1) ? -1 : 0); - Offset off0 = combine_offsets(get_offset(f.first, (f.second+1)&3), diff_off); - Offset off1 = combine_offsets(get_offset(f.first, (f.second+2)&3), diff_off); - Offset off2 = combine_offsets(get_offset(f.first, (f.second+3)&3), diff_off); - - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if(off0.x() > 1) return false; - if(off0.y() > 1) return false; - if(off0.z() > 1) return false; - if(off1.x() > 1) return false; - if(off1.y() > 1) return false; - if(off1.z() > 1) return false; - if(off2.x() > 1) return false; - if(off2.y() > 1) return false; - if(off2.z() > 1) return false; - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x() & off2.x(); - int offy = off0.y() & off1.y() & off2.y(); - int offz = off0.z() & off1.z() & off2.z(); - - return (offx == 0 && offy == 0 && offz == 0); - } - protected: template bool canonical_dual_segment(Cell_handle c, int i, Periodic_segment_3& ps, @@ -3310,7 +3456,7 @@ periodic_remove(Vertex_handle v, nr_vec.push_back(boost::make_tuple(o_ch,o_i,new_ch)); nr_vec.push_back(boost::make_tuple(new_ch,i_i,o_ch)); - // for the other faces check, if they can also be glued + // for the other facets check, if they can also be glued for(unsigned int i = 0; i < 4; i++) { if(i != i_i) { Facet f = std::pair(new_ch,i); @@ -3322,7 +3468,7 @@ periodic_remove(Vertex_handle v, std::swap(vt.second,vt.third); outer_map[vt]= f; } else { - // glue the faces + // glue the facets typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; Cell_handle o_ch2 = o_vt_f_pair2.second.first; int o_i2 = o_vt_f_pair2.second.second; diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h index 947b8b553e5..67cacfe1084 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h @@ -63,7 +63,7 @@ public: Iterator_type it = T::STORED) : _t(t), pos(_t->cells_begin()), _it(it), _off(0) { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->cells_end() && !is_canonical() ) + while (pos != _t->cells_end() && !_t->is_canonical(pos) ) ++pos; } } @@ -79,7 +79,7 @@ public: ++pos; break; case T::UNIQUE: - do { ++pos; } while (pos != _t->cells_end() && !is_canonical()); + do { ++pos; } while (pos != _t->cells_end() && !_t->is_canonical(pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -97,7 +97,7 @@ public: --pos; break; case T::UNIQUE: - do { --pos; } while (pos != _t->cells_begin() && !is_canonical()); + do { --pos; } while (pos != _t->cells_begin() && !_t->is_canonical(pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -156,42 +156,6 @@ private: mutable Periodic_tetrahedron periodic_tetrahedron; // current tetrahedron. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() { - // fetch all offsets - Offset off0, off1, off2, off3; - get_edge_offsets(off0, off1, off2, off3); - - if (_t->number_of_sheets() != make_array(1,1,1)) { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off0.z() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - if (off1.z() > 1) return false; - if (off2.x() > 1) return false; - if (off2.y() > 1) return false; - if (off2.z() > 1) return false; - if (off3.x() > 1) return false; - if (off3.y() > 1) return false; - if (off3.z() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x() & off2.x() & off3.x(); - int offy = off0.y() & off1.y() & off2.y() & off3.y(); - int offz = off0.z() & off1.z() & off2.z() & off3.z(); - - return (offx == 0 && offy == 0 && offz == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() { @@ -200,7 +164,7 @@ private: if (_off == off) { _off = 0; do { ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->cells_end() && !is_canonical()); + && pos != _t->cells_end() && !_t->is_canonical(pos)); } else { do { ++_off; @@ -214,7 +178,7 @@ private: void decrement_domain() { if (_off == 0) { if (pos == _t->cells_begin()) return; - do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(pos)); _off = get_drawing_offsets(); } else { int off = get_drawing_offsets(); @@ -225,32 +189,6 @@ private: } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1, - Offset &off2, Offset &off3) const { - Offset cell_off0 = _t->int_to_off(pos->offset(0)); - Offset cell_off1 = _t->int_to_off(pos->offset(1)); - Offset cell_off2 = _t->int_to_off(pos->offset(2)); - Offset cell_off3 = _t->int_to_off(pos->offset(3)); - Offset diff_off((cell_off0.x() == 1 - && cell_off1.x() == 1 - && cell_off2.x() == 1 - && cell_off3.x() == 1)?-1:0, - (cell_off0.y() == 1 - && cell_off1.y() == 1 - && cell_off2.y() == 1 - && cell_off3.y() == 1)?-1:0, - (cell_off0.z() == 1 - && cell_off1.z() == 1 - && cell_off2.z() == 1 - && cell_off3.z() == 1)?-1:0); - off0 = _t->combine_offsets(_t->get_offset(pos,0), diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos,1), diff_off); - off2 = _t->combine_offsets(_t->get_offset(pos,2), diff_off); - off3 = _t->combine_offsets(_t->get_offset(pos,3), diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() { @@ -262,7 +200,7 @@ private: // internally stored inside the cell telling us that this cell // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0,off1,off2,off3); + _t->get_offsets(pos, off0, off1, off2, off3); else { CGAL_assertion(_it == T::STORED_COVER_DOMAIN); off0 = _t->int_to_off(pos->offset(0)); @@ -303,7 +241,7 @@ private: Periodic_tetrahedron construct_periodic_tetrahedron() const { CGAL_assertion(pos != typename T::Cell_handle()); Offset off0, off1, off2, off3; - get_edge_offsets(off0, off1, off2, off3); + _t->get_offsets(pos, off0, off1, off2, off3); Offset transl_off = Offset((((_off>>2)&1)==1 ? -1:0), (((_off>>1)&1)==1 ? -1:0), (( _off &1)==1 ? -1:0)); @@ -369,7 +307,7 @@ public: Iterator_type it = T::STORED) : _t(t), pos(_t->facets_begin()), _it(it), _off(0) { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->facets_end() && !is_canonical() ) + while (pos != _t->facets_end() && !_t->is_canonical(*pos) ) ++pos; } } @@ -385,7 +323,7 @@ public: ++pos; break; case T::UNIQUE: - do { ++pos; } while (pos != _t->facets_end() && !is_canonical()); + do { ++pos; } while (pos != _t->facets_end() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -403,7 +341,7 @@ public: --pos; break; case T::UNIQUE: - do { --pos; } while (pos != _t->facets_begin() && !is_canonical()); + do { --pos; } while (pos != _t->facets_begin() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -462,39 +400,6 @@ private: mutable Periodic_triangle periodic_triangle; // current segment. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() { - // fetch all offsets - Offset off0, off1, off2; - get_edge_offsets(off0, off1, off2); - - if (_t->number_of_sheets() != make_array(1,1,1)) { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off0.z() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - if (off1.z() > 1) return false; - if (off2.x() > 1) return false; - if (off2.y() > 1) return false; - if (off2.z() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x() & off2.x(); - int offy = off0.y() & off1.y() & off2.y(); - int offz = off0.z() & off1.z() & off2.z(); - - return (offx == 0 && offy == 0 && offz == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() { @@ -503,7 +408,7 @@ private: if (_off == off) { _off = 0; do { ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->facets_end() && !is_canonical()); + && pos != _t->facets_end() && !_t->is_canonical(*pos)); } else { do { ++_off; @@ -517,7 +422,7 @@ private: void decrement_domain() { if (_off == 0) { if (pos == _t->facets_begin()) return; - do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(*pos)); _off = get_drawing_offsets(); } else { int off = get_drawing_offsets(); @@ -528,32 +433,6 @@ private: } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1, Offset &off2) const { - Offset cell_off0 = _t->int_to_off(pos->first->offset((pos->second+1)&3)); - Offset cell_off1 = _t->int_to_off(pos->first->offset((pos->second+2)&3)); - Offset cell_off2 = _t->int_to_off(pos->first->offset((pos->second+3)&3)); - Offset diff_off((cell_off0.x() == 1 - && cell_off1.x() == 1 - && cell_off2.x() == 1)?-1:0, - (cell_off0.y() == 1 - && cell_off1.y() == 1 - && cell_off2.y() == 1)?-1:0, - (cell_off0.z() == 1 - && cell_off1.z() == 1 - && cell_off2.z() == 1)?-1:0); - off0 = _t->combine_offsets(_t->get_offset(pos->first, - (pos->second+1)&3), - diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos->first, - (pos->second+2)&3), - diff_off); - off2 = _t->combine_offsets(_t->get_offset(pos->first, - (pos->second+3)&3), - diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() { @@ -565,7 +444,7 @@ private: // internally stored inside the cell telling us that this cell // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0,off1,off2); + _t->get_offsets(*pos, off0, off1, off2); else { CGAL_assertion(_it == T::STORED_COVER_DOMAIN); off0 = _t->int_to_off(pos->first->offset((pos->second+1)&3)); @@ -596,7 +475,7 @@ private: Periodic_triangle construct_periodic_triangle() const { CGAL_assertion(pos->first != typename T::Cell_handle()); Offset off0, off1, off2; - get_edge_offsets(off0, off1, off2); + _t->get_offsets(*pos, off0, off1, off2); Offset transl_off = Offset((((_off>>2)&1)==1 ? -1:0), (((_off>>1)&1)==1 ? -1:0), (( _off &1)==1 ? -1:0)); @@ -659,7 +538,7 @@ public: Iterator_type it = T::STORED) : _t(t), pos(_t->edges_begin()), _it(it), _off(0) { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->edges_end() && !is_canonical() ) + while (pos != _t->edges_end() && !_t->is_canonical(*pos) ) ++pos; } } @@ -675,7 +554,7 @@ public: ++pos; break; case T::UNIQUE: - do { ++pos; } while (pos != _t->edges_end() && !is_canonical()); + do { ++pos; } while (pos != _t->edges_end() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -693,7 +572,7 @@ public: --pos; break; case T::UNIQUE: - do { --pos; } while (pos != _t->edges_begin() && !is_canonical()); + do { --pos; } while (pos != _t->edges_begin() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -751,36 +630,6 @@ private: mutable Periodic_segment periodic_segment; // current segment. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() { - // fetch all offsets - Offset off0, off1; - get_edge_offsets(off0, off1); - - if (_t->number_of_sheets() != make_array(1,1,1)) { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off0.z() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - if (off1.z() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x(); - int offy = off0.y() & off1.y(); - int offz = off0.z() & off1.z(); - - return (offx == 0 && offy == 0 && offz == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() { @@ -789,7 +638,7 @@ private: if (_off == off) { _off = 0; do { ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->edges_end() && !is_canonical()); + && pos != _t->edges_end() && !_t->is_canonical(*pos)); } else { do { ++_off; @@ -803,7 +652,7 @@ private: void decrement_domain() { if (_off == 0) { if (pos == _t->edges_begin()) return; - do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(*pos)); _off = get_drawing_offsets(); } else { int off = get_drawing_offsets(); @@ -814,20 +663,6 @@ private: } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1) const { - Offset cell_off0 = _t->int_to_off(pos->first->offset(pos->second)); - Offset cell_off1 = _t->int_to_off(pos->first->offset(pos->third)); - Offset diff_off((cell_off0.x()==1 && cell_off1.x()==1)?-1:0, - (cell_off0.y()==1 && cell_off1.y()==1)?-1:0, - (cell_off0.z()==1 && cell_off1.z()==1)?-1:0); - off0 = _t->combine_offsets(_t->get_offset(pos->first,pos->second), - diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos->first,pos->third), - diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() { @@ -839,7 +674,7 @@ private: // internally stored inside the cell telling us that this cell // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0,off1); + _t->get_offsets(*pos, off0, off1); else { CGAL_assertion(_it == T::STORED_COVER_DOMAIN); off0 = _t->int_to_off(pos->first->offset(pos->second)); @@ -859,7 +694,7 @@ private: Periodic_segment construct_periodic_segment() const { CGAL_assertion(pos->first != typename T::Cell_handle()); Offset off0, off1; - get_edge_offsets(off0, off1); + _t->get_offsets(*pos, off0, off1); Offset transl_off = Offset((((_off>>2)&1)==1 ? -1:0), (((_off>>1)&1)==1 ? -1:0), (( _off &1)==1 ? -1:0)); @@ -918,7 +753,7 @@ public: Iterator_type it = T::STORED) : _t(t), pos(_t->vertices_begin()), _it(it) { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->vertices_end() && !is_canonical() ) + while (pos != _t->vertices_end() && !_t->is_canonical(pos) ) ++pos; } } @@ -936,7 +771,7 @@ public: break; case T::UNIQUE: case T::UNIQUE_COVER_DOMAIN: - do { ++pos; } while (pos != _t->vertices_end() && !is_canonical()); + do { ++pos; } while (pos != _t->vertices_end() && !_t->is_canonical(pos)); break; default: CGAL_assertion(false); @@ -952,7 +787,7 @@ public: break; case T::UNIQUE: case T::UNIQUE_COVER_DOMAIN: - do { --pos; } while (pos != _t->vertices_begin() && !is_canonical()); + do { --pos; } while (pos != _t->vertices_begin() && !_t->is_canonical(pos)); break; default: CGAL_assertion(false); @@ -1009,13 +844,6 @@ private: mutable Periodic_point periodic_point; // current point. private: - // check whether pos points onto a vertex inside the original - // domain. If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() { - return (_t->get_offset(pos) == Offset(0,0,0)); - } - Periodic_point construct_periodic_point() const { CGAL_assertion(pos != typename T::Vertex_handle()); Offset off = _t->get_offset(pos); @@ -1031,9 +859,54 @@ public: Domain_tester() {} Domain_tester(const T *tr) : t(tr) {} - bool operator()(const typename T::Vertex_iterator & v) const { - return (t->get_offset(v) != typename T::Offset(0,0,0)); + bool operator()(const typename T::Cell_iterator c) const + { + return !t->is_canonical(c); } + + bool operator()(const typename T::Facet_iterator f) const + { + return !t->is_canonical(*f); + } + + bool operator()(const typename T::Edge_iterator e) const + { + return !t->is_canonical(*e); + } + + bool operator()(const typename T::Vertex_iterator v) const + { + return !t->is_canonical(v); + } + +}; + +// Iterates over the canonical cells in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Cell_iterator and this iterator +template +class Periodic_3_triangulation_unique_cell_iterator_3 + : public Filter_iterator > +{ + typedef typename T::Cell_handle Cell_handle; + typedef typename T::Cell_iterator Cell_iterator; + + typedef Filter_iterator > Base; + typedef Periodic_3_triangulation_unique_cell_iterator_3 Self; + +public: + Periodic_3_triangulation_unique_cell_iterator_3() : Base() {} + Periodic_3_triangulation_unique_cell_iterator_3(const Base &b) : Base(b) {} + + Self & operator++() { Base::operator++(); return *this; } + Self & operator--() { Base::operator--(); return *this; } + Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } + Self operator--(int) { Self tmp(*this); --(*this); return tmp; } + + operator Cell_handle() const { return Base::base(); } }; // Iterates over the vertices in a periodic triangulation that are @@ -1045,15 +918,15 @@ public: // between a normal Vertex_iterator and this iterator template class Periodic_3_triangulation_unique_vertex_iterator_3 - : public Filter_iterator > { - + : public Filter_iterator > +{ typedef typename T::Vertex_handle Vertex_handle; typedef typename T::Vertex_iterator Vertex_iterator; typedef Filter_iterator > Base; typedef Periodic_3_triangulation_unique_vertex_iterator_3 Self; -public: +public: Periodic_3_triangulation_unique_vertex_iterator_3() : Base() {} Periodic_3_triangulation_unique_vertex_iterator_3(const Base &b) : Base(b) {} @@ -1065,6 +938,62 @@ public: operator Vertex_handle() const { return Base::base(); } }; -} //namespace CGAL +// Iterates over the canonical edges in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Edge_iterator and this iterator +template +class Periodic_3_triangulation_unique_edge_iterator_3 + : public Filter_iterator > +{ + typedef typename T::Edge Edge; + typedef typename T::Edge_iterator Edge_iterator; + + typedef Filter_iterator > Base; + typedef Periodic_3_triangulation_unique_edge_iterator_3 Self; + +public: + Periodic_3_triangulation_unique_edge_iterator_3() : Base() {} + Periodic_3_triangulation_unique_edge_iterator_3(const Base &b) : Base(b) {} + + Self & operator++() { Base::operator++(); return *this; } + Self & operator--() { Base::operator--(); return *this; } + Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } + Self operator--(int) { Self tmp(*this); --(*this); return tmp; } + + operator Edge() const { return Base::base(); } +}; + +// Iterates over the canonical facets in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Facet_iterator and this iterator +template +class Periodic_3_triangulation_unique_facet_iterator_3 + : public Filter_iterator > +{ + typedef typename T::Facet Facet; + typedef typename T::Facet_iterator Facet_iterator; + + typedef Filter_iterator > Base; + typedef Periodic_3_triangulation_unique_facet_iterator_3 Self; +public: + + Periodic_3_triangulation_unique_facet_iterator_3() : Base() {} + Periodic_3_triangulation_unique_facet_iterator_3(const Base &b) : Base(b) {} + + Self & operator++() { Base::operator++(); return *this; } + Self & operator--() { Base::operator--(); return *this; } + Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } + Self operator--(int) { Self tmp(*this); --(*this); return tmp; } + + operator Facet() const { return Base::base(); } +}; + +} // namespace CGAL #endif // CGAL_PERIODIC_3_TRIANGULATION_ITERATORS_3_H diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_iterator.h b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_iterator.h index a77afb5fbc0..49bdfff51cd 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_iterator.h +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_iterator.h @@ -86,32 +86,158 @@ _test_unique_vertex_iterator( const Triangulation &T ) size_type n = 0; for (Unique_vertex_iterator ovit = T.unique_vertices_begin(); - ovit != T.unique_vertices_end(); ++ovit) - { - Vertex_handle vh = ovit; // Test the conversion. - n++; - const Vertex & v = *ovit; // Test operator*; - Cell_handle c = ovit->cell(); // Test operator->; - (void) vh; - (void) v; - (void) c; - } + ovit != T.unique_vertices_end(); ++ovit) + { + Vertex_handle vh = ovit; // Test the conversion. + ++n; + const Vertex & v = *ovit; // Test operator*; + Cell_handle c = ovit->cell(); // Test operator->; + (void) vh; + (void) v; + (void) c; + } assert( n == T.number_of_vertices() ); // Test Backward-ness of the iterators. - n=0; + n = 0; for (Unique_vertex_iterator ovit = T.unique_vertices_end(); - ovit != T.unique_vertices_begin(); --ovit) - { - Vertex_handle vh = ovit; // Test the conversion. - (void) vh; - n++; - } + ovit != T.unique_vertices_begin(); --ovit) + { + Vertex_handle vh = ovit; // Test the conversion. + (void) vh; + ++n; + } assert( n == T.number_of_vertices() ); return n; } + +template < class Triangulation > +typename Triangulation::size_type +_test_unique_edge_iterator( const Triangulation &T ) +{ + typedef typename Triangulation::size_type size_type; + typedef typename Triangulation::Edge Edge; + typedef typename Triangulation::Cell_handle Cell_handle; + typedef typename Triangulation::Unique_edge_iterator + Unique_edge_iterator; + + size_type n = 0; + + for (Unique_edge_iterator oeit = T.unique_edges_begin(); + oeit != T.unique_edges_end(); ++oeit) + { + ++n; + const Edge& e = *oeit; // Test operator*; + Cell_handle c = oeit->first; // Test operator->; + assert(c != Cell_handle()); + (void) e; + (void) c; + } + assert( n == T.number_of_edges() ); + + // Test Backward-ness of the iterators. + n = 0; + for (Unique_edge_iterator oeit = T.unique_edges_end(); + oeit != T.unique_edges_begin(); --oeit) + { + ++n; + } + assert( n == T.number_of_edges() ); + + return n; +} + +template < class Triangulation > +typename Triangulation::size_type +_test_unique_facet_iterator( const Triangulation &T ) +{ + typedef typename Triangulation::size_type size_type; + typedef typename Triangulation::Facet Facet; + typedef typename Triangulation::Cell_handle Cell_handle; + typedef typename Triangulation::Unique_facet_iterator + Unique_facet_iterator; + + size_type n = 0; + + for (Unique_facet_iterator ofit = T.unique_facets_begin(); + ofit != T.unique_facets_end(); ++ofit) + { + ++n; + const Facet& f = *ofit; // Test operator*; + Cell_handle c = ofit->first; // Test operator->; + assert(c != Cell_handle()); + (void) f; + (void) c; + } + assert( n == T.number_of_facets() ); + + // Test Backward-ness of the iterators. + n = 0; + for (Unique_facet_iterator ofit = T.unique_facets_end(); + ofit != T.unique_facets_begin(); --ofit) + { + ++n; + } + assert( n == T.number_of_facets() ); + + return n; +} + +template < class Triangulation > +typename Triangulation::size_type +_test_unique_cell_iterator( const Triangulation &T ) +{ + typedef typename Triangulation::size_type size_type; + typedef typename Triangulation::Cell Cell; + typedef typename Triangulation::Vertex_handle Vertex_handle; + typedef typename Triangulation::Cell_handle Cell_handle; + typedef typename Triangulation::Unique_cell_iterator + Unique_cell_iterator; + + size_type n = 0; + + for (Unique_cell_iterator ocit = T.unique_cells_begin(); + ocit != T.unique_cells_end(); ++ocit) + { + Cell_handle ch = ocit; // Test the conversion. + n++; + const Cell& c = *ocit; // Test operator*; + Vertex_handle vh = ocit->vertex(0); // Test operator->; + (void) ch; + (void) c; + (void) vh; + } + assert( n == T.number_of_cells() ); + + // Test Backward-ness of the iterators. + n=0; + for (Unique_cell_iterator ocit = T.unique_cells_end(); + ocit != T.unique_cells_begin(); --ocit) + { + Cell_handle ch = ocit; // Test the conversion. + (void) ch; + ++n; + } + assert( n == T.number_of_cells() ); + + return n; +} + +template < class Triangulation > +typename Triangulation::size_type +_test_triangulation_unique_iterator( const Triangulation &T ) +{ + typedef typename Triangulation::size_type size_type; + const size_type nc = _test_unique_cell_iterator(T); + const size_type nf = _test_unique_facet_iterator(T); + const size_type ne = _test_unique_edge_iterator(T); + const size_type nv = _test_unique_vertex_iterator(T); + assert((nv-ne+nf-nc) == 0); + return nv-ne+nf-nc; +} + template < class Triangulation > typename Triangulation::size_type _test_triangulation_iterator( const Triangulation &T ) diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_triangulation_3.h b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_triangulation_3.h index 0cb56c38824..b5d08b90ec6 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_triangulation_3.h +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_triangulation_3.h @@ -479,10 +479,10 @@ _test_cls_periodic_3_triangulation_3(const PeriodicTriangulation &, _test_vertex_iterator(PT3_deg); _test_vertex_iterator(PT1_deg); - _test_unique_vertex_iterator(PT3); - _test_unique_vertex_iterator(PT1); - _test_unique_vertex_iterator(PT3_deg); - _test_unique_vertex_iterator(PT1_deg); + _test_triangulation_unique_iterator(PT3); + _test_triangulation_unique_iterator(PT1); + _test_triangulation_unique_iterator(PT3_deg); + _test_triangulation_unique_iterator(PT1_deg); _test_triangulation_iterator(PT3); _test_triangulation_iterator(PT1); diff --git a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstream.h b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstream.h index 36cfbb488e9..97fc3e0d06a 100644 --- a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstream.h +++ b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/Qt/HyperbolicPainterOstream.h @@ -77,12 +77,12 @@ public: using Base::operator <<; PainterOstream& operator << (Hyperbolic_segment_2 s) { - if(const Euclidean_segment_2* seg = boost::get(&s)) { + if(const Euclidean_segment_2* seg = std::get_if(&s)) { CGAL::Qt::PainterOstream::operator << (*seg); return *this; } - Circular_arc_2* arc = boost::get(&s); + Circular_arc_2* arc = std::get_if(&s); if(arc->squared_radius() > 100) { Euclidean_segment_2 seg(arc->source(), arc->target()); diff --git a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/hyperbolic_free_motion_animation.h b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/hyperbolic_free_motion_animation.h index 5651f2c614a..80f9808370b 100644 --- a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/hyperbolic_free_motion_animation.h +++ b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/hyperbolic_free_motion_animation.h @@ -28,7 +28,7 @@ MainWindow::initialize_animation_parameters() { source = Point(rx1, ry1); target = Point(rx2, ry2); Segment_2 seg = Construct_hyperbolic_segment_2()(source, target); - Circular_arc_2* carc = boost::get(&seg); + Circular_arc_2* carc = std::get_if(&seg); source = carc->source(); target = carc->target(); @@ -118,7 +118,7 @@ Point MainWindow::get_image(Point src, Point tgt, double time) { //std::cout << " ..getting image "; std::cout.flush(); Segment_2 seg = Construct_hyperbolic_segment_2()(src, tgt); - Circular_arc_2* carc = boost::get(&seg); + Circular_arc_2* carc = std::get_if(&seg); Circle_2 crc = carc->supporting_circle(); double sx = CGAL::to_double(((src.x()) - crc.center().x())/sqrt(crc.squared_radius())); @@ -233,7 +233,7 @@ MainWindow::animate() { // Correct in case of wrong orientation. //std::cout << " ..making line..." << std::endl; Segment_2 seg = Construct_hyperbolic_segment_2()(source, target); - Circular_arc_2* carc = boost::get(&seg); + Circular_arc_2* carc = std::get_if(&seg); std::pair inters = Construct_inexact_intersection_2()(carc->supporting_circle(), poincare); if(squared_distance(source, inters.first) < squared_distance(source, inters.second)) { source = inters.first; diff --git a/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h b/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h index 8304f78bf98..9c89cc574d0 100644 --- a/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include @@ -371,9 +371,9 @@ class Compute_approximate_hyperbolic_diameter Hyperbolic_point_2 operator()(const Hyperbolic_segment_2& s1, const Hyperbolic_segment_2& s2) { - if(Circular_arc_2* c1 = boost::get(&s1)) + if(Circular_arc_2* c1 = std::get_if(&s1)) { - if(Circular_arc_2* c2 = boost::get(&s2)) + if(Circular_arc_2* c2 = std::get_if(&s2)) { std::pair res = operator()(c1->circle(), c2->circle()); @@ -387,7 +387,7 @@ class Compute_approximate_hyperbolic_diameter } else { - Euclidean_segment_2* ell2 = boost::get(&s2); + Euclidean_segment_2* ell2 = std::get_if(&s2); std::pair res = operator()(c1->circle(), ell2->supporting_line()); Hyperbolic_point_2 p1 = res.first; @@ -401,8 +401,8 @@ class Compute_approximate_hyperbolic_diameter } else { - Euclidean_segment_2* ell1 = boost::get(&s1); - if(Circular_arc_2* c2 = boost::get(&s2)) + Euclidean_segment_2* ell1 = std::get_if(&s1); + if(Circular_arc_2* c2 = std::get_if(&s2)) { std::pair res = operator()(ell1->supporting_line(), c2->circle()); @@ -416,7 +416,7 @@ class Compute_approximate_hyperbolic_diameter } else { - Euclidean_segment_2* ell2 = boost::get(&s2); + Euclidean_segment_2* ell2 = std::get_if(&s2); Hyperbolic_point_2 p1 = operator()(ell1->supporting_line(), ell2->supporting_line()); CGAL_assertion(p1.x()*p1.x() + p1.y()*p1.y()) < FT(1); return p1; @@ -465,9 +465,9 @@ class Compute_approximate_hyperbolic_diameter Euclidean_line_2* l; Circle_2* c; - if(Circle_2* c_pq = boost::get(&bis_pq)) + if(Circle_2* c_pq = std::get_if(&bis_pq)) { - if(Circle_2* c_qr = boost::get(&bis_qr)) + if(Circle_2* c_qr = std::get_if(&bis_qr)) { std::pair inters = _gt.construct_inexact_intersection_2_object()(*c_pq, *c_qr); @@ -477,14 +477,14 @@ class Compute_approximate_hyperbolic_diameter return inters.second; } // here bis_qr is a line - l = boost::get(&bis_qr); + l = std::get_if(&bis_qr); c = c_pq; } else { // here bis_pq is a line - l = boost::get(&bis_pq); - c = boost::get(&bis_qr); + l = std::get_if(&bis_pq); + c = std::get_if(&bis_qr); } std::pair inters = _gt.construct_inexact_intersection_2_object()(*c, *l); diff --git a/Point_set_3/examples/Point_set_3/point_set_algo.cpp b/Point_set_3/examples/Point_set_3/point_set_algo.cpp index 12c98682475..19f10f5ecfb 100644 --- a/Point_set_3/examples/Point_set_3/point_set_algo.cpp +++ b/Point_set_3/examples/Point_set_3/point_set_algo.cpp @@ -68,7 +68,7 @@ int main (int, char**) parameters.normal_threshold = 0.9; ransac.detect(parameters); - for(boost::shared_ptr shape : ransac.shapes()) + for(std::shared_ptr shape : ransac.shapes()) if (Sphere* sphere = dynamic_cast(shape.get())) std::cerr << "Detected sphere of center " << sphere->center() // Center should be approx 0, 0, 0 << " and of radius " << sphere->radius() << std::endl; // Radius should be approx 1 diff --git a/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h b/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h index c5f3f513700..6646bc2bbf5 100644 --- a/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h +++ b/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h @@ -167,7 +167,7 @@ namespace CGAL { (planes.begin(), planes.end(), P, - boost::make_optional(Point(CGAL::ORIGIN))); + std::make_optional(Point(CGAL::ORIGIN))); // apply f to the triangles on the boundary of P for(typename boost::graph_traits::face_descriptor fd : faces(P)) diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index 0b517436394..fbbae3fbfcf 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -58,8 +58,8 @@ is a vertex). The implementation follow \cgalCite{cgal:la-srpss-13}. \tparam Kernel a model of `EfficientRANSACTraits` that must provide in addition a function `Intersect_3 intersection_3_object() const` and a functor `Intersect_3` with: -- `boost::optional< boost::variant< Traits::Plane_3, Traits::Line_3 > > operator()(typename Traits::Plane_3, typename Traits::Plane_3)` -- `boost::optional< boost::variant< Traits::Line_3, Traits::Point_3 > > operator()(typename Traits::Line_3, typename Traits::Plane_3)` +- `std::optional< std::variant< Traits::Plane_3, Traits::Line_3 > > operator()(typename Traits::Plane_3, typename Traits::Plane_3)` +- `std::optional< std::variant< Traits::Line_3, Traits::Point_3 > > operator()(typename Traits::Line_3, typename Traits::Plane_3)` */ template @@ -808,7 +808,7 @@ private: continue; } - if (const Line* l = boost::get(&*result)) + if (const Line* l = std::get_if(&*result)) m_edges[i].support = *l; else { @@ -1029,7 +1029,7 @@ private: auto result = CGAL::intersection (plane1, ortho); if (result) { - if (const Line* l = boost::get(&*result)) + if (const Line* l = std::get_if(&*result)) { if (!(pts1.empty())) { @@ -1066,7 +1066,7 @@ private: result = CGAL::intersection (plane2,ortho); if (result) { - if (const Line* l = boost::get(&*result)) + if (const Line* l = std::get_if(&*result)) { if (!(pts2.empty())) { @@ -1193,12 +1193,12 @@ private: const auto result = CGAL::intersection(plane1, plane2); if (result) { - if (const Line* l = boost::get(&*result)) + if (const Line* l = std::get_if(&*result)) { const auto result2 = CGAL::intersection(*l, plane3); if (result2) { - if (const Point* p = boost::get(&*result2)) + if (const Point* p = std::get_if(&*result2)) m_corners[i].support = *p; else { diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index 3f5583bb8b8..cbd77792290 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -68,6 +68,9 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("jet_pointer_as_property_map.cpp") target_link_libraries(jet_pointer_as_property_map PUBLIC CGAL::Eigen3_support) + + create_single_source_cgal_program("psp_jet_includes.cpp") + target_link_libraries(psp_jet_includes PUBLIC CGAL::Eigen3_support) else() message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() 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/examples/Polygon_mesh_processing/corefinement_mesh_union_and_intersection.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_mesh_union_and_intersection.cpp index ffa6f9aeb2e..9148d56bd07 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_mesh_union_and_intersection.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_mesh_union_and_intersection.cpp @@ -28,7 +28,7 @@ int main(int argc, char* argv[]) } Mesh out_union, out_intersection; - std::array, 4> output; + std::array, 4> output; output[PMP::Corefinement::UNION] = &out_union; output[PMP::Corefinement::INTERSECTION] = &out_intersection; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index 81f9438a198..8cad7f7227c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -69,7 +69,7 @@ enum Boolean_operation_type {UNION = 0, INTERSECTION=1, * \ingroup PMP_corefinement_grp * * \link coref_def_subsec corefines \endlink `tm1` and `tm2` and for each triangle mesh `tm_out` passed - * as an optional in `output` different from `boost::none`, the triangulated surface mesh + * as an optional in `output` different from `std::nullopt`, the triangulated surface mesh * \link coref_def_subsec bounding \endlink the result of a particular Boolean operation * between the volumes bounded by `tm1` and `tm2` will be put in the corresponding triangle mesh. * The positions of the meshes in the array `output` are specific to the Boolean operation to compute @@ -186,7 +186,7 @@ std::array corefine_and_compute_boolean_operations( TriangleMesh& tm1, TriangleMesh& tm2, - const std::array< boost::optional,4>& output, + const std::array< std::optional,4>& output, const NamedParameters1& np1 = parameters::default_values(), const NamedParameters2& np2 = parameters::default_values(), const std::tuple VPM_out_tuple_helper; typedef std::tuple< - boost::optional< typename std::tuple_element<0, VPM_out_tuple_helper>::type::type >, - boost::optional< typename std::tuple_element<1, VPM_out_tuple_helper>::type::type >, - boost::optional< typename std::tuple_element<2, VPM_out_tuple_helper>::type::type >, - boost::optional< typename std::tuple_element<3, VPM_out_tuple_helper>::type::type > + std::optional< typename std::tuple_element<0, VPM_out_tuple_helper>::type::type >, + std::optional< typename std::tuple_element<1, VPM_out_tuple_helper>::type::type >, + std::optional< typename std::tuple_element<2, VPM_out_tuple_helper>::type::type >, + std::optional< typename std::tuple_element<3, VPM_out_tuple_helper>::type::type > > VPM_out_tuple; VPM_out_tuple vpm_out_tuple( @@ -251,24 +251,24 @@ corefine_and_compute_boolean_operations( // for now edges in a coplanar patch are not constrained so there is nothing to constrained here // \todo marked edges from input to output are not ported - if (output[Corefinement::UNION] != boost::none) + if (output[Corefinement::UNION] != std::nullopt) if (&tm1 != *output[Corefinement::UNION]) copy_face_graph(tm1, *(*output[Corefinement::UNION]), parameters::vertex_point_map(vpm1), parameters::vertex_point_map(*std::get(vpm_out_tuple))); - if (output[Corefinement::INTERSECTION] != boost::none) + if (output[Corefinement::INTERSECTION] != std::nullopt) if (&tm1 != *output[Corefinement::INTERSECTION]) copy_face_graph(tm1, *(*output[Corefinement::INTERSECTION]), parameters::vertex_point_map(vpm1), parameters::vertex_point_map(*std::get(vpm_out_tuple))); - if (output[Corefinement::TM1_MINUS_TM2] != boost::none) + if (output[Corefinement::TM1_MINUS_TM2] != std::nullopt) if (&tm1 == *output[Corefinement::TM1_MINUS_TM2]) clear(tm1); - if (output[Corefinement::TM2_MINUS_TM1] != boost::none) + if (output[Corefinement::TM2_MINUS_TM1] != std::nullopt) if (&tm1 == *output[Corefinement::TM2_MINUS_TM1]) clear(tm1); @@ -281,22 +281,22 @@ corefine_and_compute_boolean_operations( if(faces(tm2).empty()) { for (int i=0; i<4; ++i) - if (output[i] != boost::none) + if (output[i] != std::nullopt) clear(*(*output[i])); return CGAL::make_array(true, true, true, true); } // tm2 is not empty - if (output[Corefinement::UNION] != boost::none) + if (output[Corefinement::UNION] != std::nullopt) if (&tm2 != *output[Corefinement::UNION]) copy_face_graph(tm2, *(*output[Corefinement::UNION]), parameters::vertex_point_map(vpm2), parameters::vertex_point_map(*std::get(vpm_out_tuple))); - if (output[Corefinement::INTERSECTION] != boost::none) + if (output[Corefinement::INTERSECTION] != std::nullopt) clear(*(*output[Corefinement::INTERSECTION])); - if (output[Corefinement::TM1_MINUS_TM2] != boost::none) + if (output[Corefinement::TM1_MINUS_TM2] != std::nullopt) clear(*(*output[Corefinement::TM1_MINUS_TM2])); - if (output[Corefinement::TM2_MINUS_TM1] != boost::none) + if (output[Corefinement::TM2_MINUS_TM1] != std::nullopt) if (&tm2 != *output[Corefinement::TM2_MINUS_TM1]) copy_face_graph(tm2, *(*output[Corefinement::TM2_MINUS_TM1]), @@ -308,17 +308,17 @@ corefine_and_compute_boolean_operations( if (faces(tm2).empty()) { // tm1 is not empty - if (output[Corefinement::UNION] != boost::none) + if (output[Corefinement::UNION] != std::nullopt) if (&tm1 != *output[Corefinement::UNION]) copy_face_graph(tm1, *(*output[Corefinement::UNION]), parameters::vertex_point_map(vpm1), parameters::vertex_point_map(*std::get(vpm_out_tuple))); - if (output[Corefinement::INTERSECTION] != boost::none) + if (output[Corefinement::INTERSECTION] != std::nullopt) clear(*(*output[Corefinement::INTERSECTION])); - if (output[Corefinement::TM2_MINUS_TM1] != boost::none) + if (output[Corefinement::TM2_MINUS_TM1] != std::nullopt) clear(*(*output[Corefinement::TM2_MINUS_TM1])); - if (output[Corefinement::TM1_MINUS_TM2] != boost::none) + if (output[Corefinement::TM1_MINUS_TM2] != std::nullopt) if (&tm1 != *output[Corefinement::TM1_MINUS_TM2]) copy_face_graph(tm1, *(*output[Corefinement::TM1_MINUS_TM2]), @@ -394,10 +394,10 @@ corefine_and_compute_boolean_operations( // special case used for clipping open meshes if (choose_parameter(get_parameter(np1, internal_np::use_bool_op_to_clip_surface), false)) { - CGAL_assertion(output[Corefinement::INTERSECTION] != boost::none); - CGAL_assertion(output[Corefinement::UNION] == boost::none); - CGAL_assertion(output[Corefinement::TM1_MINUS_TM2] == boost::none); - CGAL_assertion(output[Corefinement::TM2_MINUS_TM1] == boost::none); + CGAL_assertion(output[Corefinement::INTERSECTION] != std::nullopt); + CGAL_assertion(output[Corefinement::UNION] == std::nullopt); + CGAL_assertion(output[Corefinement::TM1_MINUS_TM2] == std::nullopt); + CGAL_assertion(output[Corefinement::TM2_MINUS_TM1] == std::nullopt); const bool use_compact_clipper = choose_parameter(get_parameter(np1, internal_np::use_compact_clipper), true); ob.setup_for_clipping_a_surface(use_compact_clipper); @@ -523,7 +523,7 @@ corefine_and_compute_union( TriangleMesh& tm1, const NamedParametersOut& np_out = parameters::default_values()) { using namespace CGAL::parameters; - std::array< boost::optional,4> output; + std::array< std::optional,4> output; output[Corefinement::UNION]=&tm_out; return @@ -555,7 +555,7 @@ corefine_and_compute_intersection( TriangleMesh& tm1, const NamedParametersOut& np_out = parameters::default_values()) { using namespace CGAL::parameters; - std::array< boost::optional,4> output; + std::array< std::optional,4> output; output[Corefinement::INTERSECTION]=&tm_out; return @@ -588,7 +588,7 @@ corefine_and_compute_difference( TriangleMesh& tm1, { using namespace CGAL::parameters; using namespace CGAL::Polygon_mesh_processing::Corefinement; - std::array< boost::optional,4> output; + std::array< std::optional,4> output; output[TM1_MINUS_TM2]=&tm_out; return 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 85c78461d73..8b41ff2ecdb 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -43,7 +43,7 @@ #include #endif // CGAL_LINKED_WITH_TBB -#include +#include #include #include @@ -1818,10 +1818,10 @@ struct Bounded_error_preprocessing #ifdef CGAL_HAUSDORFF_DEBUG using Timer = CGAL::Real_timer; #endif - std::vector& tm_wrappers; + std::vector& tm_wrappers; // Constructor. - Bounded_error_preprocessing(std::vector& tm_wrappers) + Bounded_error_preprocessing(std::vector& tm_wrappers) : tm_wrappers(tm_wrappers) { } @@ -1830,8 +1830,8 @@ struct Bounded_error_preprocessing : tm_wrappers(s.tm_wrappers) { } - bool is_tm1_wrapper(const boost::any& operand) const { return operand.type() == typeid(TM1Wrapper); } - bool is_tm2_wrapper(const boost::any& operand) const { return operand.type() == typeid(TM2Wrapper); } + bool is_tm1_wrapper(const std::any& operand) const { return operand.type() == typeid(TM1Wrapper); } + bool is_tm2_wrapper(const std::any& operand) const { return operand.type() == typeid(TM2Wrapper); } // TODO: make AABB tree build parallel! void operator()(const tbb::blocked_range& range) @@ -1849,12 +1849,12 @@ struct Bounded_error_preprocessing auto& tm_wrapper = tm_wrappers[i]; if(is_tm1_wrapper(tm_wrapper)) { - TM1Wrapper& object = boost::any_cast(tm_wrapper); + TM1Wrapper& object = std::any_cast(tm_wrapper); object.build_tree(); } else if(is_tm2_wrapper(tm_wrapper)) { - TM2Wrapper& object = boost::any_cast(tm_wrapper); + TM2Wrapper& object = std::any_cast(tm_wrapper); object.build_tree(); } else @@ -2031,7 +2031,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 std::vector tm1_parts; std::vector tm1_trees; - std::vector tm_wrappers; + std::vector tm_wrappers; #endif // defined(CGAL_LINKED_WITH_TBB) && defined(CGAL_METIS_ENABLED) #ifdef CGAL_HAUSDORFF_DEBUG @@ -2455,9 +2455,8 @@ bounded_error_squared_Hausdorff_distance_naive_impl(const TriangleMesh1& tm1, /** * \ingroup PMP_distance_grp * - * returns an estimate on the Hausdorff distance between `tm1` and `tm2` that - * is at most `error_bound` away from the actual Hausdorff distance between - * the two given meshes. + * returns an estimate on the Hausdorff distance from `tm1` to `tm2` that + * is at most `error_bound` away from the actual Hausdorff distance from `tm1` to `tm2`. * * @tparam Concurrency_tag enables sequential versus parallel algorithm. * Possible values are `Sequential_tag` and `Parallel_tag`. diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h index c27ae2bda3a..06200f2f19d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h @@ -181,7 +181,7 @@ class Face_graph_output_builder Node_id_map vertex_to_node_id1, vertex_to_node_id2; // output meshes - const std::array, 4>& requested_output; + const std::array, 4>& requested_output; // input meshes closed ? /// \todo do we really need this? bool is_tm1_closed; @@ -411,7 +411,7 @@ public: const VpmOutTuple& output_vpms, EdgeMarkMapTuple& out_edge_mark_maps, UserVisitor& user_visitor, - const std::array, 4 >& requested_output) + const std::array, 4 >& requested_output) : tm1(tm1), tm2(tm2) , vpm1(vpm1), vpm2(vpm2) , fids1(fids1), fids2(fids2) @@ -513,10 +513,10 @@ public: const boost::dynamic_bitset<>& is_node_of_degree_one, const Mesh_to_map_node&) { - const bool used_to_classify_patches = requested_output[UNION]==boost::none && - requested_output[TM1_MINUS_TM2]==boost::none && - requested_output[TM2_MINUS_TM1]==boost::none && - requested_output[INTERSECTION]==boost::none; + const bool used_to_classify_patches = requested_output[UNION]==std::nullopt && + requested_output[TM1_MINUS_TM2]==std::nullopt && + requested_output[TM2_MINUS_TM1]==std::nullopt && + requested_output[INTERSECTION]==std::nullopt; CGAL_assertion( vertex_to_node_id1.size() <= nodes.size() ); CGAL_assertion( vertex_to_node_id2.size() <= nodes.size() ); @@ -1680,8 +1680,8 @@ public: // special code to handle non-manifold vertices on the boundary for (vertex_descriptor vd : vertices(tm1)) { - boost::optional op_h = is_border(vd, tm1); - if (op_h == boost::none) continue; + std::optional op_h = is_border(vd, tm1); + if (op_h == std::nullopt) continue; halfedge_descriptor h = *op_h; CGAL_assertion( target(h, tm1) == vd); // check if the target of h is a non-manifold vertex 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 7d9a37385f8..4a15d9e59c7 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 @@ -397,20 +397,20 @@ struct TweakedGetVertexPointMap }; template -boost::optional< typename TweakedGetVertexPointMap::type > -get_vpm(const NP& np, boost::optional opm, std::true_type) +std::optional< typename TweakedGetVertexPointMap::type > +get_vpm(const NP& np, std::optional opm, std::true_type) { - if (boost::none == opm) return boost::none; + if (std::nullopt == opm) return std::nullopt; return parameters::choose_parameter( parameters::get_parameter(np, internal_np::vertex_point), get_property_map(boost::vertex_point, *(*opm)) ); } template -boost::optional< typename TweakedGetVertexPointMap::type > -get_vpm(const NP&, boost::optional opm, std::false_type) +std::optional< typename TweakedGetVertexPointMap::type > +get_vpm(const NP&, std::optional opm, std::false_type) { - if (boost::none == opm) return boost::none; + if (std::nullopt == opm) return std::nullopt; return typename TweakedGetVertexPointMap::type(); } // 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 c6f64c98322..4080ab1b682 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 @@ -265,9 +265,9 @@ public: to_exact( get(vpm, target(next(h3,tm),tm)))); const auto inter_res = exact_intersection(p1, p2, p3); - CGAL_assertion(inter_res != boost::none); + CGAL_assertion(inter_res != std::nullopt); const Exact_kernel::Point_3* pt = - boost::get(&(*inter_res)); + std::get_if(&(*inter_res)); CGAL_assertion(pt!=nullptr); add_new_node(*pt); } @@ -386,9 +386,9 @@ public: get(vpm, target(next(h3,tm),tm))); const auto inter_res = intersection(p1, p2, p3); - CGAL_assertion(inter_res != boost::none); + CGAL_assertion(inter_res != std::nullopt); const Point_3* pt = - boost::get(&(*inter_res)); + std::get_if(&(*inter_res)); CGAL_assertion(pt!=nullptr); add_new_node(*pt); } 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 ce906b5c954..3a323ce5312 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 @@ -797,7 +797,7 @@ public: Triangulation tr; std::vector edge_exist; std::pair range(0, n-1); - std::tuple, bool, bool> res = construct_3D_triangulation(P, range, tr, edge_exist); + std::tuple, bool, bool> res = construct_3D_triangulation(P, range, tr, edge_exist); if(!std::get<2>(res)) { #ifdef CGAL_HOLE_FILLING_VERBOSE #ifndef CGAL_TEST_SUITE @@ -944,14 +944,14 @@ private: } // returns [h.first-h.second edge, true if all edges inside 3D triangulation, true if tr.dimension() >= 2] - std::tuple, bool, bool> + std::tuple, bool, bool> construct_3D_triangulation(const Polyline_3& P, std::pair h, Triangulation& tr, std::vector& edge_exist) const { // construct 3D tr with P[h.first], P[h.second] also assign ids from h.first to h.second - boost::optional e; + std::optional e; int n_border = h.second - h.first + 1; tr.insert(boost::make_transform_iterator(std::next(P.begin(), h.first), Auto_count(h.first)), boost::make_transform_iterator(std::next(P.begin(), h.second +1), Auto_count(h.first))); @@ -999,7 +999,7 @@ private: * + when switched to all-space, we use map based lookup tables. ************************************************************************/ Weight fill_by_incomplete_patches(Triangulation& tr, - boost::optional start_edge, + std::optional start_edge, std::vector& edge_exist, const Polyline_3& P, const Polyline_3& Q, @@ -1072,7 +1072,7 @@ private: // construct tr for next coming hole h = remaining_holes.back(); tr.clear(); - std::tuple, bool, bool> res = construct_3D_triangulation(P, h, tr, edge_exist); + std::tuple, bool, bool> res = construct_3D_triangulation(P, h, tr, edge_exist); if(!std::get<0>(res)) { #ifdef CGAL_HOLE_FILLING_VERBOSE CGAL_warning_msg(false, "Returning no output. Filling hole with incomplete patches is not successful!"); 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 72ef49c3996..458cdf00884 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 @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include @@ -1944,7 +1944,7 @@ private: bool check_normals(const HalfedgeRange& hedges) const { std::size_t nb_patches = patch_id_to_index_map.size(); - //std::vector > normal_per_patch(nb_patches,boost::none); + //std::vector > normal_per_patch(nb_patches,std::nullopt); std::vector initialized(nb_patches,false); std::vector normal_per_patch(nb_patches); @@ -1968,7 +1968,7 @@ private: return false; } } - //normal_per_patch[index] = boost::make_optional(n); + //normal_per_patch[index] = std::make_optional(n); normal_per_patch[index] = n; initialized[index] = true; } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h index 49cfea2a724..99483e93abc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #ifndef CGAL_INTERNAL_POLYGON_MESH_SLICER_AXIS_PARALLEL_PLANE_TRAITS_H @@ -95,8 +95,8 @@ public: const typename Traits::Construct_source_3 m_source_3; const typename Traits::Construct_target_3 m_target_3; - typedef boost::variant Variant_type; - typedef boost::optional< Variant_type > result_type; + typedef std::variant Variant_type; + typedef std::optional< Variant_type > result_type; Intersect_3(const Axis_parallel_plane_traits& traits) : m_cst_coord(traits.m_cst_coord) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h index e282e092fa1..aabe4d20199 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include namespace CGAL { @@ -78,9 +78,9 @@ public: //the direction of the vertical ray depends on the position of the point in the bbox //in order to limit the expected number of nodes visited. Ray query = ray_functor(point, vector_functor(0,0,(2*point.z() < bbox.zmax()+bbox.zmin()?-1:1))); - boost::optional res = is_inside_ray_tree_traversal(query, tree); + std::optional res = is_inside_ray_tree_traversal(query, tree); - if(res == boost::none) + if(res == std::nullopt) { CGAL::Random rg(seed); // seed some value for make it easy to debug Random_points_on_sphere_3 random_point(1.,rg); @@ -88,14 +88,14 @@ public: do { //retry with a random ray query = ray_functor(point, vector_functor(CGAL::ORIGIN,*random_point++)); res = is_inside_ray_tree_traversal(query, tree); - } while (res == boost::none); + } while (res == std::nullopt); } return *res; } private: template - boost::optional + std::optional is_inside_ray_tree_traversal(const Ray& ray, const AABBTree& tree) const { std::pair @@ -114,7 +114,7 @@ private: //otherwise the point is on the facet return ON_BOUNDARY; } - return boost::optional(); // indeterminate + return std::optional(); // indeterminate } }; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h index 0976ac2e4db..0804f769968 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h @@ -102,7 +102,7 @@ public: constrained_flags_[get(vimap_, v)] = true; // scaling things cannot preserve the position of more than a single constrained point - if(anchor_point == boost::none) + if(anchor_point == std::nullopt) anchor_point = get(vpmap_, v); else scale_volume_after_smoothing_ = false; @@ -230,7 +230,7 @@ public: // If no vertex is constrained, then the smoothed mesh will share the same centroid as the input mesh Point pre_smooth_anchor_point; - if(anchor_point != boost::none) + if(anchor_point != std::nullopt) pre_smooth_anchor_point = *anchor_point; else pre_smooth_anchor_point = PMP::centroid(mesh_, parameters::vertex_point_map(vpmap_).geom_traits(traits_)); @@ -247,7 +247,7 @@ public: } Point post_smooth_anchor_point; - if(anchor_point != boost::none) + if(anchor_point != std::nullopt) post_smooth_anchor_point = *anchor_point; else post_smooth_anchor_point = PMP::centroid(mesh_, parameters::vertex_point_map(vpmap_).geom_traits(traits_)); @@ -364,7 +364,7 @@ private: // of the initial mesh if no vertex is constrained. If there is more than a constrained vertex, // then no scaling can be done without violating the constraint. bool scale_volume_after_smoothing_; - boost::optional anchor_point; + std::optional anchor_point; // linear system data std::vector diagonal_; // index of vector -> index of vimap_ diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h index 26d0266e03a..ef361b17529 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include @@ -52,6 +52,36 @@ namespace CGAL { namespace Polygon_mesh_processing { + +/// \ingroup PMP_locate_grp +/// +/// A variant used in the function `get_descriptor_from_location()`. +template +using descriptor_variant = std::variant::vertex_descriptor, + typename boost::graph_traits::halfedge_descriptor, + typename boost::graph_traits::face_descriptor>; + +/// \ingroup PMP_locate_grp +/// +/// A triplet of coordinates describing the barycentric coordinates of a point +/// with respect to the vertices of a triangular face. +/// +/// \sa `Face_location` +template +using Barycentric_coordinates = std::array; + +/// \ingroup PMP_locate_grp +/// +/// If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence +/// between the coordinates in `bc` and the vertices of the face `f` is the following: +/// - `w0` corresponds to `source(halfedge(f, tm), tm)` +/// - `w1` corresponds to `target(halfedge(f, tm), tm)` +/// - `w2` corresponds to `target(next(halfedge(f, tm), tm), tm)` +template +using Face_location = std::pair::face_descriptor, + Barycentric_coordinates >; + namespace internal { // The Ray must have the same ambient dimension as the property map's value type (aka, the point type) @@ -85,51 +115,20 @@ struct Location_traits typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef std::array Barycentric_coordinates; - typedef std::pair Face_location; + typedef CGAL::Polygon_mesh_processing::Barycentric_coordinates Barycentric_coordinates; + typedef CGAL::Polygon_mesh_processing::Face_location Face_location; }; } // end namespace internal -/// \ingroup PMP_locate_grp -/// -/// A variant used in the function `get_descriptor_from_location()`. -template -using descriptor_variant = boost::variant::vertex_descriptor, - typename boost::graph_traits::halfedge_descriptor, - typename boost::graph_traits::face_descriptor>; - -/// \ingroup PMP_locate_grp -/// -/// A triplet of coordinates describing the barycentric coordinates of a point -/// with respect to the vertices of a triangular face. -/// -/// \sa `Face_location` -template -using Barycentric_coordinates = std::array; - -/// \ingroup PMP_locate_grp -/// -/// If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence -/// between the coordinates in `bc` and the vertices of the face `f` is the following: -/// - `w0` corresponds to `source(halfedge(f, tm), tm)` -/// - `w1` corresponds to `target(halfedge(f, tm), tm)` -/// - `w2` corresponds to `target(next(halfedge(f, tm), tm), tm)` -template -using Face_location = std::pair::face_descriptor, - Barycentric_coordinates >; - // forward declarations template -bool is_in_face(const std::pair::face_descriptor, - std::array >& loc, +bool is_in_face(const Face_location& loc, const TriangleMesh& tm); template descriptor_variant -get_descriptor_from_location(const std::pair::face_descriptor, - std::array >& loc, +get_descriptor_from_location(const Face_location& loc, const TriangleMesh& tm); // end of forward declarations @@ -138,8 +137,7 @@ namespace internal { template OutputIterator -incident_faces(const std::pair::face_descriptor, - std::array >& location, +incident_faces(const Face_location& loc, const TriangleMesh& tm, OutputIterator out) { @@ -147,15 +145,15 @@ incident_faces(const std::pair::face_ typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; - const descriptor_variant dv = get_descriptor_from_location(location, tm); + const descriptor_variant dv = get_descriptor_from_location(loc, tm); - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) { const vertex_descriptor vd = *vd_ptr; for(face_descriptor fd : faces_around_target(halfedge(vd, tm), tm)) *out++ = fd; } - else if(const halfedge_descriptor* hd_ptr = boost::get(&dv)) + else if(const halfedge_descriptor* hd_ptr = std::get_if(&dv)) { const halfedge_descriptor hd = *hd_ptr; *out++ = face(hd, tm); @@ -163,7 +161,7 @@ incident_faces(const std::pair::face_ } else { - const face_descriptor fd = boost::get(dv); + const face_descriptor fd = std::get(dv); *out++ = fd; } @@ -173,7 +171,7 @@ incident_faces(const std::pair::face_ // Snapping coordinates for robustness template bool -snap_coordinates_to_border(std::array& coords, +snap_coordinates_to_border(Barycentric_coordinates& coords, const FT tolerance = std::numeric_limits::epsilon()) { #ifdef CGAL_PMP_LOCATE_DEBUG @@ -224,8 +222,7 @@ snap_coordinates_to_border(std::array& coords, template bool -snap_location_to_border(std::pair::face_descriptor, - std::array >& loc, +snap_location_to_border(Face_location& loc, const TriangleMesh /*tm*/, const FT tolerance = std::numeric_limits::epsilon()) { @@ -235,7 +232,7 @@ snap_location_to_border(std::pair::fa template struct Barycentric_coordinate_calculator // 2D version { - std::array + Barycentric_coordinates operator()(const P& ip, const P& iq, const P& ir, const P& iquery, const K& k) const { typedef typename K::FT FT; @@ -273,7 +270,7 @@ struct Barycentric_coordinate_calculator // 2D version template struct Barycentric_coordinate_calculator { - std::array + Barycentric_coordinates operator()(const P& ip, const P& iq, const P& ir, const P& iquery, const K& k) const { typedef typename K::FT FT; @@ -364,7 +361,7 @@ struct Barycentric_point_constructor // 3D version /// \pre `query` lies on the plane defined by `p`, `q`, and `r`. /// template -std::array +Barycentric_coordinates barycentric_coordinates(const Point& p, const Point& q, const Point& r, const Point& query, const GeomTraits& gt) { @@ -373,7 +370,7 @@ barycentric_coordinates(const Point& p, const Point& q, const Point& r, const Po } template -std::array::type::FT, 3> +Barycentric_coordinates::type::FT> barycentric_coordinates(const Point& p, const Point& q, const Point& r, const Point& query) { typedef typename CGAL::Kernel_traits::type Kernel; @@ -411,7 +408,7 @@ random_location_on_halfedge(typename boost::graph_traits::halfedge const int h_id = halfedge_index_in_face(hd, tm); const FT t(rnd.uniform_real(0., 1.)); - std::array coordinates; + Barycentric_coordinates coordinates; coordinates[h_id] = t; coordinates[(h_id+1)%3] = FT(1)-t; coordinates[(h_id+2)%3] = FT(0); @@ -510,8 +507,7 @@ descriptor_variant #ifdef DOXYGEN_RUNNING // just for convenience because template alias do not allow template deduction get_descriptor_from_location(const Face_location& loc, #else -get_descriptor_from_location(const std::pair::face_descriptor, - std::array >& loc, +get_descriptor_from_location(const Face_location& loc, #endif const TriangleMesh& tm) { @@ -589,12 +585,10 @@ get_descriptor_from_location(const std::pair #ifdef DOXYGEN_RUNNING Point -construct_point(const Face_location& loc, #else typename internal::Location_traits::Point -construct_point(const std::pair::face_descriptor, - std::array >& loc, #endif +construct_point(const Face_location& loc, const TriangleMesh& tm, const NamedParameters& np = parameters::default_values()) { @@ -648,12 +642,7 @@ construct_point(const std::pair::face /// template bool -#ifdef DOXYGEN_RUNNING is_on_vertex(const Face_location& loc, -#else -is_on_vertex(const std::pair::face_descriptor, - std::array >& loc, -#endif const typename boost::graph_traits::vertex_descriptor vd, const TriangleMesh& tm) { @@ -664,7 +653,7 @@ is_on_vertex(const std::pair::face_de const descriptor_variant dv = get_descriptor_from_location(loc, tm); - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) return (vd == *vd_ptr); return false; @@ -692,12 +681,7 @@ is_on_vertex(const std::pair::face_de /// template bool -#ifdef DOXYGEN_RUNNING is_on_halfedge(const Face_location& loc, -#else -is_on_halfedge(const std::pair::face_descriptor, - std::array >& loc, -#endif const typename boost::graph_traits::halfedge_descriptor hd, const TriangleMesh& tm) { @@ -709,9 +693,9 @@ is_on_halfedge(const std::pair::face_ const descriptor_variant dv = get_descriptor_from_location(loc, tm); - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) return (*vd_ptr == source(hd, tm) || *vd_ptr == target(hd, tm)); - else if(const halfedge_descriptor* hd_ptr = boost::get(&dv)) + else if(const halfedge_descriptor* hd_ptr = std::get_if(&dv)) return (*hd_ptr == hd); return false; @@ -738,11 +722,7 @@ is_on_halfedge(const std::pair::face_ /// template bool -#ifdef DOXYGEN_RUNNING is_in_face(const Barycentric_coordinates& bar, -#else -is_in_face(const std::array& bar, -#endif const TriangleMesh& tm) { CGAL_USE(tm); @@ -780,12 +760,7 @@ is_in_face(const std::array& bar, /// template bool -#ifdef DOXYGEN_RUNNING is_in_face(const Face_location& loc, -#else -is_in_face(const std::pair::face_descriptor, - std::array >& loc, -#endif const TriangleMesh& tm) { return is_in_face(loc.second, tm); @@ -812,12 +787,7 @@ is_in_face(const std::pair::face_desc /// template bool -#ifdef DOXYGEN_RUNNING is_on_face_border(const Face_location& loc, -#else -is_on_face_border(const std::pair::face_descriptor, - std::array >& loc, -#endif const TriangleMesh& tm) { if(!is_in_face(loc, tm)) @@ -853,12 +823,7 @@ is_on_face_border(const std::pair::fa /// template bool -#ifdef DOXYGEN_RUNNING is_on_mesh_border(const Face_location& loc, -#else -is_on_mesh_border(const std::pair::face_descriptor, - std::array >& loc, -#endif const TriangleMesh& tm) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -1136,7 +1101,7 @@ locate_in_face(const typename internal::Location_traits coords = barycentric_coordinates(p0, p1, p2, query, gt); + Barycentric_coordinates coords = barycentric_coordinates(p0, p1, p2, query, gt); if(snap_tolerance != FT(0) && !is_in_face(coords, tm)) { @@ -1174,12 +1139,7 @@ locate_in_face(const typename internal::Location_traits Face_location -#ifdef DOXYGEN_RUNNING locate_in_adjacent_face(const Face_location& loc, -#else -locate_in_adjacent_face(const std::pair::face_descriptor, - std::array >& loc, -#endif const typename boost::graph_traits::face_descriptor fd, const TriangleMesh& tm) { @@ -1193,14 +1153,14 @@ locate_in_adjacent_face(const std::pair loc_in_fd = std::make_pair(fd, CGAL::make_array(FT(0), FT(0), FT(0))); const descriptor_variant dv = get_descriptor_from_location(loc, tm); - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) { int index_of_vd = vertex_index_in_face(*vd_ptr, fd, tm); loc_in_fd.second[index_of_vd] = FT(1); // Note that the barycentric coordinates were initialized to 0, // so the second and third coordinates are already set up properly. } - else if(const halfedge_descriptor* hd_ptr = boost::get(&dv)) + else if(const halfedge_descriptor* hd_ptr = std::get_if(&dv)) { // Note that, here, we know that we are _not_ on a vertex const halfedge_descriptor hd = *hd_ptr; @@ -1225,7 +1185,7 @@ locate_in_adjacent_face(const std::pair(dv);) + CGAL_assertion_code(const face_descriptor fd2 = std::get(dv);) CGAL_assertion(fd2 != boost::graph_traits::null_face()); CGAL_assertion(fd2 != fd); @@ -1247,11 +1207,9 @@ locate_in_adjacent_face(const std::pair bool -locate_in_common_face(std::pair::face_descriptor, - std::array >& known_location, +locate_in_common_face(Face_location& known_location, const typename internal::Location_traits::Point& query, - std::pair::face_descriptor, - std::array >& query_location, + Face_location& query_location, const TriangleMesh& tm, const NamedParameters& np, const FT tolerance = std::numeric_limits::epsilon()) @@ -1264,7 +1222,7 @@ locate_in_common_face(std::pair::face bool is_query_location_in_face = false; - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) { const vertex_descriptor vd = *vd_ptr; halfedge_descriptor hd = halfedge(vd, tm); @@ -1284,7 +1242,7 @@ locate_in_common_face(std::pair::face break; } } - else if(const halfedge_descriptor* hd_ptr = boost::get(&dv)) + else if(const halfedge_descriptor* hd_ptr = std::get_if(&dv)) { const halfedge_descriptor hd = *hd_ptr; if(!is_border(hd, tm)) @@ -1304,7 +1262,7 @@ locate_in_common_face(std::pair::face } else { - const face_descriptor fd = boost::get(dv); + const face_descriptor fd = std::get(dv); CGAL_precondition(fd != boost::graph_traits::null_face()); query_location = locate_in_face(query, fd, tm, np); @@ -1323,10 +1281,8 @@ locate_in_common_face(std::pair::face // - both locations must be known but can change template bool -locate_in_common_face(std::pair::face_descriptor, - std::array >& first_location, - std::pair::face_descriptor, - std::array >& second_location, +locate_in_common_face(Face_location& first_location, + Face_location& second_location, const TriangleMesh& tm) { typedef typename boost::graph_traits::face_descriptor face_descriptor; @@ -1846,7 +1802,7 @@ locate_with_AABB_tree(const typename internal::Location_traits AABB_traits; typedef AABB_tree AABB_face_graph_tree; typedef typename AABB_face_graph_tree::template Intersection_and_primitive_id::Type Intersection_type; - typedef boost::optional Ray_intersection; + typedef std::optional Ray_intersection; using parameters::get_parameter; using parameters::choose_parameter; @@ -1866,7 +1822,7 @@ locate_with_AABB_tree(const typename internal::Location_traits(&(intersections[i]->first)); + Point_3* intersection_point = std::get_if(&(intersections[i]->first)); if(intersection_point) { diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h index 2ffc899b549..de2bcab9c1c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h @@ -39,10 +39,10 @@ namespace CGAL { namespace Polygon_mesh_processing { /** \ingroup PMP_orientation_grp + * * Default visitor model of `PMPPolygonSoupOrientationVisitor`. * All of its functions have an empty body. This class can be used as a - * base class if only some of the functions of the concept require to be - * overridden. + * base class if only some of the functions of the concept will be overridden. */ struct Default_orientation_visitor{ void non_manifold_edge(std::size_t, std::size_t, std::size_t){} @@ -483,12 +483,22 @@ struct Polygon_soup_orienter * * \brief tries to consistently orient a soup of polygons in 3D space. * - * When it is not possible to produce a combinatorial manifold surface, + * The algorithm re-orients polygons such that the orientation + * of adjacent polygons is consistent. Note that the adjacency is + * defined in a combinatorial sense, i.e. two polygons are sharing + * an edge if and only if the endpoints of this edge are represented + * by the same point indices in both faces (possibly in a different order); + * it is not sufficient for the points to be geometrically identical. + * One may use `CGAL::Polygon_mesh_processing::merge_duplicate_points_in_polygon_soup()` + * to convert geometrical point equality into combinatorial point equality. + * + * When it is not possible to produce a combinatorial manifold surface + * (for example, if the polygon soup makes up a Möbius strip), * some points are duplicated. * Because a polygon soup does not have any connectivity (each point * has as many occurrences as the number of polygons it belongs to), * duplicating one point (or a pair of points) - * amounts to duplicate the polygon to which it belongs. + * amounts to duplicating the polygon to which it belongs. * * These points are either an endpoint of an edge incident to more * than two polygons, an endpoint of an edge between @@ -521,7 +531,7 @@ struct Polygon_soup_orienter * \cgalNamedParamsEnd * * @return `true` if the orientation operation succeeded. - * @return `false` if some points were duplicated, thus producing a self-intersecting polyhedron. + * @return `false` if some points were duplicated, thus producing a combinatorially manifold but self-intersecting polyhedron. * * @sa `orient_triangle_soup_with_reference_triangle_mesh()` */ diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index 40f480cbb7c..c71a5d4c806 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -197,7 +197,7 @@ bool is_collapse_geometrically_valid(typename boost::graph_traits: // @todo handle boundary edges template -boost::optional +std::optional get_collapse_volume(typename boost::graph_traits::halfedge_descriptor h, const TriangleMesh& tmesh, const VPM& vpm, @@ -244,7 +244,7 @@ get_collapse_volume(typename boost::graph_traits::halfedge_descrip Vector_3 n1 = gt.construct_cross_product_vector_3_object()(v_ar, v_ab); Vector_3 n2 = gt.construct_cross_product_vector_3_object()(v_ak, v_ab); if(gt.compute_scalar_product_3_object()(n1, n2) <= 0) - return boost::none; + return std::nullopt; delta_vol += volume(b, a, removed, origin) + volume(a, b, kept, origin); // opposite orientation } @@ -268,27 +268,27 @@ get_best_edge_orientation(typename boost::graph_traits::edge_descr halfedge_descriptor h = halfedge(e, tmesh), ho = opposite(h, tmesh); - boost::optional dv1 = get_collapse_volume(h, tmesh, vpm, gt); - boost::optional dv2 = get_collapse_volume(ho, tmesh, vpm, gt); + std::optional dv1 = get_collapse_volume(h, tmesh, vpm, gt); + std::optional dv2 = get_collapse_volume(ho, tmesh, vpm, gt); // the resulting point of the collapse of a halfedge is the target of the halfedge before collapse if(get(vcm, source(h, tmesh))) - return dv2 != boost::none ? ho + return dv2 != std::nullopt ? ho : boost::graph_traits::null_halfedge(); if(get(vcm, target(h, tmesh))) - return dv1 != boost::none ? h + return dv1 != std::nullopt ? h : boost::graph_traits::null_halfedge(); - if(dv1 != boost::none) + if(dv1 != std::nullopt) { - if(dv2 != boost::none) + if(dv2 != std::nullopt) return (*dv1 < *dv2) ? h : ho; return h; } - if(dv2 != boost::none) + if(dv2 != std::nullopt) return ho; return boost::graph_traits::null_halfedge(); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h index d14e513d347..fe680d00718 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h @@ -218,6 +218,7 @@ void tangential_relaxation(const VertexRange& vertices, typedef std::tuple VNP; std::vector< VNP > barycenters; auto gt_barycenter = gt.construct_barycenter_3_object(); + auto gt_project = gt.construct_projected_point_3_object(); // at each vertex, compute vertex normal std::unordered_map vnormals; @@ -269,8 +270,19 @@ void tangential_relaxation(const VertexRange& vertices, //check squared cosine is < 0.25 (~120 degrees) if (0.25 < dot*dot / ( squared_distance(get(vpm,ph0), get(vpm, v)) * squared_distance(get(vpm,ph1), get(vpm, v))) ) - barycenters.emplace_back(v, vn, - gt_barycenter(get(vpm, ph0), 0.25, get(vpm, ph1), 0.25, get(vpm, v), 0.5)); + { + typename GT::Point_3 bary = gt_barycenter(get(vpm, ph0), 0.25, get(vpm, ph1), 0.25, get(vpm, v), 0.5); + // to avoid shrinking of borders, we project back onto the incident segments + typename GT::Segment_3 s1(get(vpm, ph0), get(vpm,v)), + s2(get(vpm, ph1), get(vpm,v)); + + typename GT::Point_3 p1 = gt_project(s1, bary), p2 = gt_project(s2, bary); + + bary = squared_distance(p1, bary) #include -#include +#include #include #include @@ -63,7 +63,7 @@ namespace CGAL { /// - `Point_3` /// - `Segment_3` /// - `Oriented_side_3` with `Oriented_side operator()(Plane_3, Point_3)` -/// - `Do_intersect_3` with `boost::optional operator()(Plane_3,Segment_3)` +/// - `Do_intersect_3` with `std::optional operator()(Plane_3,Segment_3)` /// - `Do_intersect_3` with `bool operator()(Plane_3, Bbox_3)` /// /// \todo If we keep the traits for plane orthogonal to a frame axis, `Traits` must also provide: @@ -102,7 +102,7 @@ class Polygon_mesh_slicer typedef typename Traits::FT FT; /// typedefs for internal graph to get connectivity of the polylines - typedef boost::variant AL_vertex_info; + typedef std::variant AL_vertex_info; typedef boost::adjacency_list < boost::vecS, boost::vecS, @@ -181,9 +181,9 @@ class Polygon_mesh_slicer AL_vertex_info v1 = al_graph[nodes_for_orient.first]; AL_vertex_info v2 = al_graph[nodes_for_orient.second]; - if (const vertex_descriptor* vd1_ptr = boost::get(&v1) ) + if (const vertex_descriptor* vd1_ptr = std::get_if(&v1) ) { - if (const vertex_descriptor* vd2_ptr = boost::get(&v2) ) + if (const vertex_descriptor* vd2_ptr = std::get_if(&v2) ) { CGAL_assertion( halfedge(*vd1_ptr, *vd2_ptr, m_tmesh).second ); halfedge_descriptor h_opp = halfedge(*vd1_ptr, *vd2_ptr, m_tmesh).first; @@ -207,7 +207,7 @@ class Polygon_mesh_slicer else { // e2 is intersected in its interior - edge_descriptor e2 = boost::get(v2); + edge_descriptor e2 = std::get(v2); halfedge_descriptor h2 = halfedge(e2, m_tmesh); if ( target(next(h2, m_tmesh), m_tmesh) != *vd1_ptr ) h2=opposite(h2, m_tmesh); @@ -216,9 +216,9 @@ class Polygon_mesh_slicer } else { - edge_descriptor e1 = boost::get(v1); + edge_descriptor e1 = std::get(v1); halfedge_descriptor h1 = halfedge(e1, m_tmesh); - if (const vertex_descriptor* vd2_ptr = boost::get(&v2) ) + if (const vertex_descriptor* vd2_ptr = std::get_if(&v2) ) { // e1 is intersected in its interior if ( target(next(h1, m_tmesh), m_tmesh) != *vd2_ptr ) @@ -228,7 +228,7 @@ class Polygon_mesh_slicer else { // intersection in the interior of both edges - edge_descriptor e2 = boost::get(v2); + edge_descriptor e2 = std::get(v2); halfedge_descriptor h2 = halfedge(e2, m_tmesh); if ( face(h1, m_tmesh) != face(h2,m_tmesh) ) { @@ -265,20 +265,20 @@ class Polygon_mesh_slicer nodes_for_orient.second=node_id; AL_vertex_info v = al_graph[node_id]; - if (const vertex_descriptor* vd_ptr = boost::get(&v) ) + if (const vertex_descriptor* vd_ptr = std::get_if(&v) ) { current_poly.push_back( get(m_vpmap, *vd_ptr) ); } else { - edge_descriptor ed = boost::get(v); + edge_descriptor ed = std::get(v); Segment_3 s( get(m_vpmap, source(ed, m_tmesh)), get(m_vpmap,target(ed, m_tmesh)) ); const auto inter = intersect_3(m_plane, s); - CGAL_assertion(inter != boost::none); - const Point_3* pt_ptr = boost::get(&(*inter)); + CGAL_assertion(inter != std::nullopt); + const Point_3* pt_ptr = std::get_if(&(*inter)); current_poly.push_back( *pt_ptr ); } } diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index c8a311a37ae..7a377a935c9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -825,7 +825,7 @@ private: for (unsigned int i = 0; i < cutp.size(); i++){ const Plane& plane_i = prism[cutp[i]]; - boost::optional op = intersection_point_for_polyhedral_envelope(line, plane_i.eplane); + std::optional op = intersection_point_for_polyhedral_envelope(line, plane_i.eplane); if(! op){ std::cout << "there must be an intersection 2" << std::endl; } @@ -950,7 +950,7 @@ private: } for (unsigned int j = 0; j < cidl.size(); j++) { - boost::optional op = intersection_point_for_polyhedral_envelope(line, + std::optional op = intersection_point_for_polyhedral_envelope(line, halfspace[prismindex[queue[i]]][cidl[j]].eplane); const ePoint_3& ip = *op; inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id @@ -1142,7 +1142,7 @@ private: const Plane& plane_i = prism[cutp[i]]; const eLine_3& eline = *(seg[k]); - boost::optional op = intersection_point_for_polyhedral_envelope(eline, plane_i.eplane); + std::optional op = intersection_point_for_polyhedral_envelope(eline, plane_i.eplane); if(! op){ #ifdef CGAL_ENVELOPE_DEBUG std::cout << "there must be an intersection 6" << std::endl; @@ -1227,7 +1227,7 @@ private: } - boost::optional ipp = intersection_point_for_polyhedral_envelope(tri_eplane, prism[cutp[i]].eplane, prism[cutp[j]].eplane); + std::optional ipp = intersection_point_for_polyhedral_envelope(tri_eplane, prism[cutp[i]].eplane, prism[cutp[j]].eplane); if(ipp){ inter = is_3_triangle_cut_float_fast(etri0, etri1, etri2, n, @@ -1667,7 +1667,7 @@ private: if (!cut) continue; for (unsigned int j = 0; j < cidl.size(); j++) { - boost::optional op = intersection_point_for_polyhedral_envelope(eline, + std::optional op = intersection_point_for_polyhedral_envelope(eline, halfspace[prismindex[queue[i]]][cidl[j]].eplane); const ePoint_3& ip = *op; inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id(ip, idlist, jump1, check_id); @@ -1751,7 +1751,7 @@ private: } // now we know that there exists an intesection point - boost::optional op = intersection_point_for_polyhedral_envelope(eline, + std::optional op = intersection_point_for_polyhedral_envelope(eline, halfspace[filtered_intersection[queue[i]]][intersect_face[queue[i]][j]].eplane); const ePoint_3& ip = *op; @@ -1834,7 +1834,7 @@ private: // We moved the intersection here // In case there is no intersection point we continue - boost::optional + std::optional op = intersection_point_for_polyhedral_envelope(etriangle_eplane, halfspace[jump1][intersect_face[queue[i]][k]].eplane, halfspace[jump2][intersect_face[queue[j]][h]].eplane); @@ -2113,7 +2113,7 @@ private: } ePoint_3 origin(env_vertices[env_faces[i][0]].x(), env_vertices[env_faces[i][0]].y(),env_vertices[env_faces[i][0]].z()); Surface_mesh esm; - halfspace_intersection_3(eplanes.begin(),eplanes.end(),esm , boost::make_optional(origin)); + halfspace_intersection_3(eplanes.begin(),eplanes.end(),esm , std::make_optional(origin)); copy_face_graph(esm,sm); } diff --git a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h index 89e28153408..eff54edea7c 100644 --- a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h @@ -99,7 +99,7 @@ class Side_of_triangle_mesh typename GeomTraits::Construct_ray_3 ray_functor; typename GeomTraits::Construct_vector_3 vector_functor; const TriangleMesh* tm_ptr; - boost::optional opt_vpm; + std::optional opt_vpm; bool own_tree; CGAL::Bbox_3 box; #ifdef CGAL_HAS_THREADS @@ -255,7 +255,7 @@ public: CGAL_SCOPED_LOCK(tree_mutex); tree_ptr = const_cast(atomic_tree_ptr.load(std::memory_order_relaxed)); #endif - CGAL_assertion(tm_ptr != nullptr && opt_vpm!=boost::none); + CGAL_assertion(tm_ptr != nullptr && opt_vpm!=std::nullopt); if (tree_ptr==nullptr) { tree_ptr = new AABB_tree(faces(*tm_ptr).first, @@ -297,7 +297,7 @@ public: CGAL_SCOPED_LOCK(tree_mutex); tree_ptr = const_cast(atomic_tree_ptr.load(std::memory_order_relaxed)); #endif - CGAL_assertion(tm_ptr != nullptr && opt_vpm!=boost::none); + CGAL_assertion(tm_ptr != nullptr && opt_vpm!=std::nullopt); if (tree_ptr==nullptr) { tree_ptr = new AABB_tree(faces(*tm_ptr).first, diff --git a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index 458fc0a703c..83562f64601 100644 --- a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h +++ b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -34,8 +34,8 @@ namespace internal { struct Dummy_filter2 { template inline - const boost::optional - operator()(const Profile&, const boost::optional& op) const + const std::optional + operator()(const Profile&, const std::optional& op) const { return op; } @@ -109,8 +109,8 @@ public: template - boost::optional - operator()(const Profile& profile, boost::optional op) const + std::optional + operator()(const Profile& profile, std::optional op) const { typedef typename Profile::Point Point; typedef typename Profile::vertex_descriptor_vector Link; @@ -127,7 +127,7 @@ public: if(! (*m_envelope)(p)){ // the new placement is outside envelope - return boost::none; + return std::nullopt; } const Link link = profile.link(); @@ -141,7 +141,7 @@ public: if(! (*m_envelope)(p, pv, pw)){ // the triangle intersects the envelope - return boost::none; + return std::nullopt; } pv = pw; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp index 1eec758737e..6508c453337 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp @@ -164,11 +164,10 @@ void test_bool_op_no_copy( assert( count_constrained_edges(tm1, ecm1)==307 ); assert( count_constrained_edges(tm2, ecm2)==307 ); - typedef boost::optional OTM; - Triangle_mesh *ptr = nullptr; + typedef std::optional OTM; const std::array output = - reverse ? CGAL::make_array(OTM(&tm2), OTM(&tm1), boost::make_optional(false,ptr), boost::make_optional(false,ptr)) - : CGAL::make_array(OTM(&tm1), OTM(&tm2), boost::make_optional(false,ptr), boost::make_optional(false,ptr)); + reverse ? CGAL::make_array(OTM(&tm2), OTM(&tm1), std::optional(), std::optional()) + : CGAL::make_array(OTM(&tm1), OTM(&tm2), std::optional(), std::optional()); PMP::corefine_and_compute_boolean_operations(tm1, tm2, output, diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp index 244c4601cc0..8356106a9b1 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp @@ -97,7 +97,7 @@ void run_boolean_operations( { std::cout << "Scenario #" << id << " - " << scenario << "\n"; - typedef boost::optional OSM; + typedef std::optional OSM; std::array output; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index 60c14ec9604..d0554ebc9a6 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -209,19 +209,19 @@ void test_constructions(const G& g, // --------------------------------------------------------------------------- loc = std::make_pair(f, CGAL::make_array(FT(0.3), FT(0.4), FT(0.3))); descriptor_variant dv = PMP::get_descriptor_from_location(loc, g); - const face_descriptor* fd = boost::get(&dv); + const face_descriptor* fd = std::get_if(&dv); assert(fd); loc = std::make_pair(f, CGAL::make_array(FT(0.5), FT(0.5), FT(0))); dv = PMP::get_descriptor_from_location(loc, g); - const halfedge_descriptor* hd = boost::get(&dv); + const halfedge_descriptor* hd = std::get_if(&dv); assert(hd); loc = std::make_pair(f, CGAL::make_array(FT(1), FT(0), FT(0))); assert(PMP::is_on_vertex(loc, source(halfedge(f, g), g), g)); dv = PMP::get_descriptor_from_location(loc, g); - if(const vertex_descriptor* v = boost::get(&dv)) { } else { assert(false); } + if(const vertex_descriptor* v = std::get_if(&dv)) { } else { assert(false); } // --------------------------------------------------------------------------- // just to check the API @@ -393,8 +393,8 @@ void test_predicates(const G& g, CGAL::Random& rnd) loc.second[id_of_h] = FT(1); loc.second[(id_of_h+1)%3] = FT(0); loc.second[(id_of_h+2)%3] = FT(0); - boost::optional opt_hd = CGAL::is_border(source(h, g), g); - assert(PMP::is_on_mesh_border(loc, g) == (opt_hd != boost::none)); + std::optional opt_hd = CGAL::is_border(source(h, g), g); + assert(PMP::is_on_mesh_border(loc, g) == (opt_hd != std::nullopt)); loc.second[id_of_h] = FT(0.5); loc.second[(id_of_h+1)%3] = FT(0.5); diff --git a/Polyhedron/demo/Polyhedron/Color_map.h b/Polyhedron/demo/Polyhedron/Color_map.h index a55f0c658d2..150d1424b92 100644 --- a/Polyhedron/demo/Polyhedron/Color_map.h +++ b/Polyhedron/demo/Polyhedron/Color_map.h @@ -3,13 +3,17 @@ #include -inline QColor generate_color(double h, double s_min = 0.35) +#include +#include + +inline QColor generate_color(double h, + double s_min = 0.35) { - std::size_t s_max=255; - if(h >0.8 && h < 0.95) //span of ugly pink, desaturates make it less garish IMO + std::size_t s_max = 255; + if(h > 0.8 && h < 0.95) // span of ugly pink, desaturates make it less garish IMO s_max = 160; std::size_t s = std::rand() % (s_max-static_cast(s_min*255)) + static_cast(s_min*255); - return QColor::fromHsvF(h,s/255.0,1.0); + return QColor::fromHsvF(h, s/255.0, 1.0); } @@ -22,19 +26,23 @@ compute_color_map(QColor base_color, qreal hue = base_color.hueF(); const qreal step = (static_cast(1)) / nb_of_colors; - qreal h = hue==-1 ? 0 - :hue; - for(unsigned i = 0; i < nb_of_colors; ++i) { - if (h!=-1) h += step; - if ( h > 1 ) { h -= 1; } + qreal h = (hue == -1) ? 0 : hue; + for(std::size_t i=0; i 1) + h -= 1; *out++ = generate_color(h); } + return out; } -inline QColor generate_random_color() { +inline QColor generate_random_color() +{ std::size_t h = static_cast(std::rand() % 360); - return generate_color(h/359.0); + return generate_color(h / 359.0); } -#endif +#endif // _COLOR_MAP_H diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 39c537dea5b..111238006ce 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -1267,7 +1267,7 @@ void MainWindow::open(QString filename) bool MainWindow::open(QString filename, QString loader_name) { QFileInfo fileinfo(filename); - boost::optional item_opt; + std::optional item_opt; try { item_opt = wrap_a_call_to_cpp ([this, fileinfo, loader_name]() @@ -1440,7 +1440,7 @@ QList MainWindow::getSelectedSceneItemIndices() const void MainWindow::selectionChanged() { scene->setSelectedItemIndex(getSelectedSceneItemIndex()); - scene->setSelectedItemsList(getSelectedSceneItemIndices()); + scene->setSelectedItemIndices(getSelectedSceneItemIndices()); CGAL::Three::Scene_item* item = scene->item(getSelectedSceneItemIndex()); Q_FOREACH(CGAL::QGLViewer* vi, CGAL::QGLViewer::QGLViewerPool()) { @@ -1890,7 +1890,7 @@ void MainWindow::closeEvent(QCloseEvent *event) bool MainWindow::loadScript(QString filename) { QFileInfo fileinfo(filename); - boost::optional opt = wrap_a_call_to_cpp + std::optional opt = wrap_a_call_to_cpp ([this, fileinfo] { return loadScript(fileinfo); }, this, __FILE__, __LINE__, CGAL::Three::PARENT_CONTEXT); @@ -2193,7 +2193,7 @@ void MainWindow::on_actionEraseAll_triggered() QList all_ids; for(int i = 0; i < scene->numberOfEntries(); ++i) all_ids.push_back(i); - scene->setSelectedItemsList(all_ids); + scene->setSelectedItemIndices(all_ids); on_actionErase_triggered(); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.h b/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.h index 224a66d20c7..ef4d006e2ce 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.h @@ -98,7 +98,7 @@ class Cluster_classification : public Item_classification_base void add_cluster_features () { - m_eigen = boost::make_shared + m_eigen = std::make_shared (Local_eigen_analysis::create_from_point_clusters(m_clusters, Concurrency_tag())); @@ -388,7 +388,7 @@ class Cluster_classification : public Item_classification_base int m_index_color; - boost::shared_ptr m_eigen; + std::shared_ptr m_eigen; bool m_input_is_las; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Display/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Display/CMakeLists.txt index 6e1c9990917..10b1c254b1e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Display/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Display/CMakeLists.txt @@ -1,11 +1,16 @@ include(polyhedron_demo_macros) + +qt5_wrap_ui(display_propertyUI_FILES Display_property.ui) +polyhedron_demo_plugin(display_property_plugin Display_property_plugin ${display_propertyUI_FILES} KEYWORDS Viewer) +target_link_libraries(display_property_plugin PUBLIC scene_surface_mesh_item + scene_points_with_normal_item + scene_color_ramp) + if(TARGET CGAL::Eigen3_support) - qt5_wrap_ui( display_propertyUI_FILES Display_property.ui ) - polyhedron_demo_plugin(display_property_plugin Display_property_plugin ${display_propertyUI_FILES} KEYWORDS Viewer) - target_link_libraries(display_property_plugin - PUBLIC - scene_surface_mesh_item - scene_points_with_normal_item - scene_color_ramp - CGAL::Eigen3_support) + qt5_wrap_ui(heat_methodUI_FILES Heat_method.ui) + polyhedron_demo_plugin(heat_method_plugin Heat_method_plugin ${heat_methodUI_FILES} KEYWORDS Viewer) + target_link_libraries(heat_method_plugin PUBLIC scene_surface_mesh_item + scene_selection_item + scene_color_ramp + CGAL::Eigen3_support) endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property.ui b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property.ui index 7a5a19621f4..656ec4827c5 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property.ui @@ -2,26 +2,202 @@ DisplayPropertyWidget + + false + 0 0 - 292 - 508 + 514 + 695 + + + 514 + 695 + + - Property Displaying + Property Display - - - - - - - Qt::ScrollBarAlwaysOff + + + + + + Cantarell + true + + + + Color Item + + + + + + + Property + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + QComboBox::AdjustToContents + + + + Smallest Angle Per Face + + + + + Scaled Jacobian + + + + + Heat Intensity + + + + + Heat Intensity (Intrinsic Delaunay) + + + + + + + + + + + + + Qt::Vertical + + + 20 + 40 + + + + + + + + Color Visualization + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Random colors + + + + + + + + + + + + + + + + + First color + + + + + + + Max color + + + + + + + Color Ramp + + + true + + + + + + + + + + + + + + + + + + + + + Min color + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + true @@ -30,12 +206,12 @@ 0 0 - 127 - 430 + 236 + 397 - - + + RAMP DISPLAYING @@ -46,206 +222,70 @@ - - - - - - - - - - - - - - - - - - - - Colorize - - - - - - - 0 - - - - Ramp - - - - - - Ramp Colors - - - - - - Color Min... - - - - - - - Color Max... - - - - - - - - - - - Map - - - - - - Initial Color... - - - - - - - - - - - Select Source Points - - - true - - - - - - - Zoom - - - - - - Zoom to min - - - - - - - Zoom to max - - - - - - - - - - Ramp Extrema - - - - - - 0.00 - - - - - - - 2.00 - - - - - - - - - - false - - - Delete Group - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QComboBox::AdjustToContents - - - - Smallest Angle Per Face - - - - - Scaled Jacobian - - - - - Heat Intensity - - - - - Heat Intensity (Intrinsic Delaunay) - - - - - - - - - - Qt::Vertical + + + + false - - - 20 - 40 - + + Extreme Values - + + + + + Min Value + + + + + + + Max Value + + + + + + + 2.00 + + + true + + + + + + + Zoom to max value + + + + + + + Zoom to min value + + + + + + + 0.00 + + + true + + + true + + + + + diff --git a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp index 51f960a7cb4..994dcd2e8d9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp @@ -1,400 +1,148 @@ + +#include "ui_Display_property.h" + +#include "Color_map.h" +#include "Color_ramp.h" +#include "id_printing.h" +#include "Messages_interface.h" + +#include "Scene.h" +#include "Scene_surface_mesh_item.h" +#include "Scene_points_with_normal_item.h" +#include "triangulate_primitive.h" + +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include -#include -#include - -#include "Scene_points_with_normal_item.h" - -#include "Messages_interface.h" -#include "Scene_surface_mesh_item.h" -#include "Color_ramp.h" -#include "Color_map.h" -#include "ui_Display_property.h" -#include "id_printing.h" -#include "Scene.h" -#include "triangulate_primitive.h" -#include -#include #include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + #include #include +#include -#define ARBITRARY_DBL_MIN 1.0E-30 -#define ARBITRARY_DBL_MAX 1.0E+30 +#define ARBITRARY_DBL_MIN 1.0E-17 +#define ARBITRARY_DBL_MAX 1.0E+17 +using namespace CGAL::Three; +Viewer_interface* (&getActiveViewer)() = Three::activeViewer; -//Item for heat values -typedef CGAL::Three::Triangle_container Tri; -typedef CGAL::Three::Viewer_interface VI; - -class Scene_heat_item - : public CGAL::Three::Scene_item_rendering_helper -{ - Q_OBJECT - -public: - Scene_heat_item(Scene_surface_mesh_item* item) - :sm(item->face_graph()), parent(item) - { - setTriangleContainer(0, new Triangle_container(VI::PROGRAM_HEAT_INTENSITY, - true)); - setRenderingMode(Gouraud); - } - Scene_item* clone() const Q_DECL_OVERRIDE {return nullptr;} - QString toolTip() const Q_DECL_OVERRIDE{return QString(); } - void select(double orig_x, - double orig_y, - double orig_z, - double dir_x, - double dir_y, - double dir_z) Q_DECL_OVERRIDE - { - parent->select( orig_x, orig_y, orig_z, - dir_x, dir_y, dir_z); - } - - void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const Q_DECL_OVERRIDE - { - getTriangleContainer(0)->initializeBuffers(viewer); - getTriangleContainer(0)->setIdxSize(nb_idx); - verts.resize(0); - normals .resize(0); - colors.resize(0); - idx.clear(); - idx.shrink_to_fit(); - colors.shrink_to_fit(); - verts.shrink_to_fit(); - normals.shrink_to_fit(); - } - - void draw(CGAL::Three::Viewer_interface *viewer) const Q_DECL_OVERRIDE - { - if(!visible()) - return; - if(!isInit(viewer)) - initGL(viewer); - if ( getBuffersFilled() && - ! getBuffersInit(viewer)) - { - initializeBuffers(viewer); - setBuffersInit(viewer, true); - } - if(!getBuffersFilled()) - { - computeElements(); - initializeBuffers(viewer); - } - - getTriangleContainer(0)->setAlpha(1.0f); - getTriangleContainer(0)->draw(viewer, false); - } - void compute_bbox() const Q_DECL_OVERRIDE - { - SMesh::Property_map pprop = sm->points(); - CGAL::Bbox_3 bbox ; - - for(vertex_descriptor vd :vertices(*sm)) - { - bbox = bbox + pprop[vd].bbox(); - } - _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), - bbox.xmax(),bbox.ymax(),bbox.zmax()); - is_bbox_computed = true; - } - Scene_item::Bbox bbox() const Q_DECL_OVERRIDE { - if(!is_bbox_computed) - compute_bbox(); - is_bbox_computed = true; - return _bbox; - } - - ~Scene_heat_item(){} - virtual bool supportsRenderingMode(RenderingMode m) const Q_DECL_OVERRIDE { return m==Gouraud; } - virtual void invalidateOpenGLBuffers() Q_DECL_OVERRIDE - { - - setBuffersFilled(false); - compute_bbox(); - getTriangleContainer(0)->reset_vbos(NOT_INSTANCED); - is_bbox_computed = false; - } - void triangulate_convex_facet(face_descriptor fd, - boost::property_map< SMesh, boost::vertex_index_t >::type *im) const - { - const CGAL::qglviewer::Vec v_offset = static_cast(CGAL::QGLViewer::QGLViewerPool().first())->offset(); - EPICK::Vector_3 offset = EPICK::Vector_3(v_offset.x, v_offset.y, v_offset.z); - - EPICK::Point_3 p0,p1,p2; - SMesh::Halfedge_around_face_circulator he(halfedge(fd, *sm), *sm); - SMesh::Halfedge_around_face_circulator he_end = he; - - while(next(*he, *sm) != prev(*he_end, *sm)) - { - ++he; - vertex_descriptor v0(target(*he_end, *sm)), - v1(target(*he, *sm)), - v2(target(next(*he, *sm), *sm)); - p0 = sm->point(v0) + offset; - p1 = sm->point(v1) + offset; - p2 = sm->point(v2) + offset; - idx.push_back((*im)[v0]); - idx.push_back((*im)[v1]); - idx.push_back((*im)[v2]); - } - } - void triangulate_facet(face_descriptor fd, - SMesh::Property_map *fnormals, - boost::property_map< SMesh, boost::vertex_index_t >::type *im) const - { - //Computes the normal of the facet - EPICK::Vector_3 normal = get(*fnormals, fd); - - //check if normal contains NaN values - if (normal.x() != normal.x() || normal.y() != normal.y() || normal.z() != normal.z()) - { - qDebug()<<"Warning : normal is not valid. Facet not displayed"; - return; - } - - typedef FacetTriangulator::vertex_descriptor> FT; - const CGAL::qglviewer::Vec off = static_cast(CGAL::QGLViewer::QGLViewerPool().first())->offset(); - EPICK::Vector_3 offset(off.x,off.y,off.z); - FT triangulation(fd,normal,sm, offset); - //iterates on the internal faces - for(FT::CDT::Finite_faces_iterator - ffit = triangulation.cdt->finite_faces_begin(), - end = triangulation.cdt->finite_faces_end(); - ffit != end; ++ffit) - { - if(ffit->info().is_external) - continue; - //add the vertices to the positions - //adds the vertices, normals and colors to the appropriate vectors - //adds the indices to the appropriate vector - idx.push_back((*im)[triangulation.v2v[ffit->vertex(0)]]); - idx.push_back((*im)[triangulation.v2v[ffit->vertex(1)]]); - idx.push_back((*im)[triangulation.v2v[ffit->vertex(2)]]); - } - } - - void computeElements() const Q_DECL_OVERRIDE - { - typedef EPICK::Point_3 Point; - QApplication::setOverrideCursor(Qt::WaitCursor); - const CGAL::qglviewer::Vec o = static_cast(CGAL::QGLViewer::QGLViewerPool().first())->offset(); - EPICK::Vector_3 offset(o.x, o.y, o.z); - SMesh::Property_map positions = - sm->points(); - SMesh::Property_map vnormals = - sm->property_map("v:normal").first; - SMesh::Property_map fnormals = - sm->property_map("f:normal").first; - typedef boost::graph_traits::face_descriptor face_descriptor; - typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef boost::graph_traits::vertex_descriptor vertex_descriptor; - SMesh::Property_map vcolors = - sm->property_map("v:color").first; - SMesh::Property_map vdist= - sm->property_map("v:dist").first; - typedef CGAL::Buffer_for_vao CPF; - verts.clear(); - normals.clear(); - idx.clear(); - colors.clear(); - boost::property_map< SMesh, boost::vertex_index_t >::type - im = get(boost::vertex_index, *sm); - - idx.reserve(num_faces(*sm) * 3); - for(face_descriptor fd : faces(*sm)) - { - if(is_triangle(halfedge(fd,*sm),*sm)) - { - for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, *sm),*sm)) - { - idx.push_back(source(hd, *sm)); - } - } - else - { - std::vector facet_points; - for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, *sm),*sm)) - { - facet_points.push_back(positions[target(hd, *sm)]); - } - bool is_convex = CPF::is_facet_convex(facet_points, fnormals[fd]); - - if(is_convex && is_quad(halfedge(fd,*sm),*sm) ) - { - halfedge_descriptor hd = halfedge(fd,*sm); - //1st half - idx.push_back(source(hd, *sm)); - idx.push_back(source(next(hd, *sm), *sm)); - idx.push_back(source(next(next(hd, *sm), *sm), *sm)); - - //2nd half - idx.push_back(source(hd, *sm)); - idx.push_back(source(next(next(hd, *sm), *sm), *sm)); - idx.push_back(source(prev(hd, *sm), *sm)); - } - else if(is_convex) - { - triangulate_convex_facet(fd, &im); - } - else - { - triangulate_facet(fd, &fnormals, &im); - } - } - } - for(vertex_descriptor vd : vertices(*sm)) - { - CGAL::IO::Color c = vcolors[vd]; - colors.push_back((float)c.red()/255); - colors.push_back((float)c.green()/255); - colors.push_back((float)c.blue()/255); - - - Point p = positions[vd] + offset; - CPF::add_point_in_buffer(p, verts); - EPICK::Vector_3 n = vnormals[vd]; - CPF::add_normal_in_buffer(n, normals); - heat_values.push_back(vdist[vd]); - } - nb_idx = idx.size(); - getTriangleContainer(0)->allocate(Tri::Vertex_indices, idx.data(), - static_cast(idx.size()*sizeof(unsigned int))); - getTriangleContainer(0)->allocate(Tri::Smooth_vertices, verts.data(), - static_cast(num_vertices(*sm)*3*sizeof(float))); - - getTriangleContainer(0)->allocate(Tri::Smooth_normals, normals.data(), - static_cast(num_vertices(*sm)*3*sizeof(float))); - getTriangleContainer(0)->allocate(Tri::VColors, colors.data(), - static_cast(colors.size()*sizeof(float))); - getTriangleContainer(0)->allocate(Tri::Distances, heat_values.data(), - static_cast(heat_values.size()*sizeof(float))); - compute_bbox(); - setBuffersFilled(true); - QApplication::restoreOverrideCursor(); - } - - bool isEmpty() const Q_DECL_OVERRIDE {return false;} - SMesh *face_graph() { return sm;} - Scene_surface_mesh_item* getParent() { return parent; } - -private: - SMesh* sm; - Scene_surface_mesh_item* parent; - mutable std::vector normals; - mutable std::vector idx; - mutable std::vector verts; - mutable std::vector colors; - mutable std::vector heat_values; - mutable std::size_t nb_idx; -}; // end class Scene_heat_item - -class DockWidget : - public QDockWidget, +class DockWidget + : public QDockWidget, public Ui::DisplayPropertyWidget { public: - DockWidget(QString name, QWidget *parent) - :QDockWidget(name,parent) + DockWidget(const QString& name, QWidget *parent) + : QDockWidget(name, parent) { setupUi(this); } }; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; -typedef boost::graph_traits::face_descriptor face_descriptor; -CGAL::Three::Viewer_interface* (&getActiveViewer)() = CGAL::Three::Three::activeViewer; -class DisplayPropertyPlugin : - public QObject, - public CGAL::Three::Polyhedron_demo_plugin_helper +class Display_property_plugin + : public QObject, + public Polyhedron_demo_plugin_helper { Q_OBJECT Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - typedef SMesh::Property_map::vertex_descriptor, double> Vertex_distance_map; - typedef CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3 Heat_method; - typedef CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3 Heat_method_idt; - typedef CGAL::dynamic_vertex_property_t Vertex_source_tag; - typedef boost::property_map::type Vertex_source_map; + +private: + QAction* actionDisplayProperties; + + DockWidget* dock_widget; + + // coloring choice and legend + double rm = 1.; + double gm = 0.; + double bm = 0.; + double rM = 0.; + double gM = 1.; + double bM = 0.; + double rI = 0.; + double gI = 1.; + double bI = 0.; + + Color_ramp color_ramp; + std::vector color_map; + QPixmap legend; + + // tracks whether property 'i' (aka i-th in propertyBox) applies to vertices or faces + enum class Property_simplex_type { VERTEX, FACE }; + std::vector property_simplex_types; + + enum Extremum + { + MIN_VALUE, + MAX_VALUE + }; public: - - bool applicable(QAction* action) const Q_DECL_OVERRIDE + bool applicable(QAction*) const Q_DECL_OVERRIDE { - CGAL::Three::Scene_item* item = scene->item(scene->mainSelectionIndex()); - if(action == _actions.back()) - return qobject_cast(item); - else - return qobject_cast(item) - || qobject_cast(item); + Scene_item* item = scene->item(scene->mainSelectionIndex()); + if(!item) + return false; + + return qobject_cast(item) || + qobject_cast(item); } QList actions() const Q_DECL_OVERRIDE { - return _actions; + return QList() << actionDisplayProperties; } - QColor textColor(const QColor& color) - { - QColor text_color (255, 255, 255); - if (color.red() * 0.299 + color.green() * 0.587 + color.blue() * 0.114 > 128) - text_color = QColor (0, 0, 0); - return text_color; - } - - void init(QMainWindow* mw, CGAL::Three::Scene_interface* sc, Messages_interface*) Q_DECL_OVERRIDE + void init(QMainWindow* mw, + Scene_interface* sc, + Messages_interface*) Q_DECL_OVERRIDE { this->scene = sc; this->mw = mw; - this->current_item = nullptr; - QAction *actionDisplayProperties= new QAction(QString("Display Properties"), mw); - QAction *actionHeatMethod= new QAction(QString("Heat Method"), mw); - actionHeatMethod->setProperty("submenuName", "Color"); - - rm = 1.0; - rM = 0.0; - gm = 0.0; - gM = 1.0; - bm = 0.0; - bM = 0.0; + // Main action + actionDisplayProperties = new QAction(QString("Display Properties"), mw); actionDisplayProperties->setProperty("submenuName", "Color"); - if(actionDisplayProperties) { - connect(actionDisplayProperties, SIGNAL(triggered()), - this, SLOT(openDialog())); - if(actionHeatMethod) - { - connect(actionHeatMethod, &QAction::triggered, - this, [this](){ - this->dock_widget->propertyBox->setCurrentIndex(2); - this->dock_widget->show(); - }); - } - _actions << actionDisplayProperties; - _actions << actionHeatMethod; + connect(actionDisplayProperties, SIGNAL(triggered()), + this, SLOT(openDialog())); - } - dock_widget = new DockWidget("Property Displaying", mw); - dock_widget->setVisible(false); + Scene* scene_item = static_cast(scene); + connect(scene_item, SIGNAL(itemIndexSelected(int)), + this, SLOT(onItemIndexSelected(int))); + + // Dock Widget + dock_widget = new DockWidget("Property Display", mw); addDockWidget(dock_widget); + + dock_widget->setVisible(false); + dock_widget->setEnabled(false); + + connect(dock_widget->propertyBox, SIGNAL(currentIndexChanged(int)), + this, SLOT(onNewPropertySelected(int))); + QPalette palette(Qt::red); dock_widget->minColorButton->setPalette(palette); dock_widget->minColorButton->setStyle(QStyleFactory::create("Fusion")); @@ -410,1288 +158,1066 @@ public: dock_widget->initColorButton->setStyle(QStyleFactory::create("Fusion")); dock_widget->initColorButton->update(); + displayRampLegend(); + + // lambda to generate the three connect(), for each color button (min, max, map) + auto connect_color_buttons = [this](QPushButton* colorButton, + double& r, double& g, double& b) + { + connect(colorButton, &QPushButton::pressed, + this, [this, colorButton, &r, &g, &b]() + { + QColor color = QColorDialog::getColor(); + if(!color.isValid()) + return; + + r = color.redF(); + g = color.greenF(); + b = color.blueF(); + + QPalette palette(color); + colorButton->setPalette(palette); + colorButton->update(); + + displayLegend(); + }); + }; + + connect_color_buttons(dock_widget->minColorButton, rm, gm, bm); + connect_color_buttons(dock_widget->maxColorButton, rM, gM, bM); + connect_color_buttons(dock_widget->initColorButton, rI, gI, bI); + + displayLegend(); + connect(dock_widget->colorizeButton, SIGNAL(clicked(bool)), this, SLOT(colorize())); - connect(dock_widget->propertyBox, SIGNAL(currentIndexChanged(int)), - this, SLOT(on_propertyBox_currentIndexChanged(int))); connect(dock_widget->zoomToMinButton, &QPushButton::pressed, - this, &DisplayPropertyPlugin::on_zoomToMinButton_pressed); + this, &Display_property_plugin::on_zoomToMinButton_pressed); connect(dock_widget->zoomToMaxButton, &QPushButton::pressed, - this, &DisplayPropertyPlugin::on_zoomToMaxButton_pressed); - connect(dock_widget->minColorButton, &QPushButton::pressed, - this, [this]() - { - QColor minColor = QColorDialog::getColor(); - if (!minColor.isValid()) - { - return; - } - - rm = minColor.redF(); - gm = minColor.greenF(); - bm = minColor.blueF(); - QPalette palette(minColor); - dock_widget->minColorButton->setPalette(palette); - dock_widget->minColorButton->update(); - replaceRamp(); - }); - connect(dock_widget->maxColorButton, &QPushButton::pressed, - this, [this]() - { - QColor maxColor = QColorDialog::getColor(); - if(!maxColor.isValid()) - return; - QPalette palette(maxColor); - rM = maxColor.redF(); - gM = maxColor.greenF(); - bM = maxColor.blueF(); - - dock_widget->maxColorButton->setPalette(palette); - dock_widget->maxColorButton->update(); - replaceRamp(); - }); - - connect(dock_widget->initColorButton, &QPushButton::pressed, - this, [this]() - { - QColor initColor = QColorDialog::getColor(); - if (!initColor.isValid()) - { - return; - } - - QPalette palette(initColor); - rI = initColor.redF(); - gI = initColor.greenF(); - bI = initColor.blueF(); - dock_widget->initColorButton->setPalette(palette); - dock_widget->initColorButton->update(); - }); - - connect(dock_widget->sourcePointsButton, SIGNAL(toggled(bool)), - this, SLOT(on_sourcePointsButton_toggled(bool))); - connect(dock_widget->deleteButton, &QPushButton::clicked, - this, &DisplayPropertyPlugin::delete_group); - - dock_widget->zoomToMaxButton->setEnabled(false); - dock_widget->zoomToMinButton->setEnabled(false); - Scene* scene_obj =static_cast(scene); - connect(scene_obj, SIGNAL(itemIndexSelected(int)), - this,SLOT(enableButtons(int))); - connect(scene_obj, SIGNAL(itemIndexSelected(int)), - this,SLOT(detectScalarProperties(int))); - - on_propertyBox_currentIndexChanged(0); - - - } -private: - - void detectSMScalarProperties(SMesh* smesh) - { - std::vector vprop = smesh->properties(); - std::vector fprop = smesh->properties(); - for(auto s : vprop) - if(is_property_scalar(s, smesh)) - { - dock_widget->propertyBox->addItem(s.c_str()); - } - for(auto s : fprop) - if(is_property_scalar(s, smesh)) - { - dock_widget->propertyBox->addItem(s.c_str()); - } + this, &Display_property_plugin::on_zoomToMaxButton_pressed); } - void detectPSScalarProperties(Point_set* ps) - { - for(auto s : ps->properties()) - if(is_property_scalar(s, ps)) - { - dock_widget->propertyBox->addItem(s.c_str()); - } - } private Q_SLOTS: - void detectScalarProperties(int i) - { - for(int j = dock_widget->propertyBox->count(); j>=0; --j) - dock_widget->propertyBox->removeItem(j); - - Scene_surface_mesh_item* sm_item = - qobject_cast(scene->item(i)); - Scene_points_with_normal_item* p_item = - qobject_cast(scene->item(i)); - - if(sm_item) - { - dock_widget->propertyBox->addItem("Smallest Angle Per Face"); - dock_widget->propertyBox->addItem("Scaled Jacobian"); - dock_widget->propertyBox->addItem("Heat Intensity"); - dock_widget->propertyBox->addItem("Heat Intensity (Intrinsic Delaunay)"); - detectSMScalarProperties(sm_item->face_graph()); - - } - else if(p_item) - { - detectPSScalarProperties(p_item->point_set()); - } - int width = dock_widget->propertyBox->minimumSizeHint().width(); - dock_widget->propertyBox->view()->setMinimumWidth(width); - } - void openDialog() { - if(dock_widget->isVisible()) { dock_widget->hide(); } - else{ + if(!dock_widget->isVisible()) dock_widget->show(); - dock_widget->raise(); } + dock_widget->raise(); } - void colorizePS(Scene_points_with_normal_item* ps_item) - { - ps_item->point_set()->add_colors(); - if(!treat_point_property(dock_widget->propertyBox->currentText().toStdString(), ps_item->point_set())) - { - QApplication::restoreOverrideCursor(); - return; - } - ps_item->setPointsMode(); - ps_item->invalidateOpenGLBuffers(); - ps_item->itemChanged(); - } - void colorize() - { - Scene_points_with_normal_item* p_item = - qobject_cast(scene->item(scene->mainSelectionIndex())); - if(p_item) - { - colorizePS(p_item); - return; - } - Scene_heat_item* h_item = nullptr; - Scene_surface_mesh_item* sm_item = - qobject_cast(scene->item(scene->mainSelectionIndex())); - if(!sm_item) - { - h_item = qobject_cast(scene->item(scene->mainSelectionIndex())); - if(!h_item) - return; - sm_item = h_item->getParent(); - } - QApplication::setOverrideCursor(Qt::WaitCursor); - sm_item->face_graph()->collect_garbage(); - - switch(dock_widget->propertyBox->currentIndex()){ - case 0: - displayAngles(sm_item); - break; - case 1: - displayScaledJacobian(sm_item); - break; - case 2: - dock_widget->colorChoiceWidget->setCurrentIndex(0); - if(!displayHeatIntensity(sm_item)){ - QApplication::restoreOverrideCursor(); - return; - } - sm_item->setRenderingMode(Gouraud); - break; - case 3:// Heat Method (Intrinsic Delaunay) - dock_widget->colorChoiceWidget->setCurrentIndex(0); - if(!displayHeatIntensity(sm_item, true)) - return; - sm_item->setRenderingMode(Gouraud); - break; - default: - if(dock_widget->propertyBox->currentText().contains("v:")) - { - if(!treat_sm_property(dock_widget->propertyBox->currentText().toStdString(), sm_item->face_graph())) - { - QApplication::restoreOverrideCursor(); - return; - } - sm_item->setRenderingMode(Gouraud); - } - else if(dock_widget->propertyBox->currentText().contains("f:")) - { - if(!treat_sm_property(dock_widget->propertyBox->currentText().toStdString(), sm_item->face_graph())) - { - QApplication::restoreOverrideCursor(); - return; - } - sm_item->setRenderingMode(Flat); - } - break; - } - - connect(sm_item, &Scene_surface_mesh_item::itemChanged, - this, [sm_item](){ - bool does_exist; - SMesh::Property_map pmap; - std::tie(pmap, does_exist) = - sm_item->face_graph()->property_map("f:jacobian"); - if(does_exist) - sm_item->face_graph()->remove_property_map(pmap); - std::tie(pmap, does_exist) = - sm_item->face_graph()->property_map("f:angle"); - if(does_exist) - sm_item->face_graph()->remove_property_map(pmap); - }); - QApplication::restoreOverrideCursor(); - sm_item->invalidateOpenGLBuffers(); - sm_item->redraw(); - if(dock_widget->propertyBox->currentIndex() != 2){ - dock_widget->zoomToMinButton->setEnabled(true); - dock_widget->zoomToMaxButton->setEnabled(true);} - } - - void enableButtons(int i) - { - Scene_surface_mesh_item* sm_item = - qobject_cast(scene->item(i)); - - Scene_points_with_normal_item* ps_item = - qobject_cast(scene->item(i)); - - if(! sm_item && ! ps_item) - { - dock_widget->zoomToMinButton->setEnabled(false); - dock_widget->zoomToMaxButton->setEnabled(false); - } - else if(ps_item) - { - dock_widget->zoomToMinButton->setEnabled(false); - dock_widget->zoomToMaxButton->setEnabled(false); - } - else if(sm_item){ - switch(dock_widget->propertyBox->currentIndex()) - { - case 0: - dock_widget->zoomToMinButton->setEnabled(angles_max.count(sm_item)>0 ); - dock_widget->zoomToMaxButton->setEnabled(angles_max.count(sm_item)>0 ); - break; - case 1: - dock_widget->zoomToMinButton->setEnabled(jacobian_max.count(sm_item)>0); - dock_widget->zoomToMaxButton->setEnabled(jacobian_max.count(sm_item)>0); - break; - default: - break; - } - } - } - - void resetProperty() - { - Scene_surface_mesh_item* item = - qobject_cast(sender()); - if(!item) - return; - SMesh& smesh = *item->face_graph(); - SMesh::Property_map jacobians; - bool found; - std::tie(jacobians, found) = smesh.property_map("f:jacobian"); - if(found) - { - smesh.remove_property_map(jacobians); - } - SMesh::Property_map angles; - std::tie(angles, found) = smesh.property_map("f:angle"); - if(found) - { - smesh.remove_property_map(angles); - } - } - - void displayScaledJacobian(Scene_surface_mesh_item* item) - { - - SMesh& smesh = *item->face_graph(); - //compute and store the jacobian per face - bool non_init; - SMesh::Property_map fjacobian; - std::tie(fjacobian, non_init) = smesh.add_property_map("f:jacobian", 0); - if(non_init) - { - double res_min = ARBITRARY_DBL_MAX, - res_max = -ARBITRARY_DBL_MAX; - SMesh::Face_index min_index, max_index; - for(boost::graph_traits::face_iterator fit = faces(smesh).begin(); - fit != faces(smesh).end(); - ++fit) - { - fjacobian[*fit] = scaled_jacobian(*fit, smesh); - if(fjacobian[*fit] > res_max) - { - res_max = fjacobian[*fit]; - max_index = *fit; - } - if(fjacobian[*fit] < res_min) - { - res_min = fjacobian[*fit]; - min_index = *fit; - } - } - jacobian_min.erase(item); - jacobian_min.insert(std::make_pair(item, std::make_pair(res_min, min_index))); - jacobian_max.erase(item); - jacobian_max.insert(std::make_pair(item, std::make_pair(res_max, max_index))); - connect(item, &Scene_surface_mesh_item::itemChanged, - this, &DisplayPropertyPlugin::resetProperty); - } - treat_sm_property("f:jacobian", item->face_graph()); - } - - bool resetScaledJacobian(Scene_surface_mesh_item* item) - { - SMesh& smesh = *item->face_graph(); - if(!smesh.property_map("f:jacobian").second) - { - return false; - } - dock_widget->minBox->setValue(jacobian_min[item].first-0.01); - dock_widget->maxBox->setValue(jacobian_max[item].first); - return true; - } - - - void displayAngles(Scene_surface_mesh_item* item) - { - SMesh& smesh = *item->face_graph(); - typedef boost::property_map::type PMap; - PMap pmap = get(boost::vertex_point, smesh); - //compute and store smallest angle per face - bool non_init; - SMesh::Property_map fangle; - std::tie(fangle, non_init) = smesh.add_property_map("f:angle", 0); - if(non_init) - { - double res_min = ARBITRARY_DBL_MAX, - res_max = -ARBITRARY_DBL_MAX; - SMesh::Face_index index_min, index_max; - for(boost::graph_traits::face_iterator fit = faces(smesh).begin(); - fit != faces(smesh).end(); - ++fit) - { - bool is_face_triangle = is_triangle(halfedge(*fit, smesh), smesh); - bool normal_is_ok = true; - EPICK::Vector_3 normal(0,0,0); - - EPICK::Orientation orientation = CGAL::POSITIVE; - if(!is_face_triangle) - { - face_descriptor f = *fit; - CGAL::Halfedge_around_face_circulator - he(halfedge(f, smesh), smesh), - he_end(he); - do{ - normal_is_ok = true; - - //Initializes the facet orientation - - EPICK::Point_3 S,T; - T = get(pmap, source(*he, smesh)); - S = get(pmap, target(*he, smesh)); - EPICK::Vector_3 V1((T-S).x(), (T-S).y(), (T-S).z()); - S = get(pmap,source(next(*he,smesh), smesh)); - T = get(pmap, target(next(*he,smesh), smesh)); - EPICK::Vector_3 V2((T-S).x(), (T-S).y(), (T-S).z()); - - if(normal == EPICK::Vector_3(0,0,0)) - normal_is_ok = false; - { - normal = CGAL::cross_product(V1, V2); - } - if(normal_is_ok) - { - orientation = EPICK::Orientation_3()(V1, V2, normal); - if( orientation == CGAL::COPLANAR ) - normal_is_ok = false; - } - }while( ++he != he_end && !normal_is_ok); - } - - std::vector local_angles; - local_angles.reserve(degree(*fit, smesh)); - for(halfedge_descriptor hd : - halfedges_around_face(halfedge(*fit, smesh),smesh)) - { - halfedge_descriptor hdn = next(hd, smesh); - EPICK::Vector_3 v1(get(pmap, source(hd, smesh)), get(pmap, target(hd, smesh))), - v2(get(pmap, target(hdn, smesh)), get(pmap, source(hdn, smesh))); - float norm1(CGAL::approximate_sqrt(v1.squared_length())), norm2(CGAL::approximate_sqrt(v2.squared_length())); - float dot_prod = v1*v2; - float angle = std::acos(dot_prod/(norm1*norm2)); - if(is_face_triangle || !normal_is_ok) - local_angles.push_back(angle * 180/CGAL_PI); - else - { - bool is_convex = true; - EPICK::Orientation res = EPICK::Orientation_3()(v1, v2, normal) ; - if(res!= orientation && res != CGAL::ZERO) - is_convex = false; - local_angles.push_back(is_convex ? angle * 180/CGAL_PI : 360 - angle * 180/CGAL_PI ); - } - } - std::sort(local_angles.begin(), local_angles.end()); - fangle[*fit]=local_angles.front(); - - if(fangle[*fit] > res_max) - { - res_max = fangle[*fit]; - index_max = *fit; - } - if(fangle[*fit] < res_min) - { - res_min = fangle[*fit]; - index_min = *fit; - } - } - angles_min.erase(item); - angles_min.insert(std::make_pair(item, std::make_pair(res_min, index_min))); - angles_max.erase(item); - angles_max.insert(std::make_pair(item, std::make_pair(res_max, index_max))); - - connect(item, &Scene_surface_mesh_item::itemChanged, - this, &DisplayPropertyPlugin::resetProperty); - } - treat_sm_property("f:angle", item->face_graph()); - } - - bool resetAngles(Scene_surface_mesh_item* item) - { - SMesh& smesh = *item->face_graph(); - if(!smesh.property_map("f:angle").second) - { - return false; - } - dock_widget->minBox->setValue(angles_min[item].first); - dock_widget->maxBox->setValue(angles_max[item].first); - return true; - } - - // AF: This function gets called when we click on the button "Colorize" - bool displayHeatIntensity(Scene_surface_mesh_item* item, bool iDT = false) - { - SMesh& mesh = *item->face_graph(); - bool found = is_source.find(item) != is_source.end(); - if(!found - || ! source_points - || source_points->point_set()->is_empty()) - { - QApplication::restoreOverrideCursor(); - QMessageBox::warning(mw, "Warning","Source vertices are needed for this property."); - return false; - } - if(!is_triangle_mesh(mesh)) - { - QApplication::restoreOverrideCursor(); - QMessageBox::warning(mw,"Error","The mesh must be triangulated."); - return false; - } - Heat_method * hm = nullptr; - Heat_method_idt * hm_idt = nullptr; - SMesh::Property_map heat_intensity = - mesh.add_property_map("v:heat_intensity", 0).first; - if(! iDT){ - if(mesh_heat_method_map.find(item) != mesh_heat_method_map.end()){ - hm = mesh_heat_method_map[item]; - }else { - hm = new Heat_method(mesh); - mesh_heat_method_map[item] = hm; - } - connect(item, &Scene_surface_mesh_item::aboutToBeDestroyed, - [this,item](){ - auto it = mesh_heat_method_map.find(item); - if(it == mesh_heat_method_map.end()) - return; - delete it->second; - mesh_heat_method_map.erase(it); - } - ); - } else { - if(mesh_heat_method_idt_map.find(item) != mesh_heat_method_idt_map.end()){ - hm_idt = mesh_heat_method_idt_map[item]; - }else { - hm_idt = new Heat_method_idt(mesh); - mesh_heat_method_idt_map[item] = hm_idt; - } - connect(item, &Scene_surface_mesh_item::aboutToBeDestroyed, - [this,item](){ - auto it = mesh_heat_method_idt_map.find(item); - if(it == mesh_heat_method_idt_map.end()) - return; - Heat_method_idt *hm_idt = it->second; - delete hm_idt; - mesh_heat_method_idt_map.erase(it); - } - ); - } - - for(vertex_descriptor vd : vertices(mesh)){ - if(get(is_source[item], vd)){ - if(iDT){ - hm_idt->add_source(vd); - } else - hm->add_source(vd); - } - else - { - if(iDT){ - hm_idt->remove_source(vd); - } else - hm->remove_source(vd); - } - } - - if(iDT){ - hm_idt->estimate_geodesic_distances(heat_intensity); - }else{ - hm->estimate_geodesic_distances(heat_intensity); - } - - double max = 0; - double min = (std::numeric_limits::max)(); - - for(vertex_descriptor vd : vertices(mesh)){ - double hi = heat_intensity[vd]; - if(hi < min) - min = hi; - if(hi > max) - max = hi; - } - color_ramp = Color_ramp(rm, rM, gm, gM, bm, bM); - dock_widget->minBox->setValue(min); - dock_widget->maxBox->setValue(max); - displayLegend(); - //} - SMesh::Property_map vcolors = - mesh.add_property_map("v:color", CGAL::IO::Color()).first; - SMesh::Property_map vdist= - mesh.add_property_map("v:dist", 0.0).first; - for(boost::graph_traits::vertex_iterator vit = vertices(mesh).begin(); - vit != vertices(mesh).end(); - ++vit) - { - double h =(heat_intensity[*vit]-min)/(max-min); - CGAL::IO::Color color( - 255*color_ramp.r(h), - 255*color_ramp.g(h), - 255*color_ramp.b(h)); - vcolors[*vit] = color; - vdist[*vit]=h; - } - Scene_group_item* group; - if(mesh_heat_item_map.find(item) != mesh_heat_item_map.end()) - { - group = mesh_heat_item_map[item]->parentGroup(); - group->unlockChild(mesh_heat_item_map[item]); - scene->erase(scene->item_id(mesh_heat_item_map[item])); - } - else - { - group = new Scene_group_item("Heat Visualization"); - group->setProperty("heat_group", true); - scene->addItem(group); - scene->changeGroup(item, group); - scene->changeGroup(source_points, group); - group->lockChild(item); - group->lockChild(source_points); - dock_widget->deleteButton->setEnabled(true); - connect(group, &Scene_group_item::aboutToBeDestroyed, - this, [this](){ - this->dock_widget->deleteButton->setEnabled(false); - }); - } - mesh_heat_item_map[item] = new Scene_heat_item(item); - mesh_heat_item_map[item]->setName(tr("%1 heat").arg(item->name())); - scene->addItem(mesh_heat_item_map[item]); - scene->changeGroup(mesh_heat_item_map[item], group); - group->lockChild(mesh_heat_item_map[item]); - item->setVisible(false); - displayLegend(); - if(dock_widget->sourcePointsButton->isChecked()) - dock_widget->sourcePointsButton->toggle(); - return true; - } - - void replaceRamp() - { - if(dock_widget->colorChoiceWidget->currentIndex() == 0) - { - color_ramp = Color_ramp(rm, rM, gm, gM, bm, bM); - displayLegend(); - minBox = dock_widget->minBox->value(); - maxBox = dock_widget->maxBox->value(); - } - } - - void on_propertyBox_currentIndexChanged(int) - { - dock_widget->sourcePointsButton->setEnabled(false); - Scene_surface_mesh_item* item = - qobject_cast(scene->item(scene->mainSelectionIndex())); - if(! item ) - dock_widget->maxBox->setValue(180); - else{ - switch(dock_widget->propertyBox->currentIndex()) - { - case 0: - { - dock_widget->groupBox-> setEnabled(true); - dock_widget->groupBox_3->setEnabled(true); - - dock_widget->minBox->setMinimum(0); - dock_widget->minBox->setMaximum(360); - dock_widget->minBox->setValue(0); - dock_widget->maxBox->setMinimum(0); - dock_widget->maxBox->setMaximum(360); - if(is_triangle_mesh(*item->face_graph())) - dock_widget->maxBox->setValue(60); - else if(is_quad_mesh(*item->face_graph())) - dock_widget->maxBox->setValue(90); - replaceRamp(); - break; - } - case 1: - dock_widget->groupBox-> setEnabled(true); - dock_widget->groupBox_3->setEnabled(true); - - dock_widget->minBox->setMinimum(-1000); - dock_widget->minBox->setMaximum(1000); - dock_widget->minBox->setValue(0); - - dock_widget->maxBox->setMinimum(-1000); - dock_widget->maxBox->setMaximum(1000); - dock_widget->maxBox->setValue(2); - break; - case 2: - case 3: - dock_widget->sourcePointsButton->setEnabled(true); - CGAL_FALLTHROUGH; - default: - dock_widget->maxBox->setMinimum(-99999999); - dock_widget->maxBox->setMaximum(99999999); - dock_widget->minBox->setMinimum(-99999999); - dock_widget->minBox->setMaximum(99999999); - dock_widget->groupBox-> setEnabled(false); - dock_widget->groupBox_3->setEnabled(false); - } - } - } - - void closure()Q_DECL_OVERRIDE + void closure() Q_DECL_OVERRIDE { dock_widget->hide(); } - void on_zoomToMinButton_pressed() +private: + void disableExtremeValues() { - - Scene_surface_mesh_item* item = - qobject_cast(scene->item(scene->mainSelectionIndex())); - if(!item) - return; - face_descriptor dummy_fd; - Point_3 dummy_p; - switch(dock_widget->propertyBox->currentIndex()) - { - case 0: - { - ::zoomToId(*item->face_graph(), - QString("f%1").arg(angles_min[item].second), - getActiveViewer(), - dummy_fd, - dummy_p); - } - break; - case 1: - { - ::zoomToId(*item->face_graph(), - QString("f%1").arg(jacobian_min[item].second), - getActiveViewer(), - dummy_fd, - dummy_p); - } - break; - default: - break; - } + dock_widget->extremeValuesGroup->setEnabled(false); + dock_widget->zoomToMinButton->setEnabled(false); + dock_widget->zoomToMaxButton->setEnabled(false); } - void on_zoomToMaxButton_pressed() + void enableExtremeValues() { - Scene_surface_mesh_item* item = - qobject_cast(scene->item(scene->mainSelectionIndex())); - if(!item) - return; - face_descriptor dummy_fd; - Point_3 dummy_p; - switch(dock_widget->propertyBox->currentIndex()) - { - case 0: - { - ::zoomToId(*item->face_graph(), - QString("f%1").arg(angles_max[item].second), - getActiveViewer(), - dummy_fd, - dummy_p); - } - break; - case 1: - { - ::zoomToId(*item->face_graph(), - QString("f%1").arg(jacobian_max[item].second), - getActiveViewer(), - dummy_fd, - dummy_p); - } - break; - default: - break; - } + dock_widget->extremeValuesGroup->setEnabled(true); + dock_widget->zoomToMinButton->setEnabled(true); + dock_widget->zoomToMaxButton->setEnabled(true); } - void delete_group() + void resetExtremeValues() { - if(scene->selectionIndices().empty()) - return; - Scene_item* item = scene->item(scene->selectionIndices().first()); - Scene_group_item* group = qobject_cast(item); - if(!group || !group->property("heat_group").toBool()) - return; - for(auto child_id : group->getChildren()) + // setup some dummy values such that the legend can be displayed + const std::string& property_name = dock_widget->propertyBox->currentText().toStdString(); + + if(property_name == "Smallest Angle Per Face" || property_name == "Largest Angle Per Face") { - if(Scene_surface_mesh_item* child = qobject_cast(scene->item(child_id))){ - auto it = mesh_heat_method_map.find(child); - if(it != mesh_heat_method_map.end()) - mesh_heat_method_map.erase(it); - - auto it2 = mesh_heat_item_map.find(child); - if(it2 != mesh_heat_item_map.end()) - mesh_heat_item_map.erase(it2); - - auto it3 = mesh_heat_method_idt_map.find(child); - if(it3 != mesh_heat_method_idt_map.end()) - mesh_heat_method_idt_map.erase(it3); - - group->unlockChild(child); - group->removeChild(child); - scene->addChild(child); - child->setVisible(true); - child->resetColors(); - break; - } + dock_widget->minBox->setRange(0, 360); + dock_widget->minBox->setValue(0); + dock_widget->maxBox->setRange(0, 360); + dock_widget->maxBox->setValue(0); } - scene->erase(scene->item_id(group)); - source_points = nullptr; - - } - - void on_sourcePointsButton_toggled(bool b) - { - if(b) + else if(property_name == "Scaled Jacobian") { - Scene_heat_item* h_item = nullptr; - Scene_surface_mesh_item* item = - qobject_cast(scene->item(scene->mainSelectionIndex())); - if(!item) - { - h_item = qobject_cast(scene->item(scene->mainSelectionIndex())); - if(h_item) - item = h_item->getParent(); - } - if(!item) - { - QMessageBox::warning(mw, "Warning", "You must select a Surface_mesh_item to make this work. Aborting."); - dock_widget->sourcePointsButton->setChecked(false); - return; - } - current_item = item; - connect(current_item, &Scene_surface_mesh_item::aboutToBeDestroyed, - this, [this]() - { - dock_widget->sourcePointsButton->setChecked(false); - }); - if(mesh_sources_map.find(item) == mesh_sources_map.end()) - { - source_points = new Scene_points_with_normal_item(); - source_points->setName(QString("Source vertices for %1").arg(current_item->name())); - source_points->setColor(QColor(Qt::red)); - source_points->setPointSize(5); - scene->addItem(source_points); - connect(source_points, &Scene_points_with_normal_item::aboutToBeDestroyed, - [this](){ - std::unordered_map::iterator it; - for(it = mesh_sources_map.begin(); - it != mesh_sources_map.end(); - ++it) - { - if(it->second == source_points) - { - mesh_sources_map.erase(it); - break; - } - } - }); - mesh_sources_map[current_item] = source_points; - } - else - { - source_points=mesh_sources_map[current_item]; - } - connect(item, SIGNAL(selected_vertex(void*)), this, SLOT(on_vertex_selected(void*))); - bool non_init = is_source.find(item) == is_source.end(); - if(non_init) - { - Vertex_source_map map = get(Vertex_source_tag(), *item->face_graph()); - is_source.insert(std::make_pair(item, map)); - connect(item, &Scene_surface_mesh_item::itemChanged, - this, &DisplayPropertyPlugin::resetProperty); - connect(item, &Scene_surface_mesh_item::aboutToBeDestroyed, - [this, item](){ - if(is_source.find(item) != is_source.end()) - { - is_source.erase(item); - } - }); - } + dock_widget->minBox->setRange(-1000, 1000); + dock_widget->minBox->setValue(0); + dock_widget->maxBox->setRange(-1000, 1000); + dock_widget->maxBox->setValue(0); + } + else if(property_name == "Face Area") + { + dock_widget->minBox->setRange(-1000, 1000); + dock_widget->minBox->setValue(0); + dock_widget->maxBox->setRange(-1000, 1000); + dock_widget->maxBox->setValue(0); } else { - if(!current_item) - return; - disconnect(current_item, SIGNAL(selected_vertex(void*)), this, SLOT(on_vertex_selected(void*))); - current_item = nullptr; + dock_widget->minBox->setRange(-99999999, 99999999); + dock_widget->minBox->setValue(0); + dock_widget->maxBox->setRange(-99999999, 99999999); + dock_widget->maxBox->setValue(0); } } - void on_vertex_selected(void* void_ptr) + void displayRampLegend() { - typedef boost::graph_traits::vertices_size_type size_type; - size_type h = static_cast(reinterpret_cast(void_ptr)); - vertex_descriptor vd = static_cast(h) ; - bool found = is_source.find(current_item) != is_source.end(); - if(found) - { - if(!get(is_source[current_item], vd)) - { - put(is_source[current_item], vd, true); - source_points->point_set()->insert(current_item->face_graph()->point(vd)); - } - else - { - put(is_source[current_item], vd, false); - Point_set::iterator it; - for(it = source_points->point_set()->begin(); it != source_points->point_set()->end(); ++it) - if(source_points->point_set()->point(*it) == current_item->face_graph()->point(vd)) - { - source_points->point_set()->remove(it); - source_points->point_set()->collect_garbage(); - break; - } - } - } + color_ramp = Color_ramp(rm, rM, gm, gM, bm, bM); - source_points->invalidateOpenGLBuffers(); - source_points->itemChanged(); - } -private: - template - bool displayPSProperty(Point_set* ps, PM pm); - template - bool displaySMProperty(SMesh& smesh, PM pm, vertex_descriptor); - template - bool displaySMProperty(SMesh& smesh, PM pm, face_descriptor); - template - bool treat_sm_property(std::string name, SMesh* sm); - //cannot be treated as a sm_property because the property_map<>() function takes only 1 template arg. - bool treat_point_property(std::string name, Point_set* sm); - template - bool is_property_scalar(std::string name, const SMesh* sm); - //same problem of number of templates - bool is_property_scalar(std::string name, const Point_set* ps); - template - void displayMapLegend(const std::vector& values) - { - // Create a legend_ and display it - const std::size_t size = (std::min)(color_map.size(), (std::size_t)256); - const int text_height = 20; - const int height = text_height*static_cast(size) + text_height; + const int height = 256; const int width = 140; - const int cell_width = width/3; + const int cell_width = width / 3; + const int top_margin = 5; + const int left_margin = 5; + const int drawing_height = height - 2*top_margin; + const int text_height = 20; + + legend = QPixmap(width, height + text_height); + legend.fill(QColor(200, 200, 200)); + + QPainter painter(&legend); + painter.setPen(Qt::black); + painter.setBrush(QColor(200, 200, 200)); + + const double min_value = dock_widget->minBox->value(); + const double max_value = dock_widget->maxBox->value(); + + // Build legend data + std::vector graduations(100); + for(int i=0; i<100; ++i) + graduations[i] = i / 100.0; + + int i = 0; + for(std::vector::iterator it = graduations.begin(), end = graduations.end(); it != end; ++it, i+=2) + { + QColor color(255 * color_ramp.r(*it), + 255 * color_ramp.g(*it), + 255 * color_ramp.b(*it)); + painter.fillRect(left_margin, drawing_height - top_margin - i, cell_width, 2, color); + } + + // draw right vertical line + painter.setPen(Qt::blue); + painter.drawLine(QPoint(left_margin + cell_width + 10, + drawing_height - top_margin + 2), + QPoint(left_margin + cell_width + 10, + drawing_height - top_margin - static_cast(graduations.size())*2 + 2)); + + // draw min value and max value + painter.setPen(Qt::blue); + QRect min_text_rect(left_margin + cell_width + 10, + drawing_height - top_margin, 100, text_height); + painter.drawText(min_text_rect, Qt::AlignCenter, QObject::tr("%1").arg(min_value, 0, 'f', 3)); + + QRect max_text_rect(left_margin + cell_width + 10, + drawing_height - top_margin - 200, 100, text_height); + painter.drawText(max_text_rect, Qt::AlignCenter, QObject::tr("%1").arg(max_value, 0, 'f', 3)); + + dock_widget->legendLabel->setPixmap(legend); + } + + template + void displayMapLegend(const std::vector& values) + { + const std::size_t size = (std::min)(color_map.size(), std::size_t(1024)); + + const int text_height = 20; + const int height = text_height * static_cast(size) + text_height; + const int width = 140; + const int cell_width = width / 3; const int top_margin = 15; const int left_margin = 5; const int drawing_height = height - text_height + top_margin; - legend_ = QPixmap(width, height ); - legend_.fill(QColor(200, 200, 200)); + legend = QPixmap(width, height); + legend.fill(QColor(200, 200, 200)); - QPainter painter(&legend_); + QPainter painter(&legend); painter.setPen(Qt::black); painter.setBrush(QColor(200, 200, 200)); int j = 0; int tick_height = text_height; - for (std::size_t i = 0; i< size; ++i, j+=tick_height) + for(std::size_t i=0; i size){ - QRect text_rect(left_margin + cell_width+10, 0, - 50, text_height); - painter.drawText(text_rect, Qt::AlignCenter, tr("[...]")); + + if(color_map.size() > size) + { + QRect text_rect(left_margin + cell_width + 10, 0, 50, text_height); + painter.drawText(text_rect, Qt::AlignCenter, QObject::tr("[...]")); } + // draw right vertical line painter.setPen(Qt::blue); + painter.drawLine(QPoint(left_margin + cell_width + 10, + drawing_height - top_margin + tick_height), + QPoint(left_margin + cell_width + 10, + drawing_height - top_margin - static_cast(size)*tick_height + tick_height)); - painter.drawLine(QPoint(left_margin + cell_width+10, drawing_height - top_margin +tick_height), - QPoint(left_margin + cell_width+10, - drawing_height - top_margin - static_cast(size)*tick_height+tick_height)); - dock_widget->legendLabel->setPixmap(legend_); + dock_widget->legendLabel->setPixmap(legend); } + void displayLegend() { - // Create a legend_ and display it - const int height = 256; - const int width = 140; - const int cell_width = width/3; - const int top_margin = 5; - const int left_margin = 5; - const int drawing_height = height - top_margin * 2; - const int text_height = 20; - - legend_ = QPixmap(width, height + text_height); - legend_.fill(QColor(200, 200, 200)); - - QPainter painter(&legend_); - painter.setPen(Qt::black); - painter.setBrush(QColor(200, 200, 200)); - - double min_value(dock_widget->minBox->value()), - max_value(dock_widget->maxBox->value()); - // Build legend_ data - std::vector graduations(100); - for(int i=0; i<100; ++i) - graduations[i] = i/100.0; - - int i=0; - for (std::vector::iterator it = graduations.begin(), end = graduations.end(); - it != end; ++it, i+=2) - { - QColor color(255*color_ramp.r(*it), - 255*color_ramp.g(*it), - 255*color_ramp.b(*it)); - painter.fillRect(left_margin, - drawing_height - top_margin - i, - cell_width, - 2, - color); - } - // draw right vertical line - painter.setPen(Qt::blue); - - painter.drawLine(QPoint(left_margin + cell_width+10, drawing_height - top_margin + 2), - QPoint(left_margin + cell_width+10, - drawing_height - top_margin - static_cast(graduations.size())*2 + 2)); - // draw min value and max value - painter.setPen(Qt::blue); - QRect min_text_rect(left_margin + cell_width+10,drawing_height - top_margin, - 100, text_height); - painter.drawText(min_text_rect, Qt::AlignCenter, tr("%1").arg(min_value, 0, 'f', 1)); - - QRect max_text_rect(left_margin + cell_width+10, drawing_height - top_margin - 200, - 100, text_height); - painter.drawText(max_text_rect, Qt::AlignCenter, tr("%1").arg(max_value, 0, 'f', 1)); - - dock_widget->legendLabel->setPixmap(legend_); + if(dock_widget->colorRampRadioButton->isChecked()) + displayRampLegend(); + else + color_map.clear(); } - double scaled_jacobian(const face_descriptor& f , const SMesh &mesh); - QList _actions; - Color_ramp color_ramp; - std::vector color_map; - DockWidget* dock_widget; - double rm; - double rM; - double rI; - double gm; - double gM; - double gI; - double bm; - double bM; - double bI; - std::unordered_map > jacobian_min; - std::unordered_map > jacobian_max; +private: + template + bool isSMPropertyScalar(const std::string& name, + const SMesh& mesh) const; - std::unordered_map > angles_min; - std::unordered_map > angles_max; - std::unordered_map is_source; + void detectSMScalarProperties(SMesh& mesh) + { + std::vector vprop = mesh.properties(); + for(const std::string& s : vprop) + { + if(isSMPropertyScalar(s, mesh)) + { + dock_widget->propertyBox->addItem(s.c_str()); + property_simplex_types.push_back(Property_simplex_type::VERTEX); + } + } + std::vector fprop = mesh.properties(); + for(const std::string& s : fprop) + { + if(isSMPropertyScalar(s, mesh)) + { + dock_widget->propertyBox->addItem(s.c_str()); + property_simplex_types.push_back(Property_simplex_type::FACE); + } + } + } - double minBox; - double maxBox; - QPixmap legend_; + bool isPSPropertyScalar(const std::string& name, + const Point_set& ps) const; - Scene_surface_mesh_item* current_item; - Scene_points_with_normal_item* source_points; - std::unordered_map mesh_sources_map; - std::unordered_map mesh_heat_item_map; + void detectPSScalarProperties(const Point_set& ps) + { + for(const auto& s : ps.properties()) + if(isPSPropertyScalar(s, ps)) + dock_widget->propertyBox->addItem(s.c_str()); + } - std::unordered_map mesh_heat_method_map; - std::unordered_map mesh_heat_method_idt_map; +private: + // This fills "dock_widget->propertyBox" with the properties that can be displayed for the item at position 'item_index' + void detectScalarProperties(int item_index) + { + dock_widget->propertyBox->clear(); // calls onNewPropertySelected(-1) + property_simplex_types.clear(); - template friend class PropertyDisplayer; + Scene_surface_mesh_item* sm_item = qobject_cast(scene->item(item_index)); + Scene_points_with_normal_item* ps_item = qobject_cast(scene->item(item_index)); - //CRTP used to display properties of surface meshes(vertex and face) and point set. + if(sm_item) + { + dock_widget->propertyBox->addItems({"Smallest Angle Per Face", + "Largest Angle Per Face", + "Scaled Jacobian", + "Face Area"}); + property_simplex_types = { Property_simplex_type::FACE, + Property_simplex_type::FACE, + Property_simplex_type::FACE, + Property_simplex_type::FACE }; + detectSMScalarProperties(*(sm_item->face_graph())); + } + else if(ps_item) + { + detectPSScalarProperties(*(ps_item->point_set())); + } + + int width = dock_widget->propertyBox->minimumSizeHint().width(); + dock_widget->propertyBox->view()->setMinimumWidth(width); + } + +private Q_SLOTS: + // Called when a new geometric object is selected in the scene + void onItemIndexSelected(int item_index) + { + // try to keep the same selected property, if possible + const QString selected_property = dock_widget->propertyBox->currentText(); + + detectScalarProperties(item_index); + + if(dock_widget->propertyBox->count() == 0) + return; + + const int property_index = dock_widget->propertyBox->findText(selected_property); + if(property_index == -1) + dock_widget->propertyBox->setCurrentIndex(0); + else + dock_widget->propertyBox->setCurrentIndex(property_index); + } + + // Called when a new property is selected in the combo box. + // This function is only called if the index actually changed (doesn't trigger + // if you click again the item) + void onNewPropertySelected(int property_index) + { + resetExtremeValues(); // reset extreme value before the legend to get the proper values + displayLegend(); + + if(property_index >= 0 && property_index < dock_widget->propertyBox->count()) // valid property + { + dock_widget->setEnabled(true); + disableExtremeValues(); // only available after coloring + } + else // no or broken property + { + dock_widget->setEnabled(false); + dock_widget->propertyBox->setEnabled(true); + } + } + +private: + void colorizePS(Scene_points_with_normal_item* ps_item) + { + ps_item->point_set()->add_colors(); + if(!displayPSProperty(dock_widget->propertyBox->currentText().toStdString(), + *(ps_item->point_set()))) + { + return; + } + + ps_item->invalidateOpenGLBuffers(); + ps_item->setRenderingMode(Points); + ps_item->redraw(); + } + + void colorizeSM(Scene_surface_mesh_item* sm_item) + { + CGAL_assertion(static_cast(dock_widget->propertyBox->count()) == property_simplex_types.size()); + + // leave it flat if it was, otherwise set to flat+edges + if(sm_item->renderingMode() != Flat && sm_item->renderingMode() != FlatPlusEdges) + sm_item->setRenderingMode(FlatPlusEdges); + + const std::string& property_name = dock_widget->propertyBox->currentText().toStdString(); + if(property_name == "Smallest Angle Per Face") + { + displayExtremumAnglePerFace(sm_item, MIN_VALUE); + } + else if(property_name == "Largest Angle Per Face") + { + displayExtremumAnglePerFace(sm_item, MAX_VALUE); + } + else if(property_name == "Scaled Jacobian") + { + displayScaledJacobian(sm_item); + } + else if(property_name == "Face Area") + { + displayArea(sm_item); + } + else + { + const int property_index = dock_widget->propertyBox->currentIndex(); + if(property_simplex_types.at(property_index) == Property_simplex_type::VERTEX) + { + if(!displaySMProperty(dock_widget->propertyBox->currentText().toStdString(), + *(sm_item->face_graph()))) + { + return; + } + sm_item->setRenderingMode(GouraudPlusEdges); + } + else if(property_simplex_types.at(property_index) == Property_simplex_type::FACE) + { + if(!displaySMProperty(dock_widget->propertyBox->currentText().toStdString(), + *(sm_item->face_graph()))) + { + return; + } + } + } + + sm_item->invalidateOpenGLBuffers(); + sm_item->redraw(); + } + +private Q_SLOTS: + void colorize() + { + const int property_index = dock_widget->propertyBox->currentIndex(); + if(property_index < 0 || property_index >= dock_widget->propertyBox->count()) + return; + + QApplication::setOverrideCursor(Qt::WaitCursor); + + enableExtremeValues(); + + Scene_item* item = scene->item(scene->mainSelectionIndex()); + Scene_points_with_normal_item* ps_item = qobject_cast(item); + Scene_surface_mesh_item* sm_item = qobject_cast(item); + + if(sm_item) + colorizeSM(sm_item); + else if(ps_item) + colorizePS(ps_item); + + // @todo emit a new SIGNAL on successful coloring, something like "colorChanged()" + // itemChanged is too strong and would conflict with the connection below + + QApplication::restoreOverrideCursor(); + + // below is a hackish way to call the connection only once. + // This is required because the itemChanged signal is currently emitted when the colors are reset... + // + // @todo do not emit itemChanged when the colors are reset + // @todo with qt6, single connection can be performed with `static_cast(Qt::SingleShotConnection)` + // see https://www.kdab.com/single-shot-connections/ + auto connection = std::make_shared(); + *connection = connect(item, &Scene_surface_mesh_item::itemChanged, + this, [this, item, ps_item, sm_item, connection]() + { + QObject::disconnect(*connection); + + this->removeDisplayPluginProperties(item); // meaningful only for sm_item + + // @todo Scene_item doesn't have resetColors()... + if(ps_item) + ps_item->resetColors(); + else if(sm_item) + sm_item->resetColors(); + + if(item == scene->item(scene->mainSelectionIndex())) + onItemIndexSelected(scene->item_id(item)); + }); + } + +private: + void removeDisplayPluginProperty(Scene_item* item, + const std::string& property_name) + { + Scene_surface_mesh_item* sm_item = qobject_cast(item); + if(!sm_item) + return; + + SMesh* sm = sm_item->face_graph(); + if(sm == nullptr) + return; + + // Here we only target the property maps added by this plugin, so 'double' is fine + SMesh::Property_map property; + bool found; + std::tie(property, found) = sm->property_map(property_name); + if(found) + sm->remove_property_map(property); + } + + void removeDisplayPluginProperties(Scene_item* item) + { + removeDisplayPluginProperty(item, "f:display_plugin_smallest_angle"); + removeDisplayPluginProperty(item, "f:display_plugin_largest_angle"); + removeDisplayPluginProperty(item, "f:display_plugin_scaled_jacobian"); + removeDisplayPluginProperty(item, "f:display_plugin_area"); + } + + void displayExtremumAnglePerFace(Scene_surface_mesh_item* sm_item, + const Extremum extremum) + { + SMesh* sm = sm_item->face_graph(); + if(sm == nullptr) + return; + + // if the face is already a triangle, do not extract it from the mesh + auto triangular_face_sector_angle = [](halfedge_descriptor h, + const SMesh& mesh) -> double + { + auto vpm = get(boost::vertex_point, mesh); + return CGAL::approximate_angle(get(vpm, source(h, mesh)), + get(vpm, target(h, mesh)), + get(vpm, target(next(h, mesh), mesh))); + }; + + // for non-triangular faces, extract a one-face mesh and triangulate it + auto single_face_sector_angle = [](halfedge_descriptor h, + const SMesh& mesh) -> double + { + CGAL_precondition(!is_border(h, mesh) && is_border(opposite(h, mesh), mesh)); + + auto vpm = get(boost::vertex_point, mesh); + + double sector_angle = 0; + do + { + sector_angle += CGAL::approximate_angle(get(vpm, source(h, mesh)), + get(vpm, target(h, mesh)), + get(vpm, target(next(h, mesh), mesh))); + h = opposite(next(h, mesh), mesh); + } + while(!is_border(h, mesh)); + + return sector_angle; + }; + + bool not_initialized; + SMesh::Property_map fangle; + + if(extremum == MIN_VALUE) + std::tie(fangle, not_initialized) = sm->add_property_map("f:display_plugin_smallest_angle", 0); + else + std::tie(fangle, not_initialized) = sm->add_property_map("f:display_plugin_largest_angle", 0); + + SMesh& mesh = *sm; + auto vpm = get(boost::vertex_point, mesh); + + if(not_initialized) + { + for(face_descriptor f : faces(mesh)) + { + if(CGAL::is_triangle(halfedge(f, mesh), mesh)) + { + if(extremum == MIN_VALUE) + { + fangle[f] = (std::min)({triangular_face_sector_angle(halfedge(f, mesh), mesh), + triangular_face_sector_angle(next(halfedge(f, mesh), mesh), mesh), + triangular_face_sector_angle(prev(halfedge(f, mesh), mesh), mesh)}); + } + else + { + fangle[f] = (std::max)({triangular_face_sector_angle(halfedge(f, mesh), mesh), + triangular_face_sector_angle(next(halfedge(f, mesh), mesh), mesh), + triangular_face_sector_angle(prev(halfedge(f, mesh), mesh), mesh)}); + } + } + else + { + SMesh local_smesh; + auto local_vpm = get(boost::vertex_point, local_smesh); + std::vector local_vertices; + + for(halfedge_descriptor h : halfedges_around_face(halfedge(f, mesh), mesh)) + { + local_vertices.push_back(CGAL::add_vertex(local_smesh)); + put(local_vpm, local_vertices.back(), get(vpm, target(h, mesh))); + } + + face_descriptor local_f = CGAL::Euler::add_face(local_vertices, local_smesh); + + // walk the border of the face to walk the halfedge of the pre-triangulation face + halfedge_descriptor local_border_h = opposite(halfedge(local_f, local_smesh), local_smesh); + CGAL_assertion(is_border(local_border_h, local_smesh)); + + CGAL::Polygon_mesh_processing::triangulate_faces(local_smesh); + + double extremum_angle_in_face = ARBITRARY_DBL_MAX; + halfedge_descriptor local_border_end_h = local_border_h; + do + { + double angle = single_face_sector_angle(opposite(local_border_h, local_smesh), local_smesh); + if(extremum == MIN_VALUE) + extremum_angle_in_face = (std::min)(extremum_angle_in_face, angle); + else + extremum_angle_in_face = (std::max)(extremum_angle_in_face, angle); + + local_border_h = next(local_border_h, local_smesh); + } + while(local_border_h != local_border_end_h); + + fangle[f] = extremum_angle_in_face; + } + } + } + + if(extremum == MIN_VALUE) + displaySMProperty("f:display_plugin_smallest_angle", mesh); + else + displaySMProperty("f:display_plugin_largest_angle", mesh); + } + + double scaled_jacobian(const face_descriptor f, + const SMesh& mesh) const; + + void displayScaledJacobian(Scene_surface_mesh_item* sm_item) + { + SMesh* sm = sm_item->face_graph(); + if(sm == nullptr) + return; + + bool not_initialized; + SMesh::Property_map fjacobian; + std::tie(fjacobian, not_initialized) = sm->add_property_map("f:display_plugin_scaled_jacobian", 0); + + if(not_initialized) + { + for(face_descriptor f : faces(*sm)) + fjacobian[f] = scaled_jacobian(f, *sm); + } + + displaySMProperty("f:display_plugin_scaled_jacobian", *sm); + } + + double area(const face_descriptor f, + const SMesh& mesh) const + { + if(CGAL::is_triangle(halfedge(f, mesh), mesh)) + return CGAL::Polygon_mesh_processing::face_area(f, mesh); + + auto vpm = get(boost::vertex_point, mesh); + + // create a local version of the mesh, triangulate it, sum the triangle areas + SMesh local_smesh; + auto local_vpm = get(boost::vertex_point, local_smesh); + std::vector local_vertices; + + for(halfedge_descriptor h : halfedges_around_face(halfedge(f, mesh), mesh)) + { + local_vertices.push_back(CGAL::add_vertex(local_smesh)); + put(local_vpm, local_vertices.back(), get(vpm, target(h, mesh))); + } + + CGAL::Euler::add_face(local_vertices, local_smesh); + CGAL::Polygon_mesh_processing::triangulate_faces(local_smesh); + return CGAL::Polygon_mesh_processing::area(local_smesh); + } + + void displayArea(Scene_surface_mesh_item* sm_item) + { + SMesh* sm = sm_item->face_graph(); + if(sm == nullptr) + return; + + bool not_initialized; + SMesh::Property_map farea; + std::tie(farea, not_initialized) = sm->add_property_map("f:display_plugin_area", 0); + + if(not_initialized) + { + for(face_descriptor f : faces(*sm)) + farea[f] = area(f, *sm); + } + + displaySMProperty("f:display_plugin_area", *sm); + } + +private: + template + bool call_on_PS_property(const std::string& name, + const Point_set& ps, + const Functor& functor) const; + + template + bool call_on_SM_property(const std::string& name, + const SMesh& sm, + const Functor& functor) const; + +private: + template + bool displayPSProperty(Point_set& ps, + PM pm) + { + PSDisplayer display_property(ps, pm, this); + return display_property(); + } + + bool displayPSProperty(const std::string& name, + Point_set& ps); + + // - + template + bool displaySMProperty(SMesh& mesh, + PM pm, + vertex_descriptor) + { + SMVertexDisplayer display_property(mesh, pm, this); + return display_property(); + } + + template + bool displaySMProperty(SMesh& mesh, + PM pm, + face_descriptor) + { + SMFaceDisplayer display_property(mesh, pm, this); + return display_property(); + } + + template + bool displaySMProperty(const std::string& name, + SMesh& mesh); + +private: + template + auto SimplexWithPropertyExtremum(const SimplexRange& simplex_range, + const SMesh& mesh, + const std::string& property_name, + const Extremum extremum) const + { + using Simplex = typename boost::range_value::type; + + // We don't know what's the type of the property map so we can't simply do + // mesh.property_map(property_name), + // we have to try all acceptable types. + Simplex extremum_s; + call_on_SM_property(property_name, mesh, + [extremum, &extremum_s, &simplex_range](const auto pmap) -> bool + { + double extremum_value = (extremum == MIN_VALUE) ? ARBITRARY_DBL_MAX : - ARBITRARY_DBL_MAX; + + for(Simplex s : simplex_range) + { + if((extremum == MIN_VALUE && get(pmap, s) < extremum_value) || + (extremum == MAX_VALUE && get(pmap, s) > extremum_value)) + { + extremum_value = get(pmap, s); + extremum_s = s; + } + } + + return true; + }); + + CGAL_assertion(extremum_s != Simplex()); + return extremum_s; + } + + template + void zoomToSimplexWithPropertyExtremum(const SimplexRange& simplex_range, + const SMesh& mesh, + const std::string& property_name, + const Extremum extremum) const + { + using Simplex = typename boost::range_value::type; + + const Simplex extremum_s = SimplexWithPropertyExtremum(simplex_range, mesh, property_name, extremum); + + QString sid; + if(std::is_same::value) + sid = QString("v%1").arg(extremum_s); + else + sid = QString("f%1").arg(extremum_s); + + face_descriptor unused_fd; + Point_3 unused_p; + ::zoomToId(mesh, sid, + getActiveViewer(), + unused_fd, unused_p); + }; + + void zoomToPointWithPropertyExtremum(const Point_set& ps, + const std::string& property_name, + const Extremum extremum) const + { + Point_set::Index extremum_i = -1; + call_on_PS_property(property_name, ps, + [extremum, &extremum_i, &ps](const auto pmap) -> bool + { + double extremum_value = (extremum == MIN_VALUE) ? ARBITRARY_DBL_MAX : - ARBITRARY_DBL_MAX; + + for(Point_set::Index i : ps) + { + if((extremum == MIN_VALUE && get(pmap, i) < extremum_value) || + (extremum == MAX_VALUE && get(pmap, i) > extremum_value)) + { + extremum_value = get(pmap, i); + extremum_i = i; + } + } + + return true; + }); + + CGAL_assertion(extremum_i != Point_set::Index(-1)); + Point_3 unused_p; + ::zoomToPoint(ps, extremum_i, + getActiveViewer(), + unused_p); + } + + void on_zoomToButton_pressed(const Extremum extremum) + { + const int property_index = dock_widget->propertyBox->currentIndex(); + if(property_index < 0 || property_index >= dock_widget->propertyBox->count()) + return; + + Scene_item* item = scene->item(scene->mainSelectionIndex()); + Scene_surface_mesh_item* sm_item = qobject_cast(item); + if(sm_item) + { + const SMesh& mesh = *sm_item->face_graph(); + + const std::string& property_name = dock_widget->propertyBox->currentText().toStdString(); + if(property_name == "Smallest Angle Per Face") + zoomToSimplexWithPropertyExtremum(faces(mesh), mesh, "f:display_plugin_smallest_angle", extremum); + else if(property_name == "Largest Angle Per Face") + zoomToSimplexWithPropertyExtremum(faces(mesh), mesh, "f:display_plugin_largest_angle", extremum); + else if(property_name == "Scaled Jacobian") + zoomToSimplexWithPropertyExtremum(faces(mesh), mesh, "f:display_plugin_scaled_jacobian", extremum); + else if(property_name == "Face Area") + zoomToSimplexWithPropertyExtremum(faces(mesh), mesh, "f:display_plugin_area", extremum); + else if(property_simplex_types.at(property_index) == Property_simplex_type::VERTEX) + zoomToSimplexWithPropertyExtremum(vertices(mesh), mesh, property_name, extremum); + else if(property_simplex_types.at(property_index) == Property_simplex_type::FACE) + zoomToSimplexWithPropertyExtremum(faces(mesh), mesh, property_name, extremum); + } + + Scene_points_with_normal_item* ps_item = qobject_cast(item); + if(ps_item) + { + const Point_set& ps = *ps_item->point_set(); + + const std::string& property_name = dock_widget->propertyBox->currentText().toStdString(); + zoomToPointWithPropertyExtremum(ps, property_name, extremum); + } + } + +private Q_SLOTS: + void on_zoomToMinButton_pressed() + { + on_zoomToButton_pressed(MIN_VALUE); + } + + void on_zoomToMaxButton_pressed() + { + on_zoomToButton_pressed(MAX_VALUE); + } + +private: + template + friend class PropertyDisplayer; + + // CRTP used to display properties of surface meshes (vertex and face) and point sets. template struct PropertyDisplayer { - typedef typename PM::value_type Value_type; - PropertyDisplayer(DataSet& ds, PM pm, DisplayPropertyPlugin* parent) - :dataset(ds), property_map(pm), parent(parent) - {} + using value_type = typename PM::value_type; + + DataSet& dataset; + PM property_map; + std::vector values; + Display_property_plugin* parent; + + PropertyDisplayer(DataSet& ds, + PM pm, + Display_property_plugin* parent) + : dataset(ds), property_map(pm), parent(parent) + { } - virtual void fill_values(){} - virtual void set_colors_map(std::unordered_map &){} - virtual void set_colors_ramp(){} bool operator()() { - parent->minBox = ARBITRARY_DBL_MAX; - parent->maxBox = -ARBITRARY_DBL_MAX; static_cast(this)->fill_values(); std::sort(values.begin(), values.end()); auto end = std::unique(values.begin(), values.end()); + parent->dock_widget->minBox->setValue(*values.begin()); + parent->dock_widget->maxBox->setValue(*(std::prev(end))); - parent->minBox = *values.begin(); - parent->maxBox = *(end-1); - parent->dock_widget->minBox->setValue(parent->minBox); - parent->dock_widget->maxBox->setValue(parent->maxBox); - - //fill color pmap - if(parent->dock_widget->colorChoiceWidget->currentIndex() == 1) + // fill color pmap + if(parent->dock_widget->colorRampRadioButton->isChecked()) { - std::unordered_map value_index_map; - //fill map - std::size_t counter = 0; - for(auto it = values.begin(); it != end; ++it) - { - value_index_map[*it] = counter++; - } - parent->color_map.clear(); - compute_color_map(QColor(parent->rI, parent->gI, parent->bI),std::distance(values.begin(), end), - std::back_inserter(parent->color_map)); - static_cast(this)->set_colors_map(value_index_map); - parent->displayMapLegend(values); + // scale a color ramp between min and max + parent->displayRampLegend(); + static_cast(this)->color_with_ramp(); } else { - //scale a color ramp between min and max - parent->replaceRamp(); - static_cast(this)->set_colors_ramp(); + CGAL_assertion(parent->dock_widget->randomColorsRadioButton->isChecked()); + + // generate color map + parent->color_map.clear(); + compute_color_map(QColor(255 * parent->rI, 255 * parent->gI, 255 * parent->bI), + std::distance(values.begin(), end), + std::back_inserter(parent->color_map)); + + // fill map + std::unordered_map value_index_map; + std::size_t counter = 0; + for(auto it=values.begin(); it!=end; ++it) + value_index_map[*it] = counter++; + + static_cast(this)->color_with_map(value_index_map); + parent->displayMapLegend(values); } + return true; } - - - DataSet& dataset; - PM property_map; - std::vector values; - DisplayPropertyPlugin* parent; - }; + }; // struct PropertyDisplayer template struct PSDisplayer : public PropertyDisplayer > { - typedef typename PM::value_type Value_type; - typedef PropertyDisplayer > Base; - PSDisplayer(Point_set& ds, PM pm, DisplayPropertyPlugin* parent) - :Base(ds, pm, parent) + using Base = PropertyDisplayer >; + using value_type = typename PM::value_type; + + PSDisplayer(Point_set& ps, + PM pm, + Display_property_plugin* parent) + : Base(ps, pm, parent) {} + void fill_values() { - for(auto p : this->dataset) - { + for(const auto& p : this->dataset) this->values.push_back(this->property_map[p]); - } } - void set_colors_map(std::unordered_map &value_index_map) + void color_with_map(std::unordered_map& value_index_map) { - for(Point_set::iterator pit = this->dataset.begin(); - pit != this->dataset.end(); - ++pit) + for(const auto& p : this->dataset) { - CGAL::IO::Color color( - this->parent->color_map[value_index_map[this->property_map[*pit]]].red(), - this->parent->color_map[value_index_map[this->property_map[*pit]]].green(), - this->parent->color_map[value_index_map[this->property_map[*pit]]].blue()); - this->dataset.set_color(*pit, color.red(), color.green(), color.blue()); + CGAL::IO::Color color(this->parent->color_map[value_index_map[this->property_map[p]]].red(), + this->parent->color_map[value_index_map[this->property_map[p]]].green(), + this->parent->color_map[value_index_map[this->property_map[p]]].blue()); + this->dataset.set_color(p, color.red(), color.green(), color.blue()); } } - void set_colors_ramp() + void color_with_ramp() const { - float max = this->parent->maxBox; - float min = this->parent->minBox; - for(Point_set::iterator pit = this->dataset.begin(); - pit != this->dataset.end(); - ++pit) + double min = this->parent->dock_widget->minBox->value(); + double max = this->parent->dock_widget->maxBox->value(); + for(const auto& p : this->dataset) { if(min == max) - --min; - float f = (static_cast(this->property_map[*pit])-min)/(max-min); - if(f<0) - f = 0; - if(f>1) - f = 1; - CGAL::IO::Color color( - 255*this->parent->color_ramp.r(f), - 255*this->parent->color_ramp.g(f), - 255*this->parent->color_ramp.b(f)); - this->dataset.set_color(*pit, color.red(), color.green(), color.blue()); + min -= 1.; + + double val = (this->property_map[p] - min) / (max - min); + val = boost::algorithm::clamp(val, 0., 1.); + + CGAL::IO::Color color(255 * this->parent->color_ramp.r(val), + 255 * this->parent->color_ramp.g(val), + 255 * this->parent->color_ramp.b(val)); + this->dataset.set_color(p, color.red(), color.green(), color.blue()); } } - - }; - + }; // PSDisplayer template struct SMVertexDisplayer : public PropertyDisplayer > { - typedef typename PM::value_type Value_type; - typedef PropertyDisplayer > Base; - SMVertexDisplayer(SMesh& ds, PM pm, DisplayPropertyPlugin* parent) - :Base(ds, pm, parent) + using Base = PropertyDisplayer > ; + using value_type = typename PM::value_type; + + SMVertexDisplayer(SMesh& mesh, + PM pm, + Display_property_plugin* parent) + : Base(mesh, pm, parent) {} void fill_values() { - for(auto v : vertices(this->dataset)) - { + for(vertex_descriptor v : vertices(this->dataset)) this->values.push_back(this->property_map[v]); - } } - void set_colors_map(std::unordered_map &value_index_map) + void color_with_map(std::unordered_map& value_index_map) const { SMesh::Property_map vcolors = this->dataset.template add_property_map("v:color", CGAL::IO::Color()).first; - for(boost::graph_traits::vertex_iterator vit = vertices(this->dataset).begin(); - vit != vertices(this->dataset).end(); - ++vit) + for(vertex_descriptor v : vertices(this->dataset)) { - CGAL::IO::Color color( - this->parent->color_map[value_index_map[this->property_map[*vit]]].red(), - this->parent->color_map[value_index_map[this->property_map[*vit]]].green(), - this->parent->color_map[value_index_map[this->property_map[*vit]]].blue()); - vcolors[*vit] = color; + CGAL::IO::Color color(this->parent->color_map[value_index_map[this->property_map[v]]].red(), + this->parent->color_map[value_index_map[this->property_map[v]]].green(), + this->parent->color_map[value_index_map[this->property_map[v]]].blue()); + vcolors[v] = color; } } - void set_colors_ramp() + void color_with_ramp() const { SMesh::Property_map vcolors = this->dataset.template add_property_map("v:color", CGAL::IO::Color()).first; - float max = this->parent->maxBox; - float min = this->parent->minBox; - for(boost::graph_traits::vertex_iterator vit = vertices(this->dataset).begin(); - vit != vertices(this->dataset).end(); - ++vit) + + double min = this->parent->dock_widget->minBox->value(); + double max = this->parent->dock_widget->maxBox->value(); + + if(min == max) + min -= 1.; + + for(vertex_descriptor v : vertices(this->dataset)) { - if(min == max) - --min; - float f = (static_cast(this->property_map[*vit])-min)/(max-min); - if(f<0) - f = 0; - if(f>1) - f = 1; - CGAL::IO::Color color( - 255*this->parent->color_ramp.r(f), - 255*this->parent->color_ramp.g(f), - 255*this->parent->color_ramp.b(f)); - vcolors[*vit] = color; + double val = (this->property_map[v] - min) / (max - min); + val = boost::algorithm::clamp(val, 0., 1.); + + CGAL::IO::Color color(255 * this->parent->color_ramp.r(val), + 255 * this->parent->color_ramp.g(val), + 255 * this->parent->color_ramp.b(val)); + vcolors[v] = color; } } - }; + }; // struct SMVertexDisplayer template struct SMFaceDisplayer : public PropertyDisplayer > { - typedef PropertyDisplayer > Base; - typedef typename PM::value_type Value_type; - SMFaceDisplayer(SMesh& ds, PM pm, DisplayPropertyPlugin* parent) - :Base(ds, pm, parent) - {} + using Base = PropertyDisplayer >; + using value_type = typename PM::value_type; + + SMFaceDisplayer(SMesh& mesh, + PM pm, + Display_property_plugin* parent) + : Base(mesh, pm, parent) + { } + void fill_values() { - for(auto f : faces(this->dataset)) - { + for(face_descriptor f : faces(this->dataset)) this->values.push_back(this->property_map[f]); - } } - void set_colors_map(std::unordered_map &value_index_map) + void color_with_map(std::unordered_map& value_index_map) const { SMesh::Property_map fcolors = this->dataset.template add_property_map("f:color", CGAL::IO::Color()).first; - for(boost::graph_traits::face_iterator fit = faces(this->dataset).begin(); - fit != faces(this->dataset).end(); - ++fit) + for(face_descriptor f : faces(this->dataset)) { - CGAL::IO::Color color( - this->parent->color_map[value_index_map[this->property_map[*fit]]].red(), - this->parent->color_map[value_index_map[this->property_map[*fit]]].green(), - this->parent->color_map[value_index_map[this->property_map[*fit]]].blue()); - fcolors[*fit] = color; + CGAL::IO::Color color(this->parent->color_map[value_index_map[this->property_map[f]]].red(), + this->parent->color_map[value_index_map[this->property_map[f]]].green(), + this->parent->color_map[value_index_map[this->property_map[f]]].blue()); + fcolors[f] = color; } } - void set_colors_ramp() + void color_with_ramp() const { SMesh::Property_map fcolors = this->dataset.template add_property_map("f:color", CGAL::IO::Color()).first; - float max = this->parent->maxBox; - float min = this->parent->minBox; - for(boost::graph_traits::face_iterator fit = faces(this->dataset).begin(); - fit != faces(this->dataset).end(); - ++fit) + + double min = this->parent->dock_widget->minBox->value(); + double max = this->parent->dock_widget->maxBox->value(); + + if(min == max) + min -= 1.; + + for(face_descriptor f : faces(this->dataset)) { - if(min == max) - --min; - float f = (static_cast(this->property_map[*fit])-min)/(max-min); - if(f<0) - f = 0; - if(f>1) - f = 1; - CGAL::IO::Color color( - 255*this->parent->color_ramp.r(f), - 255*this->parent->color_ramp.g(f), - 255*this->parent->color_ramp.b(f)); - fcolors[*fit] = color; + double val = (this->property_map[f] - min) / (max - min); + val = boost::algorithm::clamp(val, 0., 1.); + + CGAL::IO::Color color(255 * this->parent->color_ramp.r(val), + 255 * this->parent->color_ramp.g(val), + 255 * this->parent->color_ramp.b(val)); + fcolors[f] = color; } } - }; - + }; // struct SMFaceDisplayer }; /// Code based on the verdict module of vtk - /*========================================================================= +/*========================================================================= Copyright (c) 2006 Sandia Corporation. All rights reserved. See Copyright.txt or https://www.kitware.com/Copyright.htm for details. @@ -1701,381 +1227,170 @@ private: PURPOSE. See the above copyright notice for more information. =========================================================================*/ - double DisplayPropertyPlugin::scaled_jacobian( const face_descriptor& f , const SMesh& mesh) +double +Display_property_plugin:: +scaled_jacobian(const face_descriptor f, + const SMesh& mesh) const +{ + boost::property_map::type vpm = get(boost::vertex_point, mesh); + std::vector corner_areas(degree(f, mesh)); + + std::vector edges; + for(halfedge_descriptor hd : CGAL::halfedges_around_face(halfedge(f, mesh), mesh)) { - boost::property_map::type - pmap = get(boost::vertex_point, mesh); - std::vector corner_areas(degree(f, mesh)); - std::vector edges; - for(halfedge_descriptor hd : CGAL::halfedges_around_face(halfedge(f, mesh), mesh)) - { - edges.push_back(EPICK::Vector_3(get(pmap, source(hd, mesh)), get(pmap, target(hd, mesh)))); - } - std::vector corner_normals; - for(std::size_t i = 0; i < edges.size(); ++i) - { - corner_normals.push_back(CGAL::cross_product(edges[i], edges[(i+1)%(edges.size())])); - } - - - EPICK::Vector_3 unit_center_normal = CGAL::Polygon_mesh_processing::compute_face_normal(f, mesh); - unit_center_normal *= 1.0/CGAL::approximate_sqrt(unit_center_normal.squared_length()); - - for(std::size_t i = 0; i < corner_areas.size(); ++i) - { - corner_areas[i] = unit_center_normal*corner_normals[i]; - } - std::vector length; - for(std::size_t i=0; i 0 ) - return (double) (std::min)( min_scaled_jac, ARBITRARY_DBL_MAX ); - return (double) (std::max)( min_scaled_jac, -ARBITRARY_DBL_MAX ); - + edges.emplace_back(get(vpm, source(hd, mesh)), + get(vpm, target(hd, mesh))); } - bool DisplayPropertyPlugin::is_property_scalar(std::string name, const Point_set* ps) - { - if(name == "red" - || name == "green" - || name == "blue") - { - return false; - } + std::vector corner_normals; + for(std::size_t i=0; itemplate property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } - if(ps->template property_map(name).second) - { - return true; - } + EPICK::Vector_3 unit_center_normal = CGAL::Polygon_mesh_processing::compute_face_normal(f, mesh); + + for(std::size_t i=0; i length; + for(std::size_t i=0; i 0) + return (std::min)(min_scaled_jac, ARBITRARY_DBL_MAX); + + return (std::max)(min_scaled_jac, -ARBITRARY_DBL_MAX); +} + +bool +Display_property_plugin:: +isPSPropertyScalar(const std::string& name, + const Point_set& ps) const +{ + if(name == "red" || name == "green" || name == "blue") return false; - } - template - bool DisplayPropertyPlugin::is_property_scalar(std::string name, const SMesh* sm) - { + // the dispatch function does the filtering we want: if it founds a property + // with which it can call the functor, then it already has a property we want + return call_on_PS_property(name, ps, [](auto) -> bool { return true; }); +} - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } - if(sm->template property_map(name).second) - { - return true; - } +// Shenanigans to deal with the fact that the value type is not known +// +// find the property map with the correct value, and call the functor +template +bool +Display_property_plugin:: +isSMPropertyScalar(const std::string& name, + const SMesh& mesh) const +{ + // do not detect this plugin's properties + if(name == "f:display_plugin_smallest_angle" || + name == "f:display_plugin_largest_angle" || + name == "f:display_plugin_scaled_jacobian" || + name == "f:display_plugin_area") return false; - } - 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 Float_map; - typedef typename Point_set::template Property_map Double_map; + // the dispatch function does the filtering we want: if it founds a property + // with which it can call the functor, then it already has a property we want + return call_on_SM_property(name, mesh, [](auto) -> bool { return true; }); +} - bool okay = false; - { - Int8_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } +bool +Display_property_plugin:: +displayPSProperty(const std::string& name, + Point_set& ps) +{ + return call_on_PS_property(name, ps, + [this, &ps](auto pmap) -> bool + { + return this->displayPSProperty(ps, pmap); + }); +} - { - Uint8_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } +template +bool +Display_property_plugin:: +displaySMProperty(const std::string& name, + SMesh& mesh) +{ + return call_on_SM_property(name, mesh, + [this, &mesh](auto pmap) -> bool + { + return this->displaySMProperty(mesh, pmap, Simplex()); + }); +} - { - Int16_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } +template +bool +Display_property_plugin:: +call_on_PS_property(const std::string& name, + const Point_set& ps, + const Functor& functor) const +{ + if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); + else if(ps.template property_map(name).second) + return functor(ps.template property_map(name).first); - { - Uint16_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } + return false; +} - { - Int32_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } +template +bool +Display_property_plugin:: +call_on_SM_property(const std::string& name, + const SMesh& mesh, + const Functor& functor) const +{ + if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); + else if(mesh.template property_map(name).second) + return functor(mesh.template property_map(name).first); - { - Uint32_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } - - { - Int64_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } - - { - Uint64_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } - - { - Float_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } - - { - Double_map pmap; - std::tie(pmap, okay) = ps->property_map(name); - if(okay) - { - return displayPSProperty(ps, pmap); - } - } - return false; - } - - 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 Float_map; - typedef typename SMesh::template Property_map Double_map; - - bool okay = false; - { - Int8_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Uint8_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Int16_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Uint16_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Int32_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Uint32_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Int64_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Uint64_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Float_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - - { - Double_map pmap; - std::tie(pmap, okay) = sm->property_map(name); - if(okay) - { - return displaySMProperty(*sm, pmap, TAG()); - } - } - return false; - } - - template - bool DisplayPropertyPlugin::displayPSProperty(Point_set* ps, PM pm) - { - PSDisplayer display_property(*ps, pm, this); - return display_property(); - } - - template - bool DisplayPropertyPlugin::displaySMProperty(SMesh& smesh, PM pm, vertex_descriptor) - { - SMVertexDisplayer display_property(smesh, pm, this); - return display_property(); - } - - template - bool DisplayPropertyPlugin::displaySMProperty(SMesh& smesh, PM pm, face_descriptor) - { - SMFaceDisplayer display_property(smesh, pm, this); - return display_property(); - } + return false; +} #include "Display_property_plugin.moc" diff --git a/Polyhedron/demo/Polyhedron/Plugins/Display/Heat_method.ui b/Polyhedron/demo/Polyhedron/Plugins/Display/Heat_method.ui new file mode 100644 index 00000000000..0c7440b2236 --- /dev/null +++ b/Polyhedron/demo/Polyhedron/Plugins/Display/Heat_method.ui @@ -0,0 +1,294 @@ + + + HeatMethodWidget + + + true + + + + 0 + 0 + 365 + 708 + + + + + 365 + 708 + + + + Heat Method + + + + + + + + + true + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + true + + + true + + + + + 0 + 0 + 161 + 371 + + + + + + + true + + + RAMP DISPLAYING + + + + + + + + + + + true + + + Color Ramp + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + true + + + Min color + + + + + + + true + + + + + + + + + + + + + true + + + Max color + + + + + + + true + + + + + + + + + + + + + true + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + true + + + Method + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + true + + + + + + + + + + true + + + Extreme Value + + + + + + true + + + Zoom to max value + + + + + + + true + + + Max Value + + + + + + + true + + + 0 + + + true + + + + + + + + + + true + + + + Cantarell + true + + + + Estimate Geodesic Distances + + + + + + + true + + + Source Vertices + + + + + + true + + + + + + 1 + + + Create Source Vertices Selection Item + + + + + + + + + + + + DoubleEdit + QLineEdit +
      CGAL_double_edit.h
      +
      +
      + + +
      diff --git a/Polyhedron/demo/Polyhedron/Plugins/Display/Heat_method_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Display/Heat_method_plugin.cpp new file mode 100644 index 00000000000..fc6d564379b --- /dev/null +++ b/Polyhedron/demo/Polyhedron/Plugins/Display/Heat_method_plugin.cpp @@ -0,0 +1,829 @@ +#include "ui_Heat_method.h" + +#include "Color_ramp.h" +#include "id_printing.h" +#include "Messages_interface.h" +#include "triangulate_primitive.h" + +#include "Scene.h" +#include "Scene_polyhedron_selection_item.h" +#include "Scene_surface_mesh_item.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// @fixme multiple selection items are broken, so don't create a selection item if there is already one + +using namespace CGAL::Three; + +Viewer_interface* (&getActiveViewer)() = Three::activeViewer; + +class Scene_heat_item + : public Scene_item_rendering_helper +{ + Q_OBJECT + +private: + Scene_surface_mesh_item* parent; + SMesh* sm; + + mutable std::vector verts; + mutable std::vector normals; + mutable std::vector idx; + mutable std::vector colors; + mutable std::vector heat_values; + mutable std::size_t nb_idx; + +public: + Scene_heat_item(Scene_surface_mesh_item* item) + : parent(item), sm(item->face_graph()) + { + CGAL_precondition(is_triangle_mesh(*sm)); + + setTriangleContainer(0, new Triangle_container(Viewer_interface::PROGRAM_HEAT_INTENSITY, true)); + setRenderingMode(Gouraud); + } + + ~Scene_heat_item(){} + + Scene_item* clone() const Q_DECL_OVERRIDE { return nullptr; } + QString toolTip() const Q_DECL_OVERRIDE{ return QString(); } + Scene_surface_mesh_item* getParent() { return parent; } + bool isEmpty() const Q_DECL_OVERRIDE { return false; } + + SMesh* face_graph() { return sm; } + + void initializeBuffers(Viewer_interface *viewer) const Q_DECL_OVERRIDE + { + getTriangleContainer(0)->initializeBuffers(viewer); + getTriangleContainer(0)->setIdxSize(nb_idx); + + verts.resize(0); + verts.shrink_to_fit(); + normals.resize(0); + normals.shrink_to_fit(); + colors.resize(0); + colors.shrink_to_fit(); + idx.clear(); + idx.shrink_to_fit(); + } + + void draw(Viewer_interface *viewer) const Q_DECL_OVERRIDE + { + if(!visible()) + return; + + if(!isInit(viewer)) + initGL(viewer); + + if(getBuffersFilled() && !getBuffersInit(viewer)) + { + initializeBuffers(viewer); + setBuffersInit(viewer, true); + } + + if(!getBuffersFilled()) + { + computeElements(); + initializeBuffers(viewer); + } + + getTriangleContainer(0)->setAlpha(1.0f); + getTriangleContainer(0)->draw(viewer, false); + } + + void compute_bbox() const Q_DECL_OVERRIDE + { + setBbox(parent->bbox()); + } + + virtual bool supportsRenderingMode(RenderingMode m) const Q_DECL_OVERRIDE + { + return (m == Gouraud); + } + + virtual void invalidateOpenGLBuffers() Q_DECL_OVERRIDE + { + setBuffersFilled(false); + compute_bbox(); + getTriangleContainer(0)->reset_vbos(NOT_INSTANCED); + } + + void computeElements() const Q_DECL_OVERRIDE + { + typedef CGAL::Buffer_for_vao CPF; + + QApplication::setOverrideCursor(Qt::WaitCursor); + + auto vpm = CGAL::get(CGAL::vertex_point, *sm); + auto vnormals = sm->property_map("v:normal").first; + + auto [vcolors, vcolors_found] = sm->property_map("v:color"); + CGAL_assertion(vcolors_found); + auto [vdist, vdist_found] = sm->property_map("v:HM_Plugin_heat_intensity"); + CGAL_assertion(vdist_found); + + verts.clear(); + normals.clear(); + idx.clear(); + colors.clear(); + + idx.reserve(3 * num_faces(*sm)); + for(face_descriptor fd : faces(*sm)) + { + for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, *sm),*sm)) + idx.push_back(source(hd, *sm)); + } + + const CGAL::qglviewer::Vec& o = static_cast(CGAL::QGLViewer::QGLViewerPool().first())->offset(); + EPICK::Vector_3 offset(o.x, o.y, o.z); + + for(vertex_descriptor vd : vertices(*sm)) + { + const CGAL::IO::Color& c = vcolors[vd]; + colors.push_back(float(c.red()) / 255); + colors.push_back(float(c.green()) / 255); + colors.push_back(float(c.blue()) / 255); + + const EPICK::Point_3& p = get(vpm, vd) + offset; + CPF::add_point_in_buffer(p, verts); + + const EPICK::Vector_3& n = vnormals[vd]; + CPF::add_normal_in_buffer(n, normals); + + heat_values.push_back(vdist[vd]); + } + + nb_idx = idx.size(); + getTriangleContainer(0)->allocate(Triangle_container::Vertex_indices, idx.data(), + static_cast(idx.size()*sizeof(unsigned int))); + getTriangleContainer(0)->allocate(Triangle_container::Smooth_vertices, verts.data(), + static_cast(num_vertices(*sm)*3*sizeof(float))); + getTriangleContainer(0)->allocate(Triangle_container::Smooth_normals, normals.data(), + static_cast(num_vertices(*sm)*3*sizeof(float))); + getTriangleContainer(0)->allocate(Triangle_container::VColors, colors.data(), + static_cast(colors.size()*sizeof(float))); + getTriangleContainer(0)->allocate(Triangle_container::Distances, heat_values.data(), + static_cast(heat_values.size()*sizeof(float))); + + compute_bbox(); + setBuffersFilled(true); + + QApplication::restoreOverrideCursor(); + } +}; // class Scene_heat_item + +class DockWidget + : public QDockWidget, + public Ui::HeatMethodWidget +{ +public: + DockWidget(const QString& name, QWidget *parent) + : QDockWidget(name, parent) + { + setupUi(this); + } +}; + +class Heat_method_plugin + : public QObject, + public Polyhedron_demo_plugin_helper +{ + Q_OBJECT + Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) + Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") + + using Vertex_distance_map = SMesh::Property_map; + using Heat_method = CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3; + using Heat_method_idt = CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3; + +private: + QAction* actionHeatMethod; + + DockWidget* dock_widget; + + // coloring choice and legend + double rm = 1.; + double gm = 0.; + double bm = 0.; + double rM = 0.; + double gM = 1.; + double bM = 0.; + + Color_ramp color_ramp; + QPixmap legend; + + // tracking which scene items have which sources, and which heat method builders + boost::bimap, + boost::bimaps::set_of > item_source_vertices; + + // the point of storing this is that in the Heat Method(s), a number of computations are only + // dependent on the mesh, and not the sources, and such can be performed just once. + std::unordered_map heat_methods; + std::unordered_map idt_heat_methods; + +public: + bool applicable(QAction*) const Q_DECL_OVERRIDE + { + // Single item => it must be a mesh and the selection item will be created through the plugin's button + if(scene->selectionIndices().size() == 1) + { + Scene_item* item = scene->item(scene->mainSelectionIndex()); + return qobject_cast(item); + } + // Two items => it must be a surface mesh and a selection item (in any order) + else if(scene->selectionIndices().size() == 2) + { + Scene_item* item1 = scene->item(scene->selectionIndices().front()); + Scene_item* item2 = scene->item(scene->selectionIndices().back()); + return ((qobject_cast(item1) && + qobject_cast(item2)) || + (qobject_cast(item1) && + qobject_cast(item2))); + } + + return false; + } + + QList actions() const Q_DECL_OVERRIDE + { + return QList() << actionHeatMethod; + } + + void init(QMainWindow* mw, + Scene_interface* sc, + Messages_interface*) Q_DECL_OVERRIDE + { + this->scene = sc; + this->mw = mw; + + actionHeatMethod = new QAction(QString("Heat Method"), mw); + actionHeatMethod->setProperty("submenuName", "Color"); + + connect(actionHeatMethod, SIGNAL(triggered()), + this, SLOT(openDialog())); + + Scene* scene_item = static_cast(scene); + connect(scene_item, SIGNAL(itemIndicesSelected(QList)), + this, SLOT(onItemIndicesSelected(QList))); + + // Dock Widget + dock_widget = new DockWidget("Heat Method", mw); + addDockWidget(dock_widget); + dock_widget->setVisible(false); + + connect(dock_widget->methodBox, SIGNAL(currentIndexChanged(int)), + this, SLOT(onNewMethodSelected(int))); + + dock_widget->methodBox->addItems({"Heat Method", + "Heat Method (Intrinsic Delaunay)"}); + + connect(dock_widget->createSourceVerticesButton, SIGNAL(clicked()), + this, SLOT(createSourceVerticesSelectionItem())); + + QPalette palette(Qt::red); + dock_widget->minColorButton->setPalette(palette); + dock_widget->minColorButton->setStyle(QStyleFactory::create("Fusion")); + dock_widget->minColorButton->update(); + + palette = QPalette(Qt::green); + dock_widget->maxColorButton->setPalette(palette); + dock_widget->maxColorButton->setStyle(QStyleFactory::create("Fusion")); + dock_widget->maxColorButton->update(); + + // lambda to generate the three connect(), for each color button (min, max, map) + auto connect_color_buttons = [this](QPushButton* colorButton, + double& r, double& g, double& b) + { + connect(colorButton, &QPushButton::pressed, + this, [this, colorButton, &r, &g, &b]() + { + QColor color = QColorDialog::getColor(); + if(!color.isValid()) + return; + + r = color.redF(); + g = color.greenF(); + b = color.blueF(); + + QPalette palette(color); + colorButton->setPalette(palette); + colorButton->update(); + + displayRampLegend(); + }); + }; + + connect_color_buttons(dock_widget->minColorButton, rm, gm, bm); + connect_color_buttons(dock_widget->maxColorButton, rM, gM, bM); + + // Main action connection + connect(dock_widget->estimateDistancesButton, SIGNAL(clicked(bool)), + this, SLOT(estimateDistances())); + + // Post coloring connection + connect(dock_widget->zoomToMaxButton, &QPushButton::pressed, + this, &Heat_method_plugin::on_zoomToMaxButton_pressed); + } + +private Q_SLOTS: + void openDialog() + { + if(!dock_widget->isVisible()) + dock_widget->show(); + dock_widget->raise(); + } + + void closure() Q_DECL_OVERRIDE + { + dock_widget->hide(); + } + +private: + void disableExtremeValue() + { + dock_widget->extremeValueGroup->setEnabled(false); + dock_widget->zoomToMaxButton->setEnabled(false); + } + + void enableExtremeValue() + { + dock_widget->extremeValueGroup->setEnabled(true); + dock_widget->zoomToMaxButton->setEnabled(true); + } + + void resetExtremeValue() + { + dock_widget->maxBox->setRange(0, 99999999); + dock_widget->maxBox->setValue(0); + } + + void displayRampLegend() + { + color_ramp = Color_ramp(rm, rM, gm, gM, bm, bM); + + const int height = 256; + const int width = 140; + const int cell_width = width / 3; + const int top_margin = 5; + const int left_margin = 5; + const int drawing_height = height - 2*top_margin; + const int text_height = 20; + + legend = QPixmap(width, height + text_height); + legend.fill(QColor(200, 200, 200)); + + QPainter painter(&legend); + painter.setPen(Qt::black); + painter.setBrush(QColor(200, 200, 200)); + + const double min_value = 0; + const double max_value = dock_widget->maxBox->value(); + + // Build legend data + std::vector graduations(100); + for(int i=0; i<100; ++i) + graduations[i] = i / 100.0; + + int i = 0; + for(std::vector::iterator it = graduations.begin(), end = graduations.end(); it != end; ++it, i+=2) + { + QColor color(255 * color_ramp.r(*it), + 255 * color_ramp.g(*it), + 255 * color_ramp.b(*it)); + painter.fillRect(left_margin, drawing_height - top_margin - i, cell_width, 2, color); + } + + // draw right vertical line + painter.setPen(Qt::blue); + painter.drawLine(QPoint(left_margin + cell_width + 10, + drawing_height - top_margin + 2), + QPoint(left_margin + cell_width + 10, + drawing_height - top_margin - static_cast(graduations.size())*2 + 2)); + + // draw min value and max value + painter.setPen(Qt::blue); + QRect min_text_rect(left_margin + cell_width + 10, + drawing_height - top_margin, 100, text_height); + painter.drawText(min_text_rect, Qt::AlignCenter, QObject::tr("%1").arg(min_value, 0, 'f', 3)); + + QRect max_text_rect(left_margin + cell_width + 10, + drawing_height - top_margin - 200, 100, text_height); + painter.drawText(max_text_rect, Qt::AlignCenter, QObject::tr("%1").arg(max_value, 0, 'f', 3)); + + dock_widget->legendLabel->setPixmap(legend); + } + +private Q_SLOTS: + // Called when new geometric objects are selected in the scene + void onItemIndicesSelected(QList selected_items) + { + resetExtremeValue(); + dock_widget->setEnabled(false); + + Scene_surface_mesh_item* sm_item = nullptr; + Scene_polyhedron_selection_item* source_vertices = nullptr; + + if(selected_items.size() == 1) + { + Scene_item* item = scene->item(scene->mainSelectionIndex()); + source_vertices = qobject_cast(item); + if(source_vertices) + { + // While selecting a selection item, enable coloring if the selection item is linked to a sm_item + if(item_source_vertices.right.count(source_vertices) == 0) + return; + + dock_widget->setEnabled(true); + dock_widget->createSourceVerticesButton->setEnabled(false); + dock_widget->estimateDistancesButton->setEnabled(true); + disableExtremeValue(); + return; + } + else if(qobject_cast(item)) + { + dock_widget->setEnabled(true); + dock_widget->createSourceVerticesButton->setEnabled(false); + dock_widget->estimateDistancesButton->setEnabled(false); + disableExtremeValue(); + return; + } + + sm_item = qobject_cast(item); + } + else if(selected_items.size() == 2) + { + Scene_item* item1 = scene->item(selected_items.front()); + Scene_item* item2 = scene->item(selected_items.back()); + sm_item = qobject_cast(item1); + source_vertices = qobject_cast(item2); + if(!sm_item) + { + sm_item = qobject_cast(item2); + source_vertices = qobject_cast(item1); + } + } + + if(!sm_item) + return; + + dock_widget->setEnabled(true); + const bool has_sources = (source_vertices || item_source_vertices.left.count(sm_item) != 0); + dock_widget->estimateDistancesButton->setEnabled(has_sources); + dock_widget->createSourceVerticesButton->setEnabled(!has_sources); + disableExtremeValue(); + } + + // This function is only called if the index actually changed (doesn't trigger + // if you click again the item) + void onNewMethodSelected(int method_index) + { + resetExtremeValue(); // reset extreme value before the legend to get the proper values + displayRampLegend(); + + if(method_index >= 0 && method_index < dock_widget->methodBox->count()) // valid method + { + dock_widget->setEnabled(true); + disableExtremeValue(); // only available after displaying geodesic distances + } + else // no or broken method? + { + dock_widget->setEnabled(false); + dock_widget->methodBox->setEnabled(true); + } + } + +private: + bool displayHeatIntensity(Scene_surface_mesh_item* sm_item, + Scene_polyhedron_selection_item* source_vertices, + const bool use_iDT = false) + { + SMesh& mesh = *sm_item->face_graph(); + + SMesh::Property_map heat_intensity = + mesh.add_property_map("v:HM_Plugin_heat_intensity", 0).first; + + auto initialize_hm_map = [this, sm_item, &mesh] (auto*& hm_ptr, auto& hm_map) -> void + { + using Method = std::decay_t; + + auto it = hm_map.find(sm_item); + if(it != hm_map.end()) // method already exists + { + hm_ptr = it->second; + + for(vertex_descriptor v : vertices(mesh)) + hm_ptr->remove_source(v); + } + else + { + hm_ptr = new Method(mesh); + hm_map[sm_item] = hm_ptr; + } + + connect(sm_item, &Scene_surface_mesh_item::aboutToBeDestroyed, + this, [this, sm_item, &hm_map]() + { + item_source_vertices.left.erase(sm_item); + + auto it = hm_map.find(sm_item); + if(it == hm_map.end()) + return; + delete it->second; + hm_map.erase(it); + }); + }; + + Heat_method* hm = nullptr; + Heat_method_idt* hm_idt = nullptr; + + if(use_iDT) + initialize_hm_map(hm_idt, idt_heat_methods); + else + initialize_hm_map(hm, heat_methods); + + for(auto v : source_vertices->selected_vertices) + { + if(use_iDT) + hm_idt->add_source(v); + else + hm->add_source(v); + } + + if(use_iDT) + hm_idt->estimate_geodesic_distances(heat_intensity); + else + hm->estimate_geodesic_distances(heat_intensity); + + // Post treatment + double max = 0; + for(vertex_descriptor v : vertices(mesh)) + { + double hi = heat_intensity[v]; + if(hi > max) + max = hi; + } + + displayRampLegend(); + + auto [vcolors, vcolors_added] = mesh.add_property_map("v:color", CGAL::IO::Color()); + for(vertex_descriptor v : vertices(mesh)) + { + double h = heat_intensity[v] / max; + CGAL::IO::Color color(255 * color_ramp.r(h), + 255 * color_ramp.g(h), + 255 * color_ramp.b(h)); + vcolors[v] = color; + } + + // Create the colored item + Scene_heat_item* heat_item = new Scene_heat_item(sm_item); + heat_item->setName(tr("%1 (distance isolines)").arg(sm_item->name())); + heat_item->setVisible(false); + + sm_item->invalidateOpenGLBuffers(); + sm_item->setRenderingMode(GouraudPlusEdges); + sm_item->redraw(); + + auto heat_item_id = scene->addItem(heat_item); + scene->setSelectedItem(heat_item_id); + + // any change of sm_item destroys everything + + // @todo do not emit itemChanged when the colors are reset + // @todo with qt6, single connection can be performed with `static_cast(Qt::SingleShotConnection)` + // see https://www.kdab.com/single-shot-connections/ + auto connection = std::make_shared(); + *connection = connect(sm_item, &Scene_surface_mesh_item::itemChanged, + this, [this, sm_item, heat_item, connection]() + { + QObject::disconnect(*connection); + + sm_item->resetColors(); + removePluginProperties(sm_item); + scene->erase(scene->item_id(heat_item)); + onItemIndicesSelected(scene->selectionIndices()); + }); + + connect(sm_item, &Scene_surface_mesh_item::aboutToBeDestroyed, + this, [this, heat_item]() + { + scene->erase(scene->item_id(heat_item)); + onItemIndicesSelected(scene->selectionIndices()); + }); + + // here because if it's put above, the setSelectedItem() might reset the value + dock_widget->maxBox->setValue(max); + + return true; + } + +private Q_SLOTS: + void estimateDistances() + { + // Get the mesh and source vertices items + Scene_surface_mesh_item* sm_item = nullptr; + Scene_polyhedron_selection_item* source_vertices = nullptr; + + if(scene->selectionIndices().size() == 1) + { + Scene_item* item = scene->item(scene->mainSelectionIndex()); + sm_item = qobject_cast(item); + if(sm_item) + { + // a surface mesh item is selected, an existing associated selection item must exist + source_vertices = item_source_vertices.left.at(sm_item); + } + else + { + // a selection item is selected, an existing associated mesh item must exist + source_vertices = qobject_cast(item); + if(source_vertices) + sm_item = item_source_vertices.right.at(source_vertices); + } + } + else if(scene->selectionIndices().size() == 2) + { + // two items, for (possibly unlinked) sm_item and its associated selection + Scene_item* item1 = scene->item(scene->selectionIndices().front()); + Scene_item* item2 = scene->item(scene->selectionIndices().back()); + sm_item = qobject_cast(item1); + source_vertices = qobject_cast(item2); + if(!sm_item) + { + sm_item = qobject_cast(item2); + source_vertices = qobject_cast(item1); + } + + link_mesh_and_selection(sm_item, source_vertices); + } + else + { + QMessageBox::critical(mw, "Error","Unsupported selection of items."); + return; + } + + CGAL_assertion(sm_item && source_vertices); + + if(!is_triangle_mesh(*sm_item->face_graph())) + { + QApplication::restoreOverrideCursor(); + QMessageBox::critical(mw, "Error","The mesh must be triangulated."); + return; + } + + if(source_vertices->selected_vertices.empty()) + { + QApplication::restoreOverrideCursor(); + QMessageBox::critical(mw, "Error","At least one source vertex is required."); + return; + } + + QApplication::setOverrideCursor(Qt::WaitCursor); + + enableExtremeValue(); + + const std::string& method_name = dock_widget->methodBox->currentText().toStdString(); + if(method_name == "Heat Method") + displayHeatIntensity(sm_item, source_vertices); + else if(method_name == "Heat Method (Intrinsic Delaunay)") + displayHeatIntensity(sm_item, source_vertices, true /*use IDT*/); + + // @todo emit a new SIGNAL on successful coloring, something like "colorChanged()" + // itemChanged is too strong and would conflict with the connection below + sm_item->invalidateOpenGLBuffers(); + sm_item->redraw(); + + QApplication::restoreOverrideCursor(); + } + +private: + void removePluginProperty(Scene_item* item, + const std::string& property_name) + { + Scene_surface_mesh_item* sm_item = qobject_cast(item); + if(!sm_item) + return; + + SMesh* sm = sm_item->face_graph(); + if(sm == nullptr) + return; + + // Here we only target the property maps added by this plugin, so 'double' is fine + SMesh::Property_map property; + bool found; + std::tie(property, found) = sm->property_map(property_name); + if(found) + sm->remove_property_map(property); + } + + void removePluginProperties(Scene_item* item) + { + removePluginProperty(item, "v:HM_Plugin_heat_intensity"); + } + +private Q_SLOTS: + // deletion of the selection item removes the pair from the map + void link_mesh_and_selection(Scene_surface_mesh_item* sm_item, + Scene_polyhedron_selection_item* source_vertices) + { + item_source_vertices.left.insert(std::make_pair(sm_item, source_vertices)); + + connect(source_vertices, &Scene_polyhedron_selection_item::aboutToBeDestroyed, + this, [this, sm_item]() + { + item_source_vertices.left.erase(sm_item); + onItemIndicesSelected(scene->selectionIndices()); + }); + } + + void createSourceVerticesSelectionItem() + { + Scene_item* item = scene->item(scene->mainSelectionIndex()); + Scene_surface_mesh_item* sm_item = qobject_cast(item); + if(!sm_item) + { + QMessageBox::warning(mw, "Warning", "Select a surface mesh to add source vertices"); + dock_widget->createSourceVerticesButton->setChecked(false); + return; + } + + CGAL_assertion(item_source_vertices.left.count(sm_item) == 0); + + Scene_polyhedron_selection_item* source_vertices = new Scene_polyhedron_selection_item(sm_item, mw); + source_vertices->setName(tr("%1 (source vertices)").arg(sm_item->name())); + auto source_vertices_id = scene->addItem(source_vertices); + scene->setSelectedItem(source_vertices_id); + + link_mesh_and_selection(sm_item, source_vertices); + + dock_widget->createSourceVerticesButton->setEnabled(false); + dock_widget->estimateDistancesButton->setEnabled(true); + } + +private Q_SLOTS: + void on_zoomToMaxButton_pressed() + { + Scene_surface_mesh_item* sm_item = nullptr; + if(scene->selectionIndices().size() == 1) + { + Scene_item* item = scene->item(scene->mainSelectionIndex()); + sm_item = qobject_cast(item); + } + else if(scene->selectionIndices().size() == 2) + { + Scene_item* item1 = scene->item(scene->selectionIndices().front()); + Scene_item* item2 = scene->item(scene->selectionIndices().back()); + sm_item = qobject_cast(item1); + if(!sm_item) + sm_item = qobject_cast(item2); + } + + const SMesh& mesh = *(sm_item->face_graph()); + + auto [heat_intensity, found] = mesh.property_map("v:HM_Plugin_heat_intensity"); + CGAL_assertion(found); + + double max = 0; + vertex_descriptor max_v = boost::graph_traits::null_vertex(); + for(vertex_descriptor v : vertices(mesh)) + { + if(heat_intensity[v] > max) + { + max = heat_intensity[v]; + max_v = v; + } + } + + CGAL_assertion(max_v != boost::graph_traits::null_vertex()); + + face_descriptor unused_fd; + Point_3 unused_p; + ::zoomToId(mesh, + QString("v%1").arg(max_v), + getActiveViewer(), + unused_fd, unused_p); + } +}; + +#include "Heat_method_plugin.moc" diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp index 9139fdd2590..4cadd392fd3 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp @@ -265,7 +265,7 @@ struct Fake_mesh_domain { typedef std::pair Surface_patch_index; typedef int Curve_index; typedef int Corner_index; - typedef boost::variant Index; + typedef std::variant Index; }; typedef Geom_traits Fake_gt; @@ -417,12 +417,12 @@ struct Update_vertex case 2: { const typename V1::Index& index = v1.index(); - const Sp_index sp_index = boost::get(index); + const Sp_index sp_index = std::get(index); v2.set_index((std::max)(sp_index.first, sp_index.second)); } break; default:// -1, 0, 1, 3 - v2.set_index(boost::get(v1.index())); + v2.set_index(std::get(v1.index())); } return true; } 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 bd5f0eb143f..80eedf998fa 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -68,7 +68,7 @@ #include #include -#include +#include #include #include @@ -120,13 +120,13 @@ Q_SIGNALS: void x(QString); public: - void setIC(const IntConverter& x) { ic = x; fc = boost::optional(); } - void setFC(const DoubleConverter& x) { fc = x; ic = boost::optional(); } + void setIC(const IntConverter& x) { ic = x; fc = std::optional(); } + void setFC(const DoubleConverter& x) { fc = x; ic = std::optional(); } void setViewer(Viewer_interface* viewer) { this->viewer = viewer; } private: - boost::optional ic; - boost::optional fc; + std::optional ic; + std::optional fc; Viewer_interface* viewer; void getPixel(const QPoint& e) { 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 64ffff89444..9257317215e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp @@ -29,7 +29,7 @@ auto make_not_null(T&& t) { } #include -#include +#include #include "Scene_polylines_item.h" #ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS @@ -135,7 +135,7 @@ public: } public Q_SLOTS: - boost::optional get_items_or_return_error_string() const; + std::optional get_items_or_return_error_string() const; void set_defaults(); void mesh_3_volume(); void mesh_3_surface(); @@ -241,7 +241,7 @@ private: IMAGE_MESH_ITEMS, IMPLICIT_MESH_ITEMS }; - mutable boost::optional> items; @@ -287,9 +287,8 @@ void Mesh_3_plugin::mesh_3_volume() mesh_3(Mesh_type::VOLUME); } -boost::optional Mesh_3_plugin::get_items_or_return_error_string() const +std::optional Mesh_3_plugin::get_items_or_return_error_string() const { - using boost::get; items = {}; features_protection_available = false; item = nullptr; @@ -332,7 +331,7 @@ boost::optional Mesh_3_plugin::get_items_or_return_error_string() const { if (!items) continue; - auto poly_items_ptr = get(&*items); + auto poly_items_ptr = std::get_if(&items.value()); if(poly_items_ptr) { if (poly_items_ptr->polylines_item) { return tr("Only one polyline item is accepted"); @@ -341,7 +340,7 @@ boost::optional Mesh_3_plugin::get_items_or_return_error_string() const } } else { - if(auto image_items_ptr = get(&*items)) + if(auto image_items_ptr = std::get_if(&items.value())) { if (image_items_ptr->polylines_item) { return tr("Only one polyline item is accepted"); @@ -365,10 +364,10 @@ boost::optional Mesh_3_plugin::get_items_or_return_error_string() const //attach polylines_item to one or the other item //if it could not be done in the for loop //because of selection order - if (polylines_item != nullptr && items != boost::none) + if (polylines_item != nullptr && items != std::nullopt) { - auto poly_items_ptr = get(&*items); - auto image_items_ptr = get(&*items); + auto poly_items_ptr = std::get_if(&items.value()); + auto image_items_ptr = std::get_if(&items.value()); if(poly_items_ptr && poly_items_ptr == nullptr) poly_items_ptr->polylines_item = polylines_item; else if(image_items_ptr && image_items_ptr == nullptr) @@ -378,7 +377,7 @@ boost::optional Mesh_3_plugin::get_items_or_return_error_string() const if (!items) { return tr("Selected objects can't be meshed"); } item = nullptr; features_protection_available = false; - if (auto poly_items = get(&*items)) { + if (auto poly_items = std::get_if(&items.value())) { auto& sm_items = poly_items->sm_items; if(sm_items.empty()) { return tr("ERROR: there must be at least one surface mesh item."); @@ -399,12 +398,12 @@ boost::optional Mesh_3_plugin::get_items_or_return_error_string() const features_protection_available = true; } # ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS - else if (auto implicit_mesh_items = get(&*items)) { + else if (auto implicit_mesh_items = std::get_if(&items.value())) { item = implicit_mesh_items->function_item; } # endif # ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES - else if (auto image_mesh_items = get(&*items)) { + else if (auto image_mesh_items = std::get_if(&items.value())) { auto& image_item = image_mesh_items->image_item; item = image_item; features_protection_available = true; @@ -413,7 +412,7 @@ boost::optional Mesh_3_plugin::get_items_or_return_error_string() const if(item) { bbox = item->bbox(); - if (auto poly_items = get(&*items)) { + if (auto poly_items = std::get_if(&items.value())) { for (auto it : poly_items->sm_items) { bbox = bbox + it->bbox(); } @@ -448,28 +447,28 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, QMessageBox::warning(mw, tr("Mesh_3 plugin"), *error_string); return; } - using boost::get; + const bool more_than_one_item = - get(&*items) && - (get(&*items)->sm_items.size() > 1); + std::get_if(&items.value()) && + (std::get_if(&items.value())->sm_items.size() > 1); Scene_image_item* image_item = - get(&*items) - ? get(&*items)->image_item.get() + std::get_if(&items.value()) + ? std::get_if(&items.value())->image_item.get() : nullptr; Scene_surface_mesh_item* bounding_sm_item = - get(&*items) - ? get(&*items)->bounding_sm_item + std::get_if(&items.value()) + ? std::get_if(&items.value())->bounding_sm_item : nullptr; Scene_polylines_item* polylines_item = - get(&*items) - ? get(&*items)->polylines_item + std::get_if(&items.value()) + ? std::get_if(&items.value())->polylines_item : nullptr; - if (polylines_item == nullptr && get(&*items) != nullptr) - polylines_item = get(&*items)->polylines_item; + if (polylines_item == nullptr && std::get_if(&items.value()) != nullptr) + polylines_item = std::get_if(&items.value())->polylines_item; Scene_implicit_function_item* function_item = - get(&*items) - ? get(&*items)->function_item.get() + std::get_if(&items.value()) + ? std::get_if(&items.value())->function_item.get() : nullptr; // ----------------------------------- // Create Mesh dialog @@ -625,13 +624,13 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, ui.initializationGroup->setVisible(input_is_labeled_img); ui.grayImgGroup->setVisible(input_is_gray_img); - if (items->which() == POLYHEDRAL_MESH_ITEMS) + if (items->index() == POLYHEDRAL_MESH_ITEMS) ui.volumeGroup->setVisible(mesh_type == Mesh_type::VOLUME && nullptr != bounding_sm_item); else ui.volumeGroup->setVisible(mesh_type == Mesh_type::VOLUME); ui.sharpEdgesAngle->setValue(sharp_edges_angle_bound); - if (items->which() != POLYHEDRAL_MESH_ITEMS || polylines_item != nullptr) { + if (items->index() != POLYHEDRAL_MESH_ITEMS || polylines_item != nullptr) { ui.sharpEdgesAngleLabel->setVisible(false); ui.sharpEdgesAngle->setVisible(false); @@ -657,14 +656,14 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, const Item on_cube{"Polylines on cube", BORDERS}; const Item triple_lines{"Triple+ lines", FEATURES}; if (features_protection_available) { - if (items->which() == POLYHEDRAL_MESH_ITEMS) { + if (items->index() == POLYHEDRAL_MESH_ITEMS) { auto v = [](Protection_flags f) { return QVariant::fromValue(f); }; if (mesh_type == Mesh_type::SURFACE_ONLY) { ui.protectEdges->addItem(sharp_and_boundary.first, v(sharp_and_boundary.second)); ui.protectEdges->addItem(boundary_only.first, v(boundary_only.second)); } else ui.protectEdges->addItem(sharp_edges.first, v(sharp_edges.second)); - } else if (items->which() == IMAGE_MESH_ITEMS) { + } else if (items->index() == IMAGE_MESH_ITEMS) { if (polylines_item != nullptr) { ui.protectEdges->addItem(input_polylines.first, QVariant::fromValue(input_polylines.second)); ui.protectEdges->addItem(QString(on_cube.first).append(" and input polylines"), @@ -745,7 +744,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, : false; Meshing_thread* thread = nullptr; - switch (items->which()) { + switch (items->index()) { case POLYHEDRAL_MESH_ITEMS: { auto& poly_items = get(*items); auto& sm_items = poly_items.sm_items; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h index e1b4e7190ee..dfd31aadd84 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h @@ -34,7 +34,7 @@ #include // for C3t3_initializer #include -#include +#include namespace CGAL { class Image_3; @@ -117,7 +117,7 @@ private: void tweak_criteria(Mesh_criteria&, Mesh_fnt::Domain_tag) {} void tweak_criteria(Mesh_criteria&, Mesh_fnt::Polyhedral_domain_tag); private: - boost::any object_to_destroy; + std::any object_to_destroy; C3t3& c3t3_; Domain* const domain_; Mesh_parameters const p_; @@ -273,10 +273,10 @@ edge_criteria(double edge_size, double minb, Mesh_fnt::Polyhedral_domain_tag) Mesh_sizing_field* sizing_field_ptr = new Mesh_sizing_field(edge_size, *domain_, domain_->aabb_tree()); // The sizing field object, as well as the `patch_ids_vector` are - // allocated on the heap, and the following `boost::any` object, + // allocated on the heap, and the following `std::any` object, // containing two shared pointers, is used to make the allocated // objects be destroyed at the destruction of the thread object, using - // type erasure (`boost::any`). + // type erasure (`std::any`). object_to_destroy = std::make_pair(QSharedPointer(sizing_field_ptr), QSharedPointer(patches_ids_vector_p)); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp index 15f65cb1df8..49e21cc6635 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp @@ -217,7 +217,7 @@ void Polyhedron_demo_join_and_split_polyhedra_plugin::on_actionColorConnectedCom item->computeItemColorVectorAutomatically(true); item->invalidateOpenGLBuffers(); item->setProperty("NbPatchIds", nb_patch_ids); - scene->itemChanged(item); + scene->itemChanged(item); // @todo emits } else { diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp index 6f2e1eed542..85238d26ff4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include using namespace CGAL::Three; @@ -189,11 +189,10 @@ public Q_SLOTS: void on_Sample_random_points_from_bbox() { // calculate bbox of selected polyhedron items - boost::optional bbox - = boost::make_optional(false, CGAL::Three::Scene_interface::Bbox()); + std::optional bbox; // Workaround a bug in g++-4.8.3: // https://stackoverflow.com/a/21755207/1728537 - // Using boost::make_optional to copy-initialize 'bbox' hides the + // Using std::make_optional to copy-initialize 'bbox' hides the // warning about '*bbox' not being initialized. // -- Laurent Rineau, 2014/10/30 diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp index 5f543518f2f..f4134ecfd15 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp @@ -497,7 +497,7 @@ public Q_SLOTS: return; } - boost::optional minimum = + std::optional minimum = selection_item->select_isolated_components(ui_widget.Threshold_size_spin_box->value()); if(minimum) { ui_widget.Threshold_size_spin_box->setValue((int) *minimum); @@ -512,7 +512,7 @@ public Q_SLOTS: print_message("Error: there is no selected polyhedron selection item!"); return; } - boost::optional minimum = selection_item->get_minimum_isolated_component(); + std::optional minimum = selection_item->get_minimum_isolated_component(); if(minimum) { ui_widget.Threshold_size_spin_box->setValue((int) *minimum); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Surface_intersection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Surface_intersection_plugin.cpp index b39fd8b8f0a..036cdc43026 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Surface_intersection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Surface_intersection_plugin.cpp @@ -216,13 +216,13 @@ void Polyhedron_demo_intersection_plugin::intersectionPolylines() CGAL::cpp11::result_of::type result = CGAL::intersection(segA, segB); if (result) { - if (const Kernel::Segment_3* s = boost::get(&*result)) { + if (const Kernel::Segment_3* s = std::get_if(&*result)) { Polyline_3 p; p.push_back(s->point(0)); p.push_back(s->point(1)); new_pol_item->polylines.push_back(p); } else { - const Kernel::Point_3* p = boost::get(&*result); + const Kernel::Point_3* p = std::get_if(&*result); new_point_item->point_set()->insert(*p); } } @@ -326,13 +326,13 @@ void Polyhedron_demo_intersection_plugin::intersectionSurfacePolyline() CGAL::cpp11::result_of::type result = CGAL::intersection(triangle, segment); if (result) { - if (const Kernel::Segment_3* s = boost::get(&*result)) { + if (const Kernel::Segment_3* s = std::get_if(&*result)) { Polyline_3 p; p.push_back(s->point(0)); p.push_back(s->point(1)); new_pol_item->polylines.push_back(p); } else { - const Kernel::Point_3* p = boost::get(&*result); + const Kernel::Point_3* p = std::get_if(&*result); new_point_item->point_set()->insert(*p); } } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp index d11f45cd623..78c0e2482d4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp @@ -27,7 +27,7 @@ struct Compute_average_spacing_functor { Point_set* points; const int nb_neighbors; - boost::shared_ptr result; + std::shared_ptr result; Compute_average_spacing_functor (Point_set* points, const int nb_neighbors) : points (points), nb_neighbors (nb_neighbors), result (new double(0)) { } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp index c4a13af368d..03f18810236 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp @@ -29,7 +29,7 @@ struct Bilateral_smoothing_functor Point_set* points; unsigned int neighborhood_size; unsigned int sharpness_angle; - boost::shared_ptr result; + std::shared_ptr result; Bilateral_smoothing_functor (Point_set* points, unsigned int neighborhood_size, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp index e898807835f..b998a35750e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp @@ -29,7 +29,7 @@ struct Clustering_functor Point_set* points; Point_set::Property_map cluster_map; const double neighbor_radius; - boost::shared_ptr result; + std::shared_ptr result; Clustering_functor (Point_set* points, const double neighbor_radius, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp index 925195e38d4..c18343a17a9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp @@ -26,7 +26,7 @@ struct Outlier_removal_functor int nb_neighbors; double removed_percentage; double distance_threshold; - boost::shared_ptr result; + std::shared_ptr result; Outlier_removal_functor (Point_set* points, int nb_neighbors, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp index 185ce8930fc..634ae8c699b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp @@ -332,7 +332,7 @@ class Neighborhood typedef CGAL::Fuzzy_sphere Sphere; Scene_points_with_normal_item* points_item; - boost::shared_ptr tree; + std::shared_ptr tree; public: @@ -351,7 +351,7 @@ public: { this->points_item = points_item; - tree = boost::make_shared (points_item->point_set()->begin(), + tree = std::make_shared (points_item->point_set()->begin(), points_item->point_set()->end(), Tree::Splitter(), Search_traits (points_item->point_set()->point_map())); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp index 68a1fe2c6d3..e79f43e02d6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp @@ -440,7 +440,7 @@ private: Scene_surface_mesh_item* sm_item = nullptr; sm_item = new Scene_surface_mesh_item; - boost::shared_ptr rg_plane(boost::make_shared(plane)); + std::shared_ptr rg_plane(std::make_shared(plane)); build_alpha_shape( *(point_item->point_set()), rg_plane, sm_item, search_sphere_radius); @@ -656,7 +656,7 @@ private: std::map color_map; int index = 0; - for(boost::shared_ptr shape : ransac.shapes()) + for(std::shared_ptr shape : ransac.shapes()) { CGAL::Shape_detection::Cylinder *cyl; cyl = dynamic_cast *>(shape.get()); @@ -731,8 +731,8 @@ private: { ss << item->name().toStdString() << "_plane_"; - boost::shared_ptr > pshape - = boost::dynamic_pointer_cast > (shape); + std::shared_ptr > pshape + = std::dynamic_pointer_cast > (shape); Kernel::Point_3 ref = CGAL::ORIGIN + pshape->plane_normal (); @@ -901,7 +901,7 @@ private: } template - void build_alpha_shape (Point_set& points, boost::shared_ptr plane, + void build_alpha_shape (Point_set& points, std::shared_ptr plane, Scene_surface_mesh_item* sm_item, double epsilon); }; // end Polyhedron_demo_point_set_shape_detection_plugin @@ -997,7 +997,7 @@ void Polyhedron_demo_point_set_shape_detection_plugin::on_actionDetect_triggered template void Polyhedron_demo_point_set_shape_detection_plugin::build_alpha_shape -(Point_set& points, boost::shared_ptr plane, Scene_surface_mesh_item* sm_item, double epsilon) +(Point_set& points, std::shared_ptr plane, Scene_surface_mesh_item* sm_item, double epsilon) { typedef Kernel::Point_2 Point_2; typedef CGAL::Alpha_shape_vertex_base_2 Vb; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp index cc5431609ac..05eb2d41493 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp @@ -29,7 +29,7 @@ struct Compute_average_spacing_functor { Point_set* points; const int nb_neighbors; - boost::shared_ptr result; + std::shared_ptr result; Compute_average_spacing_functor (Point_set* points, const int nb_neighbors) : points (points), nb_neighbors (nb_neighbors), result (new double(0)) { } @@ -50,7 +50,7 @@ struct Grid_simplify_functor Point_set* points; double grid_size; unsigned int min_points_per_cell; - boost::shared_ptr result; + std::shared_ptr result; Grid_simplify_functor (Point_set* points, double grid_size, unsigned min_points_per_cell) : points (points), grid_size (grid_size), min_points_per_cell(min_points_per_cell) @@ -72,7 +72,7 @@ struct Hierarchy_simplify_functor Point_set* points; unsigned int max_cluster_size; double max_surface_variation; - boost::shared_ptr result; + std::shared_ptr result; Hierarchy_simplify_functor (Point_set* points, double max_cluster_size, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp index 538a48b32b7..519b4fff4ef 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp @@ -27,7 +27,7 @@ struct Compute_average_spacing_functor { Point_set* points; const int nb_neighbors; - boost::shared_ptr result; + std::shared_ptr result; Compute_average_spacing_functor (Point_set* points, const int nb_neighbors) : points (points), nb_neighbors (nb_neighbors), result (new double(0)) { } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp index 9385ee2442b..724ed194fc5 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp @@ -309,7 +309,7 @@ void Polyhedron_demo_edit_polyhedron_plugin::on_Select_isolated_components_butto Scene_edit_polyhedron_item* edit_item = qobject_cast(scene->item(item_id)); if(!edit_item) return; // the selected item is not of the right type - boost::optional minimum = + std::optional minimum = edit_item->select_isolated_components(ui_widget.Threshold_size_spin_box->value()); if(minimum) { ui_widget.Threshold_size_spin_box->setValue((int) *minimum); @@ -321,7 +321,7 @@ void Polyhedron_demo_edit_polyhedron_plugin::on_Get_minimum_button_clicked() { Scene_edit_polyhedron_item* edit_item = qobject_cast(scene->item(item_id)); if(!edit_item) return; // the selected item is not of the right type - boost::optional minimum = edit_item->get_minimum_isolated_component(); + std::optional minimum = edit_item->get_minimum_isolated_component(); if(minimum) { ui_widget.Threshold_size_spin_box->setValue((int) *minimum); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp index 28163a38043..c4a060696cd 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp @@ -1621,7 +1621,7 @@ void Scene_edit_polyhedron_item::reset_deform_object() refresh_all_group_centers(); } -boost::optional Scene_edit_polyhedron_item::get_minimum_isolated_component() { +std::optional Scene_edit_polyhedron_item::get_minimum_isolated_component() { Travel_isolated_components::Minimum_visitor visitor; Travel_isolated_components(*surface_mesh()).travel (vertices(*surface_mesh()).first, vertices(*surface_mesh()).second, @@ -1630,7 +1630,7 @@ boost::optional Scene_edit_polyhedron_item::get_minimum_isolated_co } -boost::optional Scene_edit_polyhedron_item::select_isolated_components(std::size_t threshold) { +std::optional Scene_edit_polyhedron_item::select_isolated_components(std::size_t threshold) { typedef boost::function_output_iterator > Output_iterator; Output_iterator out(d->deform_sm_mesh); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h index 3fc7b02d1dd..b78d140ffe3 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h @@ -379,7 +379,7 @@ public: } }; - boost::optional get_minimum_isolated_component(); + std::optional get_minimum_isolated_component(); template struct Select_roi_output{ typedef typename CGAL::Surface_mesh_deformation select_isolated_components(std::size_t threshold) ; + std::optional select_isolated_components(std::size_t threshold) ; protected: // Deformation related functions // diff --git a/Polyhedron/demo/Polyhedron/SMesh_type.h b/Polyhedron/demo/Polyhedron/SMesh_type.h index fad279a8993..8395ca148ee 100644 --- a/Polyhedron/demo/Polyhedron/SMesh_type.h +++ b/Polyhedron/demo/Polyhedron/SMesh_type.h @@ -7,21 +7,20 @@ #include #include - typedef CGAL::Exact_predicates_inexact_constructions_kernel EPICK; typedef EPICK::Point_3 Point_3; + typedef CGAL::Surface_mesh SMesh; + typedef boost::graph_traits::face_descriptor face_descriptor; typedef boost::graph_traits::vertex_descriptor vertex_descriptor; typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; - namespace boost { template struct property_map, CGAL::vertex_selection_t> { - typedef typename boost::graph_traits >::vertex_descriptor vertex_descriptor; typedef typename CGAL::Surface_mesh

      ::template Property_map type; @@ -32,7 +31,6 @@ struct property_map, CGAL::vertex_selection_t> template struct property_map, CGAL::face_selection_t> { - typedef typename boost::graph_traits >::face_descriptor face_descriptor; typedef typename CGAL::Surface_mesh

      ::template Property_map type; @@ -41,11 +39,11 @@ struct property_map, CGAL::face_selection_t> } // namespace boost - namespace CGAL { template -struct Get_pmap_of_surface_mesh_ { +struct Get_pmap_of_surface_mesh_ +{ typedef typename boost::property_map, Property_tag >::type type; }; diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index c70929ab4a5..dc601ccbf75 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -172,20 +172,22 @@ Scene::replaceItem(Scene::Item_id index, CGAL::Three::Scene_item* item, bool emi Scene::Item_id Scene::erase(Scene::Item_id index) { - if(index <0 || index >= numberOfEntries()) + if(index < 0 || index >= numberOfEntries()) return -1; CGAL::Three::Scene_item* item = m_entries[index]; + if(qobject_cast(item)) { - setSelectedItemsList(QList()<() << item_id(item)); return erase(selectionIndices()); } + m_groups.removeAll(index); - if(item->parentGroup() - && item->parentGroup()->isChildLocked(item)) + if(item->parentGroup() && item->parentGroup()->isChildLocked(item)) return -1; - //clears the Scene_view + + // clears the Scene_view clear(); index_map.clear(); if(item->parentGroup()) @@ -286,12 +288,12 @@ Scene::erase(QList indices) void Scene::remove_item_from_groups(Scene_item* item) { - CGAL::Three::Scene_group_item* group = item->parentGroup(); - if(group) - { - group->removeChild(item); - children.push_back(item_id(item)); - } + CGAL::Three::Scene_group_item* group = item->parentGroup(); + if(group) + { + group->removeChild(item); + children.push_back(item_id(item)); + } } Scene::~Scene() { @@ -315,19 +317,19 @@ Scene::~Scene() CGAL::Three::Scene_item* Scene::item(Item_id index) const { - return m_entries.value(index); // QList::value checks bounds + return m_entries.value(index); // QList::value checks bounds } Scene::Item_id Scene::item_id(CGAL::Three::Scene_item* scene_item) const { - return m_entries.indexOf(scene_item); + return m_entries.indexOf(scene_item); } int Scene::numberOfEntries() const { - return m_entries.size(); + return m_entries.size(); } // Duplicate a scene item. @@ -335,20 +337,23 @@ Scene::numberOfEntries() const Scene::Item_id Scene::duplicate(Item_id index) { - if(index < 0 || index >= m_entries.size()) - return -1; + if(index < 0 || index >= m_entries.size()) + return -1; - const CGAL::Three::Scene_item* item = m_entries[index]; - CGAL::Three::Scene_item* new_item = item->clone(); - if(new_item) { - new_item->setName(tr("%1 (copy)").arg(item->name())); - new_item->setColor(item->color()); - new_item->setVisible(item->visible()); - addItem(new_item); - return m_entries.size() - 1; - } - else - return -1; + const CGAL::Three::Scene_item* item = m_entries[index]; + CGAL::Three::Scene_item* new_item = item->clone(); + if(new_item) + { + new_item->setName(tr("%1 (copy)").arg(item->name())); + new_item->setColor(item->color()); + new_item->setVisible(item->visible()); + addItem(new_item); + return m_entries.size() - 1; + } + else + { + return -1; + } } void Scene::initializeGL(CGAL::Three::Viewer_interface* viewer) @@ -486,33 +491,33 @@ void Scene::initializeGL(CGAL::Three::Viewer_interface* viewer) void Scene::s_itemAboutToBeDestroyed(CGAL::Three::Scene_item *rmv_itm) { - Q_FOREACH(CGAL::Three::Scene_item* item, m_entries) - { - if(item == rmv_itm) - item->itemAboutToBeDestroyed(item); - } + Q_FOREACH(CGAL::Three::Scene_item* item, m_entries) + { + if(item == rmv_itm) + item->itemAboutToBeDestroyed(item); + } } bool -Scene::keyPressEvent(QKeyEvent* e){ - bool res=false; - for (QList::iterator it=selected_items_list.begin(),endit=selected_items_list.end(); - it!=endit;++it) - { - CGAL::Three::Scene_item* item=m_entries[*it]; - res |= item->keyPressEvent(e); - } - return res; +Scene::keyPressEvent(QKeyEvent* e) +{ + bool res = false; + Q_FOREACH(int i, selected_items_list) + { + CGAL::Three::Scene_item* item = m_entries[i]; + res |= item->keyPressEvent(e); + } + return res; } void Scene::draw(CGAL::Three::Viewer_interface* viewer) { - draw_aux(false, viewer); + draw_aux(false, viewer); } void Scene::drawWithNames(CGAL::Three::Viewer_interface* viewer) { - draw_aux(true, viewer); + draw_aux(true, viewer); } bool item_should_be_skipped_in_draw(Scene_item* item) { @@ -615,12 +620,10 @@ void Scene::renderWireScene(const QList &items, viewer->setGlPointSize(2.f); if(index == selected_item || selected_items_list.contains(index)) { - item.selection_changed(true); } else { - item.selection_changed(false); } item.drawEdges(viewer); @@ -1122,12 +1125,14 @@ bool Scene::dropMimeData(const QMimeData * /*data*/, if(group) { Q_FOREACH(int id, selected_items_list) + { if(group->getChildren().contains(id)) { one_contained = true; break; } + } } //if the drop item is not a group_item or if it already contains the item, then the drop action must be ignored if(!group ||one_contained) diff --git a/Polyhedron/demo/Polyhedron/Scene.h b/Polyhedron/demo/Polyhedron/Scene.h index b661ed7baa8..5b808ac8e01 100644 --- a/Polyhedron/demo/Polyhedron/Scene.h +++ b/Polyhedron/demo/Polyhedron/Scene.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include class QEvent; class QMouseEvent; @@ -195,8 +195,10 @@ public Q_SLOTS: ++i; } } + //! Sets the target list of indices as the selected indices. - QList setSelectedItemsList(QList l ) + const QList& setSelectedItemIndices(QList l, + const bool do_emit = true) { Q_FOREACH(int i,l) { @@ -206,13 +208,38 @@ public Q_SLOTS: { QList list; Q_FOREACH(Item_id id, group->getChildrenForSelection()) - list<& setSelectedItemList(QList l, + const bool do_emit = true) + { + Q_FOREACH(int i,l) + { + CGAL::Three::Scene_group_item* group = + qobject_cast(item(i)); + if(group) + { + QList list; + Q_FOREACH(Item_id id, group->getChildrenForSelection()) + list << id; + l << setSelectedItemList(list, false /*do not emit*/); + } + } + + selected_items_list = l; + if(do_emit) + Q_EMIT selectionChanged(selected_items_list); + return selected_items_list; } // Accessors (setters) @@ -249,6 +276,8 @@ Q_SIGNALS: void selectionChanged(QList is); //! Used when you don't want to update the selectedItem in the Geometric Objects view. void itemIndexSelected(int i); + //! Used when you don't want to update the selectedItem in the Geometric Objects view. + void itemIndicesSelected(QList is); //! Emit this to reset the collapsed state of all groups after the Geometric Objects view has been redrawn. void restoreCollapsedState(); //! Is emitted when draw() is finished. diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index 8164cdacf8f..a65e7adf764 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -289,15 +289,13 @@ public: { // Workaround a bug in g++-4.8.3: // https://stackoverflow.com/a/21755207/1728537 - // Using boost::make_optional to copy-initialize 'item_bbox' hides the + // Using std::make_optional to copy-initialize 'item_bbox' hides the // warning about '*item_bbox' not being initialized. // -- Laurent Rineau, 2014/10/30 constVPmap vpm = get(CGAL::vertex_point, *polyhedron()); - boost::optional item_bbox - = boost::make_optional(false, CGAL::Bbox_3()); - + std::optional item_bbox; for(Selection_set_vertex::const_iterator v_it = selected_vertices.begin(); v_it != selected_vertices.end(); ++v_it) { @@ -488,7 +486,7 @@ public: clear(); } - boost::optional get_minimum_isolated_component() { + std::optional get_minimum_isolated_component() { switch(get_active_handle_type()) { case Active_handle::VERTEX: return get_minimum_isolated_component(); @@ -499,7 +497,7 @@ public: } } template // use fg_vertex_descriptor, fg_face_descriptor, fg_edge_descriptor - boost::optional get_minimum_isolated_component() { + std::optional get_minimum_isolated_component() { Selection_traits tr(this); Travel_isolated_components::Minimum_visitor visitor; Travel_isolated_components(*polyhedron()).travel @@ -507,7 +505,7 @@ public: return visitor.minimum; } - boost::optional select_isolated_components(std::size_t threshold) { + std::optional select_isolated_components(std::size_t threshold) { switch(get_active_handle_type()) { case Active_handle::VERTEX: return select_isolated_components(threshold); @@ -518,7 +516,7 @@ public: } } template // use fg_vertex_descriptor, fg_face_descriptor, fg_edge_descriptor - boost::optional select_isolated_components(std::size_t threshold) { + std::optional select_isolated_components(std::size_t threshold) { typedef Selection_traits Tr; Tr tr(this); typedef std::insert_iterator Output_iterator; diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp index f177172ec08..49e2da75e65 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp @@ -1175,11 +1175,11 @@ void* Scene_surface_mesh_item_priv::get_aabb_tree() void Scene_surface_mesh_item::select(double orig_x, - double orig_y, - double orig_z, - double dir_x, - double dir_y, - double dir_z) + double orig_y, + double orig_z, + double dir_x, + double dir_y, + double dir_z) { SMesh *sm = d->smesh_; std::size_t vertex_to_emit = 0; @@ -1200,7 +1200,7 @@ Scene_surface_mesh_item::select(double orig_x, { const EPICK::Point_3* closest_point = - boost::get(&(closest->first)); + std::get_if(&(closest->first)); for(Intersections::iterator it = std::next(intersections.begin()), end = intersections.end(); @@ -1211,7 +1211,7 @@ Scene_surface_mesh_item::select(double orig_x, } else { const EPICK::Point_3* it_point = - boost::get(&it->first); + std::get_if(&it->first); if(it_point && (ray_dir * (*it_point - *closest_point)) < 0) { @@ -1909,7 +1909,7 @@ void Scene_surface_mesh_item::zoomToPosition(const QPoint &point, CGAL::Three::V if(!intersections.empty()) { Intersections::iterator closest = intersections.begin(); const EPICK::Point_3* closest_point = - boost::get(&closest->first); + std::get_if(&closest->first); for(Intersections::iterator it = std::next(intersections.begin()), end = intersections.end(); @@ -1920,7 +1920,7 @@ void Scene_surface_mesh_item::zoomToPosition(const QPoint &point, CGAL::Three::V } else { const EPICK::Point_3* it_point = - boost::get(&it->first); + std::get_if(&it->first); if(it_point && (ray_dir * (*it_point - *closest_point)) < 0) { @@ -2005,7 +2005,7 @@ void Scene_surface_mesh_item::resetColors() d->has_feature_edges = false; } invalidate(COLORS); - itemChanged(); + itemChanged(); // @fixme really shouldn't call something that strong } QMenu* Scene_surface_mesh_item::contextMenu() @@ -2387,7 +2387,6 @@ void Scene_surface_mesh_item::computeElements() const { d->compute_elements(ALL); setBuffersFilled(true); - const_cast(this)->itemChanged(); } void diff --git a/Polyhedron/demo/Polyhedron/Travel_isolated_components.h b/Polyhedron/demo/Polyhedron/Travel_isolated_components.h index 5cdd2dfdeb9..c1e1124f6b2 100644 --- a/Polyhedron/demo/Polyhedron/Travel_isolated_components.h +++ b/Polyhedron/demo/Polyhedron/Travel_isolated_components.h @@ -1,7 +1,7 @@ #ifndef TRAVEL_ISOLATED_COMPONENTS_H #define TRAVEL_ISOLATED_COMPONENTS_H -#include +#include #include #include "One_ring_iterators.h" #include diff --git a/Polyhedron/demo/Polyhedron/include/id_printing.h b/Polyhedron/demo/Polyhedron/include/id_printing.h index 5676f1129df..91be6e8f224 100644 --- a/Polyhedron/demo/Polyhedron/include/id_printing.h +++ b/Polyhedron/demo/Polyhedron/include/id_printing.h @@ -1,79 +1,96 @@ -#ifndef ID_PRINTING_H -#define ID_PRINTING_H +#ifndef CGAL_POLYHEDRON_DEMO_ID_PRINTING_H +#define CGAL_POLYHEDRON_DEMO_ID_PRINTING_H + #include +#include +#include +#include + #include #include #include -#include -#include + #include #define POINT_SIZE 11 template -struct VKRingPMAP{ - typedef typename boost::graph_traits::vertex_descriptor key_type; - typedef bool value_type; - typedef value_type reference; - typedef boost::read_write_property_map_tag category; - typedef typename boost::property_map::type IDmap; +struct VKRingPMAP +{ + using key_type = typename boost::graph_traits::vertex_descriptor; + using value_type = bool; + using reference = value_type; + using category = boost::read_write_property_map_tag; + + using IDmap = typename boost::property_map::type; std::vector* vec; Mesh* poly; IDmap idmap; VKRingPMAP(std::vector* vec, Mesh* poly) - :vec(vec), poly(poly) + : vec(vec), poly(poly) { idmap = get(boost::vertex_index, *poly); } - friend value_type get(const VKRingPMAP& map, const key_type& v){ + friend value_type get(const VKRingPMAP& map, const key_type& v) + { return (*map.vec)[get(map.idmap, v)]; } - friend void put(VKRingPMAP& map, const key_type& v, const value_type i){ + + friend void put(VKRingPMAP& map, const key_type& v, const value_type i) + { (*map.vec)[get(map.idmap, v)] = i; } }; + template -struct EdgeKRingPMAP{ - typedef typename boost::graph_traits::edge_descriptor key_type; - typedef bool value_type; - typedef value_type reference; - typedef boost::read_write_property_map_tag category; - typedef typename boost::property_map::type IDmap; +struct EdgeKRingPMAP +{ + using key_type = typename boost::graph_traits::edge_descriptor; + using value_type = bool; + using reference = value_type; + using category = boost::read_write_property_map_tag; + + using IDmap = typename boost::property_map::type; std::vector* vec; Mesh* poly; IDmap idmap; EdgeKRingPMAP(std::vector* vec, Mesh* poly) - :vec(vec), poly(poly) + : vec(vec), poly(poly) { idmap = get(boost::halfedge_index, *poly); } - friend value_type get(const EdgeKRingPMAP& map, const key_type& e){ + friend value_type get(const EdgeKRingPMAP& map, const key_type& e) + { return (*map.vec)[get(map.idmap, halfedge(e, *map.poly))/2]; } - friend void put(EdgeKRingPMAP& map, const key_type& e, const value_type i){ + + friend void put(EdgeKRingPMAP& map, const key_type& e, const value_type i) + { (*map.vec)[get(map.idmap, halfedge(e, *map.poly))/2] = i; } }; template -struct FKRingPMAP{ - typedef typename boost::graph_traits::face_descriptor key_type; - typedef bool value_type; - typedef value_type reference; - typedef boost::read_write_property_map_tag category; - typedef typename boost::property_map::type IDmap; +struct FKRingPMAP +{ + using key_type = typename boost::graph_traits::face_descriptor; + using value_type = bool; + using reference = value_type; + using category = boost::read_write_property_map_tag; + + using IDmap = typename boost::property_map::type; std::vector* vec; Mesh* poly; IDmap idmap; FKRingPMAP(std::vector* vec, Mesh* poly) - :vec(vec), poly(poly) + : vec(vec), poly(poly) { idmap = get(boost::face_index, *poly); } @@ -81,7 +98,9 @@ struct FKRingPMAP{ friend value_type get(const FKRingPMAP& map, const key_type& f){ return (*map.vec)[get(map.idmap, f)]; } - friend void put(FKRingPMAP& map, const key_type& f, const value_type i){ + + friend void put(FKRingPMAP& map, const key_type& f, const value_type i) + { (*map.vec)[get(map.idmap, f)] = i; } }; @@ -91,26 +110,28 @@ void deleteIds(CGAL::Three::Viewer_interface* viewer, TextListItem* fitems, std::vector* targeted_ids) { - TextRenderer *renderer = viewer->textRenderer(); + TextRenderer* renderer = viewer->textRenderer(); + for(TextItem* it : vitems->textList()) - delete it; + delete it; for(TextItem* it : eitems->textList()) - delete it; + delete it; for(TextItem* it : fitems->textList()) - delete it; + delete it; + vitems->clear(); renderer->removeTextList(vitems); + eitems->clear(); renderer->removeTextList(eitems); + fitems->clear(); renderer->removeTextList(fitems); + targeted_ids->clear(); viewer->update(); } - - - template bool find_primitive_id(const QPoint& point, Tree* aabb_tree, @@ -118,12 +139,13 @@ bool find_primitive_id(const QPoint& point, Handle& selected_fh, Point& pt_under) { - typedef typename CGAL::Kernel_traits::Kernel Traits; + using Traits = typename CGAL::Kernel_traits::Kernel; + bool found = false; CGAL::qglviewer::Vec point_under = viewer->camera()->pointUnderPixel(point,found); const CGAL::qglviewer::Vec offset = static_cast(CGAL::QGLViewer::QGLViewerPool().first())->offset(); - //find clicked facet + // find clicked facet CGAL::qglviewer::Vec dir; Point ray_origin; if(viewer->camera()->type() == CGAL::qglviewer::Camera::PERSPECTIVE) @@ -151,38 +173,39 @@ bool find_primitive_id(const QPoint& point, if(intersections.empty()) return false; + typename Intersections::iterator closest = intersections.begin(); - const Point* closest_point = - boost::get(&closest->first); - for(typename Intersections::iterator - it = std::next(intersections.begin()), - end = intersections.end(); - it != end; ++it) + const Point* closest_point = std::get_if(&closest->first); + for(typename Intersections::iterator it = std::next(intersections.begin()), + end = intersections.end(); it != end; ++it) { - if(! closest_point) { + if(! closest_point) + { closest = it; } - else { - const Point* it_point = - boost::get(&it->first); - if(it_point && - (ray_dir * (*it_point - *closest_point)) < 0) + else + { + const Point* it_point = std::get_if(&it->first); + if(it_point && (ray_dir * (*it_point - *closest_point)) < 0) { closest = it; closest_point = it_point; } } } + if(!closest_point) return false; + pt_under = Point(point_under.x, point_under.y, point_under.z); selected_fh = closest->second; + return true; } -template +template void compute_displayed_ids(Mesh& mesh, - CGAL::Three::Viewer_interface *viewer, + CGAL::Three::Viewer_interface* viewer, const typename boost::graph_traits::face_descriptor& selected_fh, const Point& pt_under, const CGAL::qglviewer::Vec& offset, @@ -191,21 +214,21 @@ void compute_displayed_ids(Mesh& mesh, TextListItem* fitems, std::vector* targeted_ids) { - typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::edge_descriptor edge_descriptor; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + using edge_descriptor = typename boost::graph_traits::edge_descriptor; + using face_descriptor = typename boost::graph_traits::face_descriptor; - typedef typename boost::property_map::type Ppmap; + using Ppmap = typename boost::property_map::type; Ppmap ppmap = get(boost::vertex_point, mesh); - typedef typename boost::property_map::type VIDmap; + using VIDmap = typename boost::property_map::type; VIDmap vidmap = get(boost::vertex_index, mesh); - typedef typename boost::property_map::type HIDmap; + using HIDmap = typename boost::property_map::type; HIDmap hidmap = get(boost::halfedge_index, mesh); - typedef typename boost::property_map::type FIDmap; + using FIDmap = typename boost::property_map::type; FIDmap fidmap = get(boost::face_index, mesh); QFont font; @@ -214,70 +237,77 @@ void compute_displayed_ids(Mesh& mesh, std::vector displayed_vertices; std::vector displayed_edges; std::vector displayed_faces; - //Test spots around facet to find the closest to point + // Test spots around facet to find the closest to point double min_dist = (std::numeric_limits::max)(); // test the vertices of the closest face for(vertex_descriptor vh : vertices_around_face(halfedge(selected_fh, mesh), mesh)) { - Point test=Point(get(ppmap, vh).x()+offset.x, - get(ppmap, vh).y()+offset.y, - get(ppmap, vh).z()+offset.z); + Point test=Point(get(ppmap, vh).x() + offset.x, + get(ppmap, vh).y() + offset.y, + get(ppmap, vh).z() + offset.z); double dist = CGAL::squared_distance(test, pt_under); - if( dist < min_dist){ + if(dist < min_dist) + { min_dist = dist; displayed_vertices.clear(); displayed_vertices.push_back(vh); } } - QVector3D point( - float(get(ppmap, displayed_vertices[0]).x() + offset.x), - float(get(ppmap, displayed_vertices[0]).y() + offset.y), - float(get(ppmap, displayed_vertices[0]).z() + offset.z)); - //test if we want to erase or not + QVector3D point(float(get(ppmap, displayed_vertices[0]).x() + offset.x), + float(get(ppmap, displayed_vertices[0]).y() + offset.y), + float(get(ppmap, displayed_vertices[0]).z() + offset.z)); + + // test if we want to erase or not for(TextItem* text_item : *targeted_ids) { if(text_item->position() == point) { - //hide and stop + // hide and stop deleteIds(viewer, vitems, eitems, fitems, targeted_ids); return; } } + deleteIds(viewer, vitems, eitems, fitems, targeted_ids); + // test the midpoint of edges of the closest face for(halfedge_descriptor e : halfedges_around_face(halfedge(selected_fh, mesh), mesh)) { - Point test=CGAL::midpoint(get(ppmap, source(e, mesh)),get(ppmap, target(e, mesh))); + Point test = CGAL::midpoint(get(ppmap, source(e, mesh)),get(ppmap, target(e, mesh))); test = Point(test.x()+offset.x, test.y()+offset.y, test.z()+offset.z); double dist = CGAL::squared_distance(test, pt_under); - if(dist < min_dist){ + if(dist < min_dist) + { min_dist = dist; displayed_vertices.clear(); displayed_edges.clear(); displayed_edges.push_back(edge(e, mesh)); } } + // test the centroid of the closest face double x(0), y(0), z(0); int total(0); for(vertex_descriptor vh : vertices_around_face(halfedge(selected_fh, mesh), mesh)) { - x+=get(ppmap, vh).x(); - y+=get(ppmap, vh).y(); - z+=get(ppmap, vh).z(); + x += get(ppmap, vh).x(); + y += get(ppmap, vh).y(); + z += get(ppmap, vh).z(); ++total; } - Point test(x/total+offset.x, - y/total+offset.y, - z/total+offset.z); + Point test(x / total+offset.x, + y / total+offset.y, + z / total+offset.z); + double dist = CGAL::squared_distance(test, pt_under); - if(dist < min_dist){ + if(dist < min_dist) + { min_dist = dist; displayed_vertices.clear(); displayed_edges.clear(); @@ -293,23 +323,21 @@ void compute_displayed_ids(Mesh& mesh, if(f != boost::graph_traits::null_face()) displayed_faces.push_back(f); } + for(halfedge_descriptor h : CGAL::halfedges_around_target(halfedge(displayed_vertices[0], mesh), mesh)) - { displayed_edges.push_back(edge(h, mesh)); - } } else if(!displayed_edges.empty()) { displayed_vertices.push_back(target(halfedge(displayed_edges[0], mesh), mesh)); displayed_vertices.push_back(target(opposite(halfedge(displayed_edges[0], mesh), mesh),mesh)); face_descriptor f1(face(halfedge(displayed_edges[0], mesh),mesh)), - f2(face(opposite(halfedge(displayed_edges[0], mesh), mesh),mesh)); + f2(face(opposite(halfedge(displayed_edges[0], mesh), mesh),mesh)); if(f1 != boost::graph_traits::null_face()) displayed_faces.push_back(f1); if(f2 != boost::graph_traits::null_face()) displayed_faces.push_back(f2); } - else if(!displayed_faces.empty()) { for(halfedge_descriptor h : CGAL::halfedges_around_face(halfedge(displayed_faces[0], mesh), mesh)) @@ -318,7 +346,8 @@ void compute_displayed_ids(Mesh& mesh, displayed_vertices.push_back(target(h, mesh)); } } - //fill TextItems + + // fill TextItems std::vector vertex_selection(false); vertex_selection.resize(num_vertices(mesh)); VKRingPMAP vpmap(&vertex_selection, &mesh); @@ -345,9 +374,7 @@ void compute_displayed_ids(Mesh& mesh, face_selection.resize(num_faces(mesh)); FKRingPMAP fpmap(&face_selection, &mesh); for(face_descriptor f_h : displayed_faces) - { - put(fpmap, f_h, true); - } + put(fpmap, f_h, true); CGAL::expand_face_selection(displayed_faces, mesh, 1, @@ -356,9 +383,9 @@ void compute_displayed_ids(Mesh& mesh, for(vertex_descriptor vh : displayed_vertices) { - Point pos=Point(get(ppmap, vh).x()+offset.x, - get(ppmap, vh).y()+offset.y, - get(ppmap, vh).z()+offset.z); + Point pos = Point(get(ppmap, vh).x() + offset.x, + get(ppmap, vh).y() + offset.y, + get(ppmap, vh).z() + offset.z); TextItem* text_item = new TextItem(float(pos.x()), float(pos.y()), float(pos.z()), @@ -366,13 +393,14 @@ void compute_displayed_ids(Mesh& mesh, vitems->append(text_item); targeted_ids->push_back(text_item); } + for(edge_descriptor e : displayed_edges) { - halfedge_descriptor h(halfedge(e, mesh)); - Point pos=CGAL::midpoint(get(ppmap, source(h, mesh)),get(ppmap, target(h, mesh))); - pos = Point(pos.x()+offset.x, - pos.y()+offset.y, - pos.z()+offset.z); + halfedge_descriptor h(halfedge(e, mesh)); + Point pos = CGAL::midpoint(get(ppmap, source(h, mesh)),get(ppmap, target(h, mesh))); + pos = Point(pos.x() + offset.x, + pos.y() + offset.y, + pos.z() + offset.z); TextItem* text_item = new TextItem(float(pos.x()), float(pos.y()), @@ -387,15 +415,15 @@ void compute_displayed_ids(Mesh& mesh, int total(0); for(vertex_descriptor vh :vertices_around_face(halfedge(f, mesh), mesh)) { - x+=get(ppmap, vh).x(); - y+=get(ppmap, vh).y(); - z+=get(ppmap, vh).z(); + x += get(ppmap, vh).x(); + y += get(ppmap, vh).y(); + z += get(ppmap, vh).z(); ++total; } - Point pos(x/total+offset.x, - y/total+offset.y, - z/total+offset.z); + Point pos(x/total + offset.x, + y/total + offset.y, + z/total + offset.z); TextItem* text_item = new TextItem(float(pos.x()), float(pos.y()), float(pos.z()), @@ -408,18 +436,20 @@ template bool printVertexIds(const Mesh& mesh, TextListItem* vitems) { - typedef typename boost::property_map::const_type Ppmap; - typedef typename boost::property_traits::value_type Point; - typedef typename boost::property_map::type IDmap; + using Ppmap = typename boost::property_map::const_type; + using Point = typename boost::property_traits::value_type; + using IDmap = typename boost::property_map::type; Ppmap ppmap = get(boost::vertex_point, mesh); IDmap idmap = get(boost::vertex_index, mesh); + const CGAL::qglviewer::Vec offset = CGAL::Three::Three::mainViewer()->offset(); + QFont font; font.setBold(true); font.setPointSize(POINT_SIZE); - //fills textItems + // fills textItems for(typename boost::graph_traits::vertex_descriptor vh : vertices(mesh)) { const Point& p = get(ppmap, vh); @@ -429,7 +459,8 @@ bool printVertexIds(const Mesh& mesh, QString("%1").arg(get(idmap, vh)), true, font, Qt::red)); } - //add the QList to the render's pool + + // add the QList to the render's pool bool res = true; Q_FOREACH(CGAL::QGLViewer* v, CGAL::QGLViewer::QGLViewerPool()) { @@ -437,10 +468,9 @@ bool printVertexIds(const Mesh& mesh, renderer->addTextList(vitems); v->update(); if(vitems->size() > static_cast(renderer->getMax_textItems())) - { res = false; - } } + return res; } @@ -448,13 +478,15 @@ template bool printEdgeIds(const Mesh& mesh, TextListItem* eitems) { - typedef typename boost::property_map::const_type Ppmap; - typedef typename boost::property_traits::value_type Point; - typedef typename boost::property_map::type IDmap; + using Ppmap = typename boost::property_map::const_type; + using Point = typename boost::property_traits::value_type; + using IDmap = typename boost::property_map::type; Ppmap ppmap = get(boost::vertex_point, mesh); IDmap idmap = get(boost::halfedge_index, mesh); + const CGAL::qglviewer::Vec offset = CGAL::Three::Three::mainViewer()->offset(); + QFont font; font.setBold(true); font.setPointSize(POINT_SIZE); @@ -468,7 +500,8 @@ bool printEdgeIds(const Mesh& mesh, float((p1.z() + p2.z()) / 2 + offset.z), QString("%1").arg(get(idmap, halfedge(e, mesh)) / 2), true, font, Qt::green)); } - //add the QList to the render's pool + + // add the QList to the render's pool bool res = true; Q_FOREACH(CGAL::QGLViewer* v, CGAL::QGLViewer::QGLViewerPool()) { @@ -476,10 +509,9 @@ bool printEdgeIds(const Mesh& mesh, renderer->addTextList(eitems); v->update(); if(eitems->size() > static_cast(renderer->getMax_textItems())) - { res = false; - } } + return res; } @@ -487,15 +519,18 @@ template bool printFaceIds(const Mesh& mesh, TextListItem* fitems) { - typedef typename boost::property_map::const_type Ppmap; - typedef typename boost::property_map::type IDmap; + using Ppmap = typename boost::property_map::const_type; + using IDmap = typename boost::property_map::type; Ppmap ppmap = get(boost::vertex_point, mesh); IDmap idmap = get(boost::face_index, mesh); + const CGAL::qglviewer::Vec offset = CGAL::Three::Three::mainViewer()->offset(); + QFont font; font.setBold(true); font.setPointSize(POINT_SIZE); + for(typename boost::graph_traits::face_descriptor fh : faces(mesh)) { double x(0), y(0), z(0); @@ -513,7 +548,8 @@ bool printFaceIds(const Mesh& mesh, float(z / total + offset.z), QString("%1").arg(get(idmap, fh)), true, font, Qt::blue)); } - //add the QList to the render's pool + + // add the QList to the render's pool bool res = true; Q_FOREACH(CGAL::QGLViewer* v, CGAL::QGLViewer::QGLViewerPool()) { @@ -521,9 +557,7 @@ bool printFaceIds(const Mesh& mesh, renderer->addTextList(fitems); v->update(); if(fitems->size() > static_cast(renderer->getMax_textItems())) - { res = false; - } } return res; } @@ -535,14 +569,15 @@ int zoomToId(const Mesh& mesh, typename boost::graph_traits::face_descriptor& selected_fh, Point& p) { - typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::property_map::const_type Ppmap; - typedef typename boost::property_map::type VIDmap; - typedef typename boost::property_map::type EIDmap; - typedef typename boost::property_map::type FIDmap; - typedef typename CGAL::Kernel_traits::Kernel Traits; + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using face_descriptor = typename boost::graph_traits::face_descriptor; + using Ppmap = typename boost::property_map::const_type; + using VIDmap = typename boost::property_map::type; + using EIDmap = typename boost::property_map::type; + using FIDmap = typename boost::property_map::type; + + using Traits = typename CGAL::Kernel_traits::Kernel; Ppmap ppmap = get(boost::vertex_point, mesh); VIDmap vidmap = get(boost::vertex_index, mesh); @@ -555,10 +590,11 @@ int zoomToId(const Mesh& mesh, if((first != QString("v") && first != QString("e") && first != QString("f")) || - !is_int) + !is_int) { return 1; //("Input must be of the form [v/e/f][int]" } + const CGAL::qglviewer::Vec offset = viewer->offset(); typename Traits::Vector_3 normal; if(first == QString("v")) @@ -567,26 +603,25 @@ int zoomToId(const Mesh& mesh, for(vertex_descriptor vh : vertices(mesh)) { std::size_t cur_id = get(vidmap, vh); - if( cur_id == id) + if(cur_id == id) { p = Point(get(ppmap, vh).x() + offset.x, get(ppmap, vh).y() + offset.y, get(ppmap, vh).z() + offset.z); + typename boost::graph_traits::halfedge_descriptor hf = halfedge(vh, mesh); if(CGAL::is_border(hf, mesh)) - { hf = opposite(hf, mesh); - } + selected_fh = face(hf, mesh); normal = CGAL::Polygon_mesh_processing::compute_vertex_normal(vh, mesh); found = true; break; } } + if(!found) - { - return 2;//"No vertex with id %1").arg(id) - } + return 2; // "No vertex with id %1").arg(id) } else if(first == QString("e")) { @@ -604,10 +639,10 @@ int zoomToId(const Mesh& mesh, typename Traits::Vector_3 normal1(0,0,0); if(!is_border(hf, mesh)) { - normal1= CGAL::Polygon_mesh_processing::compute_face_normal(face(hf,mesh), - mesh); + normal1 = CGAL::Polygon_mesh_processing::compute_face_normal(face(hf,mesh), mesh); selected_fh = face(hf, mesh); } + typename Traits::Vector_3 normal2(0,0,0); if(!is_border(opposite(hf, mesh), mesh)) { @@ -615,15 +650,15 @@ int zoomToId(const Mesh& mesh, mesh); selected_fh = face(hf, mesh); } - normal = 0.5*normal1+0.5*normal2; + + normal = 0.5*normal1 + 0.5*normal2; found = true; break; } } + if(!found) - { - return 3;//"No edge with id %1").arg(id) - } + return 3; // "No edge with id %1").arg(id) } else if(first == QString("f")) { @@ -634,30 +669,30 @@ int zoomToId(const Mesh& mesh, { if(get(fidmap, fh) != id) continue; + for(vertex_descriptor vh : vertices_around_face(halfedge(fh, mesh), mesh)) { - x+=get(ppmap, vh).x(); - y+=get(ppmap, vh).y(); - z+=get(ppmap, vh).z(); + x += get(ppmap, vh).x(); + y += get(ppmap, vh).y(); + z += get(ppmap, vh).z(); ++total; } + p = Point(x/total + offset.x, - y/total + offset.y, - z/total + offset.z); - normal = CGAL::Polygon_mesh_processing::compute_face_normal( - fh, - mesh); + y/total + offset.y, + z/total + offset.z); + normal = CGAL::Polygon_mesh_processing::compute_face_normal(fh, mesh); selected_fh = fh; found = true; break; } + if(!found) - { - return 4; //"No face with id %1").arg(id) - } + return 4; // "No face with id %1").arg(id) } + CGAL::qglviewer::Quaternion new_orientation(CGAL::qglviewer::Vec(0,0,-1), - CGAL::qglviewer::Vec(-normal.x(), -normal.y(), -normal.z())); + CGAL::qglviewer::Vec(-normal.x(), -normal.y(), -normal.z())); Point new_pos = p + 0.25*CGAL::qglviewer::Vec( viewer->camera()->position().x - viewer->camera()->pivotPoint().x, @@ -665,19 +700,69 @@ int zoomToId(const Mesh& mesh, viewer->camera()->position().z - viewer->camera()->pivotPoint().z) .norm() * normal ; - viewer->camera()->setPivotPoint(CGAL::qglviewer::Vec(p.x(), - p.y(), - p.z())); + viewer->camera()->setPivotPoint(CGAL::qglviewer::Vec(p.x(), p.y(), p.z())); viewer->moveCameraToCoordinates(QString("%1 %2 %3 %4 %5 %6 %7").arg(new_pos.x()) - .arg(new_pos.y()) - .arg(new_pos.z()) - .arg(new_orientation[0]) - .arg(new_orientation[1]) - .arg(new_orientation[2]) - .arg(new_orientation[3])); + .arg(new_pos.y()) + .arg(new_pos.z()) + .arg(new_orientation[0]) + .arg(new_orientation[1]) + .arg(new_orientation[2]) + .arg(new_orientation[3])); viewer->update(); - return 0; //all clear; -} -#endif // ID_PRINTING_H + + return 0; // all clear; +} + +template +int zoomToPoint(const PointSet& ps, + const typename PointSet::Index& index, + CGAL::Three::Viewer_interface* viewer, + typename PointSet::Point_3& p) +{ + const CGAL::qglviewer::Vec offset = viewer->offset(); + + using Point_3 = typename PointSet::Point_3; + using Vector_3 = typename PointSet::Vector_3; + + const Point_3& op = ps.point(index); + + p = Point_3(op.x() + offset.x, + op.y() + offset.y, + op.z() + offset.z); + + Vector_3 normal; + if(ps.has_normal_map()) + normal = ps.normal(index); + else + normal = { viewer->camera()->position().x - viewer->camera()->pivotPoint().x, + viewer->camera()->position().y - viewer->camera()->pivotPoint().y, + viewer->camera()->position().z - viewer->camera()->pivotPoint().z }; + + Point_3 new_pos = p + + 0.25 * CGAL::qglviewer::Vec( + viewer->camera()->position().x - viewer->camera()->pivotPoint().x, + viewer->camera()->position().y - viewer->camera()->pivotPoint().y, + viewer->camera()->position().z - viewer->camera()->pivotPoint().z) + .norm() * normal ; + + viewer->camera()->setPivotPoint(CGAL::qglviewer::Vec(p.x(), p.y(), p.z())); + + CGAL::qglviewer::Quaternion new_orientation(CGAL::qglviewer::Vec(0,0,-1), + CGAL::qglviewer::Vec(-normal.x(), -normal.y(), -normal.z())); + + viewer->moveCameraToCoordinates(QString("%1 %2 %3 %4 %5 %6 %7").arg(new_pos.x()) + .arg(new_pos.y()) + .arg(new_pos.z()) + .arg(new_orientation[0]) + .arg(new_orientation[1]) + .arg(new_orientation[2]) + .arg(new_orientation[3])); + + viewer->update(); + + return 0; +} + +#endif // CGAL_POLYHEDRON_DEMO_ID_PRINTING_H diff --git a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h index 9671bb46277..b997b2ab1bf 100644 --- a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h +++ b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h @@ -20,9 +20,9 @@ private: mutable std::size_t nb; public: - boost::shared_ptr latest_adv; - boost::shared_ptr state; - boost::shared_ptr signaler; + std::shared_ptr latest_adv; + std::shared_ptr state; + std::shared_ptr signaler; Signal_callback(bool) : latest_adv (new double(0)) @@ -71,7 +71,7 @@ public: class Functor_with_signal_callback { protected: - boost::shared_ptr m_callback; + std::shared_ptr m_callback; public: Signal_callback* callback() { return m_callback.get(); } diff --git a/Polyhedron/demo/Polyhedron/triangulate_primitive.h b/Polyhedron/demo/Polyhedron/triangulate_primitive.h index c80ceb08aca..cf7aa8a457b 100644 --- a/Polyhedron/demo/Polyhedron/triangulate_primitive.h +++ b/Polyhedron/demo/Polyhedron/triangulate_primitive.h @@ -1,234 +1,246 @@ -#ifndef TRIANGULATE_PRIMITIVE -#define TRIANGULATE_PRIMITIVE +#ifndef CGAL_DEMO_TRIANGULATE_PRIMITIVE_H +#define CGAL_DEMO_TRIANGULATE_PRIMITIVE_H + +#include + #include #include #include + #include -#include -#include #include -//Make sure all the facets are triangles +#include +#include + +#include +#include +#include + +// Ensure that all the facets are triangles +// @todo just use PMP::triangulate_face()...? +// or at least mark_faces_in_domain() + template class FacetTriangulator { - typedef Kernel Traits; +public: + using Traits = Kernel; + using Point = typename Kernel::Point_3; + using Vector = typename Kernel::Vector_3; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + using P_traits = CGAL::Projection_traits_3; - typedef typename Kernel::Vector_3 Vector; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + using face_descriptor = typename boost::graph_traits::face_descriptor; + struct Face_info + { + typename boost::graph_traits::halfedge_descriptor e[3]; + bool is_external; + }; - typedef CGAL::Projection_traits_3 P_traits; + using Vb = CGAL::Triangulation_vertex_base_with_info_2; + using Fbb = CGAL::Triangulation_face_base_with_info_2; + using Fb = CGAL::Constrained_triangulation_face_base_2; + using TDS = CGAL::Triangulation_data_structure_2; + using Itag = CGAL::Exact_predicates_tag; + using CDT = CGAL::Constrained_Delaunay_triangulation_2; - typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; + using Vertex_handle = typename CDT::Vertex_handle; + using Face_handle = typename CDT::Face_handle; - struct Face_info { - typename boost::graph_traits::halfedge_descriptor e[3]; - bool is_external; - }; - - typedef CGAL::Triangulation_face_base_with_info_2 Fb1; - typedef CGAL::Constrained_triangulation_face_base_2 Fb; - typedef CGAL::Triangulation_data_structure_2 TDS; - typedef CGAL::Exact_predicates_tag Itag; + struct PointAndId + { + Point point; + Index_type id; + PointAndId() = default; + PointAndId(const Point& point, const Index_type id) : point(point), id(id) { } + }; public: - struct PointAndId { - typename Kernel::Point_3 point; - Index_type id; - }; + CDT* cdt; + CGAL::Unique_hash_map v2v; - typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; - CDT *cdt; - CGAL::Unique_hash_map v2v; - - //Constructor - FacetTriangulator(typename boost::graph_traits::face_descriptor fd, +public: + // Constructor + FacetTriangulator(face_descriptor fd, const Vector& normal, - Mesh *poly, + Mesh* poly, Vector offset = Vector(0,0,0)) { std::vector idPoints; - for(halfedge_descriptor he_circ : halfedges_around_face( halfedge(fd, *poly), *poly)) - { - PointAndId idPoint; - idPoint.point = get(boost::vertex_point,*poly,source(he_circ, *poly))+offset; - idPoint.id = source(he_circ, *poly); - idPoints.push_back(idPoint); + for(halfedge_descriptor he_circ : halfedges_around_face(halfedge(fd, *poly), *poly)) + idPoints.emplace_back(get(CGAL::vertex_point, *poly, source(he_circ, *poly)) + offset, + source(he_circ, *poly)); - } if(!triangulate(idPoints, normal)) - std::cerr<<"Facet not displayed"<::face_descriptor fd, - const std::vector& more_points, + + FacetTriangulator(face_descriptor fd, + const std::vector& more_points, const Vector& normal, - Mesh *poly, + Mesh* poly, Vector offset = Vector(0,0,0)) { - std::vector idPoints; - for(halfedge_descriptor he_circ : halfedges_around_face( halfedge(fd, *poly), *poly)) - { - PointAndId idPoint; - idPoint.point = get(boost::vertex_point,*poly,source(he_circ, *poly))+offset; - idPoint.id = source(he_circ, *poly); - idPoints.push_back(idPoint); + std::vector idPoints; + for(halfedge_descriptor he_circ : halfedges_around_face(halfedge(fd, *poly), *poly)) + idPoints.emplace_back(get(CGAL::vertex_point, *poly, source(he_circ, *poly)) + offset, + source(he_circ, *poly)); - } - if(!triangulate_with_points(idPoints,more_points, normal)) - std::cerr<<"Facet not displayed"< &idPoints, - const Vector& normal) - { - if(!triangulate(idPoints, normal)) - std::cerr<<"Facet not displayed"< &idPoints, - const std::vector& more_points, + FacetTriangulator(std::vector& idPoints, const Vector& normal) { - if(!triangulate_with_points(idPoints, more_points, normal)) - std::cerr<<"Facet not displayed"<& idPoints, + const std::vector& more_points, + const Vector& normal) + { + if(!triangulate_with_points(idPoints, more_points, normal)) + std::cerr << "Facet not displayed" << std::endl; + } + ~FacetTriangulator() { - if (cdt ) - delete cdt; + if(cdt) + delete cdt; } private: - bool triangulate( std::vector &idPoints, - const Vector& normal ) + bool triangulate(std::vector& idPoints, + const Vector& normal) { P_traits cdt_traits(normal); cdt = new CDT(cdt_traits); - typename CDT::Vertex_handle previous, first, last_inserted; + + Vertex_handle previous, first, last_inserted; // Iterate the points of the facet and decide if they must be inserted in the CDT typename Kernel::FT x(0), y(0), z(0); - for(PointAndId idPoint : idPoints) + for(const PointAndId& idPoint : idPoints) { - x += idPoint.point.x(); - y += idPoint.point.y(); - z += idPoint.point.z(); - typename CDT::Vertex_handle vh; - //Always insert the first point, then only insert - // if the distance with the previous is reasonable. - if(first == typename CDT::Vertex_handle() || idPoint.point != previous->point()) - { - vh = cdt->insert(idPoint.point); - v2v[vh] = idPoint.id; - if(first == typename CDT::Vertex_handle()) { - first = vh; - } - if(previous != nullptr && previous != vh) { - cdt->insert_constraint(previous, vh); - last_inserted = previous; - } - previous = vh; - } - } - if(last_inserted == typename CDT::Vertex_handle()) - return false; - if(previous != first) - cdt->insert_constraint(previous, first); - // sets mark is_external - for(typename CDT::All_faces_iterator - fit2 = cdt->all_faces_begin(), - end = cdt->all_faces_end(); - fit2 != end; ++fit2) - { - fit2->info().is_external = false; - } - //check if the facet is external or internal - std::queue face_queue; - face_queue.push(cdt->infinite_vertex()->face()); - while(! face_queue.empty() ) { - typename CDT::Face_handle fh = face_queue.front(); - face_queue.pop(); - if(fh->info().is_external) continue; - fh->info().is_external = true; - for(int i = 0; i <3; ++i) { - if(!cdt->is_constrained(std::make_pair(fh, i))) - { - face_queue.push(fh->neighbor(i)); - } - } - } - return true; - } + y += idPoint.point.y(); + z += idPoint.point.z(); - bool triangulate_with_points( std::vector &idPoints, - const std::vector& more_points, - const Vector& normal) - { - P_traits cdt_traits(normal); - cdt = new CDT(cdt_traits); - typename CDT::Vertex_handle previous, first, last_inserted; - // Iterate the points of the facet and decide if they must be inserted in the CDT - for(PointAndId idPoint : idPoints) - { - typename CDT::Vertex_handle vh; - //Always insert the first point, then only insert - // if the distance with the previous is reasonable. - if(first == typename CDT::Vertex_handle() || idPoint.point != previous->point()) + Vertex_handle vh; + // Always insert the first point, then only insert if the distance with the previous is reasonable. + if(first == Vertex_handle() || idPoint.point != previous->point()) { vh = cdt->insert(idPoint.point); v2v[vh] = idPoint.id; - if(first == typename CDT::Vertex_handle()) { + if(first == Vertex_handle()) first = vh; - } - if(previous != nullptr && previous != vh) { + + if(previous != nullptr && previous != vh) + { cdt->insert_constraint(previous, vh); last_inserted = previous; } - previous = vh; + previous = vh; } - } - if(last_inserted == typename CDT::Vertex_handle()) - return false; - cdt->insert_constraint(previous, first); - for(typename Kernel::Point_3 point : more_points) - { - cdt->insert(point); - } - // sets mark is_external - for(typename CDT::All_faces_iterator - fit2 = cdt->all_faces_begin(), - end = cdt->all_faces_end(); - fit2 != end; ++fit2) - { - fit2->info().is_external = false; - } - //check if the facet is external or internal - std::queue face_queue; - face_queue.push(cdt->infinite_vertex()->face()); - while(! face_queue.empty() ) { - typename CDT::Face_handle fh = face_queue.front(); - face_queue.pop(); - if(fh->info().is_external) continue; - fh->info().is_external = true; - for(int i = 0; i <3; ++i) { - if(!cdt->is_constrained(std::make_pair(fh, i))) - { - face_queue.push(fh->neighbor(i)); - } - } - } - return true; + } + + if(last_inserted == Vertex_handle()) + return false; + + if(previous != first) + cdt->insert_constraint(previous, first); + + // sets mark is_external + for(Face_handle f2 : cdt->all_face_handles()) + f2->info().is_external = false; + + // check if the facet is external or internal + std::queue face_queue; + face_queue.push(cdt->infinite_vertex()->face()); + while(! face_queue.empty()) + { + typename CDT::Face_handle fh = face_queue.front(); + face_queue.pop(); + if(fh->info().is_external) + continue; + + fh->info().is_external = true; + for(int i = 0; i <3; ++i) + { + if(!cdt->is_constrained(std::make_pair(fh, i))) + face_queue.push(fh->neighbor(i)); + } + } + + return true; + } + + bool triangulate_with_points(std::vector& idPoints, + const std::vector& more_points, + const Vector& normal) + { + P_traits cdt_traits(normal); + cdt = new CDT(cdt_traits); + + // Iterate the points of the facet and decide if they must be inserted in the CDT + Vertex_handle previous, first, last_inserted; + for(const PointAndId& idPoint : idPoints) + { + Vertex_handle vh; + // Always insert the first point, then only insert if the distance with the previous is reasonable. + if(first == Vertex_handle() || idPoint.point != previous->point()) + { + vh = cdt->insert(idPoint.point); + v2v[vh] = idPoint.id; + if(first == Vertex_handle()) + first = vh; + + if(previous != nullptr && previous != vh) + { + cdt->insert_constraint(previous, vh); + last_inserted = previous; + } + previous = vh; + } + } + + if(last_inserted == Vertex_handle()) + return false; + + cdt->insert_constraint(previous, first); + for(const Point& point : more_points) + cdt->insert(point); + + // sets mark is_external + for(Face_handle f2 : cdt->all_face_handles()) + f2->info().is_external = false; + + // check if the facet is external or internal + std::queue face_queue; + face_queue.push(cdt->infinite_vertex()->face()); + while(!face_queue.empty()) + { + typename CDT::Face_handle fh = face_queue.front(); + face_queue.pop(); + if(fh->info().is_external) + continue; + fh->info().is_external = true; + for(int i = 0; i <3; ++i) + { + if(!cdt->is_constrained(std::make_pair(fh, i))) + face_queue.push(fh->neighbor(i)); + } + } + + return true; } }; -#endif // TRIANGULATE_PRIMITIVE +#endif // CGAL_DEMO_TRIANGULATE_PRIMITIVE_H 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/doc/Polyline_simplification_2/Concepts/PolylineSimplificationCostFunction.h b/Polyline_simplification_2/doc/Polyline_simplification_2/Concepts/PolylineSimplificationCostFunction.h index 4722bcaa72c..b945f776017 100644 --- a/Polyline_simplification_2/doc/Polyline_simplification_2/Concepts/PolylineSimplificationCostFunction.h +++ b/Polyline_simplification_2/doc/Polyline_simplification_2/Concepts/PolylineSimplificationCostFunction.h @@ -27,7 +27,7 @@ Given a vertex in constraint iterator `viq` computes `vip=std::prev(viq)` and `v \param ct The underlying constrained Delaunay triangulation which embeds the polyline constraints \param viq The vertex in constraint iterator of the vertex to remove -\returns The cost for removing `*viq`. The value `boost::none` can be returned to indicate an infinite or uncomputable cost. +\returns The cost for removing `*viq`. The value `std::nullopt` can be returned to indicate an infinite or uncomputable cost. \tparam CDT must be `CGAL::Constrained_triangulation_plus_2` with a vertex type that is model of `PolylineSimplificationVertexBase_2`. `CDT::Geom_traits` must be model of @@ -35,7 +35,7 @@ the concept `ConstrainedDelaunayTriangulationTraits_2`. */ template - boost::optional + std::optional operator()(CGAL::Constrained_triangulation_plus_2 const& ct, CGAL::Constrained_triangulation_plus_2::Vertices_in_constraint_iterator viq) const;} 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 fd1e9ccc0de..aa5418d0d43 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 @@ -49,7 +49,7 @@ public: /// \tparam CDT must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that /// is model of `PolylineSimplificationVertexBase_2`. template - boost::optional + std::optional operator()( const Constrained_triangulation_plus_2& pct , typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator vicq) const { 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 8a697736461..d26e3f22294 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 @@ -44,7 +44,7 @@ public: /// \tparam CDT must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that /// is model of `PolylineSimplificationVertexBase_2`. template - boost::optional + std::optional operator()(const Constrained_triangulation_plus_2& pct , typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator vicq) const { @@ -94,8 +94,8 @@ public: }while(vc != done); return d2_uninitialized ? - boost::optional(boost::none) : - boost::optional(d1 / d2); + std::optional(std::nullopt) : + std::optional(d1 / d2); } }; 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 4110a771821..70cfa39a6af 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 @@ -50,7 +50,7 @@ public: /// is model of `PolylineSimplificationVertexBase_2`. template - boost::optional + std::optional operator()(const Constrained_triangulation_plus_2& pct , typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator vicq)const { 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 85404f86c2d..198928e2145 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h @@ -211,7 +211,7 @@ public: it != pct.vertices_in_constraint_end(cid); ++it){ if((*it)->is_removable()){ - boost::optional dist = cost(pct, it); + std::optional dist = cost(pct, it); if(dist){ (*it)->set_cost(*dist); if(! (*mpq).contains(*it)){ @@ -326,7 +326,7 @@ operator()() pct.simplify(vit); if((*u)->is_removable()){ - boost::optional dist = cost(pct, u); + std::optional dist = cost(pct, u); if(! dist){ // cost is undefined if( mpq->contains(*u) ){ @@ -344,7 +344,7 @@ operator()() } if((*w)->is_removable()){ - boost::optional dist = cost(pct, w); + std::optional dist = cost(pct, w); if(! dist){ // cost is undefined if( mpq->contains(*w) ){ diff --git a/Polynomial/include/CGAL/Polynomial_traits_d.h b/Polynomial/include/CGAL/Polynomial_traits_d.h index f7a4d3993e3..6eb4f0d6e3f 100644 --- a/Polynomial/include/CGAL/Polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Polynomial_traits_d.h @@ -462,7 +462,7 @@ private: // We use our own Strict Weak Ordering predicate in order to avoid - // problems when calling sort for a Exponents_coeff_pair where the + // problems when calling sort for an `Exponents_coeff_pair` where the // coeff type has no comparison operators available. private: struct Compare_exponents_coeff_pair 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/SMDS_3/include/CGAL/IO/output_to_vtu.h b/SMDS_3/include/CGAL/IO/output_to_vtu.h index 28818b8ba68..51438e8dcde 100644 --- a/SMDS_3/include/CGAL/IO/output_to_vtu.h +++ b/SMDS_3/include/CGAL/IO/output_to_vtu.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -273,7 +273,7 @@ enum VTU_ATTRIBUTE_TYPE{ SIZE_TYPE }; -typedef boost::variant*, const std::vector*, const std::vector* > Vtu_attributes; +typedef std::variant*, const std::vector*, const std::vector* > Vtu_attributes; template void output_to_vtu_with_attributes(std::ostream& os, @@ -314,15 +314,15 @@ void output_to_vtu_with_attributes(std::ostream& os, os << " \n"; for(std::size_t i = 0; i< attributes.size(); ++i) { - switch(attributes[i].second.which()){ + switch(attributes[i].second.index()){ case 0: - write_attribute_tag(os,attributes[i].first, *boost::get* >(attributes[i].second), binary,offset); + write_attribute_tag(os,attributes[i].first, *std::get* >(attributes[i].second), binary,offset); break; case 1: - write_attribute_tag(os,attributes[i].first, *boost::get* >(attributes[i].second), binary,offset); + write_attribute_tag(os,attributes[i].first, *std::get* >(attributes[i].second), binary,offset); break; default: - write_attribute_tag(os,attributes[i].first, *boost::get* >(attributes[i].second), binary,offset); + write_attribute_tag(os,attributes[i].first, *std::get* >(attributes[i].second), binary,offset); break; } } @@ -334,15 +334,15 @@ void output_to_vtu_with_attributes(std::ostream& os, write_c3t3_points(os,tr,V); // fills V if the mode is BINARY write_cells(os,c3t3,V); for(std::size_t i = 0; i< attributes.size(); ++i) { - switch(attributes[i].second.which()){ + switch(attributes[i].second.index()){ case 0: - write_attributes(os, *boost::get* >(attributes[i].second)); + write_attributes(os, *std::get* >(attributes[i].second)); break; case 1: - write_attributes(os, *boost::get* >(attributes[i].second)); + write_attributes(os, *std::get* >(attributes[i].second)); break; default: - write_attributes(os, *boost::get* >(attributes[i].second)); + write_attributes(os, *std::get* >(attributes[i].second)); break; } } diff --git a/SMDS_3/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h b/SMDS_3/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h index cd3c8f135a9..87d4e5863d5 100644 --- a/SMDS_3/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h +++ b/SMDS_3/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include namespace CGAL { template <> @@ -52,19 +52,19 @@ public: }; template <> -class Output_rep > > : public IO_rep_is_specialized { - typedef boost::variant > Variant; + typedef std::variant > Variant; const Variant& v; public: Output_rep(const Variant& v) : v(v) {} std::ostream& operator()( std::ostream& out) const { - if(v.which() == 1) { - out << IO::oformat(boost::get >(v)); + if(v.index() == 1) { + out << IO::oformat(std::get >(v)); } else { - out << boost::get(v); + out << std::get(v); } return out; } diff --git a/SMDS_3/include/CGAL/SMDS_3/internal/indices_management.h b/SMDS_3/include/CGAL/SMDS_3/internal/indices_management.h index 0e4e8901ce5..18d5e4b6cc8 100644 --- a/SMDS_3/include/CGAL/SMDS_3/internal/indices_management.h +++ b/SMDS_3/include/CGAL/SMDS_3/internal/indices_management.h @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -36,12 +35,12 @@ namespace internal { // ----------------------------------- // Index_generator -// Don't use boost::variant if types are the same type +// Don't use std::variant if types are the same type // ----------------------------------- template < typename Subdomain_index, typename Surface_patch_index > struct Index_generator { - typedef boost::variant Index; + typedef std::variant Index; typedef Index type; }; @@ -72,19 +71,19 @@ struct Indices_tuple_generator template using Indices_tuple_t = typename Indices_tuple_generator::type; -// Nasty meta-programming to get a boost::variant of four types that +// Nasty meta-programming to get a std::variant of four types that // may not be all different. template struct seq1 { typedef T0 type; }; template struct seq2 { - typedef boost::variant type; + typedef std::variant type; }; template struct seq3 { - typedef boost::variant type; + typedef std::variant type; }; template struct seq4 { - typedef boost::variant type; + typedef std::variant type; }; template struct insert; @@ -142,10 +141,10 @@ struct Index_generator_with_features typedef Index type; }; -template -const T& get_index(const Boost_variant& x, - std::enable_if_t::value > * = 0) -{ return boost::get(x); } +template +const T& get_index(const Variant& x, + std::enable_if_t::value > * = 0) +{ return std::get(x); } template const T& get_index(const T& x) { return x; } @@ -305,8 +304,8 @@ struct Variant_read_visitor { }; template -struct Read_write_index> { - using Index = boost::variant; +struct Read_write_index> { + using Index = std::variant; using index_seq = std::make_index_sequence::value>; template @@ -317,12 +316,12 @@ struct Read_write_index> { void operator()(std::ostream& os, int, Index index) const { Variant_write_visitor visitor{os}; - apply_visitor(visitor, index); + std::visit(visitor, index); } Index operator()(std::istream& is, int dimension) const { Index index = get_index(dimension, index_seq{}); Variant_read_visitor visitor{is, index}; - apply_visitor(visitor, index); + std::visit(visitor, index); return index; } }; diff --git a/SMDS_3/include/CGAL/SMDS_3/io_signature.h b/SMDS_3/include/CGAL/SMDS_3/io_signature.h index ba50d850123..22022ba6051 100644 --- a/SMDS_3/include/CGAL/SMDS_3/io_signature.h +++ b/SMDS_3/include/CGAL/SMDS_3/io_signature.h @@ -33,7 +33,7 @@ #include #endif -#include +#include #include #include @@ -149,10 +149,10 @@ struct Get_io_signature }; template -struct Get_io_signature > +struct Get_io_signature > { std::string operator()() { - return std::string("boost::variant<") + + return std::string("std::variant<") + Get_io_signature()() + "," + Get_io_signature()() + ">"; } @@ -179,10 +179,10 @@ struct Get_io_signature > }; template -struct Get_io_signature > +struct Get_io_signature > { std::string operator()() { - return std::string("boost::variant<") + + return std::string("std::variant<") + Get_io_signature()() + "," + Get_io_signature()() + "," + Get_io_signature()() + ">"; @@ -191,10 +191,10 @@ struct Get_io_signature > template -struct Get_io_signature > +struct Get_io_signature > { std::string operator()() { - return std::string("boost::variant<") + + return std::string("std::variant<") + Get_io_signature()() + "," + Get_io_signature()() + "," + Get_io_signature()() + "," + diff --git a/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h b/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h index 3f1a9c92d42..24656da85e1 100644 --- a/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h +++ b/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h @@ -26,9 +26,9 @@ #include #include +#include #include -#include #include namespace CGAL { @@ -53,7 +53,7 @@ public: using Vertex_handle = typename Vb::Vertex_handle; // Types - using Index = boost::variant; + using Index = Variant_with_no_duplicate_t; using FT = typename GT::FT; // Constructor diff --git a/SMDS_3/test/SMDS_3/data/c3t3_io-hetero.binary.cgal b/SMDS_3/test/SMDS_3/data/c3t3_io-hetero.binary.cgal index f4c958d9239..ab735a65e00 100644 Binary files a/SMDS_3/test/SMDS_3/data/c3t3_io-hetero.binary.cgal and b/SMDS_3/test/SMDS_3/data/c3t3_io-hetero.binary.cgal differ diff --git a/SMDS_3/test/SMDS_3/data/c3t3_io-hetero.cgal b/SMDS_3/test/SMDS_3/data/c3t3_io-hetero.cgal index f0c10161e35..e32557d8173 100644 --- a/SMDS_3/test/SMDS_3/data/c3t3_io-hetero.cgal +++ b/SMDS_3/test/SMDS_3/data/c3t3_io-hetero.cgal @@ -1,4 +1,4 @@ -CGAL c3t3 Triangulation_3(Weighted_point,Vb(Tvb_3+i+boost::variant,i,d>),Cb(enum+RTcb_3+(std::pair)[4])) +CGAL c3t3 Triangulation_3(Weighted_point,Vb(Tvb_3+i+std::variant,i,d>),Cb(enum+RTcb_3+(std::pair)[4])) 3 6 10 11 12 0 0 7 diff --git a/SMDS_3/test/SMDS_3/test_c3t3_io.cpp b/SMDS_3/test/SMDS_3/test_c3t3_io.cpp index ef8d9e16d7a..7105303ee34 100644 --- a/SMDS_3/test/SMDS_3/test_c3t3_io.cpp +++ b/SMDS_3/test/SMDS_3/test_c3t3_io.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include @@ -48,7 +48,7 @@ struct MD_heterogeneous_types { typedef std::pair Surface_patch_index; typedef int Curve_index; typedef double Corner_index; - typedef boost::variant Index; @@ -63,7 +63,7 @@ struct MD_heterogeneous_types { static std::string reference_format_string() { - return "Triangulation_3(Weighted_point,Vb(Tvb_3+i+boost::variant,i,d>),Cb(enum+RTcb_3+(std::pair)[4]))"; + return "Triangulation_3(Weighted_point,Vb(Tvb_3+i+std::variant,i,d>),Cb(enum+RTcb_3+(std::pair)[4]))"; } }; 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/doc/STL_Extension/CGAL/Object.h b/STL_Extension/doc/STL_Extension/CGAL/Object.h index c75541b0ae9..4c843935996 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Object.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Object.h @@ -19,7 +19,7 @@ this is done with the global function `make_object()`. This encapsulation mechanism requires the use of `assign` or `object_cast` to use the functionality of the encapsulated class. -This class is similar in spirit to `boost::any`. +This class is similar in spirit to `std::any`. \cgalHeading{Example} @@ -110,16 +110,16 @@ Object(const Object &o); /*! Implicit converting constructor for compatibility with -`boost::variant`. +`std::variant`. */ -Object(boost::variant); +Object(std::variant); /*! Implicit converting constructor for compatibility with -`boost::optional` and `boost::variant`. +`std::optional` and `std::variant`. */ -Object(boost::optional< boost::variant >); +Object(std::optional< std::variant >); /// @} diff --git a/STL_Extension/doc/STL_Extension/CGAL/iterator.h b/STL_Extension/doc/STL_Extension/CGAL/iterator.h index fdc82bb1ffd..2ba1736893d 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/iterator.h +++ b/STL_Extension/doc/STL_Extension/CGAL/iterator.h @@ -106,10 +106,10 @@ The class `Dispatch_or_drop_output_iterator` defines an `OutputIterator` that contains a tuple of output iterators, and dispatches among those based on the type of the value type which is put in it. Besides defining assignment for all parameters of `V` -and for a tuple of type `V`, it is also defined for the types `boost::variant` and -`boost::optional >`, where `T...` +and for a tuple of type `V`, it is also defined for the types `std::variant` and +`std::optional >`, where `T...` must be a subset of the parameters of `V`. Should the -`boost::optional` be empty, it will be discarded. +`std::optional` be empty, it will be discarded. \cgalHeading{Parameters} @@ -194,8 +194,8 @@ dispatches among those based on the type of the value type which is put in it. Other types are also accepted, and the object is discarded in this case. Besides defining assignment for all parameters of `V` and for a tuple of type `V`, it is also defined for the types -`boost::variant` and -`boost::optional >`, where `T...` +`std::variant` and +`std::optional >`, where `T...` can be a list of arbitrary types. It also inherits from `O`, which makes it easy to treat like a diff --git a/STL_Extension/doc/STL_Extension/STL_Extension.txt b/STL_Extension/doc/STL_Extension/STL_Extension.txt index b793a86550a..b37ecb282e8 100644 --- a/STL_Extension/doc/STL_Extension/STL_Extension.txt +++ b/STL_Extension/doc/STL_Extension/STL_Extension.txt @@ -142,7 +142,7 @@ For handles and indices of vertices, halfedges, faces, etc., we provide speciali The class `Object` can store an object of whatever other type. It can be used by a function to return objects of different types. A mechanism to extract the stored object based on its type is also provided. -This class is similar to `boost::any`. +This class is similar to `std::any`. \section stl_uncertainty Uncertainty Management diff --git a/STL_Extension/examples/STL_Extension/Dispatch_output_iterator.cpp b/STL_Extension/examples/STL_Extension/Dispatch_output_iterator.cpp index f55d06db392..89abf64fbcc 100644 --- a/STL_Extension/examples/STL_Extension/Dispatch_output_iterator.cpp +++ b/STL_Extension/examples/STL_Extension/Dispatch_output_iterator.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include int main() { @@ -21,7 +21,7 @@ int main() std::back_inserter(b), std::back_inserter(c)); - typedef boost::variant var; + typedef std::variant var; var va = 23; var vb = 4.2; var vc = 'x'; // goes to a diff --git a/STL_Extension/include/CGAL/Modifiable_priority_queue.h b/STL_Extension/include/CGAL/Modifiable_priority_queue.h index 2f24c67cd77..e4fe97cda41 100644 --- a/STL_Extension/include/CGAL/Modifiable_priority_queue.h +++ b/STL_Extension/include/CGAL/Modifiable_priority_queue.h @@ -12,7 +12,7 @@ #define CGAL_MODIFIABLE_PRIORITY_QUEUE_H #include // Needed by the following Boost header for CHAR_BIT. -#include +#include #include #include @@ -66,14 +66,14 @@ public: bool contains ( value_type const& v ) { return mHeap.contains(v) ; } - boost::optional extract_top() + std::optional extract_top() { - boost::optional r ; + std::optional r ; if ( !empty() ) { value_type v = top(); pop(); - r = boost::optional(v) ; + r = std::optional(v) ; } return r ; } @@ -238,14 +238,14 @@ public: return (mHandles[vid] != handle_type()); } - boost::optional extract_top() + std::optional extract_top() { - boost::optional r; + std::optional r; if(!empty()) { value_type v = top(); pop(); - r = boost::optional(v); + r = std::optional(v); } return r; 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/Object.h b/STL_Extension/include/CGAL/Object.h index e0efd971006..765b5e70e3f 100644 --- a/STL_Extension/include/CGAL/Object.h +++ b/STL_Extension/include/CGAL/Object.h @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -39,7 +39,7 @@ class Object std::shared_ptr obj; // returns an any pointer from a variant - struct Any_from_variant : public boost::static_visitor { + struct Any_from_variant { template boost::any* operator()(const T& t) const { return new boost::any(t); @@ -62,14 +62,14 @@ class Object Object(T && t, private_tag) : obj(new boost::any(std::forward(t))) { } // implicit constructor from optionals containing variants - template - Object(const boost::optional< boost::variant >& t) - : obj( t ? boost::apply_visitor(Any_from_variant(), *t) : nullptr) { } + template + Object(const std::optional< std::variant >& t) + : obj( t ? std::visit(Any_from_variant(), *t) : nullptr) { } // implicit constructor from variants - template - Object(const boost::variant& v) - : obj(boost::apply_visitor(Any_from_variant(), v)) { } + template + Object(const std::variant& v) + : obj(std::visit(Any_from_variant(), v)) { } template bool assign(T &t) const diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp b/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp index a02a831f044..96f9f2aa08c 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp +++ b/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include // for CHAR_BIT #include @@ -79,13 +79,13 @@ private: /** The value associated with this group. This value is only valid * when @c kind!=largest_key (which indicates a deleted - * element). Note that the use of boost::optional increases the + * element). Note that the use of std::optional increases the * memory requirements slightly but does not result in extraneous * memory allocations or deallocations. The optional could be * eliminated when @c value_type is a model of * DefaultConstructible. */ - ::boost::optional< value_type > value; + ::std::optional< value_type > value; /** * The kind of key stored at this group. This may be @c @@ -205,14 +205,14 @@ public: value_type& top() { find_smallest(); - CGAL_assertion(smallest_value->value != boost::none); + CGAL_assertion(smallest_value->value != std::nullopt); return *smallest_value->value; } const value_type& top() const { find_smallest(); - CGAL_assertion(smallest_value->value != boost::none); + CGAL_assertion(smallest_value->value != std::nullopt); return *smallest_value->value; } @@ -238,7 +238,7 @@ public: rank_type r = x->rank; group* p = x->parent; { - CGAL_assertion(x->value != boost::none); + CGAL_assertion(x->value != std::nullopt); // Find x's group size_type start = get(id, *x->value) - get(id, *x->value) % log_n; @@ -727,7 +727,7 @@ private: * are each log_n long, with the last group potentially being * smaller. */ - std::vector< ::boost::optional< value_type > > groups; + std::vector< ::std::optional< value_type > > groups; /** The list of active groups, indexed by rank. When A[r] is null, * there is no active group of rank r. Otherwise, A[r] is the active diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 0ac9fcf11ae..326557344a6 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -1262,7 +1262,7 @@ filter_output_iterator(I e, const P& p) namespace internal { template -struct Output_visitor : boost::static_visitor { +struct Output_visitor { Output_visitor(OutputIterator* it) : out(it) {} OutputIterator* out; @@ -1380,17 +1380,17 @@ public: return *this; } - template - Self& operator=(const boost::variant& t) { + template + Self& operator=(const std::variant< T ... >& t) { internal::Output_visitor visitor(this); - t.apply_visitor(visitor); + std::visit(visitor, t); return *this; } - template - Self& operator=(const boost::optional< boost::variant >& t) { + template + Self& operator=(const std::optional< std::variant< T ... > >& t) { internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); + if(t) std::visit(visitor, *t); return *this; } @@ -1457,6 +1457,19 @@ public: template Self& operator=(const T&) { return *this; } + template + Self& operator=(const std::variant< T ... >& t) { + internal::Output_visitor visitor(this); + std::visit(visitor, t); + return *this; + } + + template + Self& operator=(const std::optional< std::variant< T ... > >& t) { + internal::Output_visitor visitor(this); + if(t) std::visit(visitor, *t); + return *this; + } }; diff --git a/STL_Extension/include/CGAL/variant.h b/STL_Extension/include/CGAL/variant.h new file mode 100644 index 00000000000..41bd836d8cc --- /dev/null +++ b/STL_Extension/include/CGAL/variant.h @@ -0,0 +1,87 @@ +// Copyright (c) 2023 GeometryFactory Sarl (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Sébastien Loriot +// + +#ifndef CGAL_VARIANT_H +#define CGAL_VARIANT_H + +#include + +namespace CGAL +{ + +template +struct Is_in_variant; + +template +struct Is_in_variant> +{ + inline static constexpr bool value = + std::is_same_v || Is_in_variant>::value; +}; + +template +struct Is_in_variant> +{ + inline static constexpr bool value = std::is_same_v; +}; + +/// equals true iif `T` is a possible type in `Variant` with `Variant` being a `std::variant` +template +inline constexpr bool Is_in_variant_v = Is_in_variant::value; + +// -- +template +struct Add_to_variant; + +template +struct Add_to_variant> +{ + using type = std::variant; +}; + +/// a `std::variant` with `T` appended to the types of the `std::variant` `Variant` +template< class T, class Variant > +using Add_to_variant_t = typename Add_to_variant::type; + +namespace internal{ +template +struct Get_variant_impl +{ + using type = typename Get_variant_impl< + std::conditional_t, + Variant, + Add_to_variant_t>, + Tn...>::type; +}; + +template +struct Get_variant_impl +{ + using type = std::conditional_t, + Variant, + Add_to_variant_t>; +}; +} // end of internal namespace + +template +struct Variant_with_no_duplicate +{ + using type = typename internal::Get_variant_impl, Tn ...>::type; +}; + +/// a `std::variant` with types being all different +template< class ... Tn > +using Variant_with_no_duplicate_t = typename Variant_with_no_duplicate::type; + +} //end of CGAL namespace + +#endif diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index d2590609109..efa222f2e7b 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -50,6 +50,9 @@ create_single_source_cgal_program("test_Uncertain.cpp") create_single_source_cgal_program("test_vector.cpp") create_single_source_cgal_program("test_join_iterators.cpp") create_single_source_cgal_program("test_for_each.cpp") +create_single_source_cgal_program("test_skiplist.cpp") +create_single_source_cgal_program("test_leak.cpp") +create_single_source_cgal_program("test_nth_element.cpp") if(TARGET CGAL::TBB_support) message(STATUS "Found TBB") target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) diff --git a/STL_Extension/test/STL_Extension/test_Object.cpp b/STL_Extension/test/STL_Extension/test_Object.cpp index 705779bee86..1e65bf5cf97 100644 --- a/STL_Extension/test/STL_Extension/test_Object.cpp +++ b/STL_Extension/test/STL_Extension/test_Object.cpp @@ -3,15 +3,15 @@ #include #include -#include -#include +#include +#include #include void from_opt_var() { int i = 0; double j = 0.0; - boost::optional< boost::variant > v(23); + std::optional< std::variant > v(23); CGAL::Object o = v; assert(!o.empty()); assert(CGAL::assign(i, o)); @@ -23,7 +23,7 @@ void from_opt_var() { assert(CGAL::assign(j, o)); assert(j == 2.0); //empty optional - boost::optional< boost::variant > v2; + std::optional< std::variant > v2; CGAL::Object o2 = v2; assert(o2.empty()); } @@ -31,7 +31,7 @@ void from_opt_var() { void from_var() { int i = 0; - boost::variant v(23); + std::variant v(23); CGAL::Object o = v; assert(!o.empty()); assert(CGAL::assign(i, o)); diff --git a/STL_Extension/test/STL_Extension/test_dispatch_output.cpp b/STL_Extension/test/STL_Extension/test_dispatch_output.cpp index 9dffd636b51..250fe0a57ca 100644 --- a/STL_Extension/test/STL_Extension/test_dispatch_output.cpp +++ b/STL_Extension/test/STL_Extension/test_dispatch_output.cpp @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include struct A{}; struct B{}; @@ -91,8 +91,8 @@ void complete_test(std::vector data1,std::list data2){ } void variant_test() { - typedef boost::variant var; - typedef boost::optional< var > ovar; + typedef std::variant var; + typedef std::optional< var > ovar; std::vector a; std::vector b; std::vector c; diff --git a/STL_Extension/test/STL_Extension/leak.cpp b/STL_Extension/test/STL_Extension/test_leak.cpp similarity index 100% rename from STL_Extension/test/STL_Extension/leak.cpp rename to STL_Extension/test/STL_Extension/test_leak.cpp diff --git a/STL_Extension/test/STL_Extension/test_nth_element.cpp b/STL_Extension/test/STL_Extension/test_nth_element.cpp index 67077424ddf..f9f0e8230da 100644 --- a/STL_Extension/test/STL_Extension/test_nth_element.cpp +++ b/STL_Extension/test/STL_Extension/test_nth_element.cpp @@ -12,18 +12,18 @@ int test() { CGAL::nth_element(nbs, nbs+pivot, nbs+sizeof(nbs) / sizeof(int), cmp); std::cerr << "After nth_element, nbs["<< pivot << "] = " << nbs[pivot] << std::endl; assert(nbs[pivot]==expected_value); - for(int i = 0; i < sizeof(nbs) / sizeof(int); ++i) { + for(std::size_t i = 0; i < sizeof(nbs) / sizeof(int); ++i) { std::cerr << " " << nbs[i]; } std::cerr << std::endl; for(pivot=0; pivot < 10; ++pivot) CGAL::nth_element(nbs, nbs+pivot, nbs+sizeof(nbs) / sizeof(int), cmp); std::cerr << "After sort:\n"; - for(int i = 0; i < sizeof(nbs) / sizeof(int); ++i) { + for(std::size_t i = 0; i < sizeof(nbs) / sizeof(int); ++i) { std::cerr << " " << nbs[i]; } std::cerr << std::endl; - for(int i = 1; i < sizeof(nbs) / sizeof(int); ++i) { + for(std::size_t i = 1; i < sizeof(nbs) / sizeof(int); ++i) { assert(nbs[i]>=nbs[i-1]); } return 0; diff --git a/STL_Extension/test/STL_Extension/test_skiplist.cpp b/STL_Extension/test/STL_Extension/test_skiplist.cpp index 0e0cf9a9c20..fe7bb7f1334 100644 --- a/STL_Extension/test/STL_Extension/test_skiplist.cpp +++ b/STL_Extension/test/STL_Extension/test_skiplist.cpp @@ -50,8 +50,8 @@ BOOST_FIXTURE_TEST_CASE( test_insert, Fixture ) // clear and try again l.clear(); - BOOST_CHECK_EQUAL(l.all_size(), 0); - BOOST_CHECK_EQUAL(l.skip_size(), 0); + BOOST_CHECK_EQUAL(l.all_size(), std::size_t(0)); + BOOST_CHECK_EQUAL(l.skip_size(), std::size_t(0)); l.insert(l.all_begin(), all.begin(), all.end()); skips += 8, 9; BOOST_CHECK_EQUAL_COLLECTIONS(l.all_begin(), l.all_end(), @@ -60,7 +60,6 @@ BOOST_FIXTURE_TEST_CASE( test_insert, Fixture ) skips.begin(), skips.end()); // the same goes for inserting at an arbitrary position - skip::all_iterator pos = std::next(l.all_begin(), 3); l.insert(std::next(l.all_begin(), 3) , 20); all.insert(std::next(all.begin(), 3) @@ -124,7 +123,7 @@ BOOST_FIXTURE_TEST_CASE( skip_all_case, Fixture ) l.skip(l.all_begin(), l.all_end()); skips.clear(); BOOST_CHECK_EQUAL(l.all_size(), all.size()); - BOOST_CHECK_EQUAL(l.skip_size(), 0); + BOOST_CHECK_EQUAL(l.skip_size(), std::size_t(0)); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); } 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..43674242e98 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 @@ -407,6 +414,13 @@ run_test_on_host() fi for PLATFORM in ${PLATFORMS}; do + + if [ "${CGAL_RELEASE_ID}" \> "CGAL-6.0" ]; then + if [ "${PLATFORM}" = "MSVC2015-Release-64bits" ]; then + continue + fi + fi + run_test_on_platform "${PLATFORM}" collect_demos_binaries "${PLATFORM}" publish_results "${PLATFORM}" diff --git a/Scripts/developer_scripts/test_merge_of_branch b/Scripts/developer_scripts/test_merge_of_branch index cdf1070fa87..2b3d91ecd0b 100755 --- a/Scripts/developer_scripts/test_merge_of_branch +++ b/Scripts/developer_scripts/test_merge_of_branch @@ -92,6 +92,33 @@ for i in `ls -d ^build*/examples/*/ ^build*/test/*/ ^build*/demo/^(icons|resourc fi done +#check all tests/examples are tested +echo '.. Checking if all .cpp files in examples/test are compiled...' +CML_ERRORS="" +for CML in `grep -L "GLOB cppfiles" */test/*/CMakeLists.txt */examples/*/CMakeLists.txt`; do + DIR=`dirname $CML` + + if [ "Arrangement_on_surface_2/test/Arrangement_on_surface_2" = $DIR ]; then + continue + fi + if [ "Installation/test/Installation" = $DIR ]; then + continue + fi + + for i in `ls ${DIR}/*.cpp`; do + f=`basename $i .cpp` + if ! grep -q $f ${CML}; then + CML_ERRORS=`echo "${CML_ERRORS}\n$i is not tested!"` + fi + done +done + + +if [ -n "${CML_ERRORS}" ]; then + echo -n "Some tests/examples are not tested:" + echo ${CML_ERRORS} + exit 1 +fi # check project in cmake scripts is correct echo '.. Checking if all CMakeLists.txt project names are correct...' 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/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_point_access.cpp b/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_point_access.cpp index f4e5a859bca..34abf4d8049 100644 --- a/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_point_access.cpp +++ b/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_point_access.cpp @@ -99,7 +99,7 @@ int main(int argc, char** argv) { Efficient_ransac::Shape_range::iterator it = shapes.begin(); while (it != shapes.end()) { - boost::shared_ptr shape = *it; + std::shared_ptr shape = *it; // Use Shape_base::info() to print the parameters of the detected shape. std::cout << (*it)->info(); diff --git a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h index 53331b8d709..88089e89e01 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h +++ b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h @@ -37,7 +37,7 @@ // boost -------------- #include -#include +#include #include //--------------------- @@ -104,36 +104,36 @@ public: #ifdef DOXYGEN_RUNNING typedef unspecified_type Shape_range; - ///< `Iterator_range` with a bidirectional constant iterator type with value type `boost::shared_ptr`. + ///< `Iterator_range` with a bidirectional constant iterator type with value type `std::shared_ptr`. typedef unspecified_type Plane_range; - ///< `Iterator_range` with a bidirectional constant iterator type with value type `boost::shared_ptr`. + ///< `Iterator_range` with a bidirectional constant iterator type with value type `std::shared_ptr`. #else struct Shape_range : public Iterator_range< - typename std::vector >::const_iterator> { + typename std::vector >::const_iterator> { typedef Iterator_range< - typename std::vector >::const_iterator> Base; + typename std::vector >::const_iterator> Base; - Shape_range(boost::shared_ptr > > + Shape_range(std::shared_ptr > > extracted_shapes) : Base(make_range(extracted_shapes->begin(), extracted_shapes->end())), m_extracted_shapes(extracted_shapes) {} private: - boost::shared_ptr > > + std::shared_ptr > > m_extracted_shapes; // keeps a reference to the shape vector }; struct Plane_range : public Iterator_range< - typename std::vector >::const_iterator> { + typename std::vector >::const_iterator> { typedef Iterator_range< - typename std::vector >::const_iterator> Base; + typename std::vector >::const_iterator> Base; - Plane_range(boost::shared_ptr > > + Plane_range(std::shared_ptr > > extracted_shapes) : Base(make_range(extracted_shapes->begin(), extracted_shapes->end())), m_extracted_shapes(extracted_shapes) {} private: - boost::shared_ptr > > + std::shared_ptr > > m_extracted_shapes; // keeps a reference to the shape vector }; @@ -291,7 +291,7 @@ public: clear(); m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points = std::distance( m_input_iterator_first, m_input_iterator_beyond); @@ -435,7 +435,7 @@ public: std::vector().swap(m_shape_index); m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points; @@ -488,7 +488,7 @@ public: // Reset data structures possibly used by former search m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points; for (std::size_t i = 0; i < m_num_subsets; i++) { @@ -755,7 +755,7 @@ public: //1. add best candidate to final result. m_extracted_shapes->push_back( - boost::shared_ptr(best_candidate)); + std::shared_ptr(best_candidate)); if (callback && !callback(num_invalid / double(m_num_total_points))) { clear(num_invalid, candidates); @@ -874,7 +874,7 @@ public: /// @{ /*! Returns an `Iterator_range` with a bidirectional iterator with value type - `boost::shared_ptr` over the detected shapes in the order of detection. + `std::shared_ptr` over the detected shapes in the order of detection. Depending on the chosen probability for the detection, the shapes are ordered with decreasing size. */ @@ -884,21 +884,21 @@ public: /*! Returns an `Iterator_range` with a bidirectional iterator with - value type `boost::shared_ptr` over only the + value type `std::shared_ptr` over only the detected planes in the order of detection. Depending on the chosen probability for the detection, the planes are ordered with decreasing size. */ Plane_range planes() const { - boost::shared_ptr > > planes - = boost::make_shared > >(); + std::shared_ptr > > planes + = std::make_shared > >(); for (std::size_t i = 0; i < m_extracted_shapes->size(); ++i) { - boost::shared_ptr pshape - = boost::dynamic_pointer_cast((*m_extracted_shapes)[i]); + std::shared_ptr pshape + = std::dynamic_pointer_cast((*m_extracted_shapes)[i]); // Ignore all shapes other than plane - if (pshape != boost::shared_ptr()) + if (pshape != std::shared_ptr()) planes->push_back(pshape); } return Plane_range(planes); @@ -1218,7 +1218,7 @@ private: //give the index of the subset of point i std::vector m_index_subsets; - boost::shared_ptr > > m_extracted_shapes; + std::shared_ptr > > m_extracted_shapes; std::vector m_shape_factories; diff --git a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h index 3fb4ecea249..774a21437cc 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h +++ b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h @@ -31,7 +31,7 @@ namespace Shape_detection { class Point_to_shape_index_map { typedef CGAL::Shape_detection::Shape_base Shape; - boost::shared_ptr > m_indices; + std::shared_ptr > m_indices; public: typedef std::size_t key_type; ///< %Index of the point in the random access point range. @@ -50,7 +50,7 @@ namespace Shape_detection { \tparam ShapeRange must be an `Iterator_range` with a bidirectional constant iterator type with value type - `boost::shared_ptr >`. + `std::shared_ptr >`. */ template Point_to_shape_index_map (const PointRange& points, @@ -85,7 +85,7 @@ namespace Shape_detection { { public: typedef CGAL::Shape_detection::Plane Plane_shape; - typedef boost::shared_ptr key_type; + typedef std::shared_ptr key_type; typedef typename Traits::Plane_3 value_type; typedef value_type reference; typedef boost::read_write_property_map_tag category; diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cone_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cone_parameters.cpp index 39ac55d03fc..5d995f6faa3 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cone_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cone_parameters.cpp @@ -74,7 +74,7 @@ bool test_cone_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr cone = boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr cone = std::dynamic_pointer_cast((*shapes.first)); // Check: shape detected is a cone. if (!cone) diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cylinder_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cylinder_parameters.cpp index 67cbbf24958..8c3780e0368 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cylinder_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cylinder_parameters.cpp @@ -73,7 +73,7 @@ bool test_cylinder_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr cyl = boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr cyl = std::dynamic_pointer_cast((*shapes.first)); // Check: shape detected is a cylinder. if (!cyl) diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_plane_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_plane_parameters.cpp index b963ed1e636..f0a8e772baa 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_plane_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_plane_parameters.cpp @@ -67,7 +67,7 @@ bool test_plane_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr pl = boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr pl = std::dynamic_pointer_cast((*shapes.first)); if (!pl) continue; diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_scene.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_scene.cpp index fbe007b13c7..e78e2e3ca5a 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_scene.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_scene.cpp @@ -75,7 +75,7 @@ bool test_scene(int argc, char** argv) { // Iterate through all shapes and access each point. while (it != shapes.end()) { - boost::shared_ptr shape = *it; + std::shared_ptr shape = *it; // Sum distances of points to detected shapes. FT sum_distances = 0; diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_sphere_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_sphere_parameters.cpp index 0dbc63bb9de..88f78d5326a 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_sphere_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_sphere_parameters.cpp @@ -70,7 +70,7 @@ bool test_sphere_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr sphere = boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr sphere = std::dynamic_pointer_cast((*shapes.first)); // Check: shape detected is a cylinder. if (!sphere) diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_torus_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_torus_parameters.cpp index 42138f178ff..3d39f70b473 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_torus_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_torus_parameters.cpp @@ -72,8 +72,8 @@ bool test_torus_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr torus = - boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr torus = + std::dynamic_pointer_cast((*shapes.first)); // Check: shape detected is a torus. if (!torus) diff --git a/Shape_regularization/include/CGAL/Shape_regularization/internal/Contour_base_2.h b/Shape_regularization/include/CGAL/Shape_regularization/internal/Contour_base_2.h index 1f8a5b8aafd..bbd1a13132e 100644 --- a/Shape_regularization/include/CGAL/Shape_regularization/internal/Contour_base_2.h +++ b/Shape_regularization/include/CGAL/Shape_regularization/internal/Contour_base_2.h @@ -755,10 +755,10 @@ namespace internal { typename CGAL::cpp11::result_of::type result = CGAL::intersection(line_1, line_2); if (result) { - if (const Line_2* line = boost::get(&*result)) { + if (const Line_2* line = std::get_if(&*result)) { return false; } else { - const Point_2* point = boost::get(&*result); + const Point_2* point = std::get_if(&*result); in_point = *point; return true; } } diff --git a/Shape_regularization/test/Shape_regularization/CMakeLists.txt b/Shape_regularization/test/Shape_regularization/CMakeLists.txt index ddaa6f3ea31..b465c7cfa16 100644 --- a/Shape_regularization/test/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/test/Shape_regularization/CMakeLists.txt @@ -22,7 +22,8 @@ if(TARGET CGAL::OSQP_support) test_3_segments test_4_segments test_100_segments_angles - test_100_segments_offsets) + test_100_segments_offsets + test_cgal_solver) foreach(osqp_target ${osqp_targets}) create_single_source_cgal_program("${osqp_target}.cpp") diff --git a/Shape_regularization/test/Shape_regularization/test_cgal_solver.cpp b/Shape_regularization/test/Shape_regularization/test_cgal_solver.cpp index 35904a07393..84a09fdda24 100644 --- a/Shape_regularization/test/Shape_regularization/test_cgal_solver.cpp +++ b/Shape_regularization/test/Shape_regularization/test_cgal_solver.cpp @@ -21,7 +21,7 @@ void test_cgal_solver() { using NQ = SR::Segments::Delaunay_neighbor_query_2; using AR = SR::Segments::Angle_regularization_2; - using QP = CGAL::CGAL_quadratic_program_traits; + using QP = CGAL::OSQP_quadratic_program_traits; using QP_AR = SR::QP_regularization; diff --git a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt index f637565bc51..0041dc4ccd0 100644 --- a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt +++ b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt @@ -19,6 +19,7 @@ create_single_source_cgal_program("skin_surface_subdiv.cpp") create_single_source_cgal_program("skin_surface_subdiv_with_normals.cpp") create_single_source_cgal_program("union_of_balls_simple.cpp") create_single_source_cgal_program("union_of_balls_subdiv.cpp") +create_single_source_cgal_program("skin_surface_retrieve_defining_weighted_points.cpp") find_package(ESBTL QUIET) if(ESBTL_FOUND) 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/doc/Spatial_searching/CGAL/Kd_tree.h b/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h index b36cc8fb973..0d6141ea2f0 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h @@ -188,7 +188,7 @@ The types `FuzzyQueryItem::Point_d` and `Point_d` must be equivalent. To use this function `Traits` must be a model of the concept `RangeSearchTraits`. */ template -boost::optional search_any_point(FuzzyQueryItem q) const; +std::optional search_any_point(FuzzyQueryItem q) const; /*! Reports the points that are approximately contained by `q`. diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree_node.h b/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree_node.h index 8d7d50f373e..3d92ae2dc36 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree_node.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree_node.h @@ -45,7 +45,7 @@ OutputIterator search(OutputIterator it, FuzzyQueryItem q) const; Reports any point from the subtree of the node, that is approximately contained by `q`. */ template -boost::optional search_any_point(OutputIterator it, FuzzyQueryItem q) const; +std::optional search_any_point(OutputIterator it, FuzzyQueryItem q) const; /*! Reports all the points contained by the subtree of the node. diff --git a/Spatial_searching/doc/Spatial_searching/Concepts/OrthogonalDistance.h b/Spatial_searching/doc/Spatial_searching/Concepts/OrthogonalDistance.h index d2a398589d8..d5b2af664e8 100644 --- a/Spatial_searching/doc/Spatial_searching/Concepts/OrthogonalDistance.h +++ b/Spatial_searching/doc/Spatial_searching/Concepts/OrthogonalDistance.h @@ -4,7 +4,7 @@ Requirements of an orthogonal distance class supporting incremental distance updates. To optimize distance computations transformed distances are used. -E.g., for an Euclidean distance the transformed distance is the squared Euclidean distance. +E.g., for a Euclidean distance the transformed distance is the squared Euclidean distance. \cgalRefines{GeneralDistance} diff --git a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt index afa3a3eb0ca..b6f06106069 100644 --- a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt +++ b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt @@ -282,7 +282,7 @@ scenarios for different splitter types. \subsection Spatial_searchingExampleforKNeighborSearching Example for K Neighbor Searching -The first example illustrates k neighbor searching with an Euclidean +The first example illustrates k neighbor searching with a Euclidean distance and 2-dimensional points. The generated random data points are inserted in a search tree. We then initialize the k neighbor search object with the origin as query. Finally, we diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 33a3969adc6..f9546507bd4 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -27,6 +27,8 @@ create_single_source_cgal_program("searching_polyhedron_vertices_with_fuzzy_sphe create_single_source_cgal_program("user_defined_point_and_distance.cpp") create_single_source_cgal_program("using_fair_splitting_rule.cpp") create_single_source_cgal_program("weighted_Minkowski_distance.cpp") +create_single_source_cgal_program("searching_sphere_orthogonally.cpp") +create_single_source_cgal_program("splitter_worst_cases.cpp") find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) diff --git a/Spatial_searching/examples/Spatial_searching/searching_with_circular_query.cpp b/Spatial_searching/examples/Spatial_searching/searching_with_circular_query.cpp index 3f08f1278a4..de8f75f57db 100644 --- a/Spatial_searching/examples/Spatial_searching/searching_with_circular_query.cpp +++ b/Spatial_searching/examples/Spatial_searching/searching_with_circular_query.cpp @@ -30,7 +30,7 @@ int main() Point center(0.2, 0.2); Fuzzy_circle default_range(center, 0.2); - boost::optional any = tree.search_any_point(default_range); + std::optional any = tree.search_any_point(default_range); if(any) std::cout << *any << " is in the query circle\n"; else diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 4ee61cb9214..7d79f7b6670 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -31,7 +31,7 @@ #include #include -#include +#include #ifdef CGAL_HAS_THREADS #include @@ -594,7 +594,7 @@ public: template - boost::optional + std::optional search_any_point(const FuzzyQueryItem& q) const { if(! pts.empty()){ @@ -605,7 +605,7 @@ public: Kd_tree_rectangle b(*bbox); return tree_root->search_any_point(q,b,begin(),cache_begin(),dim_); } - return boost::none; + return std::nullopt; } diff --git a/Spatial_searching/include/CGAL/Kd_tree_node.h b/Spatial_searching/include/CGAL/Kd_tree_node.h index c6af70495a2..b90068bf2ba 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_node.h +++ b/Spatial_searching/include/CGAL/Kd_tree_node.h @@ -175,14 +175,14 @@ namespace CGAL { } - boost::optional + std::optional any_tree_item() const { - boost::optional result = boost::none; + std::optional result = std::nullopt; if (is_leaf()) { Leaf_node_const_handle node = static_cast(this); if (node->size()>0){ - return boost::make_optional(*(node->begin())); + return std::make_optional(*(node->begin())); } } else { @@ -273,14 +273,14 @@ namespace CGAL { template - boost::optional + std::optional search_any_point(const FuzzyQueryItem& q, Kd_tree_rectangle& b, typename Kdt::const_iterator tree_points_begin, typename std::vector::const_iterator cache_begin, int dim) const { - boost::optional result = boost::none; + std::optional result = std::nullopt; if (is_leaf()) { Leaf_node_const_handle node = static_cast(this); @@ -376,7 +376,7 @@ namespace CGAL { // With cache template - boost::optional search_any_point_in_leaf( + std::optional search_any_point_in_leaf( Leaf_node_const_handle node, const FuzzyQueryItem &q, typename Kdt::const_iterator tree_points_begin, @@ -384,7 +384,7 @@ namespace CGAL { int dim, Tag_true /*has_points_cache*/) const { - boost::optional result = boost::none; + std::optional result = std::nullopt; typename Kdt::iterator it_node_point = node->begin(), it_node_point_end = node->end(); typename std::vector::const_iterator cache_point_it = cache_begin + dim*(it_node_point - tree_points_begin); for (; it_node_point != it_node_point_end; ++it_node_point, cache_point_it += dim) @@ -401,7 +401,7 @@ namespace CGAL { // Without cache template - boost::optional search_any_point_in_leaf( + std::optional search_any_point_in_leaf( Leaf_node_const_handle node, const FuzzyQueryItem &q, typename Kdt::const_iterator /*tree_points_begin*/, @@ -409,7 +409,7 @@ namespace CGAL { int /*dim*/, Tag_false /*has_points_cache*/) const { - boost::optional result = boost::none; + std::optional result = std::nullopt; for (iterator i = node->begin(); i != node->end(); ++i) { if (q.contains(*i)) diff --git a/Spatial_searching/include/CGAL/Point_container.h b/Spatial_searching/include/CGAL/Point_container.h index eb96024348e..4c2b180b6ba 100644 --- a/Spatial_searching/include/CGAL/Point_container.h +++ b/Spatial_searching/include/CGAL/Point_container.h @@ -25,7 +25,7 @@ #include #include -#include +#include namespace CGAL { @@ -45,8 +45,8 @@ public: private: Traits traits; // the iterator range of the Point_container - boost::optional m_b ; - boost::optional m_e ; + std::optional m_b ; + std::optional m_e ; int built_coord; // a coordinate for which the pointer list is built Kd_tree_rectangle bbox; // bounding box, i.e. rectangle of node diff --git a/Straight_skeleton_2/benchmark/Straight_skeleton_2/compare_kernels_simple_polygon_skeleton.cpp b/Straight_skeleton_2/benchmark/Straight_skeleton_2/compare_kernels_simple_polygon_skeleton.cpp index c75bc824e4b..45b78c18a09 100644 --- a/Straight_skeleton_2/benchmark/Straight_skeleton_2/compare_kernels_simple_polygon_skeleton.cpp +++ b/Straight_skeleton_2/benchmark/Straight_skeleton_2/compare_kernels_simple_polygon_skeleton.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include @@ -97,7 +97,7 @@ void build_skeleton(const char* fname) time.start(); SsBuilder ssb; ssb.enter_contour(pgn.vertices_begin(), pgn.vertices_end()); - boost::shared_ptr straight_ske = ssb.construct_skeleton(); + std::shared_ptr straight_ske = ssb.construct_skeleton(); time.stop(); std::cout << "Time spent to build skeleton " << time.time() << "\n"; diff --git a/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton.cpp b/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton.cpp index c12cba7eae3..d3079e31211 100644 --- a/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton.cpp +++ b/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton.cpp @@ -1,7 +1,5 @@ #include -#include - #include #include #include @@ -13,8 +11,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton_tweaking_skeleton.cpp b/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton_tweaking_skeleton.cpp index 95a3bdd544e..ddde78f3327 100644 --- a/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton_tweaking_skeleton.cpp +++ b/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton_tweaking_skeleton.cpp @@ -1,7 +1,5 @@ #include -#include - #include #include #include @@ -13,8 +11,8 @@ typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; typedef Ss::Halfedge_const_iterator Halfedge_const_iterator ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; @@ -56,7 +54,7 @@ int main() if ( i->opposite()->vertex()->has_infinite_time() ) { - boost::optional op= + std::optional op= builder.Construct_offset_point(offset , i->opposite()); if(!op) continue; p=*op; @@ -66,7 +64,7 @@ int main() if( i->vertex()->has_infinite_time() ) { - boost::optional op= + std::optional op= builder.Construct_offset_point(offset , i); if(!op) continue; q=*op; diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Polygon_offset_builder_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Polygon_offset_builder_2.h index 3f4db57e881..65cbf5cbb71 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Polygon_offset_builder_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Polygon_offset_builder_2.h @@ -91,12 +91,12 @@ or external angle approaches `0`, numerical overflow may prevent some of the pol If that happens, the failed contour just won't be added into the resulting sequence. \tparam OutputIterator must be a model of the OutputIterator category whose `value_type` - is a `boost::shared_ptr` holding the dynamically allocated instances of type `Container`. + is a `std::shared_ptr` holding the dynamically allocated instances of type `Container`. \param t the offset value \param out an output iterator. For each resulting offset contour, a default constructed instance of `Container` type, is dynamically allocated and each offset vertex is added to it. - A `boost::shared_ptr` holding onto the dynamically allocated container is inserted + A `std::shared_ptr` holding onto the dynamically allocated container is inserted into the output sequence via the OutputIterator `out`. \returns an `OutputIterator` past-the-end of the resulting sequence, which contains each offset contour generated. diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_builder_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_builder_2.h index 9b69d3cc9f7..e1b3801f262 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_builder_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_builder_2.h @@ -154,7 +154,7 @@ typedef Traits::Point_2 Point_2; /*! constructs the builder class. */ -Straight_skeleton_builder_2(boost::optional max_time = boost::none, +Straight_skeleton_builder_2(std::optional max_time = std::nullopt, const Traits& traits = Traits(), const Visitor& visitor = Visitor()); @@ -209,7 +209,7 @@ must be entered before calling `construct_skeleton()`. After `construct_skeleton()` completes, you cannot enter more contours and/or call `construct_skeleton()` again. If you need another straight skeleton for another polygon you must instantiate and use another builder. -The result is a dynamically allocated instance of the `Ss` class, wrapped in a `boost::shared_ptr`. +The result is a dynamically allocated instance of the `Ss` class, wrapped in a `std::shared_ptr`. If the construction process fails for whatever reason (such as a nearly-degenerate vertex whose internal or external angle is almost zero), the return value will be null, represented @@ -218,7 +218,7 @@ by a default constructed `shared_ptr`. The algorithm automatically checks the consistency of the result, thus, if it is not nullptr, it is guaranteed to be valid. */ -boost::shared_ptr construct_skeleton(); +std::shared_ptr construct_skeleton(); /// @} diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_converter_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_converter_2.h index d3ff08ad9f4..a5ea28252e2 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_converter_2.h @@ -14,7 +14,7 @@ using the items converter `ic` to convert the geometric embedding to the types o \sa `CGAL::Straight_skeleton_converter_2` */ template -boost::shared_ptr +std::shared_ptr convert_straight_skeleton_2( Source_skeleton const& s, Items_converted const& ic = Items_converter() ); @@ -77,7 +77,7 @@ Straight_skeleton_converter_2( const Items_converter& c = Items_converter() ); /*! returns a new straight skeleton data structure with the same combinatorial and geometric data as `s` using the items converter to convert the geometric embeeding to the types of the target traits. */ -boost::shared_ptr operator()( const Source_skeleton& s) const; +std::shared_ptr operator()( const Source_skeleton& s) const; /// @} diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/arrange_offset_polygons_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/arrange_offset_polygons_2.h index 5aabf233690..ce178e72d38 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/arrange_offset_polygons_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/arrange_offset_polygons_2.h @@ -8,7 +8,7 @@ by `create_offset_polygons_2()` into 2D polygons with holes by determining geome relationships using a simple algorithm based on the particular characteristics of offset polygons. The function determines parent-hole relationships among the polygons given by `[begin,end]` creating -`boost::shared_ptr< GeneralPolygonWithHoles_2 >` objects added to the output sequence given `out`. +`std::shared_ptr< GeneralPolygonWithHoles_2 >` objects added to the output sequence given `out`. A `CLOCKWISE` oriented polygon `H` is a hole of a `COUNTERCLOCKWISE` polygon `P`, iff at least one vertex of `H` is `ON_BOUNDED_SIDE` of `P`. This function should not be used to arrange arbitrary polygons into polygons with holes unless they meet the requirements specified below. @@ -20,9 +20,9 @@ bounded or unbounded side of `Q` (but not both). \tparam K must be a model of `Kernel`. \tparam InputPolygonPtrIterator must be a model of `InputIterator` whose `value_type` is a smart pointer -(such as `boost::shared_ptr`) whose `element_type` is a model of `SequenceContainer` with value type `K::Point_2`. +(such as `std::shared_ptr`) whose `element_type` is a model of `SequenceContainer` with value type `K::Point_2`. \tparam OutputPolygonWithHolesPtrIterator must be a model of `OutputIterator` whose `value_type` is a smart pointer -(such as `boost::shared_ptr`) whose `element_type` is a model of `GeneralPolygonWithHoles_2`. +(such as `std::shared_ptr`) whose `element_type` is a model of `GeneralPolygonWithHoles_2`. \return `true` if no error was encountered, and `false` otherwise. diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/compute_outer_frame_margin.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/compute_outer_frame_margin.h index 050c6dfba90..7db792ad14e 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/compute_outer_frame_margin.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/compute_outer_frame_margin.h @@ -47,7 +47,7 @@ the kernel in which the type `InputIterator::value_type` is defined. \sa `CGAL::Polygon_offset_builder_traits_2` */ template -boost::optional< typename Traits::FT > +std::optional< typename Traits::FT > compute_outer_frame_margin( InputIterator first, InputIterator beyond, typename Traits::FT offset, const Traits& traits = Default_traits ); diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_2.h index 18362fb362a..551215202ae 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_2.h @@ -25,7 +25,7 @@ will be generated in its exterior. \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_offset_polygons_2(FT offset, const StraightSkeleton& ss, OfK k = Exact_predicates_inexact_constructions_kernel()); @@ -66,7 +66,7 @@ the skeleton only once, and then call `create_offset_polygons_2()` for each dist \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_interior_skeleton_and_offset_polygons_2(FT offset, const InKPolygon& outer_boundary, HoleIterator holes_begin, @@ -104,7 +104,7 @@ the skeleton only once, and then call `create_offset_polygons_2()` for each dist \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_interior_skeleton_and_offset_polygons_2(FT offset, const InKPolygon& poly, OfK ofk = CGAL::Exact_predicates_inexact_constructions_kernel, @@ -145,7 +145,7 @@ therefore, to construct offsets at more than one single distance, use the separa \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_exterior_skeleton_and_offset_polygons_2(FT offset, const InKPolygon& poly, OfK ofk = Exact_predicates_inexact_constructions_kernel(), diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_from_polygon_with_holes_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_from_polygon_with_holes_2.h index cdba6f53874..839612ff6f3 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_from_polygon_with_holes_2.h @@ -25,7 +25,7 @@ This is equivalent to `arrange_offset_polygons_2(create_interior_skeleton_and_of \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr< OfKPolygon > > +std::vector< std::shared_ptr< OfKPolygon > > create_interior_skeleton_and_offset_polygons_with_holes_2(FT offset, const InKPolygon& poly_with_holes, OfK ofk = CGAL::Exact_predicates_inexact_constructions_kernel, @@ -63,7 +63,7 @@ having reversed the orientation of all other polygons. \sa `Polygon_offset_builder_2` */ template -std::vector > +std::vector > create_exterior_skeleton_and_offset_polygons_with_holes_2(FT offset, const InKPolygon& poly_with_holes, OfK ofk = Exact_predicates_inexact_constructions_kernel(), diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_straight_skeleton_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_straight_skeleton_2.h index 9c1368732b3..c564807bffc 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_straight_skeleton_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_straight_skeleton_2.h @@ -26,7 +26,7 @@ and its holes given by `[holes_begin, holes_end[`. \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, HoleIterator holes_begin, @@ -52,7 +52,7 @@ The outer boundary of the polygon is given by the point sequence `[outer_contour \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, SsK k = CGAL::Exact_predicates_inexact_constructions_kernel()); @@ -79,7 +79,7 @@ create_interior_straight_skeleton_2(PointIterator outer_contour_vertices_begin, \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2(const Polygon& polygon, SsK k = CGAL::Exact_predicates_inexact_constructions_kernel()); @@ -110,7 +110,7 @@ from this exterior skeleton, as computed by the function `compute_outer_frame_ma \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_straight_skeleton_2(FT max_offset, PointIterator vertices_begin, PointIterator vertices_end, @@ -144,7 +144,7 @@ from this exterior skeleton, as computed by the function `compute_outer_frame_ma \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_straight_skeleton_2(FT max_offset, const Polygon& P, SsK k = CGAL::Exact_predicates_inexact_constructions_kernel()); diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_offset_polygons_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_offset_polygons_2.h index 5627709d22b..e08f4d7b1d2 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_offset_polygons_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_offset_polygons_2.h @@ -42,7 +42,7 @@ and `create_offset_polygons_2()` instead. */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_interior_weighted_skeleton_and_offset_polygons_2(FT offset, const InKPolygon& outer_boundary, const InKWeights& outer_boundary_weights, @@ -84,7 +84,7 @@ and `create_offset_polygons_2()` instead. \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_interior_weighted_skeleton_and_offset_polygons_2(FT offset, const InKPolygon& poly, const InKWeights& weights, @@ -130,7 +130,7 @@ therefore, to construct offsets at more than one single distance, use the separa \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_exterior_weighted_skeleton_and_offset_polygons_2(FT offset, const InKPolygon& poly, const InKWeights& weights, diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h index 3f68ff59b7e..e2f4f109648 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h @@ -25,7 +25,7 @@ This is equivalent to `arrange_offset_polygons_2(create_interior_weighted_skelet \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr< OfKPolygon > > +std::vector< std::shared_ptr< OfKPolygon > > create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(FT offset, const InKPolygon& poly_with_holes, OfK ofk = CGAL::Exact_predicates_inexact_constructions_kernel, @@ -63,7 +63,7 @@ having reversed the orientation of all other polygons. \sa `Polygon_offset_builder_2` */ template -std::vector > +std::vector > create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(FT offset, const InKPolygon& poly_with_holes, OfK ofk = Exact_predicates_inexact_constructions_kernel(), diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_straight_skeleton_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_straight_skeleton_2.h index ca9c472deeb..f036609721f 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_straight_skeleton_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_weighted_straight_skeleton_2.h @@ -38,7 +38,7 @@ the `i`-th weight in the range is associated to the contour edge between the `i- template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, HoleIterator holes_begin, @@ -75,7 +75,7 @@ to the contour edge between the `i-1`-th and `i`-th vertices. \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, WeightIterator outer_contour_weights_begin, @@ -109,7 +109,7 @@ the `i`-th weight in the range is associated to the contour edge between the `i- \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_weighted_straight_skeleton_2(const InKPolygon& polygon, const InKWeights& weights, SsK k = CGAL::Exact_predicates_inexact_constructions_kernel()); @@ -147,7 +147,7 @@ is associated to the contour edge between the `i-1`-th and `i`-th vertices. \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_weighted_straight_skeleton_2(FT max_offset, PointIterator vertices_begin, PointIterator vertices_end, @@ -192,7 +192,7 @@ is associated to the contour edge between the `i-1`-th and `i`-th vertices. \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_weighted_straight_skeleton_2(FT max_offset, const InKPolygon& P, const InKWeights& weights, diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/PolygonOffsetBuilderTraits_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/PolygonOffsetBuilderTraits_2.h index d0c364262cb..facdc0e6f83 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/PolygonOffsetBuilderTraits_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/PolygonOffsetBuilderTraits_2.h @@ -38,10 +38,10 @@ A construction object type. Must provide -`boost::optional operator()(const FT& t, const Segment_2& e0, const Segment_2& e1, const Trisegment_2_ptr& et) const`, +`std::optional operator()(const FT& t, const Segment_2& e0, const Segment_2& e1, const Trisegment_2_ptr& et) const`, which constructs the point of intersection of the lines obtained by offsetting -the oriented lines given by `e0` and `e0` an Euclidean distance `t`. +the oriented lines given by `e0` and `e0` a Euclidean distance `t`. If `e0` and `e1` are collinear, if `et` is not specified (`nullptr`), then the midpoint should be returned, otherwise, the event point of `et` should be returned. diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonBuilderTraits_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonBuilderTraits_2.h index f971c1c880c..067b6e02c32 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonBuilderTraits_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonBuilderTraits_2.h @@ -64,11 +64,11 @@ A predicate object type. Must provide -`bool operator()( const Trisegment_2_ptr& tri_segment, boost::optional max_time ) const`, +`bool operator()( const Trisegment_2_ptr& tri_segment, std::optional max_time ) const`, which determines if, given the three oriented lines defined by the three input edges, -there exists an Euclidean distance `t >= 0` and `t <= max_time` for which the corresponding three -offset lines at `t` (parallel lines at an Euclidean distance of `t`) intersect in a single point. +there exists a Euclidean distance `t >= 0` and `t <= max_time` for which the corresponding three +offset lines at `t` (parallel lines at a Euclidean distance of `t`) intersect in a single point. \pre Each edge in the triple must properly define an oriented line, that is, its points cannot be coincident. */ @@ -109,7 +109,7 @@ A construction object type. Must provide -`boost::optional< boost::tuple > operator()( const Trisegment_2_ptr& e)`, +`std::optional< std::tuple > operator()( const Trisegment_2_ptr& e)`, which returns the Euclidean distance `t >= 0` and the intersection point at which the corresponding three offset lines at `t` intersect if they do. diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonVertex_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonVertex_2.h index 7a26285dccf..1b66e17ee69 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonVertex_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonVertex_2.h @@ -26,7 +26,7 @@ The type of the 2D point being the geometric embedding of the vertex typedef unspecified_type Point_2; /*! -A model of the `FieldWithSqrt` concept representing the time of a vertex (an Euclidean distance) +A model of the `FieldWithSqrt` concept representing the time of a vertex (a Euclidean distance) */ typedef unspecified_type FT; diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/Straight_skeleton_2.txt b/Straight_skeleton_2/doc/Straight_skeleton_2/Straight_skeleton_2.txt index b9a2ddb1de7..c771bf8929e 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/Straight_skeleton_2.txt +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/Straight_skeleton_2.txt @@ -467,11 +467,11 @@ To construct a set of inward offset contours the user must:

    • Construct the straight skeleton of the source polygon.
    • Instantiate the polygon offset builder passing in the straight skeleton as a parameter.
    • Call `Polygon_offset_builder_2::construct_offset_contours()` passing the desired offset - distance and an output iterator that can store a `boost::shared_ptr` of `Container` instances + distance and an output iterator that can store a `std::shared_ptr` of `Container` instances into a resulting sequence (typically, a back insertion iterator)
    • -Each element in the resulting sequence is an offset contour, given by a `boost::shared_ptr` +Each element in the resulting sequence is an offset contour, given by a `std::shared_ptr` holding a dynamically allocated instance of the Container type. Such a container can be any model of the `SequenceContainer` concept, for example, a `CGAL::Polygon_2`, or just a `std::vector` of 2D points. diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp index 5c38ea1223b..1d2967419e0 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -15,8 +15,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp index 1a4ed1ac668..61e71343578 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -16,8 +16,8 @@ typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp index 70d6f788217..1c3c5d8e3cc 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -16,8 +16,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp index f6906ab27b7..a751533ae55 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -15,7 +15,7 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 PolygonWithHoles ; -typedef boost::shared_ptr PolygonWithHolesPtr ; +typedef std::shared_ptr PolygonWithHolesPtr ; typedef std::vector PolygonWithHolesPtrVector; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp index 5aae2d904f1..84ecf3669ee 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp @@ -5,8 +5,6 @@ #include #include -#include - #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K ; @@ -15,7 +13,7 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; int main() { diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp index 00c8dab1181..84274655d63 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include @@ -15,7 +15,7 @@ typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; int main() { diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp index 387ea9647c1..675a25ff22e 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include @@ -22,7 +22,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_2 Point_2; typedef CGAL::Polygon_2 Contour; -typedef boost::shared_ptr ContourPtr; +typedef std::shared_ptr ContourPtr; typedef std::vector ContourSequence ; typedef CGAL::Straight_skeleton_2 Ss; @@ -66,7 +66,7 @@ int main() // First we need to determine the proper separation between the polygon and the frame. // We use this helper function provided in the package. - boost::optional margin = CGAL::compute_outer_frame_margin(star.begin(),star.end(),offset); + std::optional margin = CGAL::compute_outer_frame_margin(star.begin(),star.end(),offset); // Proceed only if the margin was computed (an extremely sharp corner might cause overflow) if ( margin ) @@ -97,7 +97,7 @@ int main() ssb.enter_contour(star.rbegin(),star.rend()); // Construct the skeleton - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); // Proceed only if the skeleton was correctly constructed. if ( ss ) diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Show_offset_polygon.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Show_offset_polygon.cpp index 296d721cc40..8a35567dafd 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Show_offset_polygon.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Show_offset_polygon.cpp @@ -4,7 +4,7 @@ #include #include "dump_to_eps.h" -#include +#include #include #include @@ -16,7 +16,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K ; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes ; -typedef boost::shared_ptr Polygon_with_holes_ptr ; +typedef std::shared_ptr Polygon_with_holes_ptr ; typedef std::vector Polygon_with_holes_ptr_vector ; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Show_straight_skeleton.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Show_straight_skeleton.cpp index 6f7bbd32443..a4e07d6dd2e 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Show_straight_skeleton.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Show_straight_skeleton.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include #include @@ -23,7 +21,7 @@ typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes ; typedef CGAL::Straight_skeleton_2 Straight_skeleton ; -typedef boost::shared_ptr Straight_skeleton_ptr ; +typedef std::shared_ptr Straight_skeleton_ptr ; int main( int argc, char* argv[] ) { diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/draw_straight_skeleton_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/draw_straight_skeleton_2.cpp index 2e87c323695..96f3da42c1d 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/draw_straight_skeleton_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/draw_straight_skeleton_2.cpp @@ -4,8 +4,6 @@ #include #include -#include - #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K ; @@ -14,7 +12,7 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; int main() { diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/dump_to_eps.h b/Straight_skeleton_2/examples/Straight_skeleton_2/dump_to_eps.h index 5e94bf72b3d..efc8694a921 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/dump_to_eps.h +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/dump_to_eps.h @@ -84,11 +84,11 @@ void dump_to_eps( CGAL::Straight_skeleton_2 const& aSkeleton, char const* aTy template void dump_to_eps ( CGAL::Polygon_with_holes_2 const& aInput - , std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > const& aOutput + , std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > const& aOutput , std::ostream& rOut ) { - typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > PolyWH_vector ; + typedef std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > PolyWH_vector ; CGAL::Bbox_2 lBbox = CGAL::bbox_2(aInput); diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/exterior_offset_of_multiple_polygons_with_holes.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/exterior_offset_of_multiple_polygons_with_holes.cpp index a3655becfe6..563fd207ef3 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/exterior_offset_of_multiple_polygons_with_holes.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/exterior_offset_of_multiple_polygons_with_holes.cpp @@ -3,9 +3,9 @@ #include #include -#include +#include -#include +#include #include #include @@ -16,8 +16,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 PolygonWithHoles ; -typedef boost::shared_ptr PolygonWithHolesPtr ; -typedef boost::shared_ptr PolygonPtr ; +typedef std::shared_ptr PolygonWithHolesPtr ; +typedef std::shared_ptr PolygonPtr ; typedef std::vector PolygonWithHolesPtrVector; typedef std::vector PolygonPtrVector; @@ -30,7 +30,7 @@ exterior_offset_of_disjoint_polygons_with_holes(double lOffset, const std::vecto outer_vertices.insert(outer_vertices.end(), pwh.outer_boundary().container().begin(), pwh.outer_boundary().container().end()); - boost::optional margin = compute_outer_frame_margin(outer_vertices.begin(), + std::optional margin = compute_outer_frame_margin(outer_vertices.begin(), outer_vertices.end(), lOffset); diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/extrude_skeleton.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/extrude_skeleton.cpp index 073b50964c0..c4f4cf92a27 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/extrude_skeleton.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/extrude_skeleton.cpp @@ -13,11 +13,10 @@ #include #include -#include - #include #include #include +#include namespace SS = CGAL::CGAL_SS_i; namespace PMP = CGAL::Polygon_mesh_processing; @@ -42,7 +41,7 @@ using Polygon_2 = CGAL::Polygon_2; using Polygon_with_holes_2 = CGAL::Polygon_with_holes_2; using Straight_skeleton_2 = CGAL::Straight_skeleton_2; -using Straight_skeleton_2_ptr = boost::shared_ptr; +using Straight_skeleton_2_ptr = std::shared_ptr; using Mesh = CGAL::Surface_mesh; diff --git a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h index bf5e9cfb78d..19ae42d71b3 100644 --- a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h +++ b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #include @@ -69,9 +69,9 @@ public : typedef typename Traits::FT FT ; typedef typename Traits::Point_2 Point_2 ; - typedef boost::optional OptionalPoint_2 ; + typedef std::optional OptionalPoint_2 ; - typedef boost::shared_ptr ContainerPtr ; + typedef std::shared_ptr ContainerPtr ; Polygon_offset_builder_2( Ss const& aSs, Traits const& aTraits = Traits(), Visitor const& aVisitor = Visitor() ) ; @@ -150,7 +150,7 @@ public: return r ; } - boost::optional Construct_offset_point( FT aT, Halfedge_const_handle aBisector ) const + std::optional Construct_offset_point( FT aT, Halfedge_const_handle aBisector ) const { CGAL_assertion(aBisector->is_bisector()); CGAL_assertion(handle_assigned(aBisector->opposite())); diff --git a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_traits_2.h b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_traits_2.h index ec2950f74b5..a6d0571e9b9 100644 --- a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_traits_2.h +++ b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_traits_2.h @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CGAL { @@ -50,7 +50,7 @@ struct Construct_offset_point_2 : Functor_base_2 typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; - typedef boost::optional result_type ; + typedef std::optional result_type ; result_type operator() ( FT const& aT , Segment_2_with_ID const& aE0 diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/IO/print.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/IO/print.h index 33953f24ce3..a36df07b51e 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/IO/print.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/IO/print.h @@ -50,9 +50,9 @@ void print_polygon ( CGAL::Polygon_2 const& poly ) } template -void print_polygons ( std::vector< boost::shared_ptr< CGAL::Polygon_2 > > const& polies ) +void print_polygons ( std::vector< std::shared_ptr< CGAL::Polygon_2 > > const& polies ) { - typedef std::vector< boost::shared_ptr< CGAL::Polygon_2 > > PolygonVector ; + typedef std::vector< std::shared_ptr< CGAL::Polygon_2 > > PolygonVector ; std::cout << "Polygon list with " << polies.size() << " polygons" << std::endl ; @@ -74,10 +74,10 @@ void print_polygon_with_holes ( CGAL::Polygon_with_holes_2 const& polywh ) } template -void print_polygons_with_holes ( std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > const& polies ) +void print_polygons_with_holes ( std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > const& polies ) { - typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > PolygonWithHolesVector ; + typedef std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > PolygonWithHolesVector ; std::cout << "Polygon_with_holes list with " << polies.size() << " element" << std::endl ; diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h index 01328936363..c2b1c014482 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h @@ -15,7 +15,7 @@ #include -#include +#include #include @@ -37,13 +37,13 @@ vertices_end(const Poly& aPoly, template inline typename Poly::const_iterator -vertices_begin(const boost::shared_ptr& aPoly, +vertices_begin(const std::shared_ptr& aPoly, std::enable_if_t::value>* = nullptr) { return aPoly->begin(); } template inline typename Poly::const_iterator -vertices_end(const boost::shared_ptr & aPoly, +vertices_end(const std::shared_ptr & aPoly, std::enable_if_t::value>* = nullptr) { return aPoly->end(); } @@ -62,13 +62,13 @@ vertices_end(const PolyWithHoles& aPoly, template inline typename PolyWithHoles::Polygon_2::const_iterator -vertices_begin(const boost::shared_ptr& aPoly, +vertices_begin(const std::shared_ptr& aPoly, std::enable_if_t::value>* = nullptr) { return aPoly->outer_boundary().begin(); } template inline typename PolyWithHoles::Polygon_2::const_iterator -vertices_end(const boost::shared_ptr& aPoly, +vertices_end(const std::shared_ptr& aPoly, std::enable_if_t::value>* = nullptr) { return aPoly->outer_boundary().end(); } diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h index c6d8ac62e72..1f18410c47a 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h @@ -308,7 +308,7 @@ OutputIterator Polygon_offset_builder_2::construct_offset_co mVisitor.on_construction_started(aTime); - mLastPoint = boost::none ; + mLastPoint = std::nullopt ; ResetBisectorData(); diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h index 8e5bdfdd6d2..a799eccda60 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h @@ -22,8 +22,7 @@ #include #include #include -#include -#include +#include #include #include 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..5470ad13717 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 @@ -34,7 +34,7 @@ namespace CGAL { template -Straight_skeleton_builder_2::Straight_skeleton_builder_2 ( boost::optional aMaxTime, Traits const& aTraits, Visitor const& aVisitor ) +Straight_skeleton_builder_2::Straight_skeleton_builder_2 ( std::optional aMaxTime, Traits const& aTraits, Visitor const& aVisitor ) : mTraits(aTraits) ,mVisitor(aVisitor) @@ -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. @@ -1194,7 +1194,7 @@ void Straight_skeleton_builder_2::HandleSplitEvent( EventPtr aEvent, Ve Halfedge_handle lOppBorder = lEvent.triedge().e2() ; Vertex_handle lNewNode_L, lNewNode_R ; - boost::tie(lNewNode_L,lNewNode_R) = ConstructSplitEventNodes(lEvent,lOppR); + std::tie(lNewNode_L,lNewNode_R) = ConstructSplitEventNodes(lEvent,lOppR); // Triedge lTriedge = aEvent->triedge(); @@ -1419,7 +1419,7 @@ void Straight_skeleton_builder_2::HandlePseudoSplitEvent( EventPtr aEve CGAL_STSKEL_BUILDER_TRACE( 4, "LReed = " << v2str(*lRSeed) ); Vertex_handle lNewNode_L, lNewNode_R ; - boost::tie(lNewNode_L,lNewNode_R) = ConstructPseudoSplitEventNodes(lEvent); + std::tie(lNewNode_L,lNewNode_R) = ConstructPseudoSplitEventNodes(lEvent); Halfedge_handle lNBisector_LO = SSkelEdgesPushBack( Halfedge(mEdgeID ),Halfedge(mEdgeID+1) ); Halfedge_handle lNBisector_RO = SSkelEdgesPushBack( Halfedge(mEdgeID+2),Halfedge(mEdgeID+3) ); @@ -1622,7 +1622,7 @@ template void Straight_skeleton_builder_2::MergeSplitNodes ( Vertex_handle_pair aSplitNodes ) { Vertex_handle lLNode, lRNode ; - boost::tie(lLNode,lRNode)=aSplitNodes; + std::tie(lLNode,lRNode)=aSplitNodes; Halfedge_handle lIBisectorL1 = lLNode->primary_bisector()->opposite(); Halfedge_handle lIBisectorR1 = lRNode->primary_bisector()->opposite(); diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h index d521dc4257c..93048c58c45 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h @@ -27,22 +27,20 @@ #include #include -#include -#include -#include #include #include #include #include #include +#include namespace CGAL { namespace CGAL_SS_i { template -T const& validate ( boost::optional const& o ) +T const& validate ( std::optional const& o ) { if ( !o ) throw std::overflow_error("Arithmetic overflow"); @@ -57,17 +55,16 @@ NT const& validate( NT const& n ) return n ; } -// boost::make_optional is provided in Boost >= 1.34, but not before, so we define our own versions here. template -boost::optional cgal_make_optional( T const& v ) +std::optional cgal_make_optional( T const& v ) { - return boost::optional(v) ; + return std::optional(v) ; } template -boost::optional cgal_make_optional( bool cond, T const& v ) +std::optional cgal_make_optional( bool cond, T const& v ) { - return cond ? boost::optional(v) : boost::optional() ; + return cond ? std::optional(v) : std::optional() ; } template @@ -115,10 +112,10 @@ private: has_smaller_relative_precision(point.y(), precision); } - bool has_enough_precision(const boost::tuple& time_and_point, double precision) const + bool has_enough_precision(const std::tuple& time_and_point, double precision) const { - return has_smaller_relative_precision(boost::get<0>(time_and_point), precision) && - has_enough_precision(boost::get<1>(time_and_point), precision); + return has_smaller_relative_precision(std::get<0>(time_and_point), precision) && + has_enough_precision(std::get<1>(time_and_point), precision); } bool has_enough_precision(const CGAL::Trisegment_2 >& trisegment, double precision) const @@ -209,7 +206,7 @@ template struct FPU_checker; template -struct FPU_checker > > +struct FPU_checker > > { static bool is_valid() { @@ -219,7 +216,7 @@ struct FPU_checker > > }; template -struct FPU_checker > > +struct FPU_checker > > { static bool is_valid() { @@ -229,7 +226,7 @@ struct FPU_checker > > }; template -struct FPU_checker > > +struct FPU_checker > > { static bool is_valid() { @@ -277,20 +274,20 @@ struct SS_converter : Converter typedef Trisegment_2 Source_trisegment_2 ; typedef Trisegment_2 Target_trisegment_2 ; - typedef boost::tuple Source_time_and_point_2 ; - typedef boost::tuple Target_time_and_point_2 ; + typedef std::tuple Source_time_and_point_2 ; + typedef std::tuple Target_time_and_point_2 ; - typedef boost::optional Source_opt_FT ; - typedef boost::optional Target_opt_FT ; + typedef std::optional Source_opt_FT ; + typedef std::optional Target_opt_FT ; - typedef boost::optional Source_opt_point_2 ; - typedef boost::optional Target_opt_point_2 ; + typedef std::optional Source_opt_point_2 ; + typedef std::optional Target_opt_point_2 ; - typedef boost::optional Source_opt_time_and_point_2 ; - typedef boost::optional Target_opt_time_and_point_2 ; + typedef std::optional Source_opt_time_and_point_2 ; + typedef std::optional Target_opt_time_and_point_2 ; - typedef boost::optional Source_opt_segment_2 ; - typedef boost::optional Target_opt_segment_2 ; + typedef std::optional Source_opt_segment_2 ; + typedef std::optional Target_opt_segment_2 ; typedef typename Source_trisegment_2::Self_ptr Source_trisegment_2_ptr ; typedef typename Target_trisegment_2::Self_ptr Target_trisegment_2_ptr ; @@ -324,7 +321,7 @@ struct SS_converter : Converter { Source_FT t ; Source_point_2 p ; - boost::tie(t,p) = v ; + std::tie(t,p) = v ; return Target_time_and_point_2(cvt_n(t),cvt_p(p)); } diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h index 05733500bd1..640a078953a 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h @@ -83,13 +83,13 @@ struct Info_cache }; template -using Coeff_cache = Info_cache > ; +using Coeff_cache = Info_cache > ; template -using Time_cache = Info_cache > > ; +using Time_cache = Info_cache > > ; template -using Point_cache = Info_cache > ; +using Point_cache = Info_cache > ; template struct Caches @@ -118,9 +118,9 @@ struct No_caches { void Reset ( std::size_t ) { } - No_cache > mCoeff_cache; - No_cache > > mTime_cache; - No_cache > mPoint_cache; + No_cache > mCoeff_cache; + No_cache > > mTime_cache; + No_cache > mPoint_cache; }; } // namespace CGAL_SS_i diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h index f6a2396d049..f66dad79690 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h @@ -20,14 +20,15 @@ #endif #include -#include +#include #include #include #include +#include template -inline std::string o2str( boost::optional const& o ) +inline std::string o2str( std::optional const& o ) { std::ostringstream ss ; ss << std::setprecision(17) ; diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h index d6177f02e4c..90110820a36 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h @@ -22,9 +22,6 @@ #include #include -#include -#include -#include #include #include @@ -111,7 +108,7 @@ public: typedef SSkel_ SSkel ; typedef Visitor_ Visitor ; - typedef boost::shared_ptr SSkelPtr ; + typedef std::shared_ptr SSkelPtr ; private : @@ -220,7 +217,7 @@ private : public: - Straight_skeleton_builder_2 ( boost::optional aMaxTime = boost::none, Traits const& = Traits(), Visitor const& aVisitor = Visitor() ) ; + Straight_skeleton_builder_2 ( std::optional aMaxTime = std::nullopt, Traits const& = Traits(), Visitor const& aVisitor = Visitor() ) ; SSkelPtr construct_skeleton( bool aNull_if_failed = true ) ; @@ -1067,9 +1064,9 @@ private : } } - boost::tuple ConstructEventTimeAndPoint( Trisegment_2_ptr const& aS ) const + std::tuple ConstructEventTimeAndPoint( Trisegment_2_ptr const& aS ) const { - boost::optional< boost::tuple > r = mTraits.construct_ss_event_time_and_point_2_object()( aS ) ; + std::optional< std::tuple > r = mTraits.construct_ss_event_time_and_point_2_object()( aS ) ; CGAL_postcondition_msg(!!r, "Unable to compute skeleton node coordinates"); return *r ; } @@ -1078,7 +1075,7 @@ private : { FT lTime ; Point_2 lP ; - boost::tie(lTime,lP) = ConstructEventTimeAndPoint(aE.trisegment()); + std::tie(lTime,lP) = ConstructEventTimeAndPoint(aE.trisegment()); aE.SetTimeAndPoint(lTime,lP); } @@ -1237,7 +1234,7 @@ private: int mEventID ; int mStepID ; - boost::optional mMaxTime ; + std::optional mMaxTime ; PQ mPQ ; diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_traits_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_traits_2.h index 50266d6a27d..2568caa16bc 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_traits_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_traits_2.h @@ -23,8 +23,7 @@ #include #include -#include -#include +#include #include #include @@ -80,7 +79,7 @@ struct Do_ss_event_exist_2 : Functor_base_2 : mCaches(aCaches) {} - Uncertain operator() ( Trisegment_2_ptr const& aTrisegment, boost::optional aMaxTime ) const + Uncertain operator() ( Trisegment_2_ptr const& aTrisegment, std::optional aMaxTime ) const { Uncertain rResult = exist_offset_lines_isec2(aTrisegment, aMaxTime, mCaches); @@ -241,9 +240,9 @@ struct Construct_ss_event_time_and_point_2 : Functor_base_2 typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; - typedef boost::tuple rtype ; + typedef std::tuple rtype ; - typedef boost::optional result_type ; + typedef std::optional result_type ; Construct_ss_event_time_and_point_2(Caches& aCaches) : mCaches(aCaches) @@ -256,13 +255,13 @@ struct Construct_ss_event_time_and_point_2 : Functor_base_2 FT t(0) ; Point_2 i = ORIGIN ; - boost::optional< Rational > ot = compute_offset_lines_isec_timeC2(aTrisegment, mCaches); + std::optional< Rational > ot = compute_offset_lines_isec_timeC2(aTrisegment, mCaches); if ( !!ot && certainly( CGAL_NTS certified_is_not_zero(ot->d()) ) ) { t = ot->n() / ot->d(); - boost::optional oi = construct_offset_lines_isecC2(aTrisegment, mCaches); + std::optional oi = construct_offset_lines_isecC2(aTrisegment, mCaches); if ( oi ) { i = *oi ; @@ -272,7 +271,7 @@ struct Construct_ss_event_time_and_point_2 : Functor_base_2 CGAL_STSKEL_ASSERT_CONSTRUCTION_RESULT(lOK,K,"Construct_ss_event_time_and_point_2",aTrisegment); - return cgal_make_optional(lOK,boost::make_tuple(t,i)) ; + return cgal_make_optional(lOK,std::make_tuple(t,i)) ; } private: @@ -406,7 +405,7 @@ public: if(mCaches.mCoeff_cache.Get(aOtherID)) mCaches.mCoeff_cache.Set(aID, CGAL_SS_i::cgal_make_optional(*(mCaches.mCoeff_cache.Get(aOtherID)))); else - mCaches.mCoeff_cache.Set(aID, boost::none); + mCaches.mCoeff_cache.Set(aID, std::nullopt); } // functions and tag for filtering split events @@ -420,7 +419,7 @@ public: return false; typename Base::Trisegment_2_ptr tri = lEvent->trisegment() ; - boost::optional > lOptTime = + std::optional > lOptTime = CGAL_SS_i::compute_offset_lines_isec_timeC2(tri, mCaches); if ( lOptTime && lOptTime->to_nt() > *mFilteringBound ) @@ -450,7 +449,7 @@ public: CGAL_STSKEL_TRAITS_TRACE("Computing filtering bound of V" << aNode->id() << " [" << typeid(FT).name() << "]" ); - mFilteringBound = boost::none; + mFilteringBound = std::nullopt; // No gain observed on norway while doing it for more than contour nodes if(!aNode->is_contour()) @@ -468,8 +467,8 @@ public: lHR->vertex()->point(), lHR->id()); - boost::optional< Line_2 > lL = CGAL_SS_i::compute_weighted_line_coeffC2(lSL, lHL->weight(), mCaches); - boost::optional< Line_2 > lR = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lHR->weight(), mCaches); + std::optional< Line_2 > lL = CGAL_SS_i::compute_weighted_line_coeffC2(lSL, lHL->weight(), mCaches); + std::optional< Line_2 > lR = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lHR->weight(), mCaches); Vector_2 lVL( lL->b(), - lL->a()) ; Vector_2 lVR(- lR->b(), lR->a()) ; @@ -497,7 +496,7 @@ public: // See the other function for the equations CGAL_SS_i::Segment_2_with_ID lSh (s_h, (*h)->id()); - boost::optional< Line_2 > lh = CGAL_SS_i::compute_normalized_line_coeffC2(lSh, mCaches); + std::optional< Line_2 > lh = CGAL_SS_i::compute_normalized_line_coeffC2(lSh, mCaches); FT lLambda = - ( lh->a()*laP.x() + lh->b()*laP.y() + lh->c() ) / ( lh->a()*lVLR.x() + lh->b()*lVLR.y() ) ; @@ -523,7 +522,7 @@ public: public: mutable std::size_t mTrisegment_ID = 0 ; mutable CGAL_SS_i::Caches mCaches ; - mutable boost::optional< typename K::FT > mFilteringBound ; + mutable std::optional< typename K::FT > mFilteringBound ; } ; template @@ -723,7 +722,7 @@ public: try { - boost::optional > lOptTime = + std::optional > lOptTime = CGAL_SS_i::compute_offset_lines_isec_timeC2(tri, mApproximate_traits.mCaches); if ( lOptTime && lOptTime->to_nt() > *mApproximate_traits.mFilteringBound ) @@ -759,7 +758,7 @@ public: CGAL_STSKEL_TRAITS_TRACE("Computing approximate filtering bound of V" << aNode->id() << " [" << typeid(Target_FT).name() << "]" ); - mApproximate_traits.mFilteringBound = boost::none; + mApproximate_traits.mFilteringBound = std::nullopt; // No gain observed on norway while doing it for more than contour nodes if(!aNode->is_contour()) @@ -781,8 +780,8 @@ public: lToFiltered(lHR->vertex()->point()), lHR->id()); - boost::optional lL = CGAL_SS_i::compute_weighted_line_coeffC2(lSL, lToFiltered(lHL->weight()), mApproximate_traits.mCaches); - boost::optional lR = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lToFiltered(lHR->weight()), mApproximate_traits.mCaches); + std::optional lL = CGAL_SS_i::compute_weighted_line_coeffC2(lSL, lToFiltered(lHL->weight()), mApproximate_traits.mCaches); + std::optional lR = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lToFiltered(lHR->weight()), mApproximate_traits.mCaches); Target_Point_2 laP = lToFiltered(aNode->point()); @@ -834,7 +833,7 @@ public: // lambda = - T / (d0 + d1) * n2 Target_Segment_with_ID_2 lSh (s_h, (*h)->id()); - boost::optional lh = CGAL_SS_i::compute_normalized_line_coeffC2(lSh, mApproximate_traits.mCaches); + std::optional lh = CGAL_SS_i::compute_normalized_line_coeffC2(lSh, mApproximate_traits.mCaches); Target_FT lLambda = - ( lh->a()*laP.x() + lh->b()*laP.y() + lh->c() ) / ( lh->a()*lVLR.x() + lh->b()*lVLR.y() ) ; @@ -860,7 +859,7 @@ public: std::cout << "lAP+v " << laP + lVLR << std::endl; std::cout << "Inter pt: " << *ip << std::endl; - boost::optional lh1 = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lToFiltered(lHR->weight()), mApproximate_traits.mCaches); + std::optional lh1 = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lToFiltered(lHR->weight()), mApproximate_traits.mCaches); std::cout << "lh0 check" << square(lh0->a()) + square(lh0->b()) << std::endl; std::cout << "lh1 check" << square(lh1->a()) + square(lh1->b()) << std::endl; @@ -870,7 +869,7 @@ public: std::cout << "l1 time at aNode + lVLR: " << lh1->a()*(laP + lVLR).x() + lh1->b()*(laP + lVLR).y() + lh1->c() << std::endl; auto ipp = FK().intersect_2_object()(s_h, bisect_ray); - Target_Point_2* ip = boost::get(&*ipp); + Target_Point_2* ip = std::get(&*ipp); std::cout << "l0 time at inter pt: " << lh0->a()*ip->x() + lh0->b()*ip->y() + lh0->c() << std::endl; std::cout << "l1 time at inter pt: " << lh1->a()*ip->x() + lh1->b()*ip->y() + lh1->c() << std::endl; std::cout << "lh-> " << lh->a() << " " << lh->b() << " " << square(lh->a()) + square(lh->b()) << std::endl; diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h index dc04a7a0dad..443c5a227db 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h @@ -19,7 +19,8 @@ #include #include -#include +#include + #include @@ -179,7 +180,7 @@ struct Straight_skeleton_converter_2 typedef typename Source_skeleton::Traits Source_traits ; typedef typename Target_skeleton::Traits Target_traits ; - typedef boost::shared_ptr Target_skeleton_ptr ; + typedef std::shared_ptr Target_skeleton_ptr ; typedef typename Source_skeleton::Vertex_const_iterator Source_vertex_const_iterator ; typedef typename Source_skeleton::Halfedge_const_iterator Source_halfedge_const_iterator ; @@ -349,7 +350,7 @@ private : } ; template -boost::shared_ptr +std::shared_ptr convert_straight_skeleton_2 ( Source_skeleton const& aSrc, Items_converter const& ic ) { typedef Straight_skeleton_converter_2 Skeleton_converter ; @@ -361,7 +362,7 @@ convert_straight_skeleton_2 ( Source_skeleton const& aSrc, Items_converter const } template -boost::shared_ptr +std::shared_ptr convert_straight_skeleton_2 ( Source_skeleton const& aSrc ) { typedef Straight_skeleton_items_converter_2 Items_converter ; diff --git a/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h b/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h index da2b6560fea..cd63666e9e7 100644 --- a/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h +++ b/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -49,7 +49,7 @@ bool arrange_offset_polygons_2 ( InputPolygonPtrIterator aBegin typedef typename std::iterator_traits::difference_type difference_type ; typedef typename std::iterator_traits::value_type PolygonPtr ; - typedef boost::shared_ptr PolygonWithHolesPtr ; + typedef std::shared_ptr PolygonWithHolesPtr ; difference_type lSize = std::distance(aBegin,aEnd); @@ -108,18 +108,18 @@ bool arrange_offset_polygons_2 ( InputPolygonPtrIterator aBegin } template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline -arrange_offset_polygons_2 ( std::vector > const& aPolygons, +arrange_offset_polygons_2 ( std::vector > const& aPolygons, bool& no_error) { - typedef std::vector< boost::shared_ptr > result_type ; + typedef std::vector< std::shared_ptr > result_type ; typedef std::back_insert_iterator Back_inserter; typedef typename PolygonWithHoles::General_polygon_2 Polygon_2 ; typedef typename Kernel_traits::type>::Kernel K ; - typedef typename std::vector >::const_iterator PolygonIterator ; + typedef typename std::vector >::const_iterator PolygonIterator ; result_type rResult ; no_error = arrange_offset_polygons_2( @@ -129,9 +129,9 @@ arrange_offset_polygons_2 ( std::vector > const& aPol } template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline -arrange_offset_polygons_2 ( std::vector > const& aPolygons) +arrange_offset_polygons_2 ( std::vector > const& aPolygons) { bool no_error; return arrange_offset_polygons_2(aPolygons, no_error); diff --git a/Straight_skeleton_2/include/CGAL/compute_outer_frame_margin.h b/Straight_skeleton_2/include/CGAL/compute_outer_frame_margin.h index 235589bd93f..941c7e3ca1e 100644 --- a/Straight_skeleton_2/include/CGAL/compute_outer_frame_margin.h +++ b/Straight_skeleton_2/include/CGAL/compute_outer_frame_margin.h @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -25,7 +25,7 @@ namespace CGAL { template -boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPointIterator aBegin +std::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPointIterator aBegin , ForwardPointIterator aEnd , WeightIterator aWBegin , WeightIterator CGAL_assertion_code(aWEnd) @@ -46,7 +46,7 @@ boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPoint typename Kernel::Compute_squared_distance_2 squared_distance = kernel.compute_squared_distance_2_object(); typename Kernel::Construct_segment_2 construct_segment = kernel.construct_segment_2_object(); - typedef boost::optional OptionalPoint_2 ; + typedef std::optional OptionalPoint_2 ; CGAL_STSKEL_BUILDER_TRACE(2, "Computing outer frame margin..." ); @@ -101,16 +101,16 @@ boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPoint // Add a %5 gap, and ceil to get simpler values CGAL_STSKEL_BUILDER_TRACE(4, "outer frame margin: " << approx ); - return boost::optional ( approx ) ; + return std::optional ( approx ) ; } - return boost::none; + return std::nullopt; } // `Traits` first is to help overload resolution in the 3-argument version (see below) template -boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPointIterator aBegin +std::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPointIterator aBegin , ForwardPointIterator aEnd , typename Traits::FT aOffset , Traits const& aTraits @@ -122,7 +122,7 @@ boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPoint } template -boost::optional compute_outer_frame_margin(ForwardPointIterator aBegin, +std::optional compute_outer_frame_margin(ForwardPointIterator aBegin, ForwardPointIterator aEnd, WeightIterator aWBegin, WeightIterator aWEnd, @@ -138,7 +138,7 @@ boost::optional compute_outer_frame_margin(ForwardPointIterator aBegin, } template -boost::optional compute_outer_frame_margin(ForwardPointIterator aBegin, +std::optional compute_outer_frame_margin(ForwardPointIterator aBegin, ForwardPointIterator aEnd, const FT aOffset) { diff --git a/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h b/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h index 78ff0b0368e..4a76f705eb7 100644 --- a/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h @@ -15,7 +15,7 @@ #include -#include +#include namespace CGAL { @@ -31,7 +31,7 @@ namespace CGAL_SS_i { // POSTCONDITION: In case of overflow an empty optional is returned. // template -boost::optional< typename K::Point_2 > +std::optional< typename K::Point_2 > construct_offset_pointC2 ( typename K::FT const& t, Segment_2_with_ID const& e0, typename K::FT const& w0, @@ -45,8 +45,8 @@ construct_offset_pointC2 ( typename K::FT const& t, typedef typename K::Point_2 Point_2 ; typedef typename K::Line_2 Line_2 ; - typedef boost::optional Optional_point_2 ; - typedef boost::optional Optional_line_2 ; + typedef std::optional Optional_point_2 ; + typedef std::optional Optional_line_2 ; FT x(0.0),y(0.0) ; diff --git a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h index b968c287195..9d04a209e26 100644 --- a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include @@ -60,9 +60,9 @@ Trisegment_collinearity trisegment_collinearity_no_exact_constructions(const Seg // we could also have that are_edges_orderly_collinear() returns false, but the computed coefficients // are identical. In that case, we want to return that there is a collinearity, otherwise the internal // computations (even the exact ones) will fail. - boost::optional l0 = compute_normalized_line_coeffC2(e0, caches); - boost::optional l1 = compute_normalized_line_coeffC2(e1, caches); - boost::optional l2 = compute_normalized_line_coeffC2(e2, caches); + std::optional l0 = compute_normalized_line_coeffC2(e0, caches); + std::optional l1 = compute_normalized_line_coeffC2(e1, caches); + std::optional l2 = compute_normalized_line_coeffC2(e2, caches); bool is_01 = (l0->a() == l1->a()) && (l0->b() == l1->b()) && (l0->c() == l1->c()); bool is_02 = (l0->a() == l2->a()) && (l0->b() == l2->b()) && (l0->c() == l2->c()); @@ -141,7 +141,7 @@ inexact_sqrt(const Lazy_exact_nt& lz) // POSTCONDITION: [a,b] is the leftward normal vector. // POSTCONDITION: In case of overflow, an empty optional<> is returned. template -boost::optional< typename K::Line_2> compute_normalized_line_coeffC2( Segment_2 const& e ) +std::optional< typename K::Line_2> compute_normalized_line_coeffC2( Segment_2 const& e ) { typedef typename K::FT FT ; @@ -222,7 +222,7 @@ boost::optional< typename K::Line_2> compute_normalized_line_coeffC2( Segment_2< } template -boost::optional< typename K::Line_2> compute_normalized_line_coeffC2(const Segment_2_with_ID& e) +std::optional< typename K::Line_2> compute_normalized_line_coeffC2(const Segment_2_with_ID& e) { typedef typename K::Segment_2 Segment_2 ; @@ -232,7 +232,7 @@ boost::optional< typename K::Line_2> compute_normalized_line_coeffC2(const Segme } template -boost::optional< typename K::Line_2 > +std::optional< typename K::Line_2 > compute_normalized_line_coeffC2( Segment_2_with_ID const& e, Caches& aCaches ) { @@ -241,7 +241,7 @@ compute_normalized_line_coeffC2( Segment_2_with_ID const& e, if(aCaches.mCoeff_cache.IsCached(e.mID) ) return aCaches.mCoeff_cache.Get(e.mID) ; - boost::optional< Line_2 > rRes = compute_normalized_line_coeffC2 ( e ) ; + std::optional< Line_2 > rRes = compute_normalized_line_coeffC2 ( e ) ; aCaches.mCoeff_cache.Set(e.mID, rRes) ; @@ -251,18 +251,18 @@ compute_normalized_line_coeffC2( Segment_2_with_ID const& e, // @todo weightless coefficients are stored because we use them sometimes weighted, and sometimes // inversely weighted (filtering bound). Should we store them weighted also for speed reasons? template -boost::optional< typename K::Line_2 > compute_weighted_line_coeffC2( Segment_2_with_ID const& e, - typename K::FT const& aWeight, - Caches& aCaches ) +std::optional< typename K::Line_2 > compute_weighted_line_coeffC2( Segment_2_with_ID const& e, + typename K::FT const& aWeight, + Caches& aCaches ) { typedef typename K::FT FT ; typedef typename K::Line_2 Line_2 ; CGAL_precondition( CGAL_NTS is_finite(aWeight) && CGAL_NTS is_positive(aWeight) ) ; - boost::optional< Line_2 > l = compute_normalized_line_coeffC2(e, aCaches); + std::optional< Line_2 > l = compute_normalized_line_coeffC2(e, aCaches); if( ! l ) - return boost::none ; + return std::nullopt ; FT a = l->a() * aWeight ; FT b = l->b() * aWeight ; @@ -274,7 +274,7 @@ boost::optional< typename K::Line_2 > compute_weighted_line_coeffC2( Segment_2_w ) ; if ( !CGAL_NTS is_finite(a) || !CGAL_NTS is_finite(b) || !CGAL_NTS is_finite(c) ) - return boost::none; + return std::nullopt; return cgal_make_optional( K().construct_line_2_object()(a,b,c) ) ; } @@ -328,7 +328,7 @@ construct_trisegment ( Segment_2_with_ID const& e0, // If the lines do not intersect, for example, for collinear edges, or parallel edges but with the same orientation, // returns 0 (the actual distance is undefined in this case, but 0 is a useful return) // -// NOTE: The result is a explicit rational number returned as a tuple (num,den); the caller must check that den!=0 manually +// NOTE: The result is an explicit rational number returned as a tuple (num,den); the caller must check that den!=0 manually // (a predicate for instance should return indeterminate in this case) // // PRECONDITION: None of e0, e1 and e2 are collinear (but two of them can be parallel) @@ -338,14 +338,14 @@ construct_trisegment ( Segment_2_with_ID const& e0, // NOTE: The segments (e0,e1,e2) are stored in the argument as the trisegment st.event() // template -boost::optional< Rational< typename K::FT> > +std::optional< Rational< typename K::FT> > compute_normal_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches ) { typedef typename K::FT FT ; typedef typename K::Line_2 Line_2 ; - typedef boost::optional Optional_line_2 ; + typedef std::optional Optional_line_2 ; CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing normal offset lines isec time [" << typeid(FT).name() << "]") ; CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); @@ -416,7 +416,7 @@ compute_normal_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 -boost::optional< typename K::Point_2 > +std::optional< typename K::Point_2 > compute_oriented_midpoint ( Segment_2_with_ID const& e0, Segment_2_with_ID const& e1 ) { @@ -482,12 +482,12 @@ compute_oriented_midpoint ( Segment_2_with_ID const& e0, // If you request the point of such degenerate pseudo seed the oriented midpoint between e0 and e2 is returned. // template -boost::optional< typename K::Point_2 > +std::optional< typename K::Point_2 > compute_seed_pointC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, typename Trisegment_2 >::SEED_ID sid, Caches& aCaches) { - boost::optional< typename K::Point_2 > p ; + std::optional< typename K::Point_2 > p ; typedef Trisegment_2 > Trisegment_2 ; @@ -521,7 +521,7 @@ compute_seed_pointC2 ( Trisegment_2_ptr< Trisegment_2 > // of the degenerate seed. // A normal collinearity occurs when e0,e1 or e1,e2 are collinear. template -boost::optional< typename K::Point_2 > +std::optional< typename K::Point_2 > construct_degenerate_seed_pointC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches ) { @@ -529,7 +529,7 @@ construct_degenerate_seed_pointC2 ( Trisegment_2_ptr< Trisegment_2 -boost::optional< Rational< typename K::FT> > +std::optional< Rational< typename K::FT> > compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches ) { @@ -541,7 +541,7 @@ compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 Optional_line_2 ; + typedef std::optional Optional_line_2 ; CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing artificial isec time [" << typeid(FT).name() << "]"); CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); @@ -551,15 +551,15 @@ compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2e0(), tri->w0(), aCaches) ; if( !l0 ) - return boost::none ; + return std::nullopt; const Segment_2& contour_seg = tri->e0(); Direction_2 perp_dir ( contour_seg.source().y() - contour_seg.target().y() , contour_seg.target().x() - contour_seg.source().x() ) ; - boost::optional< typename K::Point_2 > seed = construct_offset_lines_isecC2(tri->child_l(), aCaches ) ; + std::optional< typename K::Point_2 > seed = construct_offset_lines_isecC2(tri->child_l(), aCaches ) ; if(!seed) - return boost::none; + return std::nullopt; const Ray_2 ray(*seed, perp_dir); const Segment_2& opp_seg = tri->e2(); @@ -572,7 +572,7 @@ compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2(&*inter_res)) + if(const Segment_2* seg = std::get_if(&*inter_res)) { // get the segment extremity closest to the seed Boolean res = (K().compare_distance_2_object()(*seed, seg->source(), seg->target()) == CGAL::SMALLER); @@ -581,9 +581,9 @@ compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2(&*inter_res); + const Point_2* inter_pt = std::get_if(&*inter_res); if(!CGAL_NTS is_finite(inter_pt->x()) || !CGAL_NTS is_finite(inter_pt->y())) - return boost::none; + return std::nullopt; t = l0->a() * inter_pt->x() + l0->b() * inter_pt->y() + l0->c() ; } @@ -596,13 +596,13 @@ compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 -boost::optional< Rational< typename K::FT> > +std::optional< Rational< typename K::FT> > compute_degenerate_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches ) { @@ -611,8 +611,8 @@ compute_degenerate_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 Optional_point_2 ; - typedef boost::optional Optional_line_2 ; + typedef std::optional Optional_point_2 ; + typedef std::optional Optional_line_2 ; if(tri->e0() == tri->e1()) // marker for artificial bisectors: they have the same face on both sides return compute_artifical_isec_timeC2(tri, aCaches) ; @@ -752,19 +752,18 @@ compute_degenerate_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 Returning 0/0 (no event)"); - // if we return boost::none, exist_offset_lines_isec2() will think it's a numerical error return cgal_make_optional(Rational(FT(0),FT(0))) ; } } - return boost::none; + return std::nullopt; } // // Calls the appropriate function depending on the collinearity of the edges. // template -boost::optional< Rational< typename K::FT > > +std::optional< Rational< typename K::FT > > compute_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches ) { @@ -776,7 +775,7 @@ compute_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2collinearity() != TRISEGMENT_COLLINEARITY_ALL ) ; - boost::optional< Rational > rRes = + std::optional< Rational > rRes = tri->collinearity() == TRISEGMENT_COLLINEARITY_NONE ? compute_normal_offset_lines_isec_timeC2 (tri, aCaches) : compute_degenerate_offset_lines_isec_timeC2(tri, aCaches); @@ -797,7 +796,7 @@ compute_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 -boost::optional< typename K::Point_2 > +std::optional< typename K::Point_2 > construct_normal_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches) { @@ -805,7 +804,7 @@ construct_normal_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 Optional_line_2 ; + typedef std::optional Optional_line_2 ; CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing normal offset lines isec point [" << typeid(FT).name() << "]"); CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); @@ -851,7 +850,7 @@ construct_normal_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 -boost::optional< typename K::Point_2 > +std::optional< typename K::Point_2 > construct_artifical_isecC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches ) { @@ -869,23 +868,23 @@ construct_artifical_isecC2 ( Trisegment_2_ptr< Trisegment_2e0(); Direction_2 perp_dir ( contour_seg.source().y() - contour_seg.target().y() , contour_seg.target().x() - contour_seg.source().x() ) ; - boost::optional< typename K::Point_2 > seed = construct_offset_lines_isecC2(tri->child_l(), aCaches) ; + std::optional< typename K::Point_2 > seed = construct_offset_lines_isecC2(tri->child_l(), aCaches) ; if(!seed) - return boost::none; + return std::nullopt; const Ray_2 ray(*seed, perp_dir); const Segment_2& opp_seg = tri->e2(); auto inter_res = K().intersect_2_object()(ray, opp_seg); if (!inter_res) // shouldn't be here if there is no intersection - return boost::none; + return std::nullopt; - if(const Point_2* inter_pt = boost::get(&*inter_res)) + if(const Point_2* inter_pt = std::get_if(&*inter_res)) { bool ok = CGAL_NTS is_finite(inter_pt->x()) && CGAL_NTS is_finite(inter_pt->y()) ; return cgal_make_optional(ok, *inter_pt) ; } - else if(const Segment_2* seg = boost::get(&*inter_res)) + else if(const Segment_2* seg = std::get_if(&*inter_res)) { // get the segment extremity closest to the seed const Point_2& pt = (K().compare_distance_2_object()(*seed, @@ -895,7 +894,7 @@ construct_artifical_isecC2 ( Trisegment_2_ptr< Trisegment_2 -boost::optional< typename K::Point_2 > +std::optional< typename K::Point_2 > construct_degenerate_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches) { @@ -920,8 +919,8 @@ construct_degenerate_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 Optional_point_2 ; - typedef boost::optional Optional_line_2 ; + typedef std::optional Optional_point_2 ; + typedef std::optional Optional_line_2 ; if(tri->e0() == tri->e1()) // marker for artificial bisectors: they have the same face on both sides return construct_artifical_isecC2(tri, aCaches) ; @@ -1021,7 +1020,7 @@ construct_degenerate_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 -boost::optional< typename K::Point_2 > +std::optional< typename K::Point_2 > construct_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Caches& aCaches ) { @@ -1034,7 +1033,7 @@ construct_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2collinearity() != TRISEGMENT_COLLINEARITY_ALL ) ; - boost::optional< Point_2 > rRes = + std::optional< Point_2 > rRes = tri->collinearity() == TRISEGMENT_COLLINEARITY_NONE ? construct_normal_offset_lines_isecC2 (tri, aCaches) : construct_degenerate_offset_lines_isecC2(tri, aCaches); diff --git a/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h b/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h index 5e1401c12c8..bbdf0d15853 100644 --- a/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h +++ b/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h @@ -29,9 +29,9 @@ #include #include -#include +#include #include -#include +#include #include #include @@ -44,7 +44,7 @@ namespace CGAL { namespace CGAL_SS_i { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_partial_interior_straight_skeleton_2 ( FT const& aMaxTime , PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -67,7 +67,7 @@ create_partial_interior_straight_skeleton_2 ( FT const& aMaxTime Cartesian_converter conv ; typename InputKernel::FT lMaxTime = aMaxTime; - boost::optional lOptMaxTime(conv(lMaxTime)) ; + std::optional lOptMaxTime(conv(lMaxTime)) ; SsBuilder ssb( lOptMaxTime ) ; @@ -80,7 +80,7 @@ create_partial_interior_straight_skeleton_2 ( FT const& aMaxTime } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin , PointIterator aVerticesEnd @@ -93,7 +93,7 @@ create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset typedef typename Kernel_traits::Kernel IK; typedef typename IK::FT IFT; - boost::shared_ptr > rSkeleton; + std::shared_ptr > rSkeleton; // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) @@ -101,7 +101,7 @@ create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset // @todo This likely should be done in the kernel K rather than the input kernel (i.e. the same // converter stuff that is done in `create_partial_exterior_straight_skeleton_2`?). - boost::optional margin = compute_outer_frame_margin(aVerticesBegin, + std::optional margin = compute_outer_frame_margin(aVerticesBegin, aVerticesEnd, lOffset); @@ -139,10 +139,10 @@ create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset // Kernel != Skeleton::kernel. The skeleton is converted to Straight_skeleton_2 // template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Tag_false ) { - typedef boost::shared_ptr OutPolygonPtr ; + typedef std::shared_ptr OutPolygonPtr ; typedef std::vector OutPolygonPtrVector ; typedef Straight_skeleton_2 OfSkeleton ; @@ -152,7 +152,7 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Ta OutPolygonPtrVector rR ; - boost::shared_ptr lConvertedSs = convert_straight_skeleton_2(aSs); + std::shared_ptr lConvertedSs = convert_straight_skeleton_2(aSs); OffsetBuilder ob( *lConvertedSs ); ob.construct_offset_contours(aOffset, std::back_inserter(rR) ) ; @@ -163,10 +163,10 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Ta // Kernel == Skeleton::kernel, no conversion // template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k*/, Tag_true ) { - typedef boost::shared_ptr OutPolygonPtr ; + typedef std::shared_ptr OutPolygonPtr ; typedef std::vector OutPolygonPtrVector ; typedef Polygon_offset_builder_traits_2 OffsetBuilderTraits; @@ -182,7 +182,7 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k* // Allow failure due to invalid straight skeletons to go through the users template -Skeleton const& dereference ( boost::shared_ptr const& ss ) +Skeleton const& dereference ( std::shared_ptr const& ss ) { CGAL_precondition(ss.get() != 0); return *ss; @@ -191,7 +191,7 @@ Skeleton const& dereference ( boost::shared_ptr const& ss ) } // namespace CGAL_SS_i template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_offset_polygons_2(const FT& aOffset, const Skeleton& aSs, @@ -203,7 +203,7 @@ create_offset_polygons_2(const FT& aOffset, template, class FT, class Skeleton> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_offset_polygons_2(const FT& aOffset, const Skeleton& aSs) @@ -218,7 +218,7 @@ create_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aOuterBoundary, @@ -242,7 +242,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aOuterBoundary, @@ -259,7 +259,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overload where Polygon actually is a simple polygon (no holes) template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -277,7 +277,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overloads common to both polygons with and without holes, a simple polygon is returned in any case template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -290,7 +290,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly) @@ -309,7 +309,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overload where Polygon actually is a simple polygon (no holes) template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -332,7 +332,7 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overloads common to both polygons with and without holes, a simple polygons is returned in any case template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -345,7 +345,7 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly) diff --git a/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h b/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h index 09e77e732d5..ccedabda0b5 100644 --- a/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -38,7 +38,7 @@ namespace CGAL { // overload where PolygonWithHoles actually is a type of Polygon that supports holes template::type> // Hole-less polygon type -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const PolygonWithHoles& aPoly, @@ -57,7 +57,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Polygon might be a Polygon with holes or not, but it returns a Polygon with holes template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -70,7 +70,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -83,7 +83,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly) @@ -102,7 +102,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, // Polygon might be a Polygon with holes or not, but it returns a Polygon with holes template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -110,14 +110,14 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const SsK& ssk) { typedef typename CGAL_SS_i::Default_return_polygon_type::type Polygon_; - std::vector > raw_output = + std::vector > raw_output = create_exterior_skeleton_and_offset_polygons_2(aOffset, aPoly, ofk, ssk); // filter offset of the outer frame std::swap(raw_output[0], raw_output.back()); raw_output.pop_back(); - for (boost::shared_ptr ptr : raw_output) + for (std::shared_ptr ptr : raw_output) ptr->reverse_orientation(); return arrange_offset_polygons_2(raw_output); @@ -128,7 +128,7 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, // overload where PolygonWithHoles actually is a type of Polygon that supports holes template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const PolygonWithHoles& aPoly, @@ -137,14 +137,14 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, std::enable_if_t< CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) { - std::vector > polygons = + std::vector > polygons = create_exterior_skeleton_and_offset_polygons_2(aOffset, aPoly.outer_boundary(), ofk, ssk); for (typename PolygonWithHoles::Hole_const_iterator hit=aPoly.holes_begin(); hit!=aPoly.holes_end(); ++hit) { typename PolygonWithHoles::Polygon_2 hole = *hit; hole.reverse_orientation(); - std::vector > hole_polygons = + std::vector > hole_polygons = create_interior_skeleton_and_offset_polygons_2(aOffset, hole, ofk,ssk); @@ -156,7 +156,7 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -169,7 +169,7 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly) diff --git a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h index 8ef95ed7564..c65e61ffc8c 100644 --- a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -33,7 +33,7 @@ namespace CGAL { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd , HoleIterator aHolesBegin @@ -63,7 +63,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > +std::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -80,7 +80,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -100,7 +100,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -113,7 +113,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( Polygon const& aOutContour, K const& k, @@ -127,7 +127,7 @@ create_interior_straight_skeleton_2 ( Polygon const& aOutContour, } template -boost::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > +std::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > inline create_interior_straight_skeleton_2 ( Polygon const& aOutContour ) { @@ -140,7 +140,7 @@ create_interior_straight_skeleton_2 ( Polygon const& aOutContour ) /// EXTERIOR template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin , PointIterator aVerticesEnd @@ -153,7 +153,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset typedef typename Kernel_traits::Kernel IK; typedef typename IK::FT IFT; - boost::shared_ptr > rSkeleton; + std::shared_ptr > rSkeleton; // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) @@ -161,7 +161,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset // @todo This likely should be done in the kernel K rather than the input kernel (i.e. the same // converter stuff that is done in `create_partial_exterior_straight_skeleton_2`?). - boost::optional margin = compute_outer_frame_margin( aVerticesBegin, + std::optional margin = compute_outer_frame_margin( aVerticesBegin, aVerticesEnd, lOffset ); @@ -196,7 +196,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin @@ -211,7 +211,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly, K const& k ) { @@ -223,7 +223,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly ) { diff --git a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h index 490ca07788a..ae229d32e44 100644 --- a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h @@ -20,14 +20,14 @@ #include -#include +#include #include namespace CGAL { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( Polygon const& aPolyWithHoles, K const& k, diff --git a/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_2.h b/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_2.h index 19852c88904..d2553849475 100644 --- a/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_2.h +++ b/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_2.h @@ -30,9 +30,7 @@ #include #include -#include #include -#include #include #include @@ -62,7 +60,7 @@ namespace CGAL_SS_i { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_partial_interior_weighted_straight_skeleton_2 ( const FT& aMaxTime, PointIterator aOuterContour_VerticesBegin, PointIterator aOuterContour_VerticesEnd, @@ -94,7 +92,7 @@ create_partial_interior_weighted_straight_skeleton_2 ( const FT& aMaxTime, NT_converter wconv; InputFT lMaxTime = aMaxTime; - boost::optional lOptMaxTime(conv(lMaxTime)) ; + std::optional lOptMaxTime(conv(lMaxTime)) ; SsBuilder ssb( lOptMaxTime ) ; @@ -113,7 +111,7 @@ create_partial_interior_weighted_straight_skeleton_2 ( const FT& aMaxTime, } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_partial_exterior_weighted_straight_skeleton_2(const FT& aMaxOffset, PointIterator aVerticesBegin, PointIterator aVerticesEnd, @@ -129,7 +127,7 @@ create_partial_exterior_weighted_straight_skeleton_2(const FT& aMaxOffset, typedef typename Kernel_traits::Kernel IK; typedef typename IK::FT IFT; - boost::shared_ptr > rSkeleton; + std::shared_ptr > rSkeleton; // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) @@ -137,7 +135,7 @@ create_partial_exterior_weighted_straight_skeleton_2(const FT& aMaxOffset, // @todo This likely should be done in the kernel K rather than the input kernel (i.e. the same // converter stuff that is done in `create_partial_exterior_straight_skeleton_2`?). - boost::optional margin = compute_outer_frame_margin(aVerticesBegin, + std::optional margin = compute_outer_frame_margin(aVerticesBegin, aVerticesEnd, aWeightsBegin, aWeightsEnd, @@ -205,7 +203,7 @@ create_partial_exterior_weighted_straight_skeleton_2(const FT& aMaxOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aOuterBoundary, @@ -256,7 +254,7 @@ create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aOuterBoundary, @@ -275,7 +273,7 @@ create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, // Overload where Polygon actually is a simple polygon (no holes) template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -295,7 +293,7 @@ create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, // Overloads common to both polygons with and without holes, a simple polygon is returned in any case template::type> -std::vector > +std::vector > inline create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -309,7 +307,7 @@ create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -329,7 +327,7 @@ create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, // Overload where Polygon actually is a simple polygon (no holes) template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -355,7 +353,7 @@ create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, // Overloads common to both polygons with and without holes, a simple polygons is returned in any case template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -369,7 +367,7 @@ create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, diff --git a/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h b/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h index 24420366e9b..51e1fd3752e 100644 --- a/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h @@ -21,10 +21,9 @@ #include -#include - #include #include +#include namespace CGAL { @@ -38,7 +37,7 @@ namespace CGAL { // overload where PolygonWithHoles actually is a type of Polygon that supports holes template::type> // Hole-less polygon type -std::vector > +std::vector > inline create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const PolygonWithHoles& aPoly, @@ -61,7 +60,7 @@ create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, // Polygon might be a Polygon with holes or not, but it returns a Polygon with holes template::type> -std::vector > +std::vector > inline create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -75,7 +74,7 @@ create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOf template::type> -std::vector > +std::vector > inline create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -89,7 +88,7 @@ create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOf template::type> -std::vector > +std::vector > inline create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -109,7 +108,7 @@ create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOf // Polygon might be a Polygon with holes or not, but it returns a Polygon with holes template::type> -std::vector > +std::vector > create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, const Weights& aWeights, @@ -117,14 +116,14 @@ create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOf const SsK& ssk) { typedef typename CGAL_SS_i::Default_return_polygon_type::type Polygon_; - std::vector > raw_output = + std::vector > raw_output = create_exterior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly, aWeights, ofk, ssk); // filter offset of the outer frame std::swap(raw_output[0], raw_output.back()); raw_output.pop_back(); - for(boost::shared_ptr ptr : raw_output) + for(std::shared_ptr ptr : raw_output) ptr->reverse_orientation(); return arrange_offset_polygons_2(raw_output); @@ -135,7 +134,7 @@ create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOf // overload where PolygonWithHoles actually is a type of Polygon that supports holes template::type> -std::vector > +std::vector > inline create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, const PolygonWithHoles& aPoly, @@ -147,7 +146,7 @@ create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, { CGAL_precondition(aWeights.size() == aPoly.number_of_holes() + 1); - std::vector > polygons = + std::vector > polygons = create_exterior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly.outer_boundary(), {aWeights[0]}, ofk, ssk); std::size_t weight_pos = 1; @@ -155,7 +154,7 @@ create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, { typename PolygonWithHoles::Polygon_2 hole = *hit; hole.reverse_orientation(); - std::vector > hole_polygons = + std::vector > hole_polygons = create_interior_skeleton_and_offset_polygons_2(aOffset, hole, {aWeights[weight_pos]}, @@ -168,7 +167,7 @@ create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -182,7 +181,7 @@ create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOf template::type> -std::vector > +std::vector > inline create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, diff --git a/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h b/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h index 660cb8cb317..85c4cd6b99e 100644 --- a/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h @@ -22,9 +22,8 @@ #include #include -#include -#include - +#include +#include #include #include #include @@ -34,7 +33,7 @@ namespace CGAL { template -boost::shared_ptr > +std::shared_ptr > create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, HoleIterator holes_begin, @@ -80,7 +79,7 @@ create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertice template -boost::shared_ptr > +std::shared_ptr > inline create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, @@ -101,7 +100,7 @@ create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertice template -boost::shared_ptr > +std::shared_ptr > inline create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, @@ -129,7 +128,7 @@ create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertice template -boost::shared_ptr > +std::shared_ptr > inline create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, @@ -146,7 +145,7 @@ create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertice template -boost::shared_ptr > +std::shared_ptr > inline create_interior_weighted_straight_skeleton_2(const Polygon& out_contour, const Weights& weights, @@ -162,7 +161,7 @@ create_interior_weighted_straight_skeleton_2(const Polygon& out_contour, template -boost::shared_ptr > +std::shared_ptr > inline create_interior_weighted_straight_skeleton_2(const Polygon& out_contour, const Weights& weights) @@ -181,7 +180,7 @@ template -boost::shared_ptr > +std::shared_ptr > create_exterior_weighted_straight_skeleton_2(const FT& max_offset, PointIterator vertices_begin, PointIterator vertices_end, @@ -196,7 +195,7 @@ create_exterior_weighted_straight_skeleton_2(const FT& max_offset, using IK = typename Kernel_traits::Kernel; using IFT = typename IK::FT; - boost::shared_ptr > skeleton; + std::shared_ptr > skeleton; // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) @@ -204,7 +203,7 @@ create_exterior_weighted_straight_skeleton_2(const FT& max_offset, // @todo This likely should be done in the kernel K rather than the input kernel(i.e. the same // converter stuff that is done in `create_partial_exterior_straight_skeleton_2`?). - boost::optional margin = compute_outer_frame_margin(vertices_begin, + std::optional margin = compute_outer_frame_margin(vertices_begin, vertices_end, weights_begin, weights_end, @@ -262,7 +261,7 @@ create_exterior_weighted_straight_skeleton_2(const FT& max_offset, template -boost::shared_ptr > +std::shared_ptr > inline create_exterior_weighted_straight_skeleton_2(const FT& max_offset, PointIterator vertices_begin, @@ -282,7 +281,7 @@ template -boost::shared_ptr > +std::shared_ptr > inline create_exterior_weighted_straight_skeleton_2(const FT& max_offset, const Polygon& aPoly, @@ -300,7 +299,7 @@ create_exterior_weighted_straight_skeleton_2(const FT& max_offset, template -boost::shared_ptr > +std::shared_ptr > inline create_exterior_weighted_straight_skeleton_2(const FT& max_offset, Weights& weights, diff --git a/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h b/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h index e6a2fea13b1..acc2046f2a6 100644 --- a/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h @@ -20,8 +20,6 @@ #include -#include - #include namespace CGAL { @@ -29,7 +27,7 @@ namespace CGAL { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_weighted_straight_skeleton_2(const Polygon& poly_with_holes, const Weights& weights, diff --git a/Straight_skeleton_2/include/CGAL/predicates/Polygon_offset_pred_ftC2.h b/Straight_skeleton_2/include/CGAL/predicates/Polygon_offset_pred_ftC2.h index 2d5da206dd6..15833558170 100644 --- a/Straight_skeleton_2/include/CGAL/predicates/Polygon_offset_pred_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/predicates/Polygon_offset_pred_ftC2.h @@ -17,7 +17,7 @@ #include #include -#include +#include namespace CGAL { @@ -37,7 +37,7 @@ compare_offset_against_isec_timeC2 ( typename K::FT const& t, typedef Rational Rational ; typedef Quotient Quotient ; - typedef boost::optional Optional_rational ; + typedef std::optional Optional_rational ; Uncertain rResult = Uncertain::indeterminate(); diff --git a/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h b/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h index bdd371ea370..30578659b4a 100644 --- a/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include @@ -129,12 +129,12 @@ Uncertain certified_side_of_oriented_lineC2(const FT &a, const FT &b, cons // template Uncertain exist_offset_lines_isec2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, - boost::optional const& aMaxTime, + std::optional const& aMaxTime, Caches& aCaches ) { typedef Rational Rational ; - typedef boost::optional Optional_rational ; + typedef std::optional Optional_rational ; typedef Quotient Quotient ; Uncertain rResult = Uncertain::indeterminate(); @@ -203,7 +203,7 @@ compare_offset_lines_isec_timesC2 ( Trisegment_2_ptr< Trisegment_2 Rational ; typedef Quotient Quotient ; - typedef boost::optional Optional_rational ; + typedef std::optional Optional_rational ; CGAL_STSKEL_TRAITS_TRACE("compare_offset_lines_isec_timesC2(\n" << m << "\n" << n << "\n) [" << typeid(FT).name() << "]" ); @@ -259,7 +259,7 @@ Uncertain compare_isec_anglesC2 ( Vector_2 const& aBV1 // Returns true if the point aP is on the positive side of the line supporting the edge // template -Uncertain is_edge_facing_pointC2 ( boost::optional< typename K::Point_2 > const& aP, +Uncertain is_edge_facing_pointC2 ( std::optional< typename K::Point_2 > const& aP, Segment_2_with_ID const& aEdge ) { typedef typename K::FT FT ; @@ -486,8 +486,8 @@ Uncertain are_events_simultaneousC2 ( Trisegment_2_ptr< Trisegment_2 Rational ; typedef Quotient Quotient ; - typedef boost::optional Optional_rational ; - typedef boost::optional Optional_point_2 ; + typedef std::optional Optional_rational ; + typedef std::optional Optional_point_2 ; Uncertain rResult = Uncertain::indeterminate(); diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_offset_builder_types.h b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_offset_builder_types.h index e4470f20366..7f6217477a8 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_offset_builder_types.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_offset_builder_types.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; @@ -29,10 +29,10 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 Point; typedef CGAL::Aff_transformation_2 Transformation; typedef std::vector Polygon_2; -typedef boost::shared_ptr PolygonPtr; +typedef std::shared_ptr PolygonPtr; typedef CGAL::Segment_2 Segment; typedef std::vector Region ; -typedef boost::shared_ptr RegionPtr ; +typedef std::shared_ptr RegionPtr ; typedef std::vector Regions ; typedef std::vector Doubles ; @@ -51,7 +51,7 @@ typedef Sls::Vertex_const_handle Vertex_const_handle ; typedef CGAL::HalfedgeDS_const_decorator Sls_const_decorator ; -typedef boost::shared_ptr SlsPtr ; +typedef std::shared_ptr SlsPtr ; #endif diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_builder_types.h b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_builder_types.h index f41d7f30f81..7a77342eba1 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_builder_types.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_builder_types.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include //typedef CGAL::Simple_cartesian K ; @@ -30,10 +30,10 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 Point; typedef CGAL::Aff_transformation_2 Transformation; typedef std::vector Polygon_2; -typedef boost::shared_ptr PolygonPtr; +typedef std::shared_ptr PolygonPtr; typedef CGAL::Segment_2 Segment; typedef std::vector Region ; -typedef boost::shared_ptr RegionPtr ; +typedef std::shared_ptr RegionPtr ; typedef std::vector Regions ; typedef std::vector Doubles ; @@ -50,7 +50,7 @@ typedef Sls::Vertex_const_handle Vertex_const_handle ; typedef CGAL::HalfedgeDS_const_decorator Sls_const_decorator ; -typedef boost::shared_ptr SlsPtr ; +typedef std::shared_ptr SlsPtr ; #endif diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_traits_aux.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_traits_aux.cpp index d0e20ac5195..8d2fca8ccb1 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_traits_aux.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_traits_aux.cpp @@ -36,7 +36,7 @@ void report( int idx, bool ok, std::string const& info = std::string("") ) bool exist_event( Traits const& aTraits, triple const& aTriple ) { - boost::optional lMaxTime ; + std::optional lMaxTime ; return aTraits.do_ss_event_exist_2_object()(aTriple.trisegment(), lMaxTime ); } diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h index 6d45351087d..ab345149ecf 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -50,16 +50,16 @@ typedef std::vector Doubles ; typedef CGAL::Segment_2 ISegment; typedef std::vector IPolygon; -typedef boost::shared_ptr IPolygonPtr; +typedef std::shared_ptr IPolygonPtr; typedef std::vector IRegion ; -typedef boost::shared_ptr IRegionPtr ; +typedef std::shared_ptr IRegionPtr ; typedef std::vector IRegions ; typedef CGAL::Segment_2 OSegment; typedef std::vector OPolygon; -typedef boost::shared_ptr OPolygonPtr; +typedef std::shared_ptr OPolygonPtr; typedef std::vector ORegion ; -typedef boost::shared_ptr ORegionPtr ; +typedef std::shared_ptr ORegionPtr ; typedef std::vector ORegions ; typedef CGAL::Straight_skeleton_2 ISls; @@ -157,8 +157,8 @@ public: typedef CGAL::HalfedgeDS_const_decorator Sls_const_decorator ; -typedef boost::shared_ptr ISlsPtr ; -typedef boost::shared_ptr OSlsPtr ; +typedef std::shared_ptr ISlsPtr ; +typedef std::shared_ptr OSlsPtr ; typedef CGAL::Straight_skeleton_items_converter_2 SlsItemsConverter ; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/issue4533.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/issue4533.cpp index 6ff6900890b..a007bba554e 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/issue4533.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/issue4533.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include @@ -15,7 +15,7 @@ typedef K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Straight_skeleton_2 Ss; -typedef boost::shared_ptr SsPtr; +typedef std::shared_ptr SsPtr; int main() { diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/issue4684.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/issue4684.cpp index 560d8c01403..47dd764e525 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/issue4684.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/issue4684.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -13,7 +13,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; -typedef boost::shared_ptr PolygonPtr; +typedef std::shared_ptr PolygonPtr; void low_precision_run() { diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp index 8737bd07748..62f7b6afef9 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp @@ -83,7 +83,7 @@ void test(const PointRange& points, K()); assert(ss_ptr); - std::vector > offset_polygons_ptrs = + std::vector > offset_polygons_ptrs = CGAL::create_offset_polygons_2(FT(offset), CGAL::CGAL_SS_i::dereference(ss_ptr), K()); std::cout << offset_polygons_ptrs.size() << " polygon(s)" << std::endl; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/issue7284.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/issue7284.cpp index cce6771f7a5..5d1fd32522a 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/issue7284.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/issue7284.cpp @@ -10,8 +10,6 @@ #include #include -#include - #include #include #include @@ -183,7 +181,7 @@ void test(const std::vector& x, CGAL::draw(ipoly); - boost::shared_ptr< CGAL::Straight_skeleton_2 > skeleton = CGAL::create_interior_straight_skeleton_2(ipoly, I_Kernel()); + std::shared_ptr< CGAL::Straight_skeleton_2 > skeleton = CGAL::create_interior_straight_skeleton_2(ipoly, I_Kernel()); if(!skeleton) { diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp index fc31a362ca4..a3806b61235 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp @@ -312,7 +312,7 @@ IRegionPtr load_region( string file, int aShift, int& rStatus ) return rRegion ; } -void update_bbox ( IRegionPtr const& aRegion, boost::optional& rBBox ) +void update_bbox ( IRegionPtr const& aRegion, std::optional& rBBox ) { if ( aRegion ) { @@ -393,7 +393,7 @@ string change_extension ( string aFilename, string aNewExt ) void dump_to_eps ( TestCase const& aCase ) { - boost::optional lBBox ; + std::optional lBBox ; update_bbox(aCase.Inner.Input, lBBox ) ; update_bbox(aCase.Outer.Input, lBBox ) ; @@ -574,7 +574,7 @@ IPolygonPtr create_outer_frame ( IPolygon const& aOuter ) IFT lOffset = s * 0.3 ; - boost::optional lOptMargin = compute_outer_frame_margin(aOuter.begin(),aOuter.end(),lOffset) ; + std::optional lOptMargin = compute_outer_frame_margin(aOuter.begin(),aOuter.end(),lOffset) ; if ( lOptMargin ) { @@ -664,7 +664,7 @@ bool is_skeleton_valid( IRegion const& aRegion, ISls const& aSkeleton, bool is_p } -int create_skeleton ( Zone& rZone, boost::optional const& aMaxTime = boost::optional() ) +int create_skeleton ( Zone& rZone, std::optional const& aMaxTime = std::optional() ) { int rStatus = cUnknown ; @@ -739,7 +739,7 @@ int test_zone ( Zone& rZone ) if ( sMaxTime > 0 ) { - boost::optional lMaxTime = static_cast(sMaxTime) ; + std::optional lMaxTime = static_cast(sMaxTime) ; rStatus = create_skeleton(rZone,lMaxTime) ; } else diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_offset.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_offset.cpp index 48f92c02c14..298b612fa79 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_offset.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_offset.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include @@ -44,10 +44,10 @@ void test_API() Polygon_2 p; Polygon_with_holes_2 pwh; - std::vector< boost::shared_ptr > res; - std::vector< boost::shared_ptr > res_EPICK; - std::vector< boost::shared_ptr > res_w; - std::vector< boost::shared_ptr > res_w_EPICK; + std::vector< std::shared_ptr > res; + std::vector< std::shared_ptr > res_EPICK; + std::vector< std::shared_ptr > res_w; + std::vector< std::shared_ptr > res_w_EPICK; // First kernel is the offset construction (and thus output kernel), second kernel is the skeleton construction @@ -119,7 +119,7 @@ void test_API() } template -bool is_valid(const boost::shared_ptr& ss) +bool is_valid(const std::shared_ptr& ss) { typedef typename StraightSkeleton::Traits::Point_2 Point; @@ -160,7 +160,7 @@ void test_offset_square() typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; - typedef boost::shared_ptr Polygon_ptr; + typedef std::shared_ptr Polygon_ptr; typedef std::vector Polygon_ptr_container; typedef CGAL::Straight_skeleton_2 Ss; @@ -177,7 +177,7 @@ void test_offset_square() Skeleton_builder ssb; ssb.enter_contour(square.begin(), square.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); Polygon_ptr_container offset_polys = @@ -200,7 +200,7 @@ void test_offset_four_square_holes() typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; Polygon_2 outer, hole1, hole2, hole3, hole4; @@ -259,7 +259,7 @@ void test_offset_L() typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; - typedef boost::shared_ptr Polygon_ptr; + typedef std::shared_ptr Polygon_ptr; typedef std::vector Polygon_ptr_container; typedef CGAL::Straight_skeleton_2 Ss; @@ -280,7 +280,7 @@ void test_offset_L() Skeleton_builder ssb; ssb.enter_contour(L.begin(), L.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); Polygon_ptr_container offset_polys = @@ -304,7 +304,7 @@ void test_offset_polygon_with_hole() typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; // Square with a non-centered square hole @@ -393,7 +393,7 @@ void test_offset_pinched() typedef typename K::FT FT; typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; - typedef boost::shared_ptr Polygon_ptr; + typedef std::shared_ptr Polygon_ptr; typedef std::vector Polygon_ptrs; typedef CGAL::Straight_skeleton_2 Ss; @@ -431,7 +431,7 @@ void test_offset_pinched() Skeleton_builder ssb; ssb.enter_contour(input.begin(), input.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); // The two splitting fronts meet in the middle, and at that time, @@ -474,7 +474,7 @@ void test_offset_multiple_CCs() typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef CGAL::Polygon_2 Contour; - typedef boost::shared_ptr ContourPtr; + typedef std::shared_ptr ContourPtr; typedef std::vector Contour_sequence; typedef CGAL::Straight_skeleton_2 Ss; @@ -501,7 +501,7 @@ void test_offset_multiple_CCs() std::vector input(pts, pts+12); const FT offset = 50; - boost::optional margin = CGAL::compute_outer_frame_margin(input.begin(), input.end(), offset); + std::optional margin = CGAL::compute_outer_frame_margin(input.begin(), input.end(), offset); assert(margin); // Get the bbox of the polygon @@ -526,7 +526,7 @@ void test_offset_multiple_CCs() ssb.enter_contour(frame, frame+4); ssb.enter_contour(input.rbegin(), input.rend()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); Contour_sequence offset_contours; @@ -548,7 +548,7 @@ void test_offset_non_manifold() typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_ptr; + typedef std::shared_ptr Polygon_with_holes_ptr; typedef std::vector Polygon_with_holes_ptrs; typedef CGAL::Straight_skeleton_2 Ss; @@ -572,7 +572,7 @@ void test_offset_non_manifold() ssb.enter_contour(outer.begin(), outer.end()); ssb.enter_contour(hole.begin(), hole.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); // The two splitting fronts meet in the middle, and at that time, @@ -631,7 +631,7 @@ void test_offset_non_manifold_2() typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_ptr; + typedef std::shared_ptr Polygon_with_holes_ptr; typedef std::vector Polygon_with_holes_ptrs; typedef CGAL::Straight_skeleton_2 Ss; @@ -663,7 +663,7 @@ void test_offset_non_manifold_2() ssb.enter_contour(outer.begin(), outer.end()); ssb.enter_contour(hole.begin(), hole.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); // Similar to the previous function, a split event happens and at that particular time, @@ -717,7 +717,7 @@ void test_offset_polygon_exterior() typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; Polygon_2 poly; @@ -799,7 +799,7 @@ void test_offset_polygon_with_holes_exterior() typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; Polygon_2 outer ; @@ -840,7 +840,7 @@ void test_offset(const char* filename, typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; typedef CGAL::Straight_skeleton_2 Ss; @@ -905,7 +905,7 @@ void test_offset(const char* filename, ssb.enter_contour(polys[i+1].begin(), polys[i+1].end()); } - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); if(skeleton_only) diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_previous_issues.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_previous_issues.cpp index b1702cd881f..bd12f9b3c91 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_previous_issues.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_previous_issues.cpp @@ -5,15 +5,13 @@ #include #include -#include - typedef CGAL::Exact_predicates_inexact_constructions_kernel K ; typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; // Issue #39 on CB Polygon_2 data_0() diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_simple.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_simple.cpp index c6ed9f99dc2..d90bc8adf5f 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_simple.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_simple.cpp @@ -34,7 +34,7 @@ void Straight_skeleton_traits_external_trace(std::string m) #include #include -#include +#include #include #include @@ -53,10 +53,10 @@ void test_API() typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; typedef CGAL::Straight_skeleton_2 Straight_skeleton_EPICK; - typedef boost::shared_ptr Straight_skeleton_Ptr_EPICK; + typedef std::shared_ptr Straight_skeleton_Ptr_EPICK; typedef CGAL::Straight_skeleton_2 Straight_skeleton; - typedef boost::shared_ptr Straight_skeleton_Ptr; + typedef std::shared_ptr Straight_skeleton_Ptr; Polygon_2 p; Straight_skeleton_Ptr_EPICK ss0 = CGAL::create_interior_straight_skeleton_2(p); @@ -72,7 +72,7 @@ void test_API() } template -bool is_valid(const boost::shared_ptr& ss) +bool is_valid(const std::shared_ptr& ss) { typedef typename StraightSkeleton::Traits::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; @@ -136,7 +136,7 @@ void test_skeleton(const char* filename, typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; typedef CGAL::Straight_skeleton_2 Straight_skeleton; - typedef boost::shared_ptr Straight_skeleton_Ptr; + typedef std::shared_ptr Straight_skeleton_Ptr; std::ifstream in(filename); assert(in); diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_weighted_polygons_with_holes.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_weighted_polygons_with_holes.cpp index 30fda42afd3..c2736dd490a 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_weighted_polygons_with_holes.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_weighted_polygons_with_holes.cpp @@ -18,8 +18,6 @@ #include #include -#include - #include namespace SS = CGAL::CGAL_SS_i; @@ -34,7 +32,7 @@ using Polygon_2 = CGAL::Polygon_2; using Polygon_with_holes_2 = CGAL::Polygon_with_holes_2; using Straight_skeleton_2 = CGAL::Straight_skeleton_2; -using Straight_skeleton_2_ptr = boost::shared_ptr; +using Straight_skeleton_2_ptr = std::shared_ptr; using Mesh = CGAL::Surface_mesh; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_straight_skeleton_copy.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_straight_skeleton_copy.cpp index e189b587921..bd96b88b86b 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_straight_skeleton_copy.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_straight_skeleton_copy.cpp @@ -1,7 +1,5 @@ #include -#include - #include #include #include @@ -12,8 +10,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h b/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h index 38e178d7222..6d9c0286d0b 100644 --- a/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h +++ b/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h @@ -51,9 +51,7 @@ #include #include -#include #include -#include #include #include @@ -61,6 +59,8 @@ #include #include #include +#include +#include namespace CGAL { namespace Straight_skeleton_extrusion { @@ -124,7 +124,7 @@ snap_point_to_contour_halfedge_plane(const typename GeomTraits::Point_2& op, // Project orthogonally onto the halfedge // @todo should the projection be along the direction of the other offset edge sharing this point? Segment_2 s { sv->point(), tv->point() }; - boost::optional line = CGAL_SS_i::compute_normalized_line_coeffC2(s); + std::optional line = CGAL_SS_i::compute_normalized_line_coeffC2(s); CGAL_assertion(bool(line)); // otherwise the skeleton would have failed already FT px, py; @@ -278,11 +278,11 @@ class Extrusion_builder using Polygon_2 = CGAL::Polygon_2; using Polygon_with_holes_2 = CGAL::Polygon_with_holes_2; - using Offset_polygons = std::vector >; - using Offset_polygons_with_holes = std::vector >; + using Offset_polygons = std::vector >; + using Offset_polygons_with_holes = std::vector >; using Straight_skeleton_2 = CGAL::Straight_skeleton_2; - using Straight_skeleton_2_ptr = boost::shared_ptr; + using Straight_skeleton_2_ptr = std::shared_ptr; using SS_Vertex_const_handle = typename Straight_skeleton_2::Vertex_const_handle; using SS_Halfedge_const_handle = typename Straight_skeleton_2::Halfedge_const_handle; @@ -850,7 +850,7 @@ public: // the outer boundary into a hole. Hence, it needs to be reversed back to proper orientation // - the exterior offset of the holes is built by reversing the holes and computing an internal // skeleton. Hence, the result also needs to be reversed. - for(boost::shared_ptr ptr : raw_output) + for(std::shared_ptr ptr : raw_output) ptr->reverse_orientation(); Offset_polygons_with_holes output = CGAL::arrange_offset_polygons_2(raw_output); diff --git a/Stream_support/include/CGAL/IO/io.h b/Stream_support/include/CGAL/IO/io.h index 1034f74abff..e57d4327bac 100644 --- a/Stream_support/include/CGAL/IO/io.h +++ b/Stream_support/include/CGAL/IO/io.h @@ -32,6 +32,8 @@ #include #include #include +#include +#include namespace CGAL { @@ -186,6 +188,34 @@ public: std::ostream& operator()( std::ostream& os) const { return (os << t); } }; +template +class Output_rep, F> +{ + const std::optional& t; + +public: + Output_rep( const std::optional& tt) : t(tt) {} + std::ostream& operator()( std::ostream& os) const + { + if (t==std::nullopt) return (os << "--"); + return (os << t.value()); + } +}; + +template +class Output_rep, F> +{ + const std::variant& t; + +public: + Output_rep( const std::variant& tt) : t(tt) {} + std::ostream& operator()( std::ostream& os) const + { + std::visit([&os](auto&& v) { os << v; }, t); + return os; + } +}; + /*! \relates Output_rep \brief stream output of the \c Output_rep calls its \c operator(). @@ -241,6 +271,19 @@ public: std::istream& operator()( std::istream& is) const { return (is >> t); } }; +template +class Input_rep> +{ + std::optional& t; + +public: + //! initialize with a reference to \a t. + Input_rep( std::optional& tt) : t(tt) {} + + //! perform the input, calls \c operator\>\> by default. + std::istream& operator()( std::istream& is) const { return (is >> t.value()); } +}; + #if CGAL_FORCE_IFORMAT_DOUBLE || \ ( ( _MSC_VER > 1600 ) && ( _MSC_VER < 1910 ) && (! defined( CGAL_NO_IFORMAT_DOUBLE )) ) diff --git a/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h b/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h index e5be891d9b2..e3e26fe8b61 100644 --- a/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h +++ b/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h @@ -16,7 +16,7 @@ #define GEOMETRY_CONTAINER_H #include #include -#include +#include struct Dummy_deleter{ template @@ -45,7 +45,7 @@ struct Geometry_container{ typedef typename Range::const_reverse_iterator const_reverse_iterator; typedef typename Range::size_type size_type; typedef typename Range::value_type value_type; - boost::shared_ptr range; + std::shared_ptr range; bool must_delete; // // Default constructor. diff --git a/Surface_mesh/examples/Surface_mesh/sm_aabbtree.cpp b/Surface_mesh/examples/Surface_mesh/sm_aabbtree.cpp index 6fe14b01e7a..eba06f7b578 100644 --- a/Surface_mesh/examples/Surface_mesh/sm_aabbtree.cpp +++ b/Surface_mesh/examples/Surface_mesh/sm_aabbtree.cpp @@ -16,8 +16,8 @@ typedef CGAL::Surface_mesh Mesh; typedef CGAL::AABB_face_graph_triangle_primitive Primitive; typedef CGAL::AABB_traits Traits; typedef CGAL::AABB_tree Tree; -typedef boost::optional< Tree::Intersection_and_primitive_id::Type > Segment_intersection; -typedef boost::optional< Tree::Intersection_and_primitive_id::Type > Plane_intersection; +typedef std::optional< Tree::Intersection_and_primitive_id::Type > Segment_intersection; +typedef std::optional< Tree::Intersection_and_primitive_id::Type > Plane_intersection; typedef Tree::Primitive_id Primitive_id; int main() @@ -53,8 +53,8 @@ int main() tree.any_intersection(segment_query); if(intersection){ // gets intersection object - if(boost::get(&(intersection->first))){ - Point* p = boost::get(&(intersection->first)); + if(std::get_if(&(intersection->first))){ + Point* p = std::get_if(&(intersection->first)); std::cout << "intersection object is a point " << *p << std::endl; std::cout << "with face "<< intersection->second << std::endl; } @@ -77,8 +77,8 @@ int main() // (generally a segment) Plane_intersection plane_intersection = tree.any_intersection(plane_query); if(plane_intersection){ - if(boost::get(&(plane_intersection->first))){ - Segment* s = boost::get(&(plane_intersection->first)); + if(std::get_if(&(plane_intersection->first))){ + Segment* s = std::get_if(&(plane_intersection->first)); std::cout << "one intersection object is the segment " << s << std::endl; std::cout << "with face "<< intersection->second << std::endl; } diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Properties.h b/Surface_mesh/include/CGAL/Surface_mesh/Properties.h index 31eea166ee5..5e8733a87f8 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Properties.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Properties.h @@ -67,7 +67,7 @@ public: /// Return a deep copy of self. virtual Base_property_array* clone () const = 0; - /// Return a empty copy of self. + /// Return an empty copy of self. virtual Base_property_array* empty_clone () const = 0; /// Return the type_info of the property diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 222a99f77e7..b42e28707b5 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -581,9 +581,9 @@ public: return num_teleported; // find the best merge pair - boost::optional< std::pair > best_proxies = + std::optional< std::pair > best_proxies = find_best_merge(!no_threshold_test); - if (best_proxies==boost::none) + if (best_proxies==std::nullopt) return num_teleported; if (px_worst == best_proxies->first || px_worst == best_proxies->second) return num_teleported; @@ -662,7 +662,7 @@ public: * it is returned only if the error change after the merge is lower than the half of the maximum proxy error. * @return if the best merge pair is found the optional returned contains the proxy indices, and is empty otherwise. */ - boost::optional< std::pair > + std::optional< std::pair > find_best_merge(const bool use_threshold_test) { typedef std::pair Proxy_pair; typedef std::set Pair_set; @@ -705,7 +705,7 @@ public: } if (merged_set.empty()) - return boost::none; + return std::nullopt; // test if merge worth it if (use_threshold_test) { @@ -715,7 +715,7 @@ public: max_error = m_proxies[i].err; } if (min_error_change > max_error / FT(2.0)) - return boost::none; + return std::nullopt; } return std::make_pair(px0, px1); diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp index 40e6885e5ec..4e671737489 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp @@ -69,8 +69,8 @@ bool test_shape(const Mesh &mesh, const std::size_t target_num_proxies) approx.run(num_iterations); // eliminate redundant area (local minima) by merging - boost::optional > best_pair = boost::none; - while ((best_pair = approx.find_best_merge(true)) != boost::none) { + std::optional > best_pair = std::nullopt; + while ((best_pair = approx.find_best_merge(true)) != std::nullopt) { approx.merge(best_pair->first, best_pair->second); approx.run(num_iterations); } diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp index 2ea7139f548..13a43f96557 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp @@ -153,7 +153,7 @@ int main() } // force teleportation test - if ( approx.find_best_merge(true) != boost::none ) + if ( approx.find_best_merge(true) != std::nullopt ) { std::cout << "Failed: should be no possible merge with test." << std::endl; return EXIT_FAILURE; diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Surface_mesh_deformation_test_commons.h b/Surface_mesh_deformation/test/Surface_mesh_deformation/Surface_mesh_deformation_test_commons.h index a10cdd1f09c..bdc14cee74e 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Surface_mesh_deformation_test_commons.h +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Surface_mesh_deformation_test_commons.h @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt index 3a876b5977a..c4be5d3c0fb 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt @@ -441,7 +441,7 @@ Orbifold-Tutte Planar Embedding was introduced by Aigerman and Lipman \cgalCite{ and is a generalization of Tutte’s embedding to other topologies, and in particular spheres, which we consider here. The orbifold-Tutte embedding bijectively maps the original surface, that is required to be a topological ball, to a canonical, -topologically equivalent, two-dimensional flat surface called an Euclidean orbifold. +topologically equivalent, two-dimensional flat surface called a Euclidean orbifold. There are 17 Euclidean orbifolds, of which only the 4 sphere orbifolds are currently implemented in CGAL. 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_traversal_traits.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h index 18a7c1f2fa7..13216a31fdc 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h @@ -54,7 +54,7 @@ public: if ( GeomTraits().do_intersect_3_object()(query, primitive.datum(m_traits.shared_data())) ) { - boost::optional intersection + std::optional intersection = m_traits.intersection_object()(query, primitive); if(intersection) { *m_out_it++ = *intersection; diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h index 2f361642acf..7afb29eecf2 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include @@ -63,8 +63,8 @@ public: void operator()(const Polyhedron& mesh, std::size_t window_size, ValuePropertyMap values, - boost::optional spatial_parameter = boost::optional(), - boost::optional range_parameter = boost::optional() + std::optional spatial_parameter = std::optional(), + std::optional range_parameter = std::optional() ) const { typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename boost::graph_traits::face_iterator face_iterator; 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_segmentation/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h index 9ccde9421a5..5709694f491 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h @@ -26,7 +26,7 @@ #include #include -#include +#include #define CGAL_NUMBER_OF_MAD 1.5 @@ -200,7 +200,7 @@ public: disk_sampler(number_of_rays, std::back_inserter(disk_samples)); for( ; facet_begin != facet_end; ++facet_begin) { - boost::optional sdf_value = calculate_sdf_value_of_facet(*facet_begin, + std::optional sdf_value = calculate_sdf_value_of_facet(*facet_begin, cone_angle, true, disk_samples); if(sdf_value) { @@ -233,7 +233,7 @@ public: * \note: normal should have unit length */ template - boost::optional calculate_sdf_value_of_point( + std::optional calculate_sdf_value_of_point( Point center, Vector normal, SkipPrimitiveFunctor skip, @@ -250,7 +250,7 @@ public: * Overload for taking DiskSampling as template parameter */ template - boost::optional calculate_sdf_value_of_point( + std::optional calculate_sdf_value_of_point( Point center, Vector normal, SkipPrimitiveFunctor skip, @@ -270,7 +270,7 @@ public: * Overload for directly taking sampled points from disk as parameter */ template - boost::optional calculate_sdf_value_of_point( + std::optional calculate_sdf_value_of_point( const Point& center, const Vector& normal, SkipPrimitiveFunctor skip, @@ -346,10 +346,10 @@ public: } if(ray_distances.empty()) { - return boost::none; + return std::nullopt; } - return boost::optional(remove_outliers_and_calculate_sdf_value( + return std::optional(remove_outliers_and_calculate_sdf_value( ray_distances)); } @@ -369,7 +369,7 @@ private: * @param samples sampled points from a unit-disk which are corresponds to rays picked from cone * @return calculated SDF value */ - boost::optional calculate_sdf_value_of_facet( + std::optional calculate_sdf_value_of_facet( face_handle facet, double cone_angle, bool accept_if_acute, @@ -379,11 +379,11 @@ private: const Point p2 = get(vertex_point_map,target(next(halfedge(facet,mesh),mesh),mesh)); const Point p3 = get(vertex_point_map,target(prev(halfedge(facet,mesh),mesh),mesh)); const Point center = centroid_functor(p1, p2, p3); - if (collinear_functor(p1, p2, p3)) return boost::none; + if (collinear_functor(p1, p2, p3)) return std::nullopt; Vector normal = normal_functor(p2, p1, p3); normal=scale_functor(normal, FT(1.0/std::sqrt(to_double(normal.squared_length())))); - if (normal!=normal) return boost::none; + if (normal!=normal) return std::nullopt; CGAL::internal::SkipPrimitiveFunctor skip(facet); CGAL::internal::FirstIntersectionVisitor @@ -434,7 +434,7 @@ private: } const Point* i_point; - if(!(i_point = boost::get(&object))) { + if(!(i_point = std::get_if(&object))) { continue; // continue in case of segment. } @@ -478,12 +478,12 @@ private: boost::tuple ray_casting( const Ray& query, SkipFunctor s, bool accept_if_acute) const { - const boost::optional< typename Tree::template Intersection_and_primitive_id::Type > + const std::optional< typename Tree::template Intersection_and_primitive_id::Type > min_intersection = tree.first_intersection(query, s); if(!min_intersection) return boost::make_tuple(false, false, 0.0, Primitive_id()); - const Point* i_point = boost::get( &min_intersection->first ); + const Point* i_point = std::get_if( &min_intersection->first ); if (!i_point) //segment case ignored return boost::make_tuple(false, false, 0.0, Primitive_id()); diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h index eaad25fb19e..e80cd6f6b28 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h @@ -661,7 +661,7 @@ private: DBlock *nodeptr_block; void (*error_function)(const char - *); /* this function is called if a error occurs, + *); /* this function is called if an error occurs, with a corresponding error message (or exit(1) is called if it's nullptr) */ diff --git a/Surface_mesh_shortest_path/doc/Surface_mesh_shortest_path/Concepts/SurfaceMeshShortestPathTraits.h b/Surface_mesh_shortest_path/doc/Surface_mesh_shortest_path/Concepts/SurfaceMeshShortestPathTraits.h index 652c3457496..2095e338943 100644 --- a/Surface_mesh_shortest_path/doc/Surface_mesh_shortest_path/Concepts/SurfaceMeshShortestPathTraits.h +++ b/Surface_mesh_shortest_path/doc/Surface_mesh_shortest_path/Concepts/SurfaceMeshShortestPathTraits.h @@ -152,7 +152,7 @@ public: /*! Function object type. Must provide - `boost::optional< boost::variant< T... > > operator()(A obj1, B obj2)` + `std::optional< std::variant< T... > > operator()(A obj1, B obj2)` to compute the intersection between `obj1` and `obj2`, where `A` and `B` can be any type amongst `Line_2`, `Ray_2`, `Segment_2`. */ 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/examples/Surface_mesh_shortest_path/shortest_path_sequence.cpp b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/shortest_path_sequence.cpp index 98340eb0000..857321096b2 100644 --- a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/shortest_path_sequence.cpp +++ b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/shortest_path_sequence.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -26,10 +26,10 @@ typedef Graph_traits::face_descriptor face_descriptor; typedef Graph_traits::halfedge_descriptor halfedge_descriptor; // A model of SurfacemeshShortestPathVisitor storing simplicies -// using boost::variant +// using std::variant struct Sequence_collector { - typedef boost::variant< vertex_descriptor, + typedef std::variant< vertex_descriptor, std::pair, std::pair > Simplex; std::vector< Simplex > sequence; @@ -50,9 +50,8 @@ struct Sequence_collector } }; -// A visitor to print what a variant contains using boost::apply_visitor +// A visitor to print what a variant contains using std::visit struct Print_visitor - : public boost::static_visitor<> { int i; Triangle_mesh& g; @@ -123,7 +122,7 @@ int main(int argc, char** argv) // print the sequence using the visitor pattern Print_visitor print_visitor(tmesh); for (size_t i = 0; i < sequence_collector.sequence.size(); ++i) - boost::apply_visitor(print_visitor, sequence_collector.sequence[i]); + std::visit(print_visitor, sequence_collector.sequence[i]); return 0; } 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..df10bd113e2 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`. @@ -1082,7 +1082,7 @@ private: { const auto cgalIntersection = i2(cl2(segment), cl2(leftBoundary)); - if (!cgalIntersection || !boost::get(&*cgalIntersection)) + if (!cgalIntersection || !std::get_if(&*cgalIntersection)) { if (m_debugOutput) { @@ -1092,7 +1092,7 @@ private: } else { - const Point_2* result = boost::get(&*cgalIntersection); + const Point_2* result = std::get_if(&*cgalIntersection); FT t0 = pdas2(cs2(segment), ct2(segment), *result); if (t0 >= FT(1)) @@ -1140,7 +1140,7 @@ private: { const auto cgalIntersection = i2(cl2(segment), cl2(rightBoundary)); - if (!cgalIntersection || !boost::get(&*cgalIntersection)) + if (!cgalIntersection || !std::get_if(&*cgalIntersection)) { if (m_debugOutput) { @@ -1150,7 +1150,7 @@ private: } else { - const Point_2* result = boost::get(&*cgalIntersection); + const Point_2* result = std::get_if(&*cgalIntersection); FT t0 = pdas2(cs2(segment), ct2(segment), *result); if (t0 <= FT(0)) @@ -1778,7 +1778,7 @@ private: CGAL_assertion(bool(cgalIntersection)); - const Point_2* result = boost::get(&*cgalIntersection); + const Point_2* result = std::get_if(&*cgalIntersection); if (!result) result = ¤tSourceImage; @@ -3049,7 +3049,7 @@ public: typename Traits::Construct_barycentric_coordinates cbc(traits.construct_barycentric_coordinates_object()); typename Traits::Compute_squared_distance_3 csd3(traits.compute_squared_distance_3_object()); typedef typename AABB_face_graph_tree::template Intersection_and_primitive_id::Type Intersection_type; - typedef boost::optional Ray_intersection; + typedef std::optional Ray_intersection; std::vector intersections; @@ -3064,7 +3064,7 @@ public: { if (intersections[i]) { - Point_3* intersectionPoint = boost::get(&(intersections[i]->first)); + Point_3* intersectionPoint = std::get_if(&(intersections[i]->first)); if (intersectionPoint) { diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/function_objects.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/function_objects.h index 19a2ed5105b..227d20833c4 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/function_objects.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/function_objects.h @@ -465,7 +465,7 @@ public: CGAL_assertion(bool(intersectResult1)); if (!intersectResult1) return CGAL::SMALLER; - const Point_2* p1_ptr = boost::get(&*intersectResult1); + const Point_2* p1_ptr = std::get_if(&*intersectResult1); CGAL_assertion(p1_ptr && "Intersection should have been a point"); if (!p1_ptr) return CGAL::SMALLER; @@ -477,7 +477,7 @@ public: CGAL_assertion(bool(intersectResult2)); if (!intersectResult2) return CGAL::SMALLER; - const Point_2* p2_ptr = boost::get(&*intersectResult2); + const Point_2* p2_ptr = std::get_if(&*intersectResult2); CGAL_assertion(p2_ptr && "Intersection should have been a point"); if (!p2_ptr) return CGAL::SMALLER; diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h index 5fa7e3c3395..9e62e74917f 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h @@ -46,7 +46,7 @@ public: // Returns the placement computed by `base_placement`, provided the distance between the input // and this placement is smaller than `d`. Otherwise, nothing is returned. - boost::optional operator()(const Edge_profile& profile) const; + std::optional operator()(const Edge_profile& profile) const; // @} }; diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h index 53cfb706bd6..adc991a675e 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h @@ -44,8 +44,8 @@ public: returns the placement, if it does not get filtered by the wrapped filter and if no triangle in the profile has its normal changed by more than 90 degrees. */ - boost::optional operator()(const Edge_profile& profile, - boost::optional op) const; + std::optional operator()(const Edge_profile& profile, + std::optional op) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h index 8f08e9a071c..90e68a5320d 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h @@ -46,7 +46,7 @@ public: Returns the placement computed by `get_placement`, if no triangle in the profile has its normal changed by more than 90 degree. */ - boost::optional operator()(const Edge_profile& profile) const; + std::optional operator()(const Edge_profile& profile) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h index f9b904bfb3f..814c64f2793 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h @@ -32,7 +32,7 @@ public: const Get_placement_& get_placement = Get_placement_()); /// @} - boost::optional operator()(const Edge_profile& profile) const + std::optional operator()(const Edge_profile& profile) const }; diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h index 52c7c54dee8..8c908055492 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h @@ -36,8 +36,8 @@ public: The argument `placement` is unused. */ - boost::optional operator()(const Edge_profile& profile, - const boost::optional& placement) const; + std::optional operator()(const Edge_profile& profile, + const std::optional& placement) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h index 36e68f95263..433a8a64755 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h @@ -36,9 +36,9 @@ LindstromTurk_cost(const FT factor = FT(0.5)); Returns the cost of collapsing the edge (represented by its profile) considering the new `placement` computed for it. */ -boost::optional +std::optional operator()(const Edge_profile& edge_profile, - const boost::optional& placement) const; + const std::optional& placement) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h index 20ae3890439..8471efae84d 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h @@ -38,7 +38,7 @@ public: Returns the new position for the remaining vertex after collapsing the edge (represented by its profile). */ - boost::optional + std::optional operator()(const Edge_profile& profile) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h index 2cd81de679e..11fda0b9f25 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h @@ -36,7 +36,7 @@ public: the points of the source and target vertices (`profile.p0()` and `profile.p1()`) */ - boost::optional operator()(const Edge_profile& profile) const; + std::optional operator()(const Edge_profile& profile) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index dadccaa8e4d..61440bec09e 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -50,8 +50,8 @@ public: returns the placement, if it does not get filtered by the wrapped filter, and if all triangles in the profile are inside the polyhedral envelope. */ - boost::optional operator()(const Edge_profile& profile, - boost::optional op) const; + std::optional operator()(const Edge_profile& profile, + std::optional op) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h index 264f56319c7..0bbb8e88078 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h @@ -47,7 +47,7 @@ for each edge collected. */ void OnCollected(const Edge_profile& profile, - boost::optional cost); + std::optional cost); /*! Called during the processing phase (when edges are collapsed), @@ -63,7 +63,7 @@ the edge will not be collapsed. */ void OnSelected(const Edge_profile& profile, - boost::optional cost, + std::optional cost, const Edge_profile::edges_size_type initial_edge_count, const Edge_profile::edges_size_type current_edge_count); @@ -76,7 +76,7 @@ the edge will not be collapsed. */ void OnCollapsing(const Edge_profile& profile, - boost::optional placement); + std::optional placement); /*! Called when an edge has been collapsed and replaced by the vertex `vd` diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetCost.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetCost.h index 24a05f636c2..d07a362bb19 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetCost.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetCost.h @@ -5,7 +5,7 @@ The concept `GetCost` describes the requirements for the policy function object which gets the collapse cost of an edge. -The cost returned is a `boost::optional` value (i.e.\ it can be absent). +The cost returned is a `std::optional` value (i.e.\ it can be absent). An absent cost indicates that the edge should not be collapsed. This could be the result of a computational limitation (such as an overflow), or can be intentionally returned to prevent the edge from being collapsed. @@ -31,8 +31,8 @@ public: Computes and returns the cost of collapsing the edge (represented by its profile), using the calculated placement. */ - boost::optional operator()(const Edge_profile& edge_profile, - const boost::optional& placement) const; + std::optional operator()(const Edge_profile& edge_profile, + const std::optional& placement) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetPlacement.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetPlacement.h index e576472cb34..fa9347cdd28 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetPlacement.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetPlacement.h @@ -7,7 +7,7 @@ function object which gets the collapse placement of an edge, that is, the new position of the vertex that remains after a halfedge-collapse operation. -The placement returned is a `boost::optional` value (i.e., it can +The placement returned is a `std::optional` value (i.e., it can be absent). An absent result indicates that the edge should not be collapsed. This could be the result of a computational limitation (such as an overflow), or can be intentionally returned to prevent the edge from being collapsed. @@ -36,7 +36,7 @@ public: Computes and returns the placement, that is, the position of the vertex which replaces the collapsing edge (represented by its profile). */ - boost::optionaloperator()(const Edge_profile& profile) const; + std::optionaloperator()(const Edge_profile& profile) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/PlacementFilter.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/PlacementFilter.h index 324c87f45ee..a2a493e904d 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/PlacementFilter.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/PlacementFilter.h @@ -9,8 +9,8 @@ an edge is taken from the priority queue in order to get collapsed, and neither when the edge is inserted nor when it is updated in the priority queue. -The placement returned is a `boost::optional` value (i.e., it can -be absent). The value `boost::none` indicates that the edge should not be collapsed. +The placement returned is a `std::optional` value (i.e., it can +be absent). The value `std::nullopt` indicates that the edge should not be collapsed. \cgalRefines{DefaultConstructible,CopyConstructible} @@ -33,7 +33,7 @@ public: filters the placement. */ - boost::optional operator()(const Edge_profile& profile, boost::optional placement) const; + std::optional operator()(const Edge_profile& profile, std::optional placement) const; /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt index 7ca5146ab1f..8ef4268e07f 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt @@ -369,7 +369,7 @@ Simple mesh before and after the collapse of edge `v-w` into vertex `w`. While t The class `Surface_mesh_simplification::Bounded_normal_change_filter` checks if a placement would invert the normal of a face around the stars of the two vertices of an edge that is candidate for an edge collapse. It then -rejects this placement by returning `boost::none`. +rejects this placement by returning `std::nullopt`. \note This filter class replaces the usage of the class `Surface_mesh_simplification::Bounded_normal_change_placement`. Using the filter is faster as it is only performed on the edge to be collapsed next, diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp index bc89a3b77aa..04561d2239c 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp @@ -19,13 +19,13 @@ namespace SMS = CGAL::Surface_mesh_simplification; struct Dummy_placement { template - boost::optional operator()(const Profile&) const + std::optional operator()(const Profile&) const { - return boost::none; + return std::nullopt; } template - boost::optional operator()(const Profile&, const boost::optional& op) const + std::optional operator()(const Profile&, const std::optional& op) const { return op; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp index 16427c55226..ec9993b87dd 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp @@ -44,7 +44,7 @@ struct My_visitor : SMS::Edge_collapse_visitor_base My_visitor(Stats* s) : stats(s) {} // Called during the collecting phase for each edge collected. - void OnCollected(const Profile&, const boost::optional&) + void OnCollected(const Profile&, const std::optional&) { ++(stats->collected); std::cerr << "\rEdges collected: " << stats->collected << std::flush; @@ -53,7 +53,7 @@ struct My_visitor : SMS::Edge_collapse_visitor_base // Called during the processing phase for each edge selected. // If cost is absent the edge won't be collapsed. void OnSelected(const Profile&, - boost::optional cost, + std::optional cost, std::size_t initial, std::size_t current) { @@ -69,7 +69,7 @@ struct My_visitor : SMS::Edge_collapse_visitor_base // Called during the processing phase for each edge being collapsed. // If placement is absent the edge is left uncollapsed. void OnCollapsing(const Profile&, - boost::optional placement) + std::optional placement) { if(!placement) ++(stats->placement_uncomputable); diff --git a/Surface_mesh_simplification/include/CGAL/Cartesian/MatrixC33.h b/Surface_mesh_simplification/include/CGAL/Cartesian/MatrixC33.h index 34a14497364..7cc2858020b 100644 --- a/Surface_mesh_simplification/include/CGAL/Cartesian/MatrixC33.h +++ b/Surface_mesh_simplification/include/CGAL/Cartesian/MatrixC33.h @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CGAL { @@ -200,11 +200,11 @@ MatrixC33 adjoint_matrix(const MatrixC33& m) } template -boost::optional< MatrixC33 > inverse_matrix(const MatrixC33& m) +std::optional< MatrixC33 > inverse_matrix(const MatrixC33& m) { typedef typename R::RT RT; typedef MatrixC33 Matrix; - typedef boost::optional result_type; + typedef std::optional result_type; result_type rInverse; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h index 94870fb968c..87d24f3dd88 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h @@ -46,9 +46,9 @@ struct Edge_collapse_visitor_base void OnStarted(Triangle_mesh&) {} void OnFinished(Triangle_mesh&) {} void OnStopConditionReached(const Profile&) {} - void OnCollected(const Profile&, const boost::optional&) {} - void OnSelected(const Profile&, const boost::optional&, size_type, size_type) {} - void OnCollapsing(const Profile&, const boost::optional&) {} + void OnCollected(const Profile&, const std::optional&) {} + void OnSelected(const Profile&, const std::optional&, size_type, size_type) {} + void OnCollapsing(const Profile&, const std::optional&) {} void OnCollapsed(const Profile&, const vertex_descriptor&) {} void OnNonCollapsable(const Profile&) {} }; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h index 04303b90353..0e88fec1c8c 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -93,12 +93,12 @@ public: } template - boost::optional + std::optional operator()(const Profile& profile) const { typedef typename Profile::Point Point; - boost::optional op = m_base_placement(profile); + std::optional op = m_base_placement(profile); if(op) { if(m_tree_ptr == nullptr) @@ -121,7 +121,7 @@ public: m_tree_ptr->do_intersect(CGAL::Sphere_3(p, m_sq_threshold_dist))) return op; - return boost::optional(); + return std::optional(); } return op; @@ -153,13 +153,13 @@ public: { } template - boost::optional + std::optional operator()(const Profile& profile) const { typedef typename Profile::Geom_traits Geom_traits; typedef typename Profile::Point Point; - boost::optional op = m_base_placement(profile); + std::optional op = m_base_placement(profile); if(op) { CGAL_assertion(m_tree_ptr != nullptr); @@ -173,7 +173,7 @@ public: m_tree_ptr->do_intersect(CGAL::Sphere_3(p, m_sq_threshold_dist))) return op; - return boost::optional(); + return std::optional(); } return op; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h index 41e8af44337..036d5bb9b44 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h @@ -15,7 +15,7 @@ #include #include -#include +#include namespace CGAL { namespace Surface_mesh_simplification { @@ -31,8 +31,8 @@ public: template - boost::optional - operator()(const Profile& profile, boost::optional op) const + std::optional + operator()(const Profile& profile, std::optional op) const { typedef typename Profile::VertexPointMap Vertex_point_map; @@ -78,7 +78,7 @@ public: Vector n2 = gt.construct_cross_product_vector_3_object()(eq2p, eq2r); if(!is_positive(gt.compute_scalar_product_3_object()(n1, n2))) - return boost::optional(); + return std::optional(); ++it; } diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h index 379847d3ffe..1a1b9aafd12 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h @@ -15,7 +15,7 @@ #include -#include +#include namespace CGAL { namespace Surface_mesh_simplification { @@ -29,7 +29,7 @@ public: {} template - boost::optional + std::optional operator()(const Profile& profile) const { typedef typename Profile::VertexPointMap Vertex_point_map; @@ -43,7 +43,7 @@ public: const Geom_traits& gt = profile.geom_traits(); const Vertex_point_map& vpm = profile.vertex_point_map(); - boost::optional op = m_get_placement(profile); + std::optional op = m_get_placement(profile); if(op) { // triangles returns the triangles of the star of the vertices of the edge to collapse @@ -76,7 +76,7 @@ public: Vector n2 = gt.construct_cross_product_vector_3_object()(eq2p, eq2r); if(!is_positive(gt.compute_scalar_product_3_object()(n1, n2))) - return boost::optional(); + return std::optional(); ++it; } diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h index 07749bdc643..38f4b478ad3 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h @@ -31,7 +31,7 @@ public: {} template - boost::optional operator()(const Profile& profile) const + std::optional operator()(const Profile& profile) const { typedef typename Profile::TM TM; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h index 079f480076e..7b5cab2ba26 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h @@ -27,9 +27,9 @@ public: Edge_length_cost() {} template - boost::optional operator()(const Profile& profile, const T& /*placement*/) const + std::optional operator()(const Profile& profile, const T& /*placement*/) const { - typedef boost::optional result_type; + typedef std::optional result_type; return result_type(profile.geom_traits().compute_squared_distance_3_object()(profile.p0(), profile.p1())); } }; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h index 86fd7c87544..16c4581bafd 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -97,8 +97,8 @@ public: template - boost::optional - operator()(const Profile& profile, boost::optional op) const + std::optional + operator()(const Profile& profile, std::optional op) const { typedef typename Profile::Point Point; typedef typename Profile::vertex_descriptor_vector Link; @@ -116,7 +116,7 @@ public: if(m_fast_envelope->is_outside(vecp)){ // the new placement is outside envelope - return boost::none; + return std::nullopt; } const Link link = profile.link(); @@ -134,7 +134,7 @@ public: if(m_fast_envelope->is_outside(triangle)){ // the triangle intersects the envelope - return boost::none; + return std::nullopt; } vecv = vecw; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h index 8a3a11a1213..b1421d750fa 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h @@ -32,9 +32,9 @@ public: {} template - boost::optional + std::optional operator()(const Profile& profile, - const boost::optional& placement) const + const std::optional& placement) const { return internal::LindstromTurkCore(m_LT_params, profile).compute_cost(placement); } diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h index 9dc14adcf94..82bf9cc33ef 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h @@ -31,7 +31,7 @@ public: {} template - boost::optional operator()(const Profile& profile) const + std::optional operator()(const Profile& profile) const { return internal::LindstromTurkCore(m_LT_params, profile).compute_placement(); } diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h index 7429f670b5c..c76fb670318 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h @@ -29,9 +29,9 @@ public: Midpoint_placement() {} template - boost::optional operator()(const Profile& profile) const + std::optional operator()(const Profile& profile) const { - typedef boost::optional result_type; + typedef std::optional result_type; return result_type(profile.geom_traits().construct_midpoint_3_object()(profile.p0(), profile.p1())); } }; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h index d669e44f317..590747a252b 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h @@ -22,7 +22,7 @@ #include -#include +#include namespace CGAL { namespace Surface_mesh_simplification { @@ -199,14 +199,14 @@ public: public: // Cost template - boost::optional + std::optional operator()(const Profile& profile, - const boost::optional& placement) const + const std::optional& placement) const { - typedef boost::optional Optional_FT; + typedef std::optional Optional_FT; if(!placement) - return boost::optional(); + return std::optional(); CGAL_precondition(!get(vcm(), profile.v0()).isZero(0)); CGAL_precondition(!get(vcm(), profile.v1()).isZero(0)); @@ -222,7 +222,7 @@ public: public: // Placement template - boost::optional operator()(const Profile& profile) const + std::optional operator()(const Profile& profile) const { CGAL_precondition(!get(vcm(), profile.v0()).isZero(0)); CGAL_precondition(!get(vcm(), profile.v1()).isZero(0)); @@ -236,7 +236,7 @@ public: const Col_4 opt = construct_optimum(combined_matrix, p0, p1); - boost::optional pt = typename Profile::Point(opt(0) / opt(3), + std::optional pt = typename Profile::Point(opt(0) / opt(3), opt(1) / opt(3), opt(2) / opt(3)); diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h index b0fce64b6d9..59002f63681 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h @@ -55,9 +55,9 @@ public: typedef typename Geom_traits::FT FT; typedef typename Geom_traits::Vector_3 Vector; - typedef boost::optional Optional_FT; - typedef boost::optional Optional_point; - typedef boost::optional Optional_vector; + typedef std::optional Optional_FT; + typedef std::optional Optional_point; + typedef std::optional Optional_vector; typedef MatrixC33 Matrix; @@ -152,7 +152,7 @@ private : static bool is_finite(const Matrix& m) { return is_finite(m.r0()) && is_finite(m.r1()) && is_finite(m.r2()); } template - static boost::optional filter_infinity(const T& n) { return is_finite(n) ? boost::optional(n) : boost::optional(); } + static std::optional filter_infinity(const T& n) { return is_finite(n) ? std::optional(n) : std::optional(); } private: @@ -298,7 +298,7 @@ compute_placement() if(mConstraints_n == 3) { // If the matrix is singular it's inverse cannot be computed so an 'absent' value is returned. - boost::optional lOptional_Ai = inverse_matrix(mConstraints_A); + std::optional lOptional_Ai = inverse_matrix(mConstraints_A); if(lOptional_Ai) { const Matrix& lAi = *lOptional_Ai; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h index a11066435a3..4ed45a02d1e 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -40,8 +40,8 @@ namespace internal { struct Dummy_filter { template inline - const boost::optional - operator()(const Profile&, const boost::optional& op) const + const std::optional + operator()(const Profile&, const std::optional& op) const { return op; } @@ -94,7 +94,7 @@ inline std::string matrix_to_string(const Matrix& m) { } template -inline std::string optional_to_string(const boost::optional& o) { +inline std::string optional_to_string(const std::optional& o) { if(o) return boost::str(boost::format("%1%") % *o); else return std::string("NONE"); 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..5c23e83e94f 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 @@ -127,8 +127,8 @@ public: typedef typename Geom_traits::Vector_3 Vector; typedef typename Geom_traits::Equal_3 Equal_3; - typedef boost::optional Cost_type; - typedef boost::optional Placement_type; + typedef std::optional Cost_type; + typedef std::optional Placement_type; struct Compare_id { @@ -149,7 +149,7 @@ public: bool operator()(const halfedge_descriptor a, const halfedge_descriptor b) const { - // NOTE: A cost is a boost::optional<> value. + // NOTE: A cost is a std::optional<> value. // Absent optionals are ordered first; that is, "none < T" and "T > none" for any defined T != none. // In consequence, edges with undefined costs will be promoted to the top of the priority queue and popped out first. return m_algorithm->get_data(a).cost() < m_algorithm->get_data(b).cost(); @@ -333,9 +333,9 @@ private: CGAL_expensive_assertion(!mPQ->contains(h)); } - boost::optional pop_from_PQ() + std::optional pop_from_PQ() { - boost::optional opt_h = mPQ->extract_top(); + std::optional opt_h = mPQ->extract_top(); if(opt_h) { CGAL_assertion(is_primary_edge(*opt_h)); @@ -592,7 +592,7 @@ loop() // Pops and processes each edge from the PQ - boost::optional opt_h; + std::optional opt_h; #ifdef CGAL_SURF_SIMPL_INTERMEDIATE_STEPS_PRINTING int i_rm = 0; @@ -630,7 +630,7 @@ loop() std::cout << "step " << i_rm << " " << get(m_vpm, source(*h, m_tm)) << " " << get(m_vpm, target(*h, m_tm)) << "\n"; #endif - if(m_should_ignore(profile, placement)!= boost::none){ + if(m_should_ignore(profile, placement)!= std::nullopt){ collapse(profile, placement); } else @@ -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_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp index 0f5c8e99109..f24432ba3ad 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp @@ -46,7 +46,7 @@ struct My_visitor : SMS::Edge_collapse_visitor_base My_visitor(Stats* s) : stats(s) {} // Called during the collecting phase for each edge collected. - void OnCollected(const Profile&, const boost::optional&) + void OnCollected(const Profile&, const std::optional&) { ++(stats->collected); std::cerr << "\rEdges collected: " << stats->collected << std::endl; @@ -55,7 +55,7 @@ struct My_visitor : SMS::Edge_collapse_visitor_base // Called during the processing phase for each edge selected. // If cost is absent the edge won't be collapsed. void OnSelected(const Profile&, - boost::optional cost, + std::optional cost, std::size_t /* initial */, std::size_t /* current */) { @@ -67,7 +67,7 @@ struct My_visitor : SMS::Edge_collapse_visitor_base // Called during the processing phase for each edge being collapsed. // If placement is absent the edge is left uncollapsed. void OnCollapsing(const Profile&, - boost::optional placement) + std::optional placement) { if(!placement) ++(stats->placement_uncomputable); diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp index e1b27a66d55..00e6cf68501 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp @@ -198,7 +198,7 @@ void write (SurfaceSP aSurface, string aName) } template -string opt2str (const boost::optional& o) +string opt2str (const std::optional& o) { ostringstream ss; if(o) @@ -222,7 +222,7 @@ string point2str (const P& p) } template -string optpoint2str (const boost::optional

      & p) +string optpoint2str (const std::optional

      & p) { ostringstream ss; if(p) @@ -232,7 +232,7 @@ string optpoint2str (const boost::optional

      & p) return ss.str(); } template -string optfloat2str (const boost::optional& n) +string optfloat2str (const std::optional& n) { ostringstream ss; if(n) @@ -258,7 +258,7 @@ string edge2str (const E& e) return ss.str(); } -template ostream& operator << (ostream& os, const boost::optional& o) { return os << opt2str(o); } +template ostream& operator << (ostream& os, const std::optional& o) { return os << opt2str(o); } string normalize_EOL (string line) { @@ -304,12 +304,12 @@ public : CHECK(aSurface.is_valid()); } - virtual void OnCollected(const Profile& aProfile, const boost::optional& aCost) const + virtual void OnCollected(const Profile& aProfile, const std::optional& aCost) const { TEST_TRACE(str (boost::format("Collecting %1% : cost=%2%") % edge2str(aProfile.v0_v1()) % optfloat2str(aCost))); } - virtual void OnCollapsing(const Profile& aProfile, const boost::optional& aP) const + virtual void OnCollapsing(const Profile& aProfile, const std::optional& aP) const { TEST_TRACE(str (boost::format("S %1% - Collapsing %2% : placement=%3%") % mStep % edge2str(aProfile.v0_v1()) % optpoint2str(aP))); diff --git a/Surface_mesh_topology/doc/Surface_mesh_topology/CGAL/Curves_on_surface_topology.h b/Surface_mesh_topology/doc/Surface_mesh_topology/CGAL/Curves_on_surface_topology.h index d8fafdc0304..21a7c20ee0e 100644 --- a/Surface_mesh_topology/doc/Surface_mesh_topology/CGAL/Curves_on_surface_topology.h +++ b/Surface_mesh_topology/doc/Surface_mesh_topology/CGAL/Curves_on_surface_topology.h @@ -91,7 +91,7 @@ namespace Surface_mesh_topology { /// Number type of the weights. using Weight_t=double; - /// creates an Euclidean_length_weight_functor given a mesh. + /// creates a Euclidean_length_weight_functor given a mesh. Euclidean_length_weight_functor(const Mesh& m); }; 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_mesher/include/CGAL/AABB_polyhedral_oracle.h b/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h index a57dc122563..d03fe0b0fe5 100644 --- a/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h +++ b/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h @@ -84,7 +84,7 @@ namespace CGAL { Object operator()(const Surface_3& surface, const Segment_3& segment) const { - boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > intersection = surface.tree()->any_intersection(segment); if ( intersection ) @@ -95,7 +95,7 @@ namespace CGAL { Object operator()(const Surface_3& surface, const Line_3& line) const { - boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > intersection = surface.tree()->any_intersection(line); if ( intersection ) @@ -105,7 +105,7 @@ namespace CGAL { } Object operator()(const Surface_3& surface, const Ray_3& ray) const { - boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > intersection = surface.tree()->any_intersection(ray); if ( intersection ) 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/Surface_sweep_2/include/CGAL/Surface_sweep_2.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2.h index 82146be11f5..a816ba72255 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2.h @@ -102,7 +102,7 @@ public: typedef typename Base::Status_line_iterator Status_line_iterator; typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; typedef std::vector Intersection_vector; typedef Random_access_output_iterator diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h index 63ad21b4bc1..acc94c13abc 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h @@ -624,7 +624,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, intersector(xc, (*sc_it)->last_curve(), vector_inserter(xections)); CGAL_assertion(xections.size() == 1); auto& item = xections.front(); - xc = *boost::get(&item); + xc = *std::get_if(&item); } CGAL_assertion @@ -667,7 +667,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, this->m_traits->is_closed_2_object()(c1->last_curve(), ARR_MIN_END) && this->m_traits->is_closed_2_object()(c2->last_curve(), ARR_MIN_END)) { - if ((boost::get(&(*vi)) != nullptr) && + if ((std::get_if(&(*vi)) != nullptr) && this->m_traits->equal_2_object()(ctr_min(c1->last_curve()), ctr_min(c2->last_curve()))) { @@ -685,7 +685,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, vector_inserter vi_last = vi_end; --vi_last; - if (boost::get(&(*vi_last)) != nullptr) { + if (std::get_if(&(*vi_last)) != nullptr) { CGAL_SS_PRINT_TEXT("Skipping common right endpoint..."); CGAL_SS_PRINT_EOL(); --vi_end; @@ -712,7 +712,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, vector_inserter vi_last = vi_end; --vi_last; - if (boost::get(&(*vi_last)) != nullptr) { + if (std::get_if(&(*vi_last)) != nullptr) { CGAL_SS_PRINT_TEXT("Skipping common right endpoint on boundary..."); CGAL_SS_PRINT_EOL(); --vi_end; @@ -725,7 +725,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, // SL: curves are split and no event strictly before the current event should // be reported if (vi != vi_end) { - const Intersection_point* xp_point = boost::get(&(*vi)); + const Intersection_point* xp_point = std::get_if(&(*vi)); if (xp_point != nullptr) { // Skip the intersection point if it is not larger than the current event. // To correctly do so, we have to set the ps_x and ps_y for xp_point->first @@ -744,7 +744,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, bool first_i = true; for (; vi != vi_end; ++vi) { Multiplicity multiplicity = 0; - const Intersection_point* xp_point = boost::get(&(*vi)); + const Intersection_point* xp_point = std::get_if(&(*vi)); if (xp_point != nullptr) { Point_2 xp = xp_point->first; multiplicity = xp_point->second; @@ -753,7 +753,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, _create_intersection_point(xp, multiplicity, c1, c2); } else { - const X_monotone_curve_2 icv = *boost::get(&(*vi)); + const X_monotone_curve_2 icv = *std::get_if(&(*vi)); // CGAL_assertion(icv != nullptr); CGAL_SS_PRINT_TEXT("Found an overlap"); diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h index d3c785ea8f2..1fdbd1ab094 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h @@ -51,7 +51,7 @@ void make_x_monotone(CurveInputIter begin, CurveInputIter end, { typedef typename Traits::Point_2 Point_2; typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; // Split the input curves into x-monotone objects. std::size_t num_of_curves = std::distance(begin, end); @@ -63,14 +63,14 @@ void make_x_monotone(CurveInputIter begin, CurveInputIter end, // Transform each object to either a point or an x-monotone curve. for (const auto& obj : object_vec) { - const X_monotone_curve_2* xcv = boost::get(&obj); + const X_monotone_curve_2* xcv = std::get_if(&obj); if (xcv != nullptr) { // The object is an x-monotone curve. *x_curves++ = *xcv; continue; } // The object is an isolated point. - const Point_2* pt = boost::get(&obj); + const Point_2* pt = std::get_if(&obj); CGAL_assertion(pt != nullptr); *iso_points++ = *pt; } diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h index 4fbe1180756..798284fa04e 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include @@ -317,7 +317,7 @@ Sliver_removal_result flip_3_to_2(typename C3t3::Edge& edge, } ch->vertex(v)->set_cell(ch); - inc_cells[ch->vertex(v)] = boost::none; + inc_cells[ch->vertex(v)] = std::nullopt; ch->reset_cache_validity(); } } @@ -596,8 +596,8 @@ void find_best_flip_to_improve_dh(C3t3& c3t3, if(tr.is_infinite(vh)) continue; - boost::optional>& o_inc_vh = inc_cells[vh]; - if (o_inc_vh == boost::none) + std::optional>& o_inc_vh = inc_cells[vh]; + if (o_inc_vh == std::nullopt) { boost::container::small_vector inc_vec; tr.incident_cells(vh, std::back_inserter(inc_vec)); @@ -620,7 +620,7 @@ void find_best_flip_to_improve_dh(C3t3& c3t3, indices(facet_circulator->second, i)); if (curr_vertex != vh0 && curr_vertex != vh1) { - if (is_edge_uv(vh, curr_vertex, boost::get(o_inc_vh))) + if (is_edge_uv(vh, curr_vertex, o_inc_vh.value())) { is_edge = true; break; @@ -761,8 +761,8 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, facet_circulator++; facet_circulator++; - boost::optional>& o_inc_vh = inc_cells[vh]; - if (o_inc_vh == boost::none) + std::optional>& o_inc_vh = inc_cells[vh]; + if (o_inc_vh == std::nullopt) { boost::container::small_vector inc_vec; tr.incident_cells(vh, std::back_inserter(inc_vec)); @@ -778,7 +778,7 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, indices(facet_circulator->second, i)); if (curr_vertex != vh0 && curr_vertex != vh1) { - if (is_edge_uv(vh, curr_vertex, boost::get(o_inc_vh))) + if (is_edge_uv(vh, curr_vertex, o_inc_vh.value())) return NOT_FLIPPABLE; } } @@ -948,7 +948,7 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, } ch->vertex(v)->set_cell(ch); - inc_cells[ch->vertex(v)] = boost::none; + inc_cells[ch->vertex(v)] = std::nullopt; ch->reset_cache_validity(); } } @@ -1186,14 +1186,14 @@ std::size_t flip_all_edges(const std::vector& edges, Tr& tr = c3t3.triangulation(); std::unordered_map > > inc_cells; + std::optional > > inc_cells; std::size_t count = 0; for (const VertexPair& vp : edges) { - boost::optional>& + std::optional>& o_inc_vh = inc_cells[vp.first]; - if (o_inc_vh == boost::none) + if (o_inc_vh == std::nullopt) { boost::container::small_vector inc_vec; tr.incident_cells(vp.first, std::back_inserter(inc_vec)); @@ -1202,7 +1202,7 @@ std::size_t flip_all_edges(const std::vector& edges, Cell_handle ch; int i0, i1; - if (is_edge_uv(vp.first, vp.second, boost::get(o_inc_vh), ch, i0, i1)) + if (is_edge_uv(vp.first, vp.second, o_inc_vh.value(), ch, i0, i1)) { Edge edge(ch, i0, i1); diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index 797fe36f45f..8c08f760387 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -92,7 +92,7 @@ private: } template - boost::optional + std::optional find_adjacent_facet_on_surface(const Facet& f, const Edge& edge, const C3t3& c3t3, @@ -212,7 +212,7 @@ private: for (const std::array& ei : edges) { Edge edge(ch, ei[0], ei[1]); - if (boost::optional neighbor + if (std::optional neighbor = find_adjacent_facet_on_surface(f, edge, c3t3, cell_selector)) { const Facet neigh = *neighbor; //already a canonical_facet @@ -308,7 +308,7 @@ private: #endif } - boost::optional project(const Surface_patch_index& si, + std::optional project(const Surface_patch_index& si, const Vector_3& gi) { CGAL_assertion(subdomain_FMLS_indices.find(si) != subdomain_FMLS_indices.end()); @@ -538,7 +538,7 @@ public: = project_on_tangent_plane(smoothed_position, current_pos, vertices_normals[v][si]); //Check if the mls surface exists to avoid degenerated cases - if (boost::optional mls_projection = project(si, normal_projection)) { + if (std::optional mls_projection = project(si, normal_projection)) { final_position = final_position + *mls_projection; } else { @@ -575,7 +575,7 @@ public: { //Check if the mls surface exists to avoid degenerated cases - if (boost::optional mls_projection = project(si, current_pos)) { + if (std::optional mls_projection = project(si, current_pos)) { final_position = final_position + *mls_projection; } else { @@ -661,7 +661,7 @@ public: current_pos, vertices_normals[v][si]); - if (boost::optional mls_projection = project(si, normal_projection)) + if (std::optional mls_projection = project(si, normal_projection)) final_position = final_position + *mls_projection; else final_position = smoothed_position; @@ -683,7 +683,7 @@ public: const Vector_3 current_pos(CGAL::ORIGIN, point(v->point())); - if (boost::optional mls_projection = project(si, current_pos)) + if (std::optional mls_projection = project(si, current_pos)) { const typename Tr::Point new_pos(CGAL::ORIGIN + *mls_projection); if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)){ diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 4c8fac7609c..d06a9c52a97 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -30,7 +30,7 @@ #include #include -#include +#include namespace CGAL { @@ -321,15 +321,15 @@ public: Cell_handle c = c_i.first; const std::array& f_on_surface = c_i.second; - boost::optional patch; + std::optional patch; for (int i = 0; i < 4; ++i) { if (f_on_surface[i]) { Surface_patch_index spi = m_c3t3.surface_patch_index(c, i); - if (patch != boost::none && patch != spi) + if (patch != std::nullopt && patch != spi) { - patch = boost::none; + patch = std::nullopt; break; } else @@ -338,7 +338,7 @@ public: } } } - if(patch == boost::none) + if(patch == std::nullopt) continue; for (int i = 0; i < 4; ++i) @@ -346,7 +346,7 @@ public: if(f_on_surface[i]) m_c3t3.remove_from_complex(c, i); else - m_c3t3.add_to_complex(c, i, patch.get()); + m_c3t3.add_to_complex(c, i, patch.value()); } m_c3t3.remove_from_complex(c); diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index be81a7809a4..1c4237191d0 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -535,7 +536,7 @@ void set_index(typename C3t3::Vertex_handle v, const C3t3& c3t3) v->set_index(typename C3t3::Curve_index(1)); break; case 0: - v->set_index(boost::get(v->index())); + v->set_index(Mesh_3::internal::get_index(v->index())); break; default: CGAL_assertion(false); diff --git a/Three/include/CGAL/Three/Scene_interface.h b/Three/include/CGAL/Three/Scene_interface.h index e60049c91a0..64441fe197d 100644 --- a/Three/include/CGAL/Three/Scene_interface.h +++ b/Three/include/CGAL/Three/Scene_interface.h @@ -58,7 +58,6 @@ namespace Three{ * */ class Scene_interface { public: - //!A bounding box is a box with each face corresponding to an extremum of its contents. typedef CGAL::Bbox_3 Bbox; diff --git a/Three/include/CGAL/Three/Scene_item.h b/Three/include/CGAL/Three/Scene_item.h index ca65c413f3c..b517a9c9108 100644 --- a/Three/include/CGAL/Three/Scene_item.h +++ b/Three/include/CGAL/Three/Scene_item.h @@ -81,7 +81,7 @@ public: PROGRAM_OLD_FLAT, /** Used to render flat shading without pre computing normals without geometry shader*/ PROGRAM_SOLID_WIREFRAME, //! Used to render edges with width superior to 1. PROGRAM_NO_INTERPOLATION, //! Used to render faces without interpolating their color. - PROGRAM_HEAT_INTENSITY, //! Used to render special item in Display_property_plugin + PROGRAM_HEAT_INTENSITY, //! Used to render special item in Heat_method_plugin NB_OF_PROGRAMS //! Holds the number of different programs in this enum. }; typedef CGAL::Bbox_3 Bbox; diff --git a/Three/include/CGAL/Three/Viewer_interface.h b/Three/include/CGAL/Three/Viewer_interface.h index c1330a12301..2bdba0aadd3 100644 --- a/Three/include/CGAL/Three/Viewer_interface.h +++ b/Three/include/CGAL/Three/Viewer_interface.h @@ -70,7 +70,7 @@ public: PROGRAM_OLD_FLAT, /** Used to render flat shading without pre computing normals without geometry shader*/ PROGRAM_SOLID_WIREFRAME, //! Used to render edges with width superior to 1. PROGRAM_NO_INTERPOLATION, //! Used to render faces without interpolating their color. - PROGRAM_HEAT_INTENSITY, //! Used to render special item in Display_property_plugin + PROGRAM_HEAT_INTENSITY, //! Used to render special item in Heat_method_plugin PROGRAM_TETRA_FILTERING, //! Used in Scene_tetrahedra_item with Tetrahedra_filtering_plugin NB_OF_PROGRAMS //! Holds the number of different programs in this enum. }; diff --git a/Three/include/CGAL/Three/exceptions.h b/Three/include/CGAL/Three/exceptions.h index cf3640d5b46..dd923aa5b2b 100644 --- a/Three/include/CGAL/Three/exceptions.h +++ b/Three/include/CGAL/Three/exceptions.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include namespace CGAL{ @@ -44,7 +44,7 @@ public: template struct Optional_or_bool { - typedef boost::optional type; + typedef std::optional type; template static type invoke(Callable f) { return type(f()); } diff --git a/Triangulation/doc/Triangulation/Triangulation.txt b/Triangulation/doc/Triangulation/Triangulation.txt index c992f6d7cd3..452891fa415 100644 --- a/Triangulation/doc/Triangulation/Triangulation.txt +++ b/Triangulation/doc/Triangulation/Triangulation.txt @@ -347,8 +347,8 @@ ask the triangulation to construct the set of edges (\f$ 1\f$ dimensional faces) incident to the vertex at infinity. It is easy to see that these edges are in bijection with the vertices on the convex hull of the points. This gives us a handy way to count the convex hull vertices -(include files triangulation1.cpp and -triangulation2.cpp are given and commented below). +(include files triangulation1.h and +triangulation2.h are given and commented below). \cgalExample{triangulation.cpp} @@ -368,14 +368,14 @@ there are (at least) two possibilities: The first is to iterate over the full cells of the triangulation and check if they are infinite or not: -\cgalExample{triangulation1.cpp} +\cgalExample{triangulation1.h} A second possibility is to ask the triangulation to gather all the full cells incident to the infinite vertex: they form precisely the set of infinite full cells: -\cgalExample{triangulation2.cpp} +\cgalExample{triangulation2.h} One important difference between the two examples above is that the first uses little memory but traverses all the full cells, while the second @@ -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/doc/Triangulation/examples.txt b/Triangulation/doc/Triangulation/examples.txt index 36db1597b8f..5ced981de5e 100644 --- a/Triangulation/doc/Triangulation/examples.txt +++ b/Triangulation/doc/Triangulation/examples.txt @@ -3,8 +3,8 @@ \example delaunay_triangulation.cpp \example regular_triangulation.cpp \example triangulation.cpp -\example triangulation1.cpp -\example triangulation2.cpp +\example triangulation1.h +\example triangulation2.h \example triangulation_data_structure_dynamic.cpp \example triangulation_data_structure_static.cpp */ diff --git a/Triangulation/examples/Triangulation/triangulation.cpp b/Triangulation/examples/Triangulation/triangulation.cpp index 0044bc1da77..0e791d871a2 100644 --- a/Triangulation/examples/Triangulation/triangulation.cpp +++ b/Triangulation/examples/Triangulation/triangulation.cpp @@ -36,8 +36,8 @@ int main() std::cout << "There are " << edges.size() << " vertices on the convex hull." << std::endl; -#include "triangulation1.cpp" // See below -#include "triangulation2.cpp" +#include "triangulation1.h" // See below +#include "triangulation2.h" return 0; } diff --git a/Triangulation/examples/Triangulation/triangulation1.cpp b/Triangulation/examples/Triangulation/triangulation1.h similarity index 100% rename from Triangulation/examples/Triangulation/triangulation1.cpp rename to Triangulation/examples/Triangulation/triangulation1.h diff --git a/Triangulation/examples/Triangulation/triangulation2.cpp b/Triangulation/examples/Triangulation/triangulation2.h similarity index 100% rename from Triangulation/examples/Triangulation/triangulation2.cpp rename to Triangulation/examples/Triangulation/triangulation2.h diff --git a/Triangulation/include/CGAL/Delaunay_triangulation.h b/Triangulation/include/CGAL/Delaunay_triangulation.h index 262f451fdc1..8fa25e4d08c 100644 --- a/Triangulation/include/CGAL/Delaunay_triangulation.h +++ b/Triangulation/include/CGAL/Delaunay_triangulation.h @@ -130,12 +130,12 @@ private: // Wrapper struct Side_of_oriented_subsphere_d { - boost::optional* fop; + std::optional* fop; Construct_flat_orientation_d cfo; In_flat_side_of_oriented_sphere_d ifsoos; Side_of_oriented_subsphere_d( - boost::optional& x, + std::optional& x, Construct_flat_orientation_d const&y, In_flat_side_of_oriented_sphere_d const&z) : fop(&x), cfo(y), ifsoos(z) {} @@ -145,7 +145,7 @@ private: { if(!*fop) *fop=cfo(a,b); - return ifsoos(fop->get(),a,b,p); + return ifsoos(fop->value(),a,b,p); } }; public: @@ -416,7 +416,7 @@ Delaunay_triangulation Dark_triangulation dark_side( maximal_dimension(), flat_orientation_ ? - std::pair(current_dimension(), flat_orientation_.get_ptr()) + std::pair(current_dimension(), &flat_orientation_.value()) : std::pair((std::numeric_limits::max)(), (Flat_orientation_d*) nullptr) ); Dark_s_handle dark_s; diff --git a/Triangulation/include/CGAL/Regular_triangulation.h b/Triangulation/include/CGAL/Regular_triangulation.h index 2d63893e38a..b2e6a651d49 100644 --- a/Triangulation/include/CGAL/Regular_triangulation.h +++ b/Triangulation/include/CGAL/Regular_triangulation.h @@ -129,12 +129,12 @@ private: // Wrapper struct Power_side_of_power_sphere_for_non_maximal_dim_d { - boost::optional* fop; + std::optional* fop; Construct_flat_orientation_d cfo; In_flat_power_side_of_power_sphere_d ifpt; Power_side_of_power_sphere_for_non_maximal_dim_d( - boost::optional& x, + std::optional& x, Construct_flat_orientation_d const&y, In_flat_power_side_of_power_sphere_d const&z) : fop(&x), cfo(y), ifpt(z) {} @@ -144,7 +144,7 @@ private: { if(!*fop) *fop=cfo(a,b); - return ifpt(fop->get(),a,b,p); + return ifpt(fop->value(),a,b,p); } }; diff --git a/Triangulation/include/CGAL/Triangulation.h b/Triangulation/include/CGAL/Triangulation.h index 55a118a7b69..1c1bff78370 100644 --- a/Triangulation/include/CGAL/Triangulation.h +++ b/Triangulation/include/CGAL/Triangulation.h @@ -88,12 +88,12 @@ protected: // Wrapper struct Coaffine_orientation_d { - boost::optional* fop; + std::optional* fop; Construct_flat_orientation_d cfo; In_flat_orientation_d ifo; Coaffine_orientation_d( - boost::optional& x, + std::optional& x, Construct_flat_orientation_d const&y, In_flat_orientation_d const&z) : fop(&x), cfo(y), ifo(z) {} @@ -102,9 +102,9 @@ protected: CGAL::Orientation operator()(Iter a, Iter b) const { if (*fop) - return ifo(fop->get(),a,b); + return ifo(fop->value(),a,b); *fop = cfo(a,b); - CGAL_assertion(ifo(fop->get(),a,b) == CGAL::POSITIVE); + CGAL_assertion(ifo(fop->value(),a,b) == CGAL::POSITIVE); return CGAL::POSITIVE; } }; @@ -117,7 +117,7 @@ protected: flat_orientation_ = *preset_flat_orientation_.second; } else - flat_orientation_ = boost::none; + flat_orientation_ = std::nullopt; } typedef typename TriangulationTraits::Orientation_d @@ -188,7 +188,7 @@ protected: // DATA MEMBERS Triangulation_ds tds_; const Geom_traits kernel_; Vertex_handle infinity_; - mutable boost::optional flat_orientation_; + mutable std::optional flat_orientation_; // The user can specify a Flat_orientation_d object to be used for // orienting simplices of a specific dimension // (= preset_flat_orientation_.first) 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/Concepts/ConstrainedTriangulationTraits_2.h b/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationTraits_2.h index 6f7a9e5ea85..e57a8ebb6f4 100644 --- a/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationTraits_2.h +++ b/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationTraits_2.h @@ -40,7 +40,7 @@ public: /*! A function object whose `operator()` computes the intersection of two segments. -`boost::optional > operator()(Segment_2 s1, Segment_2 s2);` +`std::optional > operator()(Segment_2 s1, Segment_2 s2);` Returns the intersection of `s1` and `s2`. */ typedef unspecified_type Intersect_2; 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_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 331d424eaec..e08b1ab895d 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -1891,16 +1891,16 @@ compute_intersection(const Gt& gt, #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS typedef typename Gt::Segment_2 Segment_2; if(result){ - if (const Segment_2* s = boost::get(&*result)){ + if (const Segment_2* s = std::get_if(&*result)){ std::cerr << CGAL::internal::cdt_2_indent_level << "compute_intersection: " << *s << '\n'; - }else if(const Point_2* p = boost::get(&*result)) + }else if(const Point_2* p = std::get_if(&*result)) std::cerr << CGAL::internal::cdt_2_indent_level << "compute_intersection: " << *p << '\n'; } #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS if(result){ - if(const Point_2* p = boost::get(&*result)){ + if(const Point_2* p = std::get_if(&*result)){ pi = *p; return true; } 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/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index f8ebae52e97..0b1170a552e 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -841,7 +841,7 @@ system when clearing or destroying the triangulation. This can be important for algorithms like simplifications of data sets which will produce fragmented memory usage (doing fresh copies of the data structures are one way out in such cases). The asymptotic memory overhead of `Compact_container` for its -internal bookkeeping is otherwise on the order of \f$ O(\sqrt{n})\f$. +internal bookkeeping is otherwise on the order of \cgalBigO{\sqrt{n}}. \cgalFigureRef{Triangulation3figmemory} shows the number of bytes used per points, as measured empirically using `Memory_sizer` for large triangulations diff --git a/Triangulation_3/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h index 8040af90f2c..e588e7f6cf9 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h @@ -14,6 +14,8 @@ #include +#include + namespace CGAL { template < class Tr, class Inc > @@ -337,7 +339,9 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre std::array vert = {&(cur_cell->vertex(0)->point()), &(cur_cell->vertex(1)->point()), &(cur_cell->vertex(2)->point()), &(cur_cell->vertex(3)->point())}; - int inside = 0, outside = 0, regular_case = 0, degenerate = 0; + CGAL_assertion_code(int inside = 0;) + CGAL_assertion_code(int outside = 0;) + int regular_case = 0, degenerate = 0; if(cur.lt == Tr::FACET && prev.cell != Cell_handle()) { // [source, target] entered the cell `cur` via a facet. @@ -347,7 +351,8 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Simplex cur_after_walk; auto case_target_is_inside_cur_cell = [&](int case_nb) { - inside = case_nb; + CGAL_USE(case_nb); + CGAL_assertion_code(inside = case_nb;) prev_after_walk = {cur_cell, Tr::CELL, -1, -1}; cur_after_walk = {{}, Tr::CELL, -1, -1}; }; @@ -355,7 +360,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre if(nnext == Cell_handle{}) { nnext = cur_cell->neighbor(facet_nb); } - outside = facet_nb; + CGAL_assertion_code(outside = facet_nb;) prev_after_walk = {cur_cell, Tr::FACET, facet_nb, -1}; cur_after_walk = {nnext, Tr::FACET, nnext->index(cur_cell), -1}; }; diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 7cdc9fc5eda..709d2f6d133 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -22,21 +22,25 @@ create_single_source_cgal_program("test_regular_traits_3.cpp") create_single_source_cgal_program("test_RT_cell_base_with_weighted_circumcenter_3.cpp") create_single_source_cgal_program("test_robust_weighted_circumcenter.cpp") 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) + create_single_source_cgal_program("test_simplex_iterator_3.cpp" ) + create_single_source_cgal_program("test_segment_cell_traverser_3.cpp" ) + target_compile_features(test_simplex_iterator_3 PRIVATE cxx_std_17) 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." + "NOTICE: test_simplex_iterator_3.cpp and test_segment_simplex_traverser_3.cpp require 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") create_single_source_cgal_program("test_triangulation_serialization_3.cpp") +create_single_source_cgal_program("test_dt_deterministic_3.cpp") +create_single_source_cgal_program("test_Triangulation_with_transform_iterator.cpp") +create_single_source_cgal_program("test_Triangulation_with_zip_iterator.cpp") if(TARGET CGAL::TBB_support) message(STATUS "Found TBB") diff --git a/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.cpp b/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.cpp index 35d2acc07c9..e1532362bb7 100644 --- a/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.cpp @@ -27,9 +27,9 @@ int main() std::stringstream buffer; buffer << dt3; - //~ std::ofstream out ("test_dt_deterministic_3.in"); - //~ out << dt3; - + //std::ofstream out ("test_dt_deterministic_3.in"); + //out << dt3; + //out.close(); //reading the result from a file std::ifstream file ("test_dt_deterministic_3.in"); diff --git a/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.in b/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.in index ec9008c87fe..c04c6f739de 100644 --- a/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.in +++ b/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.in @@ -1001,10698 +1001,10698 @@ 8 1 0 9 0 0 5346 -509 200 354 331 -66 533 547 545 -201 206 27 203 -911 613 923 919 -283 259 282 263 -352 43 445 350 -645 8 648 649 -978 967 968 600 -203 27 193 206 -520 506 522 25 -230 229 224 130 -554 461 459 552 -191 205 190 181 -765 116 12 75 -762 604 12 765 -71 667 73 690 -669 625 14 624 -725 724 723 728 -374 366 373 372 -507 356 505 20 -301 0 289 36 -582 580 0 581 -694 756 695 704 -71 688 686 690 -26 143 0 216 -961 945 929 203 -748 46 757 4 -95 764 705 680 -141 133 147 149 -714 732 721 675 -198 518 40 362 -351 359 368 370 -703 749 702 93 -191 22 205 181 -763 758 429 366 -442 444 57 350 -225 16 0 140 -95 703 702 92 -94 102 99 93 -76 75 12 72 -249 241 335 28 -428 435 360 367 -328 317 329 40 -216 209 210 142 -566 71 686 690 -375 367 365 361 -733 751 93 744 -759 366 364 747 -615 77 74 612 -90 674 722 721 -99 94 93 92 -44 6 360 367 -224 222 226 229 -321 302 312 304 -321 303 39 314 -563 568 0 564 -70 435 559 433 -757 420 366 4 -0 725 723 728 -902 915 984 897 -147 145 0 151 -292 293 282 259 -804 803 812 805 -541 543 540 536 -219 220 223 336 -612 74 610 646 -751 97 734 770 -129 130 131 0 -765 766 767 758 -841 110 843 837 -193 195 181 22 -460 457 454 455 -5 54 421 374 -0 672 674 84 -546 468 0 58 -93 94 102 748 -362 517 510 44 -554 546 465 556 -0 819 821 101 -885 886 840 839 -204 162 195 22 -415 706 417 45 -67 58 546 555 -158 146 153 154 -241 336 335 28 -709 700 88 711 -728 723 0 724 -617 909 619 910 -687 775 764 774 -68 575 577 576 -0 305 852 270 -0 254 248 253 -0 836 846 111 -615 606 607 609 -107 106 851 850 -173 170 134 152 -476 481 479 475 -486 494 0 493 -948 180 177 182 -442 350 435 44 -413 421 373 372 -736 91 735 727 -639 79 80 78 -174 1 171 179 -163 164 174 153 -196 200 203 199 -990 999 987 1000 -812 39 306 814 -176 178 168 0 -798 803 805 795 -491 500 523 156 -307 308 37 383 -492 490 493 148 -737 735 731 727 -290 295 297 390 -0 735 823 736 -192 205 193 190 -262 283 264 263 -284 338 243 337 -388 49 389 48 -0 641 637 643 -278 288 281 280 -303 302 321 304 -306 310 36 37 -170 152 0 135 -135 151 132 133 -755 756 96 773 -485 475 0 473 -178 129 169 0 -156 211 155 202 -410 0 412 409 -544 540 543 537 -520 519 527 602 -600 633 594 9 -957 958 0 164 -673 683 682 672 -160 153 165 163 -231 235 239 221 -204 166 195 162 -160 529 524 523 -195 162 180 22 -21 178 176 0 -132 137 140 151 -899 901 915 938 -183 188 187 28 -178 169 168 0 -213 331 206 200 -368 442 367 44 -465 556 0 458 -184 232 231 0 -295 333 318 282 -686 687 96 566 -318 324 331 329 -218 220 26 0 -694 686 695 756 -795 798 938 797 -304 271 3 269 -675 730 722 714 -302 289 3 304 -613 761 604 605 -287 237 245 34 -196 198 200 199 -0 253 248 256 -255 31 257 263 -187 22 208 191 -155 202 209 186 -202 212 22 27 -732 731 91 727 -733 99 820 102 -338 284 339 0 -364 376 308 747 -134 178 175 230 -121 974 970 960 -187 191 208 28 -406 449 0 405 -242 246 237 238 -0 816 817 38 -216 26 210 209 -27 195 194 193 -538 544 0 475 -205 326 192 206 -353 504 509 356 -881 796 797 805 -379 745 749 708 -805 812 866 814 -0 894 895 898 -361 375 309 364 -206 205 193 192 -201 200 206 203 -83 677 673 679 -751 750 743 741 -692 685 698 696 -329 328 370 313 -301 0 385 289 -322 314 30 39 -274 281 283 262 -36 0 305 38 -37 0 36 38 -264 266 269 273 -501 499 462 61 -294 312 263 282 -206 324 192 199 -34 287 277 278 -318 317 319 324 -944 932 118 943 -324 323 325 199 -346 393 348 0 -209 215 219 336 -302 303 289 304 -791 784 826 831 -365 5 421 374 -671 683 0 665 -68 561 550 549 -558 557 57 70 -185 187 28 183 -0 933 189 253 -251 205 190 191 -20 212 202 27 -263 267 259 260 -211 507 505 20 -346 297 387 0 -302 316 290 41 -0 79 643 8 -435 44 511 516 -387 388 394 386 -326 324 192 206 -33 285 288 286 -283 267 259 263 -360 6 605 761 -328 30 323 363 -287 33 284 0 -301 384 37 310 -517 24 515 516 -45 709 707 703 -210 209 219 17 -185 219 17 175 -353 356 344 349 -56 447 402 0 -50 373 46 380 -758 76 429 694 -143 210 217 149 -0 245 34 278 -405 409 0 408 -355 504 358 509 -565 689 688 432 -569 82 662 571 -316 290 294 302 -815 810 807 100 -545 66 541 543 -7 543 0 66 -774 780 625 10 -755 781 792 794 -783 627 787 794 -416 417 706 52 -233 235 221 0 -803 322 39 309 -645 654 650 649 -160 158 153 525 -290 298 300 299 -385 0 300 289 -0 650 649 637 -404 418 0 424 -0 625 10 668 -34 287 237 0 -41 315 302 313 -365 428 374 763 -412 0 414 411 -939 914 990 970 -93 708 749 745 -606 604 12 762 -703 751 743 744 -292 286 298 35 -391 5 397 365 -346 387 393 0 -278 276 277 0 -269 266 268 273 -390 2 42 329 -0 273 269 268 -223 241 240 239 -527 965 596 597 -81 599 634 592 -711 750 726 742 -357 314 375 369 -53 699 0 87 -718 724 716 713 -924 918 931 920 -247 236 239 235 -521 201 508 20 -543 7 59 468 -64 534 515 512 -756 94 695 704 -324 40 329 317 -892 878 901 900 -199 945 930 937 -459 554 465 460 -464 466 463 477 -537 543 59 468 -114 911 793 910 -540 541 0 543 -447 43 445 352 -419 424 50 52 -522 161 527 197 -351 355 359 354 -160 524 158 525 -307 0 38 816 -440 436 0 438 -399 406 408 398 -451 454 0 452 -198 362 40 363 -412 409 404 422 -493 486 494 18 -508 509 25 506 -309 310 308 376 -348 349 345 0 -42 392 393 394 -345 344 340 0 -511 558 57 70 -395 397 371 48 -358 498 43 63 -2 348 353 345 -212 205 22 27 -543 541 0 66 -64 63 512 510 -440 70 433 57 -345 330 353 332 -63 350 445 43 -411 0 414 416 -487 144 0 490 -559 511 514 516 -684 685 567 678 -404 423 0 418 -673 83 679 683 -551 572 589 68 -573 560 607 565 -955 957 950 947 -224 230 130 129 -235 247 236 0 -0 91 735 736 -514 609 559 608 -160 153 0 165 -557 70 436 440 -550 563 0 562 -750 731 742 741 -462 478 0 464 -510 517 23 515 -548 542 582 65 -704 419 693 694 -490 146 0 158 -131 130 228 0 -539 540 531 538 -757 366 759 4 -498 457 451 43 -425 440 0 438 -461 460 554 459 -140 139 0 145 -232 247 231 0 -152 133 135 134 -375 391 369 371 -525 142 148 154 -354 355 359 358 -971 120 960 962 -78 635 639 636 -24 19 23 515 -507 211 156 20 -208 205 22 212 -196 25 200 518 -69 70 436 557 -366 758 757 759 -425 438 433 440 -69 557 556 553 -0 1000 987 999 -405 423 0 404 -440 557 0 436 -74 78 584 646 -478 501 462 61 -479 481 485 475 -491 521 522 508 -446 347 451 0 -19 23 515 534 -471 472 0 470 -536 543 540 537 -665 670 683 83 -761 604 762 765 -214 216 0 495 -421 413 422 410 -532 520 502 522 -679 681 683 83 -469 59 0 468 -513 477 539 501 -476 471 466 469 -453 460 454 455 -463 453 455 460 -532 536 528 540 -471 470 0 469 -486 493 488 489 -353 356 509 213 -522 519 25 197 -640 646 644 638 -629 644 623 641 -587 572 590 9 -546 465 0 467 -362 6 517 44 -62 495 500 507 -580 576 581 582 -702 704 94 749 -77 74 646 640 -0 725 728 11 -580 577 647 585 -452 56 447 445 -65 582 0 542 -337 240 238 0 -158 146 154 148 -570 71 565 72 -438 436 433 440 -80 638 8 648 -802 795 796 803 -156 521 491 20 -434 435 559 360 -350 511 57 435 -704 757 694 756 -696 678 698 680 -367 6 361 357 -720 699 700 719 -370 328 357 369 -141 144 0 492 -707 709 88 711 -68 551 561 549 -459 467 465 546 -546 545 468 58 -463 466 0 453 -648 638 8 645 -783 794 787 788 -585 647 80 584 -608 609 611 572 -623 621 14 669 -694 686 756 75 -929 196 197 203 -432 688 564 691 -80 79 0 8 -733 827 791 770 -62 495 496 0 -0 177 182 948 -646 588 612 570 -573 565 570 563 -549 575 0 550 -891 877 882 901 -793 911 765 116 -386 49 389 388 -417 51 0 53 -510 515 64 511 -502 508 491 522 -523 483 61 482 -86 679 676 677 -660 658 657 664 -698 685 684 678 -482 502 539 501 -491 523 61 482 -56 402 55 0 -136 127 138 126 -106 13 818 810 -668 670 666 83 -429 374 763 366 -633 81 594 9 -591 601 600 19 -124 983 984 985 -526 157 521 491 -963 960 929 962 -631 632 635 122 -894 996 893 939 -617 913 909 910 -169 135 0 128 -137 131 16 136 -140 145 0 141 -952 974 997 999 -75 773 756 767 -27 205 193 206 -0 737 741 727 -0 668 677 670 -687 690 678 667 -0 637 649 8 -616 922 614 24 -593 590 594 9 -94 695 771 756 -243 293 258 333 -6 44 362 357 -574 563 0 575 -705 53 87 699 -585 586 653 578 -844 885 840 843 -618 116 911 913 -360 6 761 361 -263 257 256 260 -830 792 790 828 -321 314 39 30 -115 614 921 923 -375 364 365 376 -569 663 0 568 -696 687 695 690 -53 692 698 696 -769 794 788 793 -719 701 0 700 -611 609 610 572 -733 751 744 739 -816 821 810 815 -53 698 0 699 -424 51 0 417 -448 401 394 392 -373 381 372 4 -755 99 94 754 -373 420 50 46 -41 313 302 316 -409 0 408 410 -418 51 0 424 -408 406 405 398 -442 367 5 391 -592 599 635 115 -548 582 576 589 -681 684 0 683 -138 127 16 0 -726 732 710 742 -702 705 703 95 -675 777 91 732 -770 768 791 99 -861 860 857 862 -359 362 370 354 -788 794 787 910 -603 616 608 24 -105 837 835 104 -280 258 261 244 -104 103 820 101 -98 786 843 839 -695 686 96 756 -683 670 673 83 -792 790 783 785 -726 714 710 732 -75 765 767 758 -684 681 680 83 -606 516 605 360 -822 98 837 830 -141 147 144 492 -794 788 783 790 -697 419 693 704 -101 746 0 740 -839 886 840 811 -743 744 0 708 -86 679 680 720 -811 818 850 13 -670 665 666 83 -753 754 752 102 -261 242 246 245 -906 910 787 909 -762 758 76 429 -438 433 689 426 -378 377 381 4 -431 688 693 430 -757 758 756 767 -95 86 85 97 -620 773 96 75 -560 433 434 689 -705 53 699 698 -718 717 724 722 -116 617 619 910 -829 769 100 828 -679 677 673 676 -676 679 674 673 -588 577 584 610 -93 102 745 748 -753 752 746 102 -710 712 0 725 -94 754 99 102 -635 632 78 74 -840 841 839 13 -734 778 825 826 -830 98 837 839 -802 322 803 309 -253 252 260 256 -814 39 306 309 -0 728 729 11 -89 701 0 712 -380 46 378 4 -272 275 283 274 -310 371 384 376 -704 46 757 748 -310 301 36 37 -306 308 310 37 -809 753 810 819 -788 794 910 793 -733 827 103 820 -252 933 870 253 -0 627 626 628 -0 103 104 101 -728 730 729 11 -730 728 725 11 -793 808 767 765 -0 846 105 838 -711 89 0 710 -905 915 917 912 -0 730 729 728 -756 755 94 754 -757 46 420 4 -105 822 837 104 -730 724 722 714 -892 936 900 895 -735 91 731 727 -741 750 731 751 -686 695 690 693 -809 822 837 830 -0 898 988 994 -810 13 829 809 -0 836 835 105 -269 0 268 270 -117 875 937 873 -744 740 0 745 -984 912 905 985 -0 274 272 273 -741 739 0 744 -101 820 753 102 -381 0 382 383 -134 178 129 169 -171 176 178 168 -130 234 229 226 -251 250 191 249 -0 833 110 846 -618 116 77 12 -0 852 854 270 -278 285 277 276 -329 324 331 40 -283 275 281 274 -259 258 280 244 -805 814 866 796 -815 760 747 759 -258 249 251 254 -155 204 156 202 -225 234 226 0 -280 261 245 244 -817 107 852 857 -603 19 534 591 -0 738 103 739 -723 716 0 724 -729 91 727 11 -857 32 818 866 -0 103 740 739 -617 907 630 909 -606 516 360 559 -894 898 994 991 -604 618 615 12 -184 231 232 223 -267 260 256 248 -280 248 267 0 -853 270 108 858 -639 79 78 636 -111 845 836 110 -0 902 897 896 -0 845 847 848 -0 112 842 844 -0 845 848 111 -628 621 14 629 -141 145 144 147 -634 599 635 592 -120 961 944 928 -618 116 617 77 -877 878 882 901 -514 561 559 609 -141 151 147 133 -609 573 607 612 -0 627 628 909 -908 985 122 907 -527 597 602 601 -796 760 807 808 -76 758 75 694 -620 96 619 621 -321 317 320 312 -27 204 194 195 -373 366 420 4 -585 584 80 586 -842 840 865 850 -202 204 156 20 -173 170 152 172 -229 234 130 0 -800 604 765 911 -580 647 577 587 -604 116 618 12 -234 228 130 0 -930 196 927 929 -516 24 605 517 -516 517 605 6 -640 643 641 630 -123 967 966 121 -961 195 942 193 -258 249 254 261 -224 229 226 130 -21 183 184 0 -494 480 0 495 -199 324 200 206 -94 702 771 695 -94 756 771 755 -598 966 0 123 -234 229 233 0 -216 215 214 0 -939 894 990 991 -143 216 210 142 -210 219 150 17 -141 145 0 144 -154 174 155 17 -135 169 129 128 -909 910 787 627 -184 231 229 0 -216 26 209 215 -225 140 132 16 -131 127 16 136 -82 637 645 650 -734 826 827 770 -132 137 16 140 -211 209 216 142 -587 590 593 9 -160 165 159 157 -226 222 221 229 -137 136 0 128 -126 127 138 0 -128 131 136 0 -131 127 136 0 -600 599 633 9 -598 123 633 600 -211 209 142 155 -597 596 0 965 -580 593 647 587 -78 632 635 631 -0 628 14 641 -569 571 645 82 -0 738 737 823 -147 152 146 149 -140 139 145 151 -145 147 0 144 -137 138 0 136 -175 21 184 230 -154 174 172 153 -640 617 629 77 -151 147 133 152 -129 131 128 0 -242 245 237 246 -292 295 35 290 -135 137 0 128 -522 526 521 491 -136 127 16 138 -132 131 16 137 -490 146 158 148 -19 968 616 24 -336 240 241 335 -201 213 206 200 -292 286 291 298 -40 317 324 323 -138 126 0 136 -151 145 0 139 -484 489 0 524 -135 137 132 151 -929 203 197 194 -140 151 141 133 -175 21 178 171 -185 186 17 219 -128 137 132 135 -164 172 0 167 -128 131 129 132 -129 130 132 131 -143 217 492 149 -139 16 0 138 -141 145 147 151 -160 165 0 159 -154 163 174 153 -598 595 0 597 -132 151 140 133 -128 131 132 137 -128 131 137 136 -263 319 260 282 -135 134 133 132 -128 129 135 132 -135 129 134 132 -173 133 152 134 -183 232 184 0 -139 137 16 138 -131 225 132 16 -139 138 0 137 -162 179 166 180 -990 914 125 970 -185 183 184 21 -136 127 126 0 -298 0 291 300 -160 163 165 157 -962 946 964 959 -634 635 982 980 -147 133 152 149 -149 152 146 173 -501 503 499 502 -26 218 0 217 -140 137 16 139 -136 138 16 137 -140 16 0 139 -527 519 601 602 -494 486 480 18 -147 152 0 146 -172 170 0 167 -17 1 175 171 -170 171 178 168 -489 490 158 148 -140 145 141 151 -195 180 181 22 -474 488 0 484 -494 495 216 142 -227 140 0 141 -534 601 602 591 -961 193 945 203 -174 167 172 164 -226 221 218 0 -137 151 0 139 -526 157 159 161 -143 148 492 493 -503 513 506 502 -143 142 148 494 -530 484 0 524 -623 644 662 82 -464 479 471 476 -492 493 0 143 -149 147 492 490 -471 476 470 469 -137 135 0 151 -328 30 363 322 -355 43 359 358 -142 210 154 155 -170 178 134 169 -149 173 154 210 -142 210 148 154 -338 243 334 339 -223 221 220 222 -143 26 210 216 -156 142 155 211 -201 194 203 27 -535 603 590 572 -180 187 181 22 -163 164 153 165 -194 961 929 203 -913 908 985 912 -349 504 355 353 -946 947 195 166 -202 209 211 155 -942 949 941 948 -60 485 474 473 -288 275 285 276 -158 153 0 160 -767 755 756 754 -175 178 134 171 -252 933 873 870 -618 604 911 116 -209 26 219 215 -490 489 493 148 -0 183 188 182 -148 149 146 154 -199 206 203 192 -171 167 172 174 -1 21 175 171 -174 164 172 153 -478 479 0 464 -210 149 148 154 -156 211 202 20 -223 222 220 219 -140 137 139 151 -173 134 175 150 -172 152 0 170 -147 151 0 152 -151 135 0 152 -526 161 522 521 -135 151 133 152 -534 552 533 602 -0 786 884 885 -187 22 191 181 -526 482 529 523 -169 129 128 0 -149 173 146 154 -187 177 182 183 -180 187 182 181 -523 157 526 491 -125 977 976 975 -252 190 933 253 -163 166 164 165 -990 986 970 125 -482 523 526 491 -485 538 0 475 -160 523 525 157 -490 149 146 148 -474 488 484 486 -505 344 330 356 -69 561 550 436 -233 229 231 0 -27 22 193 205 -175 171 134 173 -947 166 180 195 -146 153 0 158 -556 465 0 546 -143 149 492 148 -479 485 473 475 -537 476 477 469 -171 21 178 176 -170 178 169 168 -479 60 473 485 -520 519 602 534 -573 565 607 612 -591 600 603 19 -158 525 148 154 -0 994 894 898 -483 485 484 60 -531 482 530 529 -60 486 0 474 -536 513 459 537 -541 540 528 536 -959 964 165 958 -869 864 856 867 -164 165 0 153 -173 175 17 150 -183 188 182 187 -526 522 502 491 -217 227 0 141 -874 872 871 804 -17 171 175 173 -878 900 798 938 -64 535 514 515 -479 60 485 481 -594 595 0 598 -171 170 173 172 -179 1 176 177 -173 172 152 146 -23 926 24 517 -249 191 188 28 -167 170 0 168 -296 332 295 334 -1 177 183 21 -170 135 0 169 -605 614 606 604 -482 526 502 491 -193 22 181 205 -187 22 186 208 -864 874 871 804 -232 241 28 223 -179 167 171 174 -175 185 184 21 -171 168 170 167 -0 183 182 177 -935 117 876 936 -134 169 129 135 -219 150 175 222 -62 507 499 497 -26 215 216 0 -231 247 235 0 -800 911 765 793 -257 325 252 319 -968 922 616 24 -182 188 189 191 -840 887 865 811 -918 931 872 799 -903 882 901 891 -201 521 522 197 -163 162 174 166 -211 207 209 202 -220 239 223 240 -227 225 0 140 -170 169 0 168 -152 170 134 135 -134 170 169 135 -180 1 179 177 -179 1 171 176 -247 246 236 0 -171 167 170 172 -174 162 155 17 -153 172 0 164 -153 146 0 172 -182 189 181 191 -154 153 172 146 -172 146 0 152 -154 172 173 146 -17 1 174 162 -174 155 163 154 -261 280 245 0 -176 168 171 167 -891 877 901 892 -878 797 805 880 -163 166 174 164 -133 134 173 150 -130 224 132 225 -370 368 369 357 -149 150 133 173 -149 133 152 173 -170 171 134 178 -171 170 134 173 -17 1 171 174 -17 174 171 173 -173 174 171 172 -154 173 172 174 -17 174 173 154 -162 155 163 174 -0 177 950 176 -257 320 325 319 -179 176 171 167 -226 233 221 0 -182 191 181 187 -1 21 171 176 -118 943 935 893 -162 1 179 180 -176 1 21 177 -0 21 177 176 -942 180 948 181 -292 298 290 35 -249 208 191 28 -29 241 249 28 -118 943 873 935 -936 117 876 874 -0 870 933 253 -162 1 174 179 -162 179 174 166 -166 179 174 164 -179 167 174 164 -965 596 0 159 -179 176 950 177 -950 948 947 180 -520 527 519 522 -966 965 971 963 -879 936 876 874 -930 196 199 198 -879 874 864 878 -259 260 258 333 -182 188 191 187 -878 938 798 797 -353 355 354 509 -960 929 969 927 -972 951 952 120 -0 262 274 273 -864 798 874 804 -202 162 22 186 -874 798 872 804 -0 21 183 177 -971 120 974 960 -972 946 951 120 -344 496 342 0 -922 921 976 968 -223 222 184 231 -1 185 175 21 -1 183 185 21 -217 227 141 133 -144 490 487 492 -186 1 187 185 -1 177 187 183 -1 187 185 183 -184 185 175 222 -1 185 17 175 -162 187 22 186 -185 187 186 28 -162 187 180 22 -186 1 185 17 -162 1 186 17 -155 162 186 17 -194 27 193 203 -197 203 196 201 -180 187 177 182 -180 1 177 187 -162 1 180 187 -162 1 187 186 -118 933 873 932 -191 190 189 181 -261 242 258 249 -327 330 213 212 -187 208 186 28 -869 874 871 864 -890 887 882 888 -155 162 202 186 -292 293 295 282 -187 191 28 188 -331 40 324 200 -0 182 188 189 -902 896 899 897 -899 900 938 113 -296 339 35 0 -197 194 203 201 -339 295 35 293 -29 249 188 28 -0 254 261 248 -134 178 230 129 -227 140 133 132 -386 0 385 389 -506 508 509 504 -799 918 931 924 -27 212 205 206 -290 299 300 41 -520 519 25 522 -210 26 217 150 -532 602 528 536 -967 966 601 598 -520 461 513 506 -605 24 608 614 -27 195 193 22 -949 941 954 951 -195 162 166 180 -526 161 527 522 -242 237 245 244 -919 795 924 938 -193 205 181 190 -202 27 204 20 -865 861 857 862 -475 538 544 476 -27 204 195 22 -204 162 202 155 -247 241 223 239 -644 643 637 641 -194 961 195 946 -96 566 687 621 -373 366 374 420 -88 415 0 87 -750 742 743 741 -674 673 0 676 -115 618 923 908 -198 200 40 518 -562 550 573 560 -40 328 323 363 -204 162 22 202 -27 204 22 202 -203 206 193 192 -196 200 201 203 -220 215 26 0 -318 324 327 331 -774 772 771 768 -373 427 50 420 -101 753 746 102 -198 40 200 199 -0 118 935 893 -522 527 519 197 -196 25 201 200 -197 196 25 201 -175 222 150 224 -437 689 430 426 -2 332 331 329 -199 40 200 324 -328 322 314 30 -6 357 363 322 -759 366 747 4 -598 633 0 594 -678 764 680 696 -68 561 572 609 -211 214 209 207 -375 357 369 391 -330 327 213 331 -201 522 25 197 -494 142 148 18 -149 150 173 210 -232 29 247 0 -330 332 340 334 -208 191 22 205 -31 304 312 264 -186 208 22 202 -186 207 208 202 -322 357 328 314 -508 356 509 504 -359 362 368 370 -210 26 219 209 -203 200 206 199 -239 240 220 0 -155 186 209 17 -231 247 223 239 -231 247 239 235 -121 971 974 960 -522 506 508 25 -157 204 156 163 -163 204 156 155 -162 204 163 155 -163 166 204 162 -161 962 965 963 -600 967 601 598 -521 161 522 197 -327 250 212 205 -202 212 207 208 -141 217 133 149 -492 147 144 490 -210 150 217 149 -262 267 283 263 -29 241 242 249 -189 191 188 254 -287 237 284 244 -239 238 240 0 -29 246 242 241 -104 822 809 820 -214 216 209 215 -211 216 209 214 -209 186 219 17 -143 142 210 148 -142 209 210 155 -336 207 186 209 -134 230 224 129 -493 494 0 143 -219 26 150 218 -202 207 209 186 -201 20 27 213 -155 209 210 17 -143 210 149 148 -155 210 154 17 -210 173 154 17 -230 130 129 0 -276 285 277 0 -219 150 17 175 -210 150 173 17 -217 150 133 149 -284 243 338 339 -280 278 245 0 -356 499 508 507 -149 490 492 148 -210 26 150 219 -495 480 0 62 -143 26 217 210 -26 217 0 143 -412 0 380 414 -347 43 447 352 -356 507 508 20 -213 509 508 356 -331 200 354 40 -208 212 22 202 -20 213 212 27 -213 206 212 27 -201 213 27 206 -368 362 357 370 -391 357 369 368 -389 48 395 371 -396 399 400 47 -752 759 747 4 -496 344 497 0 -251 191 254 249 -241 238 240 239 -339 295 334 296 -16 127 228 0 -241 246 238 247 -130 228 234 225 -213 212 505 20 -287 288 33 285 -218 222 221 226 -227 226 225 224 -227 140 132 225 -214 215 209 207 -223 185 184 222 -185 219 175 222 -278 244 288 280 -131 228 127 0 -224 227 132 225 -219 26 218 220 -219 218 150 222 -134 175 150 224 -221 220 218 0 -237 284 337 0 -337 343 240 0 -224 226 225 130 -184 222 175 230 -219 26 220 215 -284 237 337 242 -230 229 130 0 -183 188 232 0 -33 0 286 35 -150 26 217 218 -230 129 178 0 -133 134 224 132 -16 228 225 0 -178 21 175 230 -227 140 141 133 -218 222 220 221 -218 219 220 222 -129 130 224 132 -239 235 236 0 -222 218 150 224 -130 234 226 225 -129 224 134 132 -247 29 246 0 -189 190 251 253 -231 247 232 223 -223 185 222 219 -237 337 238 0 -21 184 230 0 -218 222 226 224 -226 234 233 0 -21 230 178 0 -221 222 223 231 -231 222 184 229 -133 134 150 224 -224 227 133 132 -184 229 230 0 -131 130 132 225 -28 185 232 223 -218 226 227 224 -150 218 227 224 -150 227 133 224 -150 227 217 133 -150 217 227 218 -217 218 0 227 -227 226 218 0 -225 226 227 0 -292 275 291 286 -228 130 131 225 -228 225 131 16 -127 228 131 16 -232 185 184 223 -188 29 232 0 -221 222 231 229 -230 222 175 224 -134 175 224 230 -230 222 224 229 -184 222 230 229 -225 228 234 0 -229 231 221 233 -185 232 184 183 -185 28 232 183 -183 188 28 232 -188 29 28 232 -229 233 221 226 -231 235 233 0 -229 234 233 226 -235 233 221 231 -278 288 287 285 -829 839 811 886 -253 190 251 252 -221 239 220 0 -281 288 259 280 -287 285 277 278 -238 239 236 0 -232 29 28 241 -220 240 215 0 -223 239 220 221 -518 509 25 200 -361 322 802 309 -241 246 242 238 -251 205 191 250 -935 875 873 870 -286 0 298 35 -253 256 260 248 -247 241 232 223 -0 188 29 254 -186 28 208 336 -850 841 840 13 -246 236 238 247 -247 29 232 241 -247 29 241 246 -0 188 254 189 -33 287 284 244 -248 260 258 259 -0 278 281 280 -0 266 273 268 -285 33 287 0 -231 239 223 221 -221 235 239 0 -361 6 801 322 -246 236 279 238 -342 341 340 338 -244 287 245 278 -261 249 254 29 -253 252 251 260 -272 283 294 264 -342 330 340 341 -304 302 312 294 -275 286 285 0 -288 244 259 280 -270 265 271 305 -320 319 257 312 -278 244 280 245 -241 247 238 239 -219 336 186 209 -209 215 336 207 -0 904 905 903 -388 392 369 42 -255 267 262 263 -311 321 320 312 -186 336 208 207 -296 297 346 0 -33 284 339 293 -0 109 266 108 -220 215 336 219 -220 240 223 336 -264 266 273 262 -281 267 280 259 -305 858 265 32 -876 875 868 871 -243 341 338 334 -791 831 830 785 -244 237 284 242 -865 840 811 850 -247 236 238 239 -109 869 856 867 -31 311 312 304 -250 205 191 208 -0 118 934 933 -189 190 191 251 -276 275 285 0 -34 277 287 0 -237 287 284 0 -254 191 188 249 -254 249 188 29 -257 260 252 256 -267 248 259 260 -212 250 208 205 -249 250 191 208 -335 336 208 28 -294 290 300 302 -292 294 291 283 -850 865 818 811 -248 258 251 254 -866 880 805 881 -244 288 287 278 -340 339 334 296 -697 51 417 53 -258 242 261 244 -261 242 245 244 -853 311 304 265 -369 391 48 371 -244 237 245 287 -295 334 318 333 -295 318 316 282 -867 864 856 859 -35 298 290 297 -241 223 336 28 -336 185 223 219 -336 219 186 185 -223 240 241 336 -557 440 57 70 -28 336 186 185 -321 30 320 317 -253 251 254 248 -264 269 272 273 -275 288 281 276 -0 254 253 189 -189 251 254 253 -189 191 254 251 -248 258 254 261 -29 242 261 249 -0 266 262 273 -29 242 246 261 -271 265 36 305 -0 254 29 261 -246 29 261 0 -336 335 208 207 -246 261 245 0 -284 243 293 244 -238 279 237 0 -288 278 281 276 -810 13 818 811 -312 321 317 316 -991 898 988 897 -321 30 39 311 -303 39 311 321 -321 311 304 312 -44 6 367 357 -0 869 868 109 -0 867 869 109 -310 375 371 376 -311 30 320 321 -0 267 262 255 -0 272 269 273 -102 754 752 748 -400 47 395 396 -0 256 248 267 -242 243 244 258 -858 812 265 32 -248 258 260 251 -253 260 251 248 -853 856 265 858 -249 243 258 250 -258 250 251 249 -242 243 258 249 -266 109 853 108 -263 260 256 267 -327 341 330 212 -262 283 272 264 -275 291 286 0 -0 854 268 270 -271 0 3 269 -255 263 256 267 -255 263 264 31 -255 263 262 264 -264 269 3 272 -37 0 301 36 -265 39 311 303 -245 237 279 34 -264 273 272 262 -0 105 834 838 -262 267 281 283 -271 0 269 270 -0 838 834 824 -236 246 279 0 -88 89 0 711 -854 860 108 858 -255 257 256 263 -283 267 281 259 -208 341 207 335 -0 256 267 255 -264 266 262 255 -0 255 262 266 -0 109 255 266 -255 109 31 266 -31 266 264 255 -271 270 853 265 -304 303 289 271 -261 248 280 0 -306 39 303 310 -0 272 3 269 -238 236 279 0 -243 335 337 338 -19 616 603 24 -800 795 796 802 -274 283 272 262 -801 795 803 799 -297 299 290 41 -279 246 245 0 -38 306 36 37 -850 857 818 865 -53 692 0 698 -36 0 289 271 -0 108 266 268 -0 305 817 852 -854 852 858 270 -305 852 858 32 -274 272 275 0 -346 390 296 332 -265 311 304 303 -208 250 341 335 -33 0 285 286 -304 289 3 271 -276 274 275 0 -248 280 267 259 -34 237 279 0 -248 258 280 259 -262 273 272 274 -246 279 237 238 -386 299 387 41 -25 509 201 200 -298 0 297 35 -288 285 275 286 -290 300 302 41 -292 295 290 282 -272 3 291 0 -817 106 107 818 -291 0 3 300 -279 245 34 0 -245 279 237 246 -300 0 3 289 -34 278 277 0 -0 849 855 107 -332 295 334 318 -342 343 338 0 -259 263 260 282 -267 281 280 0 -267 262 281 0 -0 281 274 262 -243 258 293 244 -868 257 256 255 -244 284 243 242 -327 318 334 333 -244 288 33 287 -271 265 303 36 -327 331 206 213 -351 43 359 355 -292 291 290 298 -248 258 261 280 -457 63 498 461 -330 332 327 331 -340 330 344 345 -289 0 3 271 -0 278 276 281 -0 281 276 274 -275 281 274 276 -271 0 270 305 -344 330 353 345 -365 366 374 372 -353 348 349 345 -264 304 312 294 -321 328 313 314 -40 323 199 198 -38 817 32 813 -339 33 35 0 -249 335 242 243 -260 326 251 333 -337 338 343 0 -2 393 42 351 -332 2 390 329 -272 291 275 0 -283 291 292 275 -283 292 282 259 -346 345 2 332 -384 0 389 301 -214 215 343 0 -42 394 387 388 -272 294 3 264 -272 291 294 283 -327 333 334 250 -287 277 285 0 -278 287 245 34 -296 345 340 0 -399 0 400 47 -278 288 285 276 -275 283 281 288 -283 288 259 281 -288 293 292 259 -288 244 293 259 -316 319 317 312 -388 48 389 371 -301 303 289 315 -497 462 0 456 -293 292 33 288 -33 293 35 292 -244 293 33 288 -33 284 293 244 -293 258 259 244 -303 36 289 271 -23 24 515 517 -391 367 5 365 -343 215 240 0 -272 275 291 283 -300 299 385 41 -283 288 292 259 -283 292 288 275 -288 275 292 286 -33 288 292 286 -33 286 292 35 -413 373 381 372 -294 283 282 263 -855 857 860 852 -272 291 3 294 -264 283 294 263 -290 294 291 292 -282 294 290 292 -282 294 292 283 -36 0 271 305 -849 851 847 850 -821 815 307 377 -301 36 289 303 -315 301 303 310 -31 320 257 312 -250 335 208 249 -357 370 362 328 -292 293 35 295 -340 338 339 0 -337 242 238 241 -385 386 389 388 -304 265 303 271 -296 35 297 0 -297 298 290 299 -298 0 299 297 -47 0 400 395 -312 316 282 294 -614 613 604 605 -316 321 313 302 -319 320 325 317 -290 295 35 297 -297 295 35 296 -335 341 243 250 -33 339 35 293 -299 0 298 300 -286 0 291 298 -290 291 300 298 -290 300 291 294 -300 3 291 294 -250 326 251 205 -385 388 389 315 -383 382 381 372 -548 589 576 549 -303 311 304 321 -331 324 206 200 -424 416 0 411 -401 448 394 0 -380 0 378 379 -760 309 814 308 -385 301 289 315 -316 318 390 329 -313 317 329 328 -268 854 108 270 -31 311 320 312 -294 304 3 264 -294 302 3 304 -620 619 96 773 -881 796 789 797 -853 858 108 856 -0 108 854 860 -324 329 318 317 -264 304 3 269 -520 25 519 512 -249 335 208 28 -499 491 508 507 -302 300 3 289 -294 300 3 302 -313 369 315 314 -332 318 327 331 -306 309 310 308 -206 327 212 205 -306 305 265 32 -38 305 306 32 -305 306 36 38 -305 265 36 306 -265 303 36 306 -265 39 303 306 -385 315 289 302 -377 0 383 307 -400 396 395 48 -379 745 748 749 -37 0 38 307 -398 47 421 410 -263 319 257 260 -38 306 37 308 -38 308 37 307 -94 704 757 748 -302 300 289 385 -808 800 766 765 -620 116 773 75 -694 758 75 756 -306 39 310 309 -306 303 36 310 -506 509 358 504 -922 924 916 613 -781 627 794 619 -391 48 392 369 -397 5 421 365 -429 374 428 763 -775 83 86 677 -724 716 0 717 -303 310 39 314 -310 384 37 376 -309 310 314 39 -833 838 832 834 -303 301 36 310 -263 312 257 319 -508 20 201 213 -282 290 294 316 -312 302 316 294 -809 753 819 101 -118 935 873 933 -260 319 326 333 -378 0 381 377 -704 702 695 697 -606 604 762 761 -752 747 815 377 -751 97 770 92 -31 312 257 263 -31 312 263 264 -264 312 263 294 -302 315 303 321 -977 960 969 967 -475 481 538 476 -321 315 314 313 -329 316 318 317 -318 326 319 333 -293 259 258 333 -41 388 385 315 -410 0 408 399 -333 327 326 250 -334 333 243 250 -315 303 289 302 -41 386 385 388 -316 282 319 312 -494 216 143 142 -353 355 349 348 -303 310 314 315 -282 295 290 316 -206 326 327 205 -495 214 496 0 -318 324 319 326 -348 345 346 0 -316 282 318 319 -496 214 495 211 -40 323 324 199 -243 333 258 250 -309 314 322 39 -40 328 317 323 -42 392 394 388 -997 944 939 928 -771 768 755 781 -327 330 334 332 -450 439 440 57 -320 317 319 312 -326 250 327 205 -258 250 333 251 -263 312 319 282 -341 207 335 343 -257 319 252 260 -316 318 317 319 -251 326 190 205 -303 315 314 321 -316 317 313 321 -302 315 321 313 -841 837 839 13 -841 835 837 13 -822 831 98 830 -800 795 802 801 -312 321 316 302 -333 326 251 250 -194 195 961 193 -325 319 324 326 -321 317 313 328 -751 770 733 92 -913 910 911 114 -317 30 320 323 -0 889 890 112 -328 30 317 323 -325 324 192 326 -324 325 192 199 -733 770 99 92 -319 325 324 317 -327 324 206 331 -324 325 323 317 -325 320 323 317 -313 316 329 317 -326 192 190 205 -317 328 321 30 -328 314 321 30 -252 325 192 326 -252 192 190 326 -251 252 190 326 -260 326 252 251 -260 319 252 326 -326 319 252 325 -212 327 206 213 -332 318 331 329 -206 324 327 326 -318 324 326 327 -384 397 371 395 -282 318 319 333 -35 296 295 339 -351 43 347 352 -61 480 483 500 -559 435 511 516 -373 420 46 4 -56 452 0 439 -425 433 426 443 -367 375 365 391 -2 351 355 348 -444 445 57 350 -435 511 57 70 -351 359 370 354 -284 33 339 0 -2 348 345 346 -509 213 201 200 -477 513 503 501 -384 382 397 395 -296 340 345 332 -214 207 342 343 -519 23 25 196 -258 333 260 251 -449 423 0 405 -354 331 40 329 -376 371 384 397 -339 334 295 293 -249 241 242 335 -296 345 346 332 -243 335 250 249 -395 396 397 48 -338 337 284 0 -336 335 207 343 -482 501 481 61 -389 395 384 371 -367 357 391 368 -293 333 295 282 -293 259 333 282 -259 260 333 282 -282 260 333 319 -318 327 326 333 -341 334 243 250 -214 343 342 0 -28 185 223 336 -340 332 296 334 -339 243 334 293 -293 243 334 333 -293 334 295 333 -284 243 339 293 -327 332 334 318 -392 48 394 388 -342 207 341 343 -337 237 238 242 -510 358 512 518 -498 506 461 358 -240 337 238 241 -344 342 340 0 -220 240 336 215 -241 337 335 240 -241 242 335 337 -335 242 243 337 -243 284 337 242 -296 340 339 0 -475 476 544 470 -392 352 403 368 -2 353 354 331 -341 340 338 334 -330 340 341 334 -336 240 343 215 -340 330 345 332 -296 346 345 0 -341 327 250 212 -208 212 341 250 -387 299 297 41 -342 338 340 0 -54 423 449 405 -338 339 334 340 -208 212 207 341 -341 327 334 250 -341 330 334 327 -214 207 343 215 -336 343 207 215 -392 403 391 368 -243 335 338 341 -336 240 335 343 -337 335 240 343 -337 335 343 338 -338 335 343 341 -342 341 338 343 -348 393 347 0 -410 409 422 405 -439 452 0 458 -398 441 54 5 -396 403 441 5 -370 313 369 42 -451 452 447 445 -404 427 418 50 -526 532 502 522 -358 43 359 63 -309 376 308 364 -726 721 701 714 -62 496 497 0 -342 330 344 340 -450 444 439 57 -367 357 375 391 -403 442 441 5 -389 0 385 301 -446 348 347 0 -353 330 213 331 -353 330 331 332 -2 353 331 332 -345 353 2 332 -349 348 446 0 -497 344 349 0 -349 344 345 0 -387 394 393 0 -347 393 348 351 -2 348 393 351 -2 370 351 42 -354 2 331 329 -353 355 509 504 -505 356 213 20 -330 353 213 356 -359 43 350 63 -457 63 43 498 -678 687 764 696 -802 796 808 760 -359 43 352 350 -351 43 352 359 -496 214 342 0 -357 328 363 322 -301 371 310 315 -2 355 354 353 -2 355 353 348 -520 513 502 506 -355 347 348 351 -375 361 365 364 -353 349 344 345 -92 772 770 768 -359 63 510 358 -390 318 295 332 -503 499 462 501 -2 351 354 355 -968 922 24 926 -355 347 351 43 -309 375 376 364 -83 668 670 677 -510 63 511 64 -362 328 40 363 -394 48 49 388 -518 358 25 509 -352 445 444 350 -370 368 392 369 -383 0 384 37 -704 94 695 702 -83 775 666 668 -380 378 381 4 -376 397 382 372 -521 201 522 508 -498 461 503 460 -356 344 330 353 -62 462 0 497 -709 699 87 700 -728 724 0 730 -434 763 762 429 -518 358 512 25 -6 357 362 363 -6 357 322 361 -588 573 610 612 -375 365 391 397 -367 6 360 361 -314 371 315 310 -419 52 50 46 -370 328 369 313 -441 442 443 5 -359 352 368 350 -359 350 368 44 -368 44 367 357 -93 749 94 748 -689 429 430 426 -757 756 94 754 -433 435 57 70 -512 358 506 25 -364 361 802 309 -44 511 350 435 -436 70 560 433 -86 83 679 677 -322 375 314 309 -510 515 511 516 -491 521 508 20 -521 161 197 194 -559 435 516 360 -357 328 362 363 -360 516 605 6 -559 516 608 606 -40 323 198 363 -607 559 606 434 -434 360 762 763 -615 611 609 610 -516 608 606 605 -0 104 819 101 -748 378 46 4 -295 332 296 390 -362 354 40 370 -372 366 373 4 -54 443 425 426 -361 375 322 309 -412 422 404 50 -370 368 351 392 -422 427 404 50 -840 843 839 841 -361 357 322 375 -357 367 375 361 -314 375 369 371 -322 357 314 375 -351 352 368 359 -791 784 831 785 -354 329 40 370 -362 370 40 328 -329 313 370 42 -2 329 370 42 -420 757 758 694 -354 2 329 370 -412 0 413 380 -370 329 40 328 -48 396 397 391 -403 401 396 407 -364 366 372 747 -351 352 392 368 -732 85 777 731 -310 309 314 375 -406 449 405 398 -359 44 368 362 -368 44 357 362 -433 428 434 426 -383 308 37 376 -373 46 380 4 -328 314 357 369 -328 314 369 313 -389 384 301 371 -299 0 387 297 -354 2 370 351 -392 391 369 368 -404 412 411 409 -376 364 365 372 -314 369 315 371 -396 5 397 391 -388 371 389 315 -379 380 46 378 -308 310 37 376 -309 310 376 375 -364 366 365 372 -387 386 394 0 -370 392 351 42 -370 369 392 42 -416 706 414 52 -390 318 332 329 -376 365 397 372 -412 0 411 409 -314 375 371 310 -686 695 693 694 -420 374 427 429 -373 422 50 427 -404 423 418 427 -425 437 426 438 -90 721 722 714 -725 712 0 713 -422 54 427 374 -373 422 427 374 -420 419 50 46 -76 686 694 75 -422 54 423 427 -54 426 423 427 -760 802 814 309 -850 818 106 13 -401 49 400 0 -386 0 299 385 -376 384 37 383 -375 391 371 397 -383 0 37 307 -388 48 369 392 -301 371 384 310 -745 102 746 748 -315 369 313 388 -307 308 383 747 -383 308 376 747 -413 421 422 373 -373 380 381 4 -446 347 355 43 -50 412 411 404 -703 708 749 93 -742 710 0 11 -395 47 397 396 -50 418 404 424 -384 0 301 37 -374 421 372 373 -377 0 381 383 -378 0 380 381 -376 382 383 372 -101 753 819 821 -605 604 606 761 -380 0 379 414 -373 422 412 50 -41 42 313 390 -390 329 42 313 -386 385 299 41 -41 315 313 388 -41 313 316 390 -316 329 390 313 -2 390 346 332 -382 0 384 383 -376 384 383 382 -299 0 300 385 -302 300 385 41 -41 315 385 302 -389 371 301 315 -385 389 301 315 -316 295 290 390 -299 0 386 387 -382 0 395 384 -393 392 42 351 -395 0 389 384 -388 369 313 42 -41 388 313 42 -42 388 387 41 -387 388 386 41 -395 47 382 397 -400 0 49 395 -398 421 422 410 -42 393 346 387 -371 48 369 388 -315 371 369 388 -316 318 295 390 -382 413 381 372 -702 749 94 93 -49 0 386 389 -297 295 296 390 -346 297 296 390 -346 387 297 390 -390 387 297 41 -290 390 297 41 -316 390 290 41 -42 387 390 41 -42 387 346 390 -2 42 346 390 -376 397 384 382 -54 426 427 374 -398 54 449 405 -413 422 412 373 -49 395 389 48 -395 0 49 389 -0 777 735 91 -48 391 397 371 -5 428 54 374 -394 386 49 0 -394 388 49 386 -368 367 442 391 -42 393 387 394 -403 444 441 442 -47 0 395 382 -2 348 346 393 -2 393 346 42 -406 55 0 449 -448 393 394 0 -447 445 444 352 -396 398 399 47 -781 619 794 773 -447 347 448 0 -368 350 442 44 -420 427 419 430 -398 410 422 405 -711 700 88 89 -498 504 358 355 -449 425 0 423 -89 701 712 710 -49 400 395 48 -410 409 405 408 -375 397 371 376 -375 365 397 376 -367 442 435 44 -89 726 700 701 -706 0 379 708 -400 401 407 396 -591 600 9 603 -394 49 401 0 -560 70 561 559 -428 443 54 426 -367 442 428 435 -421 54 398 422 -48 394 401 392 -54 425 449 423 -48 394 49 401 -48 401 49 400 -48 401 400 396 -398 47 410 399 -398 410 408 399 -412 373 380 413 -403 396 391 5 -403 48 391 396 -48 401 396 403 -406 405 0 408 -406 55 449 441 -456 349 446 0 -19 926 24 23 -48 401 403 392 -392 48 391 403 -163 155 156 525 -405 404 0 409 -410 409 412 422 -399 406 0 408 -699 700 0 87 -45 697 417 53 -450 444 56 439 -391 403 5 442 -347 393 448 0 -400 407 399 396 -399 407 398 396 -399 406 398 407 -407 399 406 0 -407 406 55 0 -402 407 55 0 -401 407 402 0 -401 400 407 0 -407 400 399 0 -403 401 407 402 -398 410 405 408 -430 418 427 419 -411 50 404 424 -447 445 56 444 -47 0 410 399 -47 0 413 410 -424 417 0 416 -398 54 405 422 -428 426 54 374 -422 409 404 405 -413 0 412 410 -422 413 412 410 -413 373 380 381 -409 404 0 411 -413 0 381 380 -421 54 422 374 -414 380 46 379 -50 380 46 414 -724 723 716 713 -414 379 46 52 -421 422 373 374 -418 430 431 419 -441 444 55 450 -50 414 46 52 -365 421 372 374 -431 432 430 437 -50 412 414 411 -50 412 380 414 -50 412 373 380 -47 0 382 413 -382 0 381 413 -87 417 0 53 -721 726 720 85 -415 417 87 45 -397 5 396 421 -45 417 87 53 -416 417 0 415 -415 417 0 87 -397 421 372 365 -421 47 413 410 -437 438 0 432 -404 424 0 411 -771 764 92 772 -373 374 427 420 -425 438 0 437 -693 430 688 694 -393 448 394 392 -757 767 754 759 -419 418 50 424 -424 416 414 52 -50 424 414 52 -572 561 514 609 -427 418 50 419 -428 442 443 435 -5 398 396 421 -443 435 57 433 -421 396 47 398 -422 54 405 423 -437 438 689 426 -441 443 54 5 -422 423 404 427 -562 689 432 438 -767 100 759 808 -85 86 679 676 -690 685 692 696 -702 95 92 764 -422 423 405 404 -455 451 0 446 -5 54 398 421 -382 421 47 413 -382 421 413 372 -382 397 421 372 -382 397 47 421 -397 396 47 421 -426 428 443 433 -561 70 514 559 -424 417 416 52 -424 51 417 52 -419 51 424 52 -419 51 418 424 -424 411 414 416 -50 411 414 424 -427 419 50 420 -425 450 440 443 -425 449 450 443 -443 450 440 57 -490 158 0 489 -442 444 443 57 -429 374 427 426 -426 374 428 429 -18 158 524 525 -702 93 94 92 -574 568 571 569 -434 435 360 428 -694 430 688 76 -425 438 426 433 -5 374 365 428 -428 435 443 433 -5 428 365 367 -627 782 626 781 -420 374 429 366 -418 431 0 51 -418 431 51 419 -762 606 360 434 -45 705 87 709 -442 352 444 350 -54 425 423 426 -434 428 429 426 -731 85 777 97 -69 70 553 561 -510 516 517 515 -512 23 515 510 -430 693 419 694 -429 427 430 426 -675 85 777 732 -691 685 692 690 -418 437 0 431 -73 568 71 564 -532 526 527 522 -562 565 564 432 -420 427 430 429 -426 437 427 430 -620 686 75 96 -620 686 96 566 -686 687 695 96 -432 565 564 688 -443 440 433 57 -435 44 360 367 -433 435 434 428 -437 418 427 430 -437 432 0 431 -431 437 430 418 -448 401 402 0 -407 402 441 403 -515 514 64 511 -511 44 510 516 -512 515 64 510 -566 690 687 667 -436 70 433 440 -805 803 814 796 -931 925 198 363 -361 801 802 322 -512 461 520 506 -368 352 442 350 -396 441 398 5 -426 425 423 437 -423 425 0 437 -5 443 54 428 -423 437 0 418 -427 437 423 418 -427 426 423 437 -458 452 0 454 -402 56 444 447 -556 69 0 557 -555 69 553 551 -492 217 141 149 -446 498 43 355 -531 482 526 532 -481 501 478 61 -355 509 358 354 -442 444 441 443 -5 442 443 428 -443 442 57 435 -425 450 0 440 -442 350 57 435 -444 445 56 439 -12 607 72 612 -396 407 441 403 -396 407 398 441 -406 441 398 407 -406 55 441 407 -407 55 441 402 -402 444 352 447 -447 448 402 0 -414 0 379 706 -449 450 0 425 -444 56 55 450 -441 450 55 449 -56 439 0 450 -450 439 0 440 -55 450 0 449 -449 441 450 443 -403 352 442 368 -391 403 442 368 -442 428 5 367 -451 455 0 454 -451 347 447 0 -425 440 433 443 -403 352 444 442 -402 352 444 403 -402 444 441 403 -55 444 441 402 -55 56 444 402 -443 444 450 57 -450 441 444 443 -445 452 56 439 -444 445 439 57 -217 492 0 143 -349 446 348 355 -446 347 348 355 -448 392 393 351 -471 475 470 476 -347 448 393 351 -347 448 351 352 -448 392 351 352 -392 448 403 352 -403 448 402 352 -402 447 352 448 -448 447 352 347 -403 448 401 402 -448 403 401 392 -447 347 451 43 -451 347 446 43 -445 447 451 43 -455 453 0 454 -54 449 425 443 -54 441 449 443 -398 54 441 449 -406 441 449 398 -55 56 0 450 -458 454 0 465 -483 480 60 486 -451 447 452 0 -452 447 56 0 -503 499 456 462 -463 464 0 466 -468 7 0 58 -533 67 547 545 -67 535 547 551 -67 546 545 459 -459 546 465 554 -66 547 542 58 -456 455 0 446 -453 467 0 465 -474 485 0 473 -559 435 434 433 -499 497 456 462 -69 70 557 553 -456 463 0 455 -462 499 62 61 -458 445 439 452 -457 445 458 452 -454 457 458 452 -358 461 498 63 -498 451 446 43 -355 498 43 358 -212 207 505 202 -464 479 0 471 -455 463 0 453 -538 530 531 482 -465 454 0 453 -523 156 525 157 -629 641 623 14 -445 63 43 457 -504 499 456 503 -18 142 148 525 -63 461 554 64 -457 445 451 43 -457 445 452 451 -454 457 452 451 -454 457 451 455 -44 510 350 511 -561 560 559 609 -525 142 154 155 -554 459 67 552 -67 556 553 555 -330 356 213 505 -562 573 565 560 -467 469 0 468 -59 7 0 468 -70 511 553 514 -456 462 0 463 -66 545 547 58 -216 143 0 494 -70 435 511 559 -479 472 471 475 -341 505 330 212 -359 510 44 362 -507 500 61 491 -545 67 547 58 -538 539 544 476 -465 453 467 460 -918 15 931 920 -478 462 62 61 -476 479 471 475 -462 464 0 463 -551 69 561 549 -70 511 514 559 -465 457 458 454 -460 457 465 454 -453 460 465 454 -467 453 477 460 -493 487 488 489 -64 534 535 515 -69 556 0 555 -61 62 478 480 -557 439 57 440 -499 356 508 504 -459 465 467 460 -584 639 78 592 -568 73 0 564 -216 494 0 495 -466 471 0 469 -532 536 540 539 -453 466 0 467 -546 468 545 459 -752 754 100 759 -466 469 0 467 -459 467 477 460 -156 157 491 521 -60 474 0 473 -469 470 0 59 -499 508 506 504 -472 473 0 475 -141 147 492 149 -464 471 466 476 -561 70 560 436 -464 471 0 466 -522 201 25 508 -66 7 545 58 -530 529 0 531 -472 475 0 470 -525 158 153 154 -349 504 446 355 -529 526 523 157 -486 493 0 488 -18 525 148 158 -479 472 0 471 -486 483 484 60 -495 211 216 142 -62 478 0 462 -473 472 479 475 -464 476 466 477 -501 513 503 502 -531 529 526 482 -18 483 484 486 -474 484 0 485 -537 477 539 513 -521 194 201 27 -544 539 537 476 -483 481 485 60 -534 552 602 520 -503 455 456 498 -144 487 0 492 -466 453 463 477 -467 453 466 477 -477 469 466 467 -476 469 466 477 -67 556 554 553 -62 500 61 507 -477 453 463 460 -354 200 518 40 -487 490 0 489 -475 472 471 470 -530 481 482 538 -473 472 0 479 -479 60 0 473 -478 60 0 479 -500 523 61 491 -62 480 0 478 -480 60 0 478 -156 142 525 155 -493 489 18 148 -486 493 489 18 -490 489 487 493 -495 214 216 211 -20 212 505 202 -580 576 582 589 -147 490 0 144 -489 158 18 148 -507 491 508 20 -433 434 689 426 -61 478 483 480 -481 478 483 61 -157 163 156 525 -513 539 532 502 -539 501 476 481 -484 485 474 60 -483 481 61 482 -562 564 0 432 -483 478 60 480 -359 518 510 362 -499 507 61 491 -481 478 60 483 -483 480 486 18 -60 480 0 486 -481 479 60 478 -481 464 479 478 -476 464 479 481 -540 528 0 541 -459 477 467 537 -629 630 640 641 -147 146 0 490 -486 488 0 474 -493 494 148 18 -204 194 521 27 -496 344 505 356 -537 477 467 469 -486 484 474 60 -331 353 354 509 -163 155 525 154 -158 160 0 524 -524 489 0 158 -529 530 524 523 -486 489 484 18 -143 494 148 493 -503 506 499 502 -488 487 0 489 -488 489 0 484 -486 488 484 489 -465 554 458 457 -147 149 146 490 -64 461 552 512 -524 484 483 530 -530 524 0 529 -464 463 501 477 -476 464 481 501 -481 464 478 501 -502 508 499 491 -354 518 362 40 -500 142 156 211 -500 483 61 523 -539 502 513 501 -485 484 0 530 -491 507 156 20 -476 464 501 477 -495 211 500 507 -463 455 456 503 -462 463 456 503 -501 463 462 503 -217 141 0 492 -493 487 0 488 -487 493 0 492 -492 490 487 493 -497 349 456 0 -330 505 213 212 -486 480 0 494 -966 965 963 597 -584 592 78 74 -505 214 496 211 -562 560 565 689 -446 504 498 355 -491 500 156 507 -498 504 506 358 -510 63 350 511 -0 787 909 906 -20 505 211 202 -505 207 211 202 -356 497 344 349 -356 496 344 497 -204 27 521 20 -214 207 211 505 -456 455 446 498 -455 451 446 498 -455 457 451 498 -455 457 498 460 -457 461 498 460 -511 558 553 64 -349 356 504 353 -527 963 965 597 -521 27 201 20 -551 69 553 561 -157 161 526 521 -500 142 494 18 -500 480 483 18 -500 494 495 480 -500 495 62 480 -500 494 480 18 -61 500 62 480 -459 477 537 513 -62 507 61 499 -482 502 61 491 -502 499 61 491 -499 62 497 462 -494 142 500 495 -495 142 500 211 -464 501 462 478 -464 463 462 501 -64 461 554 552 -500 211 156 507 -498 504 456 503 -507 356 499 497 -501 502 499 61 -482 502 501 61 -555 556 553 69 -560 70 559 433 -160 529 523 157 -477 463 503 460 -463 455 503 460 -503 455 498 460 -477 463 501 503 -688 689 76 430 -446 456 498 504 -349 456 446 504 -349 456 504 497 -504 497 456 499 -497 356 499 504 -349 497 504 356 -341 207 505 212 -342 207 505 341 -342 505 330 341 -342 344 330 505 -342 344 505 496 -342 496 505 214 -214 207 505 342 -509 358 25 506 -504 499 503 506 -498 504 503 506 -498 503 461 506 -356 507 496 497 -507 62 496 497 -495 62 496 507 -507 496 495 211 -507 505 496 211 -356 505 496 507 -213 200 509 331 -633 81 0 594 -526 529 159 157 -518 23 512 510 -502 506 499 508 -213 356 508 20 -512 23 25 519 -197 519 25 196 -331 353 509 213 -508 213 201 509 -25 508 201 509 -513 461 460 503 -477 513 460 503 -538 531 0 540 -196 518 200 198 -537 468 59 469 -438 436 0 562 -527 528 596 532 -515 514 511 516 -512 506 520 25 -350 510 44 359 -350 63 510 359 -510 63 512 358 -512 63 461 358 -512 358 461 506 -78 632 631 640 -590 591 594 9 -44 6 517 516 -67 546 556 555 -517 362 363 6 -521 194 197 201 -198 362 363 517 -64 63 461 512 -503 461 506 513 -527 161 965 963 -156 157 521 204 -561 560 550 436 -459 461 460 513 -459 513 460 477 -532 513 536 539 -695 687 764 771 -436 550 0 562 -44 517 510 516 -198 517 518 362 -560 559 607 434 -72 622 71 566 -550 560 562 436 -599 921 115 616 -510 518 517 362 -620 617 619 116 -25 23 512 518 -44 6 516 360 -435 44 516 360 -542 582 0 548 -709 87 88 700 -574 568 570 571 -596 528 531 532 -782 768 780 781 -359 518 362 354 -359 358 518 354 -518 354 358 509 -518 354 509 200 -359 358 510 518 -23 518 517 510 -23 518 198 517 -23 518 196 198 -23 25 196 518 -160 159 0 529 -529 160 159 157 -591 595 594 598 -481 482 483 530 -64 554 67 552 -520 506 502 522 -502 506 508 522 -481 530 483 485 -156 204 521 20 -482 481 539 538 -602 519 601 534 -491 156 523 157 -18 483 500 523 -59 470 0 544 -585 647 0 80 -523 530 483 482 -67 553 535 551 -482 532 502 526 -607 565 76 72 -570 565 573 612 -529 482 530 523 -588 575 574 578 -615 607 612 609 -537 477 476 539 -544 470 0 475 -163 525 153 154 -18 524 483 523 -18 484 483 524 -18 489 484 524 -18 158 489 524 -160 525 153 163 -157 525 160 163 -160 524 525 523 -18 525 524 523 -523 500 18 525 -500 142 18 525 -500 142 525 156 -523 500 525 156 -577 576 580 589 -485 530 483 484 -532 539 531 482 -538 481 539 476 -513 532 520 502 -476 469 537 544 -523 524 483 530 -564 570 71 565 -12 606 607 615 -160 529 0 524 -9 81 592 599 -539 477 476 501 -583 595 0 594 -591 595 583 594 -652 648 0 649 -520 519 534 512 -534 23 512 519 -515 23 512 534 -577 586 578 588 -533 595 541 583 -595 541 0 528 -588 571 586 574 -460 554 465 457 -553 511 64 514 -520 532 527 522 -482 501 539 481 -545 468 537 459 -545 7 468 58 -69 70 561 436 -558 554 553 64 -540 544 0 538 -538 544 539 540 -527 602 532 520 -535 591 590 603 -19 23 534 519 -481 538 485 475 -611 592 115 599 -544 469 59 470 -531 528 0 540 -579 569 0 574 -586 646 584 638 -601 519 19 534 -540 537 539 536 -459 468 467 546 -546 467 0 468 -556 554 458 465 -537 467 468 469 -459 467 468 537 -476 469 544 470 -539 537 513 536 -539 482 532 502 -0 14 625 624 -531 538 0 530 -485 530 0 538 -537 469 59 544 -544 543 59 537 -544 537 539 540 -539 538 531 482 -458 439 558 557 -64 553 514 535 -870 257 252 256 -588 573 612 570 -520 513 536 532 -540 543 0 544 -67 555 553 551 -511 558 70 553 -553 514 535 551 -458 556 557 558 -58 67 547 555 -350 558 57 511 -481 530 485 538 -545 537 536 459 -532 540 531 539 -532 540 528 531 -533 66 541 545 -589 580 577 587 -660 665 666 670 -662 623 667 566 -542 66 0 65 -436 433 560 438 -432 564 0 691 -7 66 542 58 -7 542 0 58 -7 66 0 542 -7 59 0 543 -67 545 546 58 -577 586 584 585 -543 59 0 544 -545 543 541 536 -533 545 541 536 -545 536 537 543 -537 543 468 545 -543 7 468 545 -66 7 543 545 -562 550 563 573 -548 576 0 549 -513 459 552 536 -67 535 533 547 -557 70 558 553 -66 547 65 542 -9 603 611 572 -578 579 0 574 -547 548 65 542 -547 548 542 58 -58 542 0 548 -535 67 533 552 -572 603 590 9 -64 552 534 512 -552 461 513 520 -552 461 520 512 -533 552 67 545 -68 572 589 587 -911 800 789 793 -556 546 0 555 -67 545 552 459 -552 545 536 459 -552 520 534 512 -561 560 573 550 -561 69 550 549 -436 69 0 550 -550 69 0 549 -552 513 536 520 -553 70 514 561 -562 563 564 565 -563 564 0 562 -552 461 459 513 -555 546 0 58 -58 548 0 555 -64 67 535 552 -64 535 534 552 -534 535 533 552 -615 606 609 608 -533 536 552 545 -555 551 548 549 -555 551 547 548 -58 555 547 548 -555 67 547 551 -67 546 554 556 -555 69 551 549 -555 549 0 69 -64 67 553 535 -555 548 0 549 -558 63 554 64 -557 69 0 436 -558 439 57 557 -350 63 558 511 -511 63 558 64 -918 799 872 798 -434 360 763 428 -554 67 553 64 -557 458 0 556 -67 546 459 554 -63 457 554 461 -461 457 554 460 -620 72 686 566 -556 557 558 553 -439 557 0 440 -439 458 0 557 -556 558 554 553 -458 556 558 554 -457 458 558 554 -63 457 558 554 -457 558 445 63 -63 350 558 445 -558 350 57 445 -439 57 445 558 -439 558 445 458 -458 558 445 457 -0 936 892 895 -0 660 670 658 -68 561 573 550 -551 553 514 561 -560 559 434 433 -123 633 0 598 -436 560 562 438 -438 562 0 432 -602 536 532 520 -576 68 575 549 -577 587 610 68 -514 603 608 515 -659 660 657 664 -645 648 579 652 -551 549 68 589 -68 573 575 550 -566 690 686 687 -581 578 0 576 -568 574 570 563 -645 648 652 649 -610 577 584 587 -12 615 612 77 -575 68 550 549 -762 765 12 75 -788 769 806 790 -515 24 608 516 -620 72 75 686 -861 842 862 865 -562 573 563 565 -578 574 0 575 -584 592 610 587 -576 578 0 575 -576 575 0 549 -568 563 0 574 -72 76 607 12 -687 669 667 678 -683 684 0 665 -575 573 563 550 -72 71 686 566 -0 625 668 624 -620 72 566 622 -683 684 665 83 -547 535 533 590 -629 644 622 623 -678 666 567 684 -666 665 684 83 -678 666 684 83 -575 563 0 550 -589 547 65 590 -0 907 630 631 -567 661 663 664 -949 942 941 951 -115 616 921 614 -125 914 992 976 -613 604 800 911 -568 571 662 570 -0 668 10 677 -582 581 0 576 -578 586 579 574 -527 596 526 532 -612 615 609 610 -582 576 0 548 -569 655 0 663 -579 571 569 574 -12 607 612 615 -90 682 84 674 -564 563 570 565 -640 78 646 638 -589 68 576 549 -568 563 570 564 -568 570 71 564 -762 758 765 75 -12 612 72 77 -613 800 919 911 -650 637 645 649 -590 547 65 583 -585 577 586 578 -569 568 0 574 -587 572 610 68 -654 652 0 651 -577 576 578 581 -68 572 561 551 -572 514 561 551 -551 514 535 572 -612 565 607 72 -606 559 360 434 -916 922 923 921 -646 644 622 640 -551 590 547 589 -587 572 589 590 -615 612 74 610 -68 576 577 589 -921 614 922 923 -593 81 587 9 -588 574 570 571 -547 551 589 548 -645 586 648 638 -551 535 547 590 -581 577 585 578 -551 549 589 548 -586 571 579 574 -65 580 0 582 -660 658 665 670 -577 575 578 576 -622 646 612 570 -68 587 589 577 -653 586 579 578 -646 78 584 638 -596 531 526 532 -656 650 655 654 -639 635 78 592 -644 646 571 638 -577 588 584 586 -592 9 611 587 -634 635 639 592 -646 588 610 612 -577 576 581 580 -535 591 533 590 -587 81 592 9 -533 66 583 541 -583 66 0 541 -65 66 0 583 -157 964 521 204 -547 66 65 583 -551 572 590 589 -587 9 611 572 -594 81 593 9 -547 66 583 533 -74 632 78 640 -588 586 578 574 -577 575 588 578 -12 116 77 620 -653 579 648 652 -585 80 0 648 -601 595 602 591 -580 585 0 581 -580 577 585 581 -830 831 98 785 -593 594 0 81 -583 594 0 593 -579 648 645 586 -533 541 602 536 -533 591 583 590 -650 82 655 654 -533 591 595 583 -592 611 74 610 -601 597 602 595 -673 682 674 672 -843 786 885 839 -702 764 771 695 -9 592 611 599 -68 575 588 577 -68 573 588 575 -575 573 588 563 -588 573 570 563 -574 588 570 563 -574 575 588 563 -547 589 65 548 -548 582 589 65 -580 589 582 65 -604 116 12 765 -531 596 0 528 -638 78 643 640 -608 614 611 615 -611 115 74 615 -551 535 590 572 -990 939 991 914 -590 547 583 533 -514 535 572 603 -535 534 533 591 -648 586 80 638 -653 585 648 586 -65 593 0 580 -65 580 589 593 -593 580 589 587 -587 589 593 590 -593 589 65 590 -593 590 65 583 -65 583 0 593 -583 541 0 595 -927 960 929 963 -593 590 583 594 -590 591 583 594 -0 893 935 936 -534 19 601 591 -602 597 528 595 -527 526 596 161 -596 526 159 161 -596 529 159 526 -596 531 529 526 -531 529 0 596 -529 159 0 596 -535 534 591 603 -603 591 590 9 -595 528 0 597 -597 528 0 596 -966 121 0 123 -598 966 601 597 -943 117 873 935 -959 946 964 958 -166 946 958 964 -527 596 528 597 -602 552 533 536 -602 541 528 536 -909 628 619 627 -895 893 940 894 -602 533 534 591 -360 761 762 763 -611 115 615 614 -632 908 907 913 -794 627 787 910 -592 635 78 74 -592 115 635 74 -123 600 598 967 -591 594 600 598 -0 643 637 8 -644 638 571 645 -591 594 9 600 -639 636 0 79 -533 602 595 591 -602 552 536 520 -917 919 938 797 -974 999 0 986 -930 196 203 199 -944 961 932 945 -932 942 934 181 -0 981 989 993 -965 966 0 597 -959 965 0 159 -591 595 598 601 -601 595 598 597 -591 601 598 600 -602 528 541 595 -533 602 541 595 -527 597 528 602 -527 528 532 602 -994 898 988 991 -68 609 572 610 -514 535 603 515 -535 534 603 515 -603 534 19 515 -24 19 515 603 -606 360 761 762 -788 806 769 793 -702 764 92 771 -757 759 752 4 -516 24 608 605 -514 572 608 603 -434 763 429 428 -19 968 926 927 -603 600 616 19 -678 684 680 83 -0 641 642 637 -605 608 606 614 -684 567 0 665 -434 762 76 429 -755 792 769 794 -669 621 625 774 -651 650 656 654 -609 607 559 606 -609 560 559 607 -608 609 559 606 -919 915 917 938 -603 608 611 572 -609 560 607 573 -561 560 609 573 -603 24 608 515 -611 615 74 610 -577 610 588 68 -68 573 610 588 -923 913 618 911 -559 516 514 608 -516 514 608 515 -788 910 787 114 -80 639 78 584 -610 573 609 612 -570 565 612 72 -68 561 609 573 -572 609 514 608 -587 611 610 572 -592 611 610 587 -921 976 975 983 -638 643 637 644 -584 592 74 610 -82 659 642 650 -914 992 976 113 -622 644 571 662 -922 926 920 925 -816 813 38 307 -616 614 608 24 -68 573 609 610 -615 608 609 611 -581 653 0 578 -883 789 114 917 -599 81 633 9 -780 772 779 10 -611 115 592 74 -0 985 124 984 -906 905 114 912 -615 618 77 12 -95 764 772 92 -704 757 756 94 -623 642 641 644 -606 615 12 604 -606 614 615 604 -107 851 849 850 -92 770 99 768 -908 913 618 923 -908 913 923 912 -923 613 916 919 -614 604 613 923 -960 120 929 962 -606 608 615 614 -957 166 179 947 -124 984 983 993 -906 114 787 910 -916 924 938 919 -9 600 616 603 -9 616 611 603 -603 611 608 616 -616 611 608 614 -611 616 115 614 -611 599 115 616 -9 599 611 616 -9 599 616 600 -77 617 620 116 -613 924 916 919 -916 983 976 921 -930 196 929 203 -614 115 615 618 -615 115 74 618 -615 618 74 77 -604 618 614 615 -620 72 622 77 -72 77 612 622 -639 635 634 636 -12 72 620 77 -12 72 75 620 -12 116 620 75 -82 655 659 650 -0 122 907 631 -0 787 627 909 -566 96 620 621 -617 628 630 629 -580 647 0 585 -647 577 584 585 -81 639 0 647 -593 81 647 587 -72 612 570 622 -72 570 71 622 -664 658 0 665 -662 644 571 82 -593 81 0 647 -71 622 662 566 -628 626 619 627 -619 620 629 617 -620 77 629 617 -0 626 14 628 -640 632 631 630 -629 628 641 14 -570 571 662 622 -639 79 0 80 -634 636 0 639 -756 686 96 75 -782 784 780 768 -641 644 642 637 -669 621 14 625 -671 672 0 683 -666 665 567 684 -74 78 646 640 -0 626 625 14 -621 626 14 625 -669 774 625 775 -781 774 771 768 -668 669 625 775 -631 635 636 122 -78 635 636 631 -626 621 14 628 -621 623 14 629 -598 633 594 600 -107 861 857 850 -646 584 74 610 -619 621 626 628 -619 629 628 617 -619 621 628 629 -619 620 621 629 -566 629 621 620 -566 622 629 620 -622 77 629 620 -569 82 663 662 -665 658 671 670 -622 623 566 629 -629 623 566 621 -874 117 918 900 -642 644 82 637 -0 981 124 980 -617 630 640 629 -651 652 0 649 -629 640 644 641 -644 643 641 640 -632 618 617 77 -74 618 632 77 -74 115 632 618 -0 907 909 630 -951 961 944 120 -617 116 913 910 -914 920 976 969 -617 909 630 628 -974 120 970 960 -773 619 910 116 -973 975 981 979 -944 943 996 939 -987 989 125 988 -638 79 8 643 -633 978 123 979 -0 636 631 79 -636 79 78 631 -917 915 905 902 -629 628 630 641 -788 910 114 793 -81 633 634 599 -908 985 907 913 -983 982 921 908 -81 633 0 634 -635 115 632 74 -644 645 571 82 -0 122 631 636 -0 628 641 630 -0 14 624 642 -623 642 624 14 -648 80 0 8 -81 634 0 639 -77 640 622 629 -81 634 639 592 -0 624 659 642 -638 637 8 645 -623 661 669 624 -0 631 630 643 -584 78 80 638 -80 79 638 78 -80 79 8 638 -586 584 80 638 -586 571 646 638 -647 639 0 80 -78 631 643 640 -640 631 643 630 -78 79 638 643 -0 643 630 641 -586 571 638 645 -623 641 642 14 -622 623 662 566 -645 637 8 649 -80 647 639 584 -664 657 0 658 -653 579 0 578 -655 659 650 656 -647 584 577 587 -74 632 640 77 -632 617 640 77 -617 630 632 640 -584 647 639 592 -0 14 642 641 -648 8 0 649 -638 643 8 637 -0 631 643 79 -78 631 79 643 -77 646 622 640 -71 662 667 566 -647 81 639 592 -638 643 644 640 -587 81 647 592 -587 647 584 592 -629 640 622 644 -580 593 0 647 -648 585 80 586 -623 644 82 642 -569 571 579 645 -579 571 586 645 -644 645 82 637 -644 638 645 637 -571 646 622 570 -571 588 646 570 -588 571 646 586 -588 646 584 586 -646 584 610 588 -622 646 571 644 -77 646 612 622 -77 74 612 646 -0 659 650 642 -0 659 656 650 -664 665 0 567 -653 652 0 579 -581 585 653 578 -581 585 0 653 -645 652 654 649 -569 654 0 655 -82 642 637 650 -0 642 650 637 -932 190 181 934 -0 650 656 651 -0 650 651 649 -653 585 0 648 -579 653 648 586 -652 653 0 648 -663 664 0 567 -656 655 0 654 -654 651 650 649 -651 656 0 654 -568 569 662 571 -569 82 654 655 -652 651 654 649 -645 579 654 652 -654 579 0 652 -569 579 0 654 -645 579 569 654 -82 645 569 654 -82 645 654 650 -655 657 0 664 -82 661 659 655 -86 83 680 679 -662 82 661 623 -0 624 660 659 -71 570 662 622 -721 675 722 714 -0 624 668 660 -656 657 0 655 -655 657 659 656 -0 657 656 659 -661 624 659 660 -90 682 0 84 -568 662 663 73 -663 661 655 664 -682 683 0 672 -669 661 666 624 -0 785 782 783 -668 625 669 624 -666 668 669 624 -0 660 658 657 -0 659 660 657 -622 644 662 623 -568 71 662 73 -71 568 662 570 -655 664 0 663 -569 82 655 663 -663 73 0 568 -567 73 0 663 -0 677 676 673 -663 82 655 661 -663 82 661 662 -623 642 82 661 -82 661 642 659 -661 624 642 659 -623 642 661 624 -568 569 663 662 -86 677 676 776 -661 660 659 664 -659 664 657 655 -661 664 659 655 -666 664 567 665 -623 669 14 624 -661 664 567 666 -658 671 0 665 -566 669 667 687 -760 308 747 364 -660 658 664 665 -764 678 680 775 -661 660 666 624 -72 686 76 75 -83 775 668 677 -772 774 775 10 -660 664 666 665 -660 664 661 666 -666 660 668 624 -748 94 754 757 -0 660 668 670 -660 670 666 668 -674 682 84 672 -667 661 567 666 -663 661 567 667 -663 667 567 73 -663 662 667 73 -662 71 667 73 -663 661 667 662 -662 623 661 667 -800 604 761 765 -792 768 782 781 -0 670 673 671 -673 679 674 682 -0 670 671 658 -721 674 722 675 -717 84 0 722 -431 693 419 430 -706 52 417 45 -566 623 669 621 -566 623 667 669 -667 623 661 669 -667 669 661 666 -71 564 691 73 -682 672 0 84 -432 689 430 437 -684 683 681 83 -0 672 673 674 -0 673 672 671 -776 676 85 777 -721 676 674 675 -882 881 887 883 -710 725 0 11 -0 677 673 670 -726 719 701 721 -97 776 779 772 -0 103 101 740 -726 719 700 701 -97 779 770 772 -718 713 0 712 -773 755 756 767 -722 84 0 674 -722 724 0 717 -621 96 781 774 -0 784 782 785 -675 674 0 676 -777 675 0 676 -732 714 710 11 -0 776 10 779 -773 756 96 75 -71 565 688 564 -83 677 670 673 -51 697 693 692 -693 694 695 704 -841 844 843 845 -687 566 669 621 -923 614 922 613 -782 792 783 785 -51 697 419 693 -669 666 667 678 -667 666 567 678 -667 567 685 678 -0 626 780 625 -431 432 688 430 -566 71 690 667 -680 681 679 83 -774 772 780 10 -776 86 85 676 -690 691 685 73 -757 758 767 759 -51 693 419 431 -86 720 95 85 -690 678 685 696 -690 667 73 685 -822 832 831 827 -429 76 430 694 -87 700 0 88 -0 780 10 625 +469 466 0 471 +316 313 302 321 +229 222 221 231 +251 189 190 253 +129 128 0 131 +0 262 255 267 +175 17 150 219 +136 0 126 138 +310 39 303 314 +629 623 14 641 +831 0 832 833 +63 43 358 359 +316 290 41 390 +467 459 468 546 +897 899 902 915 +176 168 0 178 +191 22 187 208 +648 0 585 653 +826 734 770 827 +116 12 77 618 +233 226 229 234 +512 506 461 520 +79 8 0 80 +522 161 526 527 +23 196 519 927 +762 434 360 763 +168 169 0 178 +244 284 33 293 +361 322 6 801 +628 617 619 629 +806 790 769 829 +26 209 210 216 +171 17 173 175 +301 37 36 310 +85 676 675 777 +792 790 769 794 +0 277 34 287 +218 150 26 219 +83 668 666 670 +4 366 372 373 +202 186 207 209 +621 566 96 687 698 681 0 699 -703 95 705 709 -828 830 809 829 -700 89 0 88 -416 417 415 706 -71 691 688 690 -681 683 0 682 -679 681 682 683 -673 683 679 682 -683 670 671 673 -683 671 672 673 -665 670 671 683 -434 429 689 426 -71 564 688 691 -678 687 696 690 -607 560 689 565 -562 689 565 432 -689 429 76 430 -432 689 688 430 -73 685 0 691 -562 560 689 438 -432 438 689 437 -688 694 686 693 -688 76 686 694 -560 433 689 438 -432 691 0 431 -667 567 73 685 -685 73 0 567 -684 685 0 567 -434 429 76 689 -689 607 76 434 -560 607 689 434 -431 432 691 688 -51 692 693 431 -73 691 0 564 -854 858 108 270 -365 367 428 763 -71 691 690 73 -829 828 100 753 -692 685 0 698 -688 686 76 72 -565 688 76 72 -565 71 688 72 -688 71 686 72 -690 667 685 678 -693 704 695 697 -698 684 681 680 -690 687 695 686 -607 689 76 565 -565 689 76 688 -696 693 695 697 -51 53 697 692 -690 692 693 696 -697 692 53 696 -680 698 684 678 -430 694 419 420 -429 694 430 420 -431 692 0 51 -692 53 0 51 -607 762 606 12 -361 763 365 364 -680 698 699 681 -707 743 0 708 -685 692 0 691 -691 692 0 431 -714 701 712 718 -431 691 692 693 -693 691 692 690 -693 692 697 696 -703 93 702 92 -768 771 92 772 -696 678 685 698 -695 696 690 693 -686 688 693 690 -688 691 693 690 -431 691 693 688 -741 731 727 737 -86 679 720 85 -698 684 0 681 -685 684 0 698 -757 767 756 754 -752 746 102 748 -775 669 666 668 -696 697 702 705 -846 110 111 836 -89 712 0 710 -780 772 768 779 -699 705 698 680 -705 696 698 680 -96 774 771 781 -52 51 697 419 -52 51 417 697 -52 697 417 45 -742 741 0 743 -772 10 776 779 -732 85 721 675 -416 0 706 415 -700 701 0 89 -699 720 681 719 -720 681 719 679 -86 680 95 720 -680 681 720 679 -90 84 0 717 -414 706 379 52 -45 53 87 705 -53 697 705 45 -730 724 725 728 -0 713 723 725 +304 303 265 311 +458 556 557 558 +526 159 529 596 +19 591 600 601 +322 6 357 361 +199 323 324 325 +28 191 208 249 +924 918 799 931 +95 86 85 97 +50 373 46 380 +198 40 323 363 +306 36 37 310 +292 259 288 293 +154 149 146 173 +163 162 155 174 +21 176 0 178 +480 61 62 500 +456 0 462 497 +240 223 220 336 +645 8 638 648 +601 527 519 602 +398 396 47 399 +303 39 311 321 +175 171 21 178 +16 132 137 140 +192 193 205 206 +324 192 199 325 +677 10 0 776 +639 0 81 647 +17 171 173 174 +153 0 146 158 +131 132 16 225 +167 171 176 179 +249 243 242 258 +596 527 161 965 +218 217 150 227 +0 489 158 524 +387 386 41 388 +794 793 773 910 +603 24 19 616 +0 400 401 407 +774 771 96 781 +66 7 0 543 +640 622 629 644 +511 63 350 558 +149 133 150 217 +287 244 33 288 +615 604 614 618 +974 120 952 997 +27 22 202 204 +757 754 752 759 +490 147 149 492 +80 79 78 639 +211 142 209 216 +139 16 137 140 +770 97 734 778 +131 130 129 132 +144 141 0 145 +0 177 948 950 +263 262 264 283 +771 92 768 772 +897 0 898 988 +489 0 484 524 +644 622 623 662 +136 128 0 137 +933 870 0 935 +417 52 416 424 +211 209 214 216 +126 0 127 138 +503 460 461 513 +97 770 772 779 +0 218 220 221 +477 469 467 537 +206 199 200 324 +332 345 2 353 +252 319 325 326 +202 22 162 204 +48 391 392 403 +283 282 259 292 724 722 0 730 -696 695 702 697 -416 0 414 706 -705 697 702 45 -770 779 784 768 -45 705 709 703 -740 102 101 746 -378 752 377 4 -45 705 703 702 -705 699 87 709 -801 803 802 322 -743 708 707 703 -749 706 708 45 -0 843 786 885 -743 709 750 703 -52 419 704 46 -704 46 419 420 -704 419 694 420 -760 308 364 309 -0 677 776 676 -52 419 697 704 -95 750 709 703 -53 697 696 705 -696 53 705 698 -415 707 706 45 -707 415 87 45 -714 724 725 730 -727 742 0 11 -711 726 710 742 -88 415 87 707 -415 0 707 88 -415 0 706 707 -707 87 88 709 -45 87 707 709 -707 709 743 703 -379 748 46 749 -750 732 726 742 -45 703 707 708 -378 379 0 745 -703 744 708 93 -740 746 0 745 -735 734 778 825 -714 732 730 11 -756 695 771 96 -706 0 708 707 -706 707 708 45 -747 377 752 4 -711 709 750 743 -711 750 742 743 -38 817 305 32 -88 711 0 707 -710 714 725 11 -699 719 0 700 -714 718 712 725 -0 91 729 730 -718 717 716 724 -716 715 0 713 -711 710 0 742 -719 681 682 679 -0 729 727 11 -714 710 701 726 -675 722 0 674 -91 730 0 675 -718 716 0 713 -95 97 751 92 -719 90 0 701 -718 722 724 714 -89 710 726 701 -710 701 712 714 -721 719 701 90 -90 719 682 721 -714 721 701 90 -714 730 725 11 -381 747 372 4 -90 722 718 714 -701 718 0 712 -720 719 726 721 -701 90 718 714 -701 90 0 718 -90 717 0 718 -718 717 0 716 -750 97 731 751 -721 719 682 679 -90 721 682 674 -721 679 682 674 -675 732 730 714 -679 721 719 720 -730 732 91 11 -85 676 721 675 -679 721 720 85 -85 676 679 721 -730 722 0 675 -681 719 0 699 -719 681 0 682 -90 719 0 682 -710 714 712 725 -679 676 674 721 -95 680 705 720 -705 680 699 720 -699 680 681 720 -705 699 709 720 -709 699 700 720 -709 95 705 720 -742 732 11 727 -754 100 769 828 -90 674 84 722 -90 722 84 717 -90 717 718 722 -93 751 733 92 -703 95 750 751 -723 715 0 716 -716 723 715 713 -0 713 715 723 -718 725 724 713 -724 725 723 713 -725 718 712 713 -718 714 724 725 -753 752 815 821 -91 675 0 777 -95 772 97 92 -708 744 0 745 -45 708 749 703 -93 703 751 92 -11 732 91 727 -703 95 751 92 -709 720 700 726 -720 719 700 726 -711 709 700 726 -89 711 700 726 -89 711 726 710 -75 767 756 758 -730 91 729 11 -0 824 738 823 -102 733 93 740 -381 377 747 4 -751 741 743 744 -731 91 735 777 -0 826 784 831 -773 769 767 793 -735 737 736 727 -0 738 739 737 -0 729 736 727 -703 751 744 93 -732 11 710 742 -75 773 767 765 -822 834 827 103 -695 687 771 96 -760 814 813 308 -45 749 702 703 -0 736 737 727 -93 733 99 92 -102 99 93 733 -751 741 739 734 -703 750 743 751 -95 97 750 751 -721 732 726 85 -721 714 726 732 -675 732 91 730 -76 762 12 75 -740 733 744 739 -827 826 791 770 -0 737 739 741 -734 735 731 737 -752 754 759 757 -696 695 764 702 -707 711 0 743 -741 731 737 734 -739 741 737 734 -760 796 807 814 -621 781 626 774 -755 756 771 96 -837 809 835 104 -729 91 736 727 -0 91 736 729 -776 777 0 676 -97 778 734 770 -0 776 778 777 -772 779 770 768 -769 790 794 792 -740 733 739 103 -742 731 732 727 -0 104 835 819 -794 792 782 781 -889 882 883 903 -0 835 106 819 -814 803 812 39 -753 828 100 754 -739 734 737 738 -822 832 833 831 -740 733 93 744 -833 838 834 105 -727 741 0 742 -741 731 742 727 -744 739 0 740 -741 744 0 743 -45 749 697 702 -749 704 94 748 -621 626 625 774 -378 746 377 752 -52 704 749 46 -749 704 697 702 -747 366 372 4 -731 97 734 751 -759 760 747 364 -707 709 711 743 -711 742 0 743 -703 743 708 744 -745 379 0 708 -749 706 379 708 -751 741 744 739 -52 379 46 749 -865 866 818 811 -93 102 740 745 -93 740 744 745 -93 744 708 745 -52 697 749 704 -745 746 0 378 -746 377 0 378 -745 102 740 746 -749 46 704 748 -93 749 748 745 -814 802 803 309 -0 842 861 847 -816 815 307 821 -307 747 383 377 -377 383 381 747 -747 383 381 372 -747 376 383 372 -364 372 376 747 -613 801 761 605 -696 687 764 695 -750 85 731 97 -420 758 429 694 -95 85 750 97 -750 85 732 731 -816 815 810 813 -750 731 732 742 -379 378 46 748 -379 378 748 745 -378 745 746 748 -52 706 749 45 -52 697 45 749 -52 706 379 749 -720 750 95 85 -720 726 750 85 -750 85 726 732 -750 726 720 709 -95 750 720 709 -711 709 726 750 -733 751 739 734 -751 731 741 734 -360 761 763 361 -694 758 756 757 -378 748 752 4 -378 748 746 752 -762 763 758 429 -102 94 754 748 -816 819 810 821 -808 760 807 100 -816 813 307 815 -858 857 860 859 -806 769 100 829 -760 814 807 813 -751 734 733 770 -791 784 785 792 -823 825 737 735 -753 100 752 754 -377 0 307 821 -92 97 770 772 -762 766 761 765 -911 604 765 116 -791 768 784 792 -771 768 99 755 -782 792 784 768 -746 0 821 101 -774 775 764 772 -76 607 762 434 -607 76 762 12 -763 761 766 361 -361 761 802 801 -762 758 766 765 -97 778 770 779 -755 794 769 773 -821 0 307 816 -771 99 92 94 -94 702 92 771 -92 768 99 771 -822 827 791 820 -755 768 792 781 -764 680 95 86 -748 757 752 4 -748 754 752 757 -704 46 420 757 -420 757 694 704 -104 822 820 103 -104 835 819 809 -361 367 365 763 -420 366 758 757 -420 366 429 758 -764 696 705 680 -361 360 367 763 -360 428 367 763 -767 766 759 758 -754 100 759 767 -763 366 365 364 -365 763 374 366 -814 309 306 308 -808 802 766 800 -762 607 606 434 -76 758 762 75 -813 306 38 308 -311 804 39 812 -805 803 796 795 -912 917 114 919 -252 192 873 190 -323 799 931 363 -732 777 91 731 -0 106 816 819 -104 820 809 101 -881 796 805 866 -893 117 936 940 -0 817 305 38 -984 915 905 912 -763 361 766 364 -798 799 803 795 -0 819 816 821 -606 360 605 761 -377 0 821 746 -696 702 764 705 -764 702 95 705 -96 687 774 621 -0 844 843 885 -687 669 774 621 -75 116 773 765 -913 116 911 910 -605 801 761 6 -0 779 10 780 -801 799 803 322 -364 766 759 760 -366 766 759 364 -366 763 766 364 -366 763 758 766 -762 766 758 763 -762 761 766 763 -366 766 758 759 -863 879 869 864 -775 86 764 772 -772 775 86 10 -813 814 306 308 -755 99 771 94 -755 769 767 773 -777 676 85 675 -764 775 680 86 -775 83 678 680 -95 86 772 764 -95 86 97 772 -775 677 86 10 -668 775 625 10 -97 776 85 777 -620 619 773 116 -783 782 627 794 -687 774 764 771 -767 808 766 765 -97 777 778 776 -774 772 764 771 -687 774 771 96 -805 803 812 814 -613 800 761 801 -889 890 112 887 -912 913 923 911 -782 792 785 784 -782 794 783 792 -125 977 914 976 -613 924 919 795 -769 790 788 794 -822 827 831 791 -796 795 800 789 -769 100 754 767 -755 769 754 767 -810 829 100 753 -810 809 829 753 -775 774 625 10 -677 775 668 10 -86 83 775 680 -782 780 626 781 -822 827 820 103 -814 803 39 309 -780 774 626 781 -784 779 780 768 -733 734 827 770 -0 786 785 783 -733 770 791 99 -97 86 776 772 -97 86 85 776 -774 772 768 780 -687 678 764 775 -678 775 687 669 -687 669 775 774 -669 666 678 775 -775 666 678 83 -772 86 776 10 -86 677 776 10 -0 677 10 776 -0 782 627 783 -830 822 791 820 -820 102 101 740 -0 892 879 877 -755 792 768 99 -792 791 768 99 -731 735 734 778 -731 778 734 97 -731 777 778 97 -731 777 735 778 -0 778 735 777 -842 847 840 850 -774 626 625 780 -97 776 778 779 -0 776 779 778 -806 796 789 881 -755 781 773 96 -773 781 619 96 -621 96 619 781 -621 619 626 781 -627 781 626 619 -820 733 740 103 -910 913 906 114 -768 774 780 781 -771 781 755 96 -809 822 830 820 -0 782 780 626 -0 627 782 626 -630 632 631 907 -822 831 830 791 -0 784 779 780 -0 782 784 780 -795 798 797 805 -807 806 100 829 -0 824 832 838 -361 6 761 801 -769 100 767 808 -813 760 308 815 -632 913 618 908 -815 747 307 377 -931 323 872 799 -905 917 114 912 -755 781 794 773 -792 794 783 790 -838 833 846 105 -0 98 785 786 -987 990 125 986 -907 632 631 122 -0 989 987 988 -617 628 619 909 -972 971 120 974 -0 627 787 783 -844 112 840 885 -746 752 821 377 -795 797 789 796 -836 835 837 841 -807 806 808 100 -795 798 924 938 -782 627 794 781 -786 790 785 783 -773 793 767 765 -910 911 793 116 -828 99 820 791 -797 883 789 881 -804 803 39 812 -923 922 916 613 -114 789 788 793 -32 814 306 813 -803 30 39 322 -760 815 807 100 -940 117 936 900 -769 794 793 773 -364 802 760 309 -24 926 922 925 -799 363 322 801 -799 924 931 925 -813 308 38 307 -766 802 808 760 -830 785 786 790 -803 799 30 322 -810 811 807 829 -0 104 105 835 -613 604 761 800 -101 753 821 746 -983 912 984 985 -114 789 919 917 -100 760 815 759 -788 789 806 793 -759 766 808 760 -801 363 322 6 -793 765 773 116 -831 832 826 827 -881 883 789 806 -983 915 912 916 -936 940 900 895 -125 990 991 914 -809 820 828 753 -795 805 797 796 -733 827 820 791 -827 834 822 832 -0 825 778 826 -821 752 815 377 -753 828 754 102 -809 837 13 839 -827 734 739 738 -770 768 784 791 -0 98 831 785 -800 761 766 765 -944 961 945 928 -823 735 737 736 -98 785 786 830 -953 955 949 119 -819 753 810 821 -852 857 858 32 -100 815 752 759 -922 921 916 976 -0 786 783 884 -866 865 880 881 -0 862 888 863 -887 881 886 883 -866 814 807 796 -875 320 325 257 -799 363 30 322 -802 761 800 801 -799 323 30 363 -753 100 815 752 -806 796 881 807 -941 934 932 942 -880 888 862 863 -15 930 945 937 -265 39 306 812 -815 308 747 760 -0 877 888 890 -976 969 968 977 -958 165 0 164 -613 795 800 801 -265 812 306 32 -364 802 766 760 -364 361 766 802 -361 761 766 802 -766 761 800 802 -821 753 810 815 -753 752 821 746 -0 826 778 779 -850 861 857 865 -0 868 255 109 -759 808 100 760 -311 39 265 812 -32 812 306 814 -806 769 808 100 -798 803 804 805 -801 795 802 803 -804 30 39 803 -804 30 803 799 -804 799 803 798 -876 875 871 874 -252 190 873 933 -181 195 942 180 -117 875 873 935 -311 30 804 320 -0 862 861 842 -0 256 255 868 -863 877 879 878 -873 190 932 933 -311 30 39 804 -815 753 810 100 -814 802 796 803 -809 820 753 101 -810 13 811 829 -793 800 808 765 -808 800 793 789 -806 808 793 789 -796 808 806 789 -796 800 808 789 -800 808 802 796 -807 806 796 808 -769 806 808 793 -769 808 767 793 -767 808 759 766 -838 824 832 834 -103 820 101 740 -0 823 737 736 -858 859 860 867 -104 809 819 101 -811 806 807 829 -829 790 886 806 -0 831 784 785 -849 848 847 851 -825 738 827 832 -860 862 867 859 -268 853 269 270 -760 802 796 814 -875 257 870 868 -0 836 105 846 -837 809 13 835 -941 932 118 944 -816 106 810 819 -830 792 785 790 -0 838 832 833 -829 790 839 886 -877 878 901 892 -867 863 859 862 -115 632 618 908 -0 108 268 854 -106 13 810 819 -819 13 810 809 -0 861 855 849 -0 862 860 861 -854 860 858 852 -814 866 32 812 -817 818 857 32 -752 815 747 759 -846 833 110 105 -807 829 100 810 -877 879 878 892 -266 268 108 853 -38 816 817 813 -843 885 840 839 -38 813 32 306 -815 810 813 807 -760 815 813 807 -853 268 108 270 -813 308 307 815 -815 308 307 747 -809 828 829 753 -269 270 853 271 -0 106 107 817 -0 106 817 816 -810 811 818 807 -813 810 818 807 -858 860 108 867 -0 867 860 862 -877 888 882 880 -981 980 982 124 -856 812 265 858 -855 107 857 852 -789 795 919 797 -0 867 108 860 -817 818 32 813 -816 818 817 813 -813 818 810 816 -818 106 810 816 -816 106 817 818 -827 738 834 832 -829 790 806 769 -828 790 829 769 -791 99 820 733 -828 99 754 102 -820 99 828 102 -813 807 866 814 -835 13 819 809 -753 820 828 102 -102 733 740 820 -0 784 826 779 -770 826 784 779 -791 826 784 770 -835 13 106 819 -827 738 739 103 -105 834 822 104 -833 832 822 834 -104 834 822 103 -0 851 836 848 -734 778 826 770 -822 833 98 831 -0 824 823 825 -823 738 825 824 -825 734 737 735 -738 825 737 823 -0 107 106 851 -770 778 826 779 -881 796 866 807 -738 734 737 825 -733 827 739 103 -733 734 739 827 -0 825 735 778 -0 823 735 825 -0 98 833 831 -825 734 827 738 -734 825 827 826 -837 822 809 104 -832 825 826 827 -828 830 791 820 -0 107 851 849 -828 792 790 769 -755 769 792 828 -755 828 792 99 -792 828 791 99 -831 827 826 791 -830 829 828 790 -880 797 805 881 -754 828 755 99 -754 769 755 828 -0 833 832 831 -809 830 828 820 -791 792 830 828 -791 792 785 830 -0 834 103 738 -0 834 738 824 -832 738 834 824 -834 738 827 103 -0 832 824 825 -825 738 832 824 -0 832 825 826 -0 831 832 826 -829 839 13 811 -836 110 841 837 -0 833 98 110 -833 834 822 105 -845 841 848 836 -809 830 837 839 -0 104 834 105 -0 104 103 834 -841 844 840 843 -841 843 839 837 -0 844 845 843 -842 112 840 844 -930 199 937 931 -817 818 107 857 -0 833 846 838 -0 846 110 111 -111 845 848 836 -786 884 790 783 -822 98 833 837 -833 98 110 837 -105 833 110 837 -105 110 836 837 -0 845 110 843 -836 835 105 837 -105 822 833 837 -840 839 811 13 -110 98 843 837 -265 270 853 858 -850 840 811 13 -786 884 886 790 -889 882 890 887 -0 895 892 896 -829 830 839 790 -830 790 786 839 -98 830 786 839 -809 830 839 829 -809 839 13 829 -0 111 110 845 -841 845 843 110 -811 881 866 807 -105 110 846 836 -0 848 836 111 -850 106 851 13 -860 857 858 852 -884 788 886 790 -843 98 839 837 -0 98 786 843 -0 110 98 843 -886 788 806 790 -845 841 836 110 -847 841 840 850 -109 871 856 869 -859 805 812 866 -875 257 252 870 -118 933 932 934 -864 878 805 880 -862 860 857 859 -0 898 895 896 -0 844 885 112 -845 841 847 848 -857 861 855 860 -849 847 861 850 -271 853 304 265 -0 855 854 852 -0 844 847 845 -845 847 841 844 -841 847 840 844 -847 842 840 844 -0 844 842 847 -851 835 841 13 -850 851 847 841 -879 876 869 874 -883 788 789 806 -0 849 851 848 -0 851 835 836 -850 851 841 13 -851 106 835 13 -107 849 861 850 -0 849 848 847 -851 848 847 841 -851 836 848 841 -851 835 836 841 -866 865 881 811 -0 107 855 852 -0 860 854 855 -0 851 106 835 -0 817 107 852 -852 305 817 32 -305 270 858 852 -858 32 859 812 -857 818 107 850 -107 818 106 850 -861 842 865 850 -817 857 852 32 -861 847 842 850 -856 858 859 812 -854 855 860 852 -266 109 31 853 -31 853 264 266 -269 266 264 853 -269 853 264 304 -31 853 304 264 -31 311 304 853 -269 853 304 271 -268 266 269 853 -868 31 257 255 -934 190 181 189 -876 870 868 875 -882 797 880 881 -0 862 863 867 -865 862 857 859 -947 166 179 180 -117 874 875 876 -31 856 853 109 -853 856 108 109 -0 109 108 867 -305 270 265 858 -31 311 853 856 -853 311 265 856 -856 311 265 812 -856 311 812 804 -109 31 868 255 -919 800 789 911 -979 975 978 973 -108 856 867 109 -799 804 872 798 -882 883 797 881 -869 876 868 871 -0 861 849 847 -0 860 855 861 -858 32 857 859 -0 870 256 868 -813 866 32 814 -859 32 866 812 -858 859 867 856 -0 877 879 863 -865 857 866 859 -15 931 930 937 -857 32 866 859 -107 861 855 857 -107 849 855 861 -813 818 32 866 -805 878 798 797 -806 881 811 807 -939 943 940 15 -866 807 818 811 -863 864 869 867 -31 257 871 868 -0 863 869 867 -938 918 113 900 -873 875 252 870 -916 915 919 938 -868 257 870 256 -870 256 252 253 -938 797 901 917 -0 253 256 870 -856 864 812 859 -859 864 812 805 -864 804 812 805 -864 805 798 804 -856 804 812 864 -932 190 934 933 +169 129 0 178 +0 147 146 490 +397 47 382 421 +626 621 14 628 +22 180 181 187 +96 755 756 773 +145 140 139 151 +937 117 873 943 +223 222 184 231 +368 369 357 391 +0 34 237 287 +51 417 52 697 +294 3 264 304 +8 80 638 648 +968 927 967 969 +139 137 0 151 +314 30 39 321 +0 21 178 230 +245 34 278 287 +490 149 148 492 +198 362 363 517 +376 382 372 397 +312 257 263 319 +514 511 515 516 +136 131 128 137 +595 541 528 602 +180 22 181 195 +200 25 196 201 +178 129 0 230 +703 95 705 709 +154 148 142 525 +36 271 289 303 +426 433 428 443 +432 430 431 437 +363 322 30 799 +888 0 877 890 +245 244 237 287 +37 0 36 38 +257 255 31 263 +866 807 811 881 +461 498 503 506 +340 296 332 345 +259 244 258 280 +313 41 302 315 +324 323 317 325 +186 202 207 208 +222 175 184 230 +13 809 810 819 813 807 818 866 -865 857 818 866 -858 867 108 856 -867 864 859 863 -31 871 856 109 -613 795 919 800 -31 868 871 109 -31 871 311 856 -934 189 181 182 -897 993 992 984 -109 868 871 869 -871 864 856 869 -786 886 885 839 -916 924 113 938 -871 257 875 868 -875 325 252 257 -933 935 873 870 -900 936 879 874 -943 15 928 945 -919 795 789 800 -869 876 871 874 -804 320 872 871 -252 325 875 873 -0 890 888 112 -179 177 950 180 -114 911 919 789 -856 871 311 804 -871 320 311 804 -31 320 311 871 -31 257 320 871 -804 871 864 856 -119 947 949 951 -871 320 875 257 -892 936 879 900 -928 945 15 930 -323 30 872 799 -872 30 804 799 -872 30 320 804 -323 30 320 872 -323 320 325 872 -899 938 915 113 -252 325 873 192 -884 788 790 783 -865 842 862 888 -879 874 869 864 -874 871 872 875 -872 320 875 871 -872 320 325 875 -117 874 872 875 -874 900 798 878 -0 876 868 869 -0 870 868 876 -0 948 182 934 -24 922 614 605 -941 942 932 944 +309 364 308 760 +869 868 109 871 +757 694 756 758 +215 214 209 216 +0 128 135 137 +373 4 46 380 +0 826 831 832 +0 33 285 287 +187 22 186 208 +373 50 46 420 +392 388 48 394 +255 262 263 267 +83 670 673 677 +193 181 22 195 +0 386 387 394 +436 0 69 557 +286 0 275 291 +807 100 806 808 +20 27 202 204 +185 28 186 336 +2 329 354 370 +34 277 278 287 +36 289 301 303 +0 548 549 555 +282 294 312 316 +302 312 316 321 +760 807 100 815 +162 22 180 195 +671 665 670 683 +526 522 527 532 +0 414 416 706 +47 396 395 400 +294 290 291 300 +520 532 536 602 +239 231 223 247 +237 34 245 287 +200 199 40 324 +267 263 259 283 +302 294 290 316 +392 401 403 448 +264 294 304 312 +40 362 198 518 +180 162 1 187 +262 0 255 266 +143 149 210 217 +552 64 67 554 +27 20 202 212 +22 162 180 187 +795 798 799 924 +39 265 303 311 +245 278 244 287 +445 56 439 452 +367 361 365 375 +397 396 47 421 +748 46 379 749 +277 0 285 287 +316 282 318 319 +54 405 422 423 +700 87 699 709 +665 83 666 670 +32 305 265 858 +467 0 465 546 +693 690 692 696 +699 87 53 705 +0 291 298 300 +511 514 70 559 +346 345 0 348 +351 43 347 352 +534 512 64 552 +310 301 37 384 +397 382 372 421 +376 371 310 384 +917 789 114 919 +350 57 435 511 +932 873 190 933 +52 50 414 424 +864 863 867 869 +785 784 782 792 +73 71 564 568 +269 0 272 273 +103 0 101 104 +0 379 380 414 +186 28 187 208 +386 299 0 387 +5 54 428 443 +607 609 612 615 +645 649 652 654 +301 36 303 310 +209 26 210 219 +426 54 374 427 +362 40 198 363 +486 0 488 493 +323 317 40 324 +983 908 912 985 +318 332 295 390 +377 747 752 815 +388 369 42 392 +322 314 309 375 +638 571 644 645 +286 35 0 298 +0 35 33 339 +278 0 245 280 +30 314 39 322 +319 312 257 320 +275 0 272 291 +348 2 345 353 +56 0 439 452 +537 59 468 543 +149 148 143 210 +68 577 588 610 +167 164 0 172 +75 116 12 620 +856 108 109 867 +367 5 428 442 +515 512 64 534 +800 613 604 911 +607 606 559 609 +660 665 666 670 +43 63 358 498 +241 238 242 337 +631 630 0 643 +445 57 350 558 +360 44 367 435 +251 252 190 326 +552 533 534 602 +393 0 387 394 +573 68 550 575 +41 300 302 385 +51 53 0 417 +791 784 785 792 +46 378 379 380 +243 284 293 339 +516 435 360 559 +212 20 202 505 +401 0 402 448 +213 201 20 508 +395 371 48 397 +43 350 352 359 +96 619 620 621 +451 447 445 452 +447 445 43 451 +348 347 351 355 +331 330 332 353 +515 510 23 517 +446 43 355 498 +335 241 240 336 +0 436 438 440 +372 382 381 413 +0 385 386 389 +560 561 573 609 +2 331 332 353 +315 302 289 385 +826 825 827 832 +732 731 742 750 +400 399 396 407 +342 0 344 496 +694 695 704 756 +579 571 574 586 +679 719 720 721 +407 402 55 441 +573 565 560 607 +163 155 154 174 +573 563 570 588 +623 642 82 661 +468 59 7 543 +543 537 536 545 +99 92 93 733 +527 520 519 602 +519 23 19 534 +154 146 148 158 +158 153 0 160 +217 149 141 492 +69 551 549 561 +67 545 58 547 +615 614 115 618 +438 433 425 440 +471 464 0 479 +679 86 85 720 +43 63 350 359 +351 347 393 448 +149 141 133 217 +547 67 535 551 +175 222 224 230 +241 335 240 337 +524 523 18 525 +160 523 524 525 +515 511 510 516 +478 60 0 479 +17 154 155 174 +523 482 491 526 +176 1 177 179 +445 43 352 447 +69 551 553 555 +367 360 428 763 +372 4 373 381 +364 361 365 763 +46 50 52 419 +504 503 498 506 +25 512 23 519 +577 576 578 581 +756 755 754 767 +913 908 912 923 +458 0 439 557 +115 614 611 616 +547 65 542 548 +0 574 575 578 +744 743 741 751 +640 630 631 643 +16 131 136 137 +724 718 714 725 +153 163 164 165 +870 0 253 933 +217 0 143 492 +150 17 210 219 +540 538 539 544 +157 161 159 526 +560 70 436 561 +439 445 452 458 +455 451 446 498 +488 487 489 493 +19 23 515 534 +543 66 7 545 +58 0 7 468 +153 146 154 158 +344 342 496 505 +463 455 456 503 +483 61 500 523 +132 131 16 137 +469 468 467 537 +560 436 438 562 +438 425 0 440 +355 348 347 446 +477 463 464 501 +47 410 413 421 +618 74 77 632 +53 45 417 697 +467 468 0 546 +403 391 368 442 +468 58 0 546 +195 22 27 204 +702 695 696 764 +0 625 10 668 +23 24 19 515 +595 533 541 602 +309 364 375 376 +515 23 24 517 +668 10 677 775 +379 706 708 749 +566 621 669 687 +315 41 302 385 +816 106 0 817 +92 93 94 99 +767 756 755 773 +607 565 560 689 +71 565 72 688 +524 18 158 525 +545 459 67 546 +53 51 0 692 +547 535 533 590 +366 364 763 766 +739 734 738 827 +790 785 783 792 +629 628 617 630 +338 340 341 342 +260 256 257 263 +581 576 0 582 +24 608 614 616 +94 704 748 749 +672 673 674 682 +908 122 124 982 +548 551 547 589 +711 726 742 750 +59 0 7 543 +677 676 673 679 +759 100 752 815 +688 686 690 693 +51 419 418 431 +737 0 727 741 +628 621 14 629 +75 72 12 76 +375 364 365 376 +299 0 300 385 +796 802 803 814 +511 64 514 515 +422 50 373 427 +14 623 624 642 +952 951 119 953 +581 578 585 653 +893 935 117 943 +12 116 604 618 +169 134 129 178 +78 631 632 635 +23 519 19 927 +228 0 130 234 +455 454 451 457 +0 786 884 885 +559 434 360 606 +434 429 428 763 +630 628 617 909 +613 605 604 614 +0 66 541 583 +0 630 907 909 +962 120 946 972 +135 129 128 169 +549 551 548 589 +294 264 263 312 +73 662 663 667 +0 634 636 639 +418 50 404 427 +0 540 541 543 +93 92 94 702 +242 245 246 261 +122 0 907 985 +729 728 0 730 +837 835 13 841 +707 88 0 711 +701 90 714 721 +0 624 625 668 +756 754 94 757 +755 99 768 771 +99 93 94 102 +76 429 430 689 +724 723 725 728 +658 665 670 671 +755 94 99 771 +780 768 774 781 +282 290 294 316 +661 82 662 663 +549 0 550 575 +374 426 427 429 +374 373 366 420 +0 779 780 784 +417 45 52 697 +427 420 374 429 +368 44 350 442 +427 423 418 437 +584 587 592 610 +53 87 0 417 +51 0 418 424 +822 791 827 831 +404 405 0 423 +47 0 399 400 +767 75 756 773 +673 83 677 679 +673 671 670 683 +621 623 14 629 +687 667 566 690 +674 673 0 676 +777 731 97 778 +719 679 682 721 +776 97 772 779 +676 675 674 721 +722 717 718 724 +603 9 572 611 +84 0 717 722 +434 433 426 689 +676 86 85 679 +772 771 764 774 +688 76 686 694 +45 415 417 706 +738 103 0 739 +742 726 732 750 +709 703 95 750 +710 701 712 714 +762 761 604 765 +669 666 667 678 +11 728 729 730 +727 91 11 729 +615 12 604 618 +508 25 506 509 +790 786 830 839 +0 981 989 993 +193 27 194 195 +141 145 147 151 +705 696 680 764 +747 366 4 759 +341 207 342 505 +265 304 311 853 +638 586 571 645 +326 324 206 327 +698 696 680 705 +44 357 367 368 +92 768 99 771 +754 752 748 757 +730 675 91 732 +645 637 649 650 +706 379 52 749 +52 45 706 749 +718 714 722 724 +708 706 45 749 +674 0 84 722 +654 651 0 656 +667 71 566 690 +46 704 748 757 +323 799 872 931 +606 559 434 607 +321 314 30 328 +257 256 255 263 +7 66 0 542 +369 328 313 370 +747 364 366 759 +840 839 13 841 +177 176 179 950 +828 753 100 829 +245 237 242 246 +704 52 46 749 +129 132 134 135 +832 827 822 834 +83 678 666 775 +909 787 627 910 +80 586 638 648 +75 686 694 756 +704 694 756 757 +815 377 307 821 +50 46 52 414 +379 745 748 749 +162 163 155 204 +201 27 203 206 +42 392 393 394 +0 377 746 821 +11 725 728 730 +725 724 728 730 +11 714 725 730 +748 745 93 749 +740 93 102 745 +725 0 11 728 +708 703 743 744 +723 0 725 728 +102 99 93 733 +0 107 849 855 +714 724 725 730 +24 603 608 616 +791 733 99 820 +834 832 824 838 +594 0 81 633 +241 29 28 249 +238 241 242 246 +508 201 25 509 +728 724 0 730 +72 75 12 620 +850 107 857 861 +62 462 0 497 +91 727 731 735 +819 0 101 821 +291 286 0 298 +99 755 768 792 +251 191 189 254 +3 0 269 271 +817 816 106 818 +879 876 874 936 +241 29 242 246 +110 105 836 846 +852 0 270 854 +34 237 245 279 +0 268 269 270 +311 39 265 812 +176 21 171 178 +106 810 816 819 +838 833 0 846 +856 864 867 869 +196 199 200 203 +796 806 807 881 +667 623 661 669 +116 12 604 765 909 627 619 910 -181 193 932 942 -937 192 945 873 -112 887 890 888 -863 879 864 878 -918 872 931 937 -773 910 793 116 -0 876 869 879 -24 925 605 517 -0 879 869 863 -0 893 936 895 -886 881 887 811 -882 880 887 881 -887 880 865 881 -917 789 919 797 -179 950 947 180 -863 878 864 880 -864 874 798 878 -805 864 798 878 -904 917 883 114 -887 881 865 811 -0 863 888 877 -0 948 934 941 -199 945 937 192 +844 843 841 845 +770 768 92 772 +195 27 194 204 +760 747 308 815 +822 809 830 837 +835 13 809 837 +881 806 811 886 +835 104 105 837 +722 675 0 730 +724 714 722 730 +805 804 798 864 +106 13 819 835 +716 715 713 723 +833 110 105 837 +105 110 836 837 +811 839 840 886 +818 13 106 850 +836 0 111 846 +187 182 181 191 +165 163 164 166 +799 363 322 801 +764 772 774 775 +181 189 182 934 +615 74 77 618 +866 859 805 880 +81 599 633 634 +113 918 15 940 +983 915 916 992 +759 760 100 815 +141 140 0 145 +841 110 836 845 +170 171 134 178 +83 680 678 775 +592 78 74 635 +615 77 12 618 +125 976 914 992 +601 19 519 927 +190 252 253 933 +9 599 600 633 +20 156 202 211 +521 491 522 526 +182 188 189 191 +611 599 115 616 +841 839 837 843 +0 986 987 989 +0 136 137 138 +912 911 114 913 +579 578 0 653 +636 635 78 639 +995 0 998 1000 +634 0 81 639 +615 115 74 618 +304 311 312 321 +264 262 255 266 +270 265 271 305 +17 185 186 219 +0 182 183 188 +80 0 639 647 +592 584 78 639 +890 0 877 891 +972 952 0 974 +468 459 537 545 +140 139 0 145 +81 592 599 634 +215 209 26 216 +138 16 137 139 +634 635 636 639 +229 226 130 234 +170 171 172 173 +152 134 170 173 +839 829 790 886 +133 149 150 173 +899 897 991 992 +528 536 532 602 +907 617 632 913 +141 147 133 151 +794 619 627 910 +649 637 0 650 +655 0 569 663 +882 878 797 901 +552 536 533 602 +0 487 488 493 +967 960 121 977 +894 990 991 994 +619 626 627 628 +627 626 0 628 +115 599 592 635 +668 83 666 775 +147 144 141 492 +483 480 60 486 +870 252 873 933 +74 632 78 640 +634 592 599 635 +524 158 160 525 +133 135 151 152 +142 209 155 211 +18 483 484 486 +130 129 0 131 +128 131 132 137 +130 224 225 226 +117 876 935 936 +146 149 152 173 +479 475 476 481 +0 275 276 285 +185 184 183 232 +132 133 134 135 +0 144 145 147 +252 190 873 933 +131 128 0 136 +134 135 152 170 +253 252 870 933 +21 171 1 176 +0 126 127 136 +131 127 16 136 +132 129 128 135 +128 129 0 169 +250 249 191 251 +178 134 129 230 +181 189 190 191 +219 215 26 220 +486 18 480 494 +355 351 354 359 +131 0 127 136 +128 132 135 137 +27 193 194 203 +132 140 133 151 +131 129 128 132 +136 16 137 138 +136 126 127 138 +217 150 26 218 +139 0 16 140 +133 140 141 151 +137 0 138 139 +22 27 202 212 +183 177 1 187 +191 187 28 208 +156 155 202 211 +372 365 364 376 +479 473 475 485 +934 181 942 948 +140 16 132 225 +137 132 135 151 +252 256 257 260 +176 171 168 178 +135 132 133 151 +136 127 16 138 +127 0 16 138 +145 139 0 151 +148 154 142 210 +147 141 133 149 +149 147 141 492 +970 914 125 977 +157 491 521 526 +148 149 154 210 +152 133 134 173 +160 159 157 165 +145 144 141 147 +96 566 686 687 +168 167 170 171 +197 194 201 521 +830 785 791 831 +138 0 16 139 +145 0 147 151 +246 241 29 247 +462 499 501 503 +175 184 185 222 +0 130 131 228 +488 0 484 489 +149 146 148 154 +135 133 134 152 +60 479 481 485 +160 153 0 165 +521 161 157 526 +161 521 522 526 +533 541 66 583 +457 445 63 558 +490 487 492 493 +592 587 9 611 +467 460 453 477 +187 183 182 188 +562 550 0 563 +137 139 140 151 +148 490 492 493 +60 474 484 486 +148 489 490 493 +145 141 140 151 +180 166 162 195 +216 142 143 494 +540 0 538 544 +194 197 201 203 +140 132 137 151 +523 491 157 526 +207 202 209 211 +924 916 919 938 +27 22 205 212 +489 148 18 493 +195 166 946 947 +185 183 1 187 +150 134 173 175 +142 156 155 525 +201 197 196 203 +464 471 476 479 +160 157 163 165 +226 130 224 229 +0 474 486 488 +134 129 135 169 +251 250 249 258 +487 0 492 493 +195 180 166 947 +225 130 226 234 +26 0 217 218 +1 162 17 186 +522 519 197 527 +26 218 219 220 +496 342 214 505 +0 158 160 524 +141 144 0 492 +170 167 0 172 +355 446 498 504 +134 133 150 173 +219 209 215 336 +930 15 920 931 +171 168 167 176 +132 131 130 225 +17 155 162 174 +173 154 17 174 +135 0 137 151 +149 147 146 152 +133 147 149 152 +151 135 0 152 +151 0 147 152 +147 0 146 152 +151 147 133 152 +160 0 159 165 +148 142 143 210 +156 142 155 211 +156 491 500 507 +513 506 502 520 +153 0 164 172 +635 634 636 980 +146 149 148 490 +158 146 148 490 +27 194 201 203 +153 160 163 165 +18 158 489 524 +963 962 161 965 +329 331 2 354 +484 0 474 485 +489 18 486 493 +61 481 482 483 +563 550 0 575 +147 149 146 490 +186 1 162 187 +18 148 142 494 +502 491 482 526 +176 168 167 956 +358 355 498 504 +466 464 0 471 +495 494 480 500 +334 338 339 340 +260 319 326 333 +172 167 164 174 +522 491 502 526 +235 0 236 239 +951 952 119 972 +502 520 522 532 +502 513 520 532 +951 119 946 972 +502 522 526 532 +597 601 527 963 +162 22 186 187 +521 197 161 522 +121 0 123 973 +134 171 173 175 +854 852 0 855 +581 0 578 653 +160 153 163 525 +601 519 534 602 +972 120 952 974 +970 960 969 977 +597 0 598 966 +165 0 159 959 +512 25 506 520 +154 163 153 525 +481 479 475 485 +892 878 877 901 +166 163 164 174 +687 669 678 775 +959 159 161 965 +177 1 21 183 +0 153 164 165 +229 130 224 230 +963 601 927 967 +966 0 121 971 +209 202 155 211 +179 162 1 180 +224 132 130 225 +128 0 135 169 +965 597 963 966 +173 17 150 175 +149 133 152 173 +541 536 528 602 +185 1 17 186 +171 170 134 173 +222 229 184 231 +221 229 231 233 +177 21 0 183 +491 508 521 522 +0 127 16 228 +172 171 167 174 +798 805 864 878 +170 169 168 178 +175 134 171 178 +1 21 176 177 +798 797 805 878 +246 29 242 261 +948 942 941 949 +152 0 146 172 +927 601 19 967 +202 155 186 209 +204 163 157 964 +162 1 17 174 +312 31 257 320 +135 134 169 170 +166 162 163 174 +179 1 177 180 +154 146 172 173 +146 153 154 172 +146 152 172 173 +152 135 0 170 +0 153 146 172 +0 152 170 172 +171 167 170 172 +169 168 0 170 +167 0 168 170 +210 209 142 216 +203 27 193 206 +169 0 135 170 +171 17 1 174 +174 162 1 179 +189 181 182 191 +206 192 199 324 +155 17 162 186 +174 166 162 179 +920 918 113 924 +382 372 381 383 +172 152 170 173 +33 0 284 287 +144 147 490 492 +134 175 224 230 +174 171 167 179 +171 21 1 175 +183 182 177 187 +164 153 172 174 +163 153 164 174 +172 153 154 174 +163 154 153 174 +173 171 172 174 +172 154 173 174 +1 171 174 179 +17 171 1 175 +170 168 171 178 +179 166 162 180 +170 134 169 178 +890 882 889 903 +168 176 0 956 +533 536 541 602 +895 893 0 936 +908 122 907 985 +182 177 0 183 +181 22 187 191 +925 363 198 931 +35 292 290 298 +0 118 933 935 +176 21 0 177 +932 118 873 933 +188 0 182 189 +864 804 798 874 +962 959 161 965 +177 180 948 950 +164 166 174 179 +174 167 164 179 +965 959 0 971 +946 942 195 947 +176 171 1 179 +959 958 0 972 +118 932 873 943 +537 477 476 539 +156 20 202 204 +284 244 33 287 +354 353 2 355 +320 317 312 321 +27 205 206 212 +951 944 941 954 +182 187 188 191 +521 204 157 964 +950 949 0 955 +193 22 27 195 +29 246 0 261 +487 144 490 492 +870 875 876 935 +980 634 979 982 +183 21 0 184 +931 323 199 937 +28 185 183 232 +183 1 21 185 +175 21 1 185 +184 21 175 185 +184 183 21 185 +1 17 175 185 +182 180 177 187 +180 1 177 187 +182 181 180 187 +330 344 345 353 +277 276 278 285 +296 334 339 340 +185 17 175 219 +491 156 500 523 +795 797 798 938 +19 24 926 968 +154 173 17 210 +608 605 24 614 +185 28 183 187 +195 162 22 204 +28 185 186 187 +186 185 1 187 +244 242 243 258 +226 221 0 233 +232 223 231 247 +221 226 229 233 +188 28 183 232 +187 28 183 188 +966 965 0 971 +220 219 215 336 +274 272 262 283 +258 244 242 261 +324 319 318 326 +188 187 28 191 +23 196 198 518 +862 859 857 865 +323 198 363 931 +319 252 260 326 +274 262 0 281 +296 0 35 297 +298 297 0 299 +872 804 871 874 +125 988 989 993 +804 864 871 874 +26 215 0 220 +186 155 17 209 +225 131 130 228 +220 221 222 223 +213 200 201 509 +185 223 28 336 +388 48 369 392 +880 882 887 888 +259 248 258 260 +970 120 960 974 +852 107 0 855 +605 604 606 761 +205 193 27 206 +203 200 201 206 +203 199 200 206 +798 864 874 878 +798 804 872 874 +918 15 117 937 +942 932 944 961 +360 516 559 606 +242 243 335 337 +906 114 787 910 +143 26 210 216 +500 61 62 507 +155 156 202 204 +250 191 205 251 +202 162 155 204 +928 944 945 961 +163 157 156 204 +429 366 374 763 +197 196 25 201 +604 605 606 614 +17 173 150 210 +963 927 960 967 +773 116 619 910 +196 197 25 519 +281 275 274 283 +116 617 77 620 +431 0 51 692 +432 438 562 689 +705 45 703 709 +364 309 308 376 +375 310 309 376 +240 220 215 336 +669 667 566 687 +196 200 201 203 +645 82 637 650 +757 752 4 759 +209 207 211 214 +0 33 284 339 +205 250 251 326 +205 190 192 326 +192 252 325 326 +22 191 205 208 +560 573 607 609 +757 366 758 759 +188 28 29 249 +196 25 23 519 +209 155 17 210 +209 142 155 210 +199 198 196 200 +199 40 198 200 +291 3 294 300 +495 214 211 496 +186 22 202 208 +423 54 405 449 +276 275 274 281 +210 142 143 216 +150 210 26 219 +209 186 207 336 +17 186 209 219 +192 199 203 206 +203 193 192 206 +130 225 228 234 +854 0 108 860 +606 605 608 614 +162 155 186 202 +22 162 186 202 +21 175 178 230 +219 218 150 222 +913 906 912 985 +195 166 162 204 +162 166 163 204 +156 155 163 204 +522 520 519 527 +522 197 161 527 +521 508 201 522 +157 160 523 529 +190 181 191 205 +191 181 22 205 +181 190 193 205 +181 193 22 205 +193 190 192 205 +22 193 27 205 +17 209 210 219 +349 345 344 353 +259 281 283 288 +212 207 341 505 +318 329 331 332 +6 44 360 516 +483 60 484 486 +0 214 215 216 +143 0 26 216 +215 26 0 216 +184 21 0 230 +209 215 26 219 +206 201 27 213 +455 453 460 463 +27 201 20 213 +508 213 201 509 +223 184 185 232 +205 22 208 212 +208 22 202 212 +154 17 155 210 +142 154 155 210 +173 154 149 210 +218 26 0 220 +173 149 150 210 +206 200 201 213 +334 243 293 339 +132 140 225 227 +50 418 404 424 +338 284 243 339 +490 489 487 493 +299 297 0 387 +396 391 5 397 +269 3 271 304 +857 852 858 860 +208 202 207 212 +520 519 25 522 +353 356 504 509 +210 149 150 217 +210 150 26 217 +376 375 371 397 +206 27 212 213 +212 27 20 213 +410 409 412 422 +421 374 54 422 +504 499 503 506 +550 0 436 562 +257 260 263 319 +0 183 184 232 +804 311 320 871 +320 319 317 325 +317 319 324 325 +344 349 353 356 +214 209 207 215 +0 143 26 217 +850 842 861 865 +248 259 258 280 +856 311 804 871 +241 238 239 247 +317 316 313 329 +249 29 254 261 +26 143 210 217 +0 131 127 228 +140 0 16 225 +16 131 225 228 +150 133 224 227 +133 134 150 224 +175 185 219 222 +132 130 129 224 +133 132 134 224 +28 188 29 232 +140 133 141 227 +341 338 342 343 +183 0 188 232 +259 280 281 288 +132 129 134 224 +150 175 219 222 +241 239 223 247 +175 150 134 224 +0 141 217 227 +253 251 189 254 +256 252 253 260 +220 0 221 239 +224 129 134 230 +225 0 16 228 +224 130 129 230 +222 221 218 226 +127 131 16 228 +221 218 220 222 +220 218 219 222 +223 221 222 231 +184 229 0 231 +224 222 218 226 +222 184 185 223 +806 796 807 808 +222 185 219 223 +241 240 238 337 +219 220 222 223 +222 218 150 224 +226 222 221 229 +223 185 28 232 +226 224 222 229 +217 141 133 227 +222 150 175 224 +221 0 218 226 +140 132 133 227 +217 133 150 227 +224 133 132 227 +225 224 132 227 +140 141 0 227 +218 0 217 227 +225 140 0 227 +226 0 218 227 +226 225 0 227 +218 224 226 227 +226 224 225 227 +224 218 150 227 +229 224 222 230 +178 175 134 230 +229 222 184 230 +228 225 0 234 +225 226 0 234 +29 188 0 232 +184 223 231 232 +229 0 130 230 +229 184 0 230 +21 184 175 230 +129 130 0 230 +0 229 130 234 +0 226 233 234 +239 238 236 247 +333 243 293 334 +0 184 231 232 +191 188 189 254 +231 229 0 233 +0 276 277 285 +233 229 0 234 +238 242 237 246 +239 220 0 240 +248 0 253 256 +0 231 233 235 +241 223 232 247 +231 221 233 235 +233 221 0 235 +254 251 249 258 +0 238 239 240 +312 294 302 316 +235 221 0 239 +238 236 0 239 +246 238 241 247 +188 29 0 254 +231 223 221 239 +266 264 262 273 +236 238 246 247 +250 243 249 258 +251 249 191 254 +223 220 221 239 +338 243 335 341 +261 258 244 280 +275 286 291 292 +498 461 358 506 +235 231 221 239 +252 251 190 253 +862 859 863 867 +29 188 249 254 +246 29 0 247 +900 117 874 918 +239 235 231 247 +28 188 191 249 +338 337 0 343 +191 190 205 251 +29 241 242 249 +335 28 241 336 +290 297 298 299 +278 245 244 280 +379 378 0 380 +240 239 223 241 +303 271 289 304 +236 235 239 247 +248 258 261 280 +36 265 271 303 +191 189 190 251 +261 244 245 280 +219 186 209 336 +0 235 236 247 +246 0 236 247 +235 0 231 247 +215 209 207 336 +239 223 220 240 +223 240 241 336 +220 215 0 240 +240 238 239 241 +320 312 311 321 +253 248 251 254 +249 188 191 254 +29 28 232 241 +28 223 232 241 +208 205 212 250 +0 29 232 247 +232 29 241 247 +231 0 232 247 +244 237 242 245 +262 264 272 273 +249 191 208 250 +293 284 33 339 +272 264 269 273 +291 290 298 300 +207 186 208 336 +237 0 238 279 +40 324 329 331 +327 206 213 331 +200 206 324 331 +391 371 375 397 +213 206 200 331 +440 57 433 443 +795 796 789 800 +335 241 242 337 +386 385 41 388 +219 185 186 336 +280 259 244 288 +242 244 245 261 +282 259 263 283 +255 31 109 868 +295 35 290 297 +0 267 280 281 +328 362 40 370 +257 868 870 875 +252 256 253 870 +265 39 303 306 +249 254 258 261 +868 256 257 870 +246 245 0 261 +869 856 864 871 +208 191 205 250 +254 248 251 258 +258 243 293 333 +454 452 451 457 +34 0 237 279 +293 259 258 333 +919 916 915 938 +915 899 901 938 +284 0 237 287 +266 269 264 273 +285 33 286 288 +892 0 879 936 +244 278 280 288 +283 281 275 288 +278 277 285 287 +253 189 0 254 +189 188 0 254 +0 248 253 254 +284 243 337 338 +236 238 0 279 +359 350 352 368 +242 29 249 261 +281 280 278 288 +855 107 849 861 +263 260 256 267 +260 248 256 267 +276 274 0 281 +31 263 264 312 +294 302 304 312 +30 317 320 321 +312 302 304 321 +311 304 303 321 +304 302 303 321 +311 30 320 321 +829 806 790 886 +242 249 258 261 +258 254 248 261 +254 0 248 261 +863 0 867 869 +0 109 867 869 +880 866 865 881 +262 255 263 264 +256 248 0 267 +253 252 251 260 +248 253 251 260 +0 271 36 305 +253 248 256 260 +258 248 251 260 +0 255 256 267 +207 208 212 341 +254 29 0 261 +268 0 269 273 +774 768 771 781 +857 850 861 865 +263 255 31 264 +263 256 255 267 +271 3 0 289 +298 290 299 300 +745 93 102 748 +327 324 206 331 +285 0 275 286 +271 0 270 305 +755 754 94 756 +845 841 847 848 +272 262 273 274 +38 0 36 305 +275 272 283 291 +108 109 0 266 +109 255 0 266 +31 255 109 266 +125 970 977 986 +268 269 266 273 +264 262 272 283 +266 262 0 273 +267 259 248 280 +266 108 109 853 +268 0 108 854 +272 274 275 283 +312 263 282 319 +266 0 268 273 +275 274 0 276 +237 238 246 279 +269 0 270 271 +272 0 3 291 +292 35 286 298 +267 262 263 283 +329 318 316 390 +281 274 262 283 +281 267 259 283 +264 255 31 266 +263 259 260 267 +260 259 248 267 +303 302 315 321 +753 752 815 821 +868 109 0 869 +760 813 807 815 +854 108 858 860 +307 38 37 308 +429 76 430 694 +860 857 855 861 +328 322 30 363 +0 108 266 268 +845 111 836 848 +850 847 841 851 +264 3 269 304 +0 3 269 272 +878 863 864 879 +274 0 272 275 +25 508 506 522 +262 267 281 283 +346 0 387 393 +273 0 272 274 +3 264 269 272 +33 0 285 286 +0 37 36 301 +35 0 33 286 +270 0 268 854 +304 31 264 312 +238 236 246 279 +273 262 0 274 +342 338 0 343 +292 283 282 294 +389 48 49 395 +245 246 0 279 +0 246 236 279 +0 34 245 279 +506 25 358 509 +297 290 41 299 +289 0 36 301 +246 245 237 279 +290 292 291 298 +277 0 34 278 +276 0 277 278 +293 35 295 339 +148 149 143 492 +278 276 0 281 +284 244 243 293 +289 3 0 300 +301 289 0 385 +271 0 36 289 +288 259 244 293 +244 259 258 293 +293 33 35 339 +259 263 260 282 +303 310 314 315 +260 252 251 326 +34 0 245 278 +267 248 0 280 +261 0 248 280 +261 245 0 280 +267 0 262 281 +280 267 259 281 +275 285 286 288 +292 290 282 295 +208 28 249 335 +280 278 0 281 +327 318 324 331 +335 243 250 341 +391 365 5 397 +284 237 244 287 +33 35 286 292 +243 244 258 293 +0 452 454 458 +335 337 338 343 +332 329 2 390 +337 243 335 338 +375 365 391 397 +212 250 327 341 +237 244 242 284 +242 244 243 284 +270 268 108 854 +293 292 282 295 +292 35 290 295 +35 292 293 295 +207 335 208 341 +495 0 214 496 +302 3 294 304 +334 250 243 341 +212 208 250 341 +302 289 3 304 +357 361 367 375 +350 435 44 511 +305 32 265 306 +281 276 275 288 +281 278 276 288 +285 276 278 288 +285 275 276 288 +285 278 287 288 +287 33 285 288 +287 278 244 288 +288 244 33 293 +292 288 33 293 +292 33 35 293 +329 324 318 331 +251 260 326 333 +35 295 296 297 +288 33 286 292 +283 259 288 292 +297 0 35 298 +292 282 259 293 +302 290 41 316 +389 371 48 395 +292 286 291 298 +286 275 288 292 +289 271 3 304 +212 206 213 327 +321 313 314 328 +314 303 315 321 +445 451 452 457 +295 290 282 316 +313 314 315 321 +283 275 291 292 +275 283 288 292 +201 200 25 509 +264 263 283 294 +263 282 283 294 +272 264 283 294 +272 3 264 294 +3 272 291 294 +291 272 283 294 +290 292 282 294 +292 290 291 294 +306 37 38 308 +291 283 292 294 +316 317 313 321 +309 39 310 314 +357 369 375 391 +43 351 347 355 +334 293 295 339 +106 107 817 818 +32 813 817 818 +317 318 316 329 +40 200 324 331 +419 46 50 420 +752 4 748 757 +752 747 4 759 +38 37 0 307 +315 313 41 388 +332 327 318 334 +334 327 250 341 +250 208 335 341 +297 35 290 298 +291 0 3 300 +0 298 299 300 +299 290 41 300 +320 30 804 872 +382 376 372 383 +381 0 382 383 +316 41 313 390 +48 392 394 401 +707 0 708 743 +315 289 301 385 +312 311 31 320 +334 330 327 341 +31 311 304 853 +385 299 0 386 +48 369 371 388 +0 289 300 385 +314 309 39 322 +289 302 303 304 +619 617 116 620 +0 87 88 415 +369 313 42 370 +294 263 282 312 +326 250 251 333 +265 36 271 305 +817 813 816 818 +300 3 294 302 +300 289 3 302 +300 294 290 302 +300 290 41 302 +369 315 371 388 +444 56 445 447 +282 263 260 319 +258 250 243 333 +312 317 316 321 +740 103 101 820 +303 265 271 304 +305 38 32 306 +36 38 305 306 +305 265 36 306 +303 36 265 306 +100 806 769 829 +36 37 38 306 +207 215 336 343 +369 314 357 375 +685 684 0 698 +42 346 387 393 +380 373 4 381 +920 914 15 969 +760 759 100 808 +306 39 303 310 +39 306 309 310 +306 303 36 310 +308 306 37 310 +44 350 359 368 +306 308 309 310 +708 93 703 744 +395 49 0 400 +695 96 687 771 +357 314 322 375 +755 781 792 794 +759 364 366 766 +30 323 328 363 +326 319 318 333 +875 871 868 876 +354 200 509 518 +13 810 106 819 +361 322 309 375 +362 44 359 368 +695 686 96 756 +807 760 100 808 +443 57 442 444 +405 398 54 422 +914 928 15 969 +330 212 327 341 +72 565 570 612 +335 208 28 336 +499 491 502 508 +2 351 354 355 +632 74 78 635 +761 361 801 802 +769 788 793 794 +322 30 314 328 +302 313 315 321 +31 257 263 312 +729 0 91 730 +311 31 304 312 +25 197 201 522 +327 213 330 331 +257 252 260 319 +759 747 364 760 +804 798 803 805 +319 317 312 320 +333 293 295 334 +326 318 327 333 +382 0 47 395 +258 259 260 333 +366 374 420 429 +303 301 310 315 +303 289 301 315 +302 289 303 315 +313 42 41 388 +5 398 396 421 +0 386 49 389 +258 251 250 333 +282 295 316 318 +251 258 260 333 +551 69 553 561 +296 332 334 340 +41 313 302 316 +401 396 48 403 +869 864 863 879 +321 30 317 328 +803 795 796 805 +369 371 375 391 +416 411 0 424 +381 380 373 413 +28 241 249 335 +311 39 30 321 +760 364 766 802 +312 282 316 319 +325 319 324 326 +317 312 316 319 +318 317 316 319 +260 282 319 333 +687 621 669 774 +369 48 371 391 +40 199 198 323 +332 295 296 334 +388 315 371 389 +0 296 35 339 +769 767 755 773 +6 360 361 761 +796 795 789 797 +875 117 874 876 +314 39 303 321 +156 20 491 507 +331 327 318 332 +108 856 858 867 +768 92 99 770 +192 190 252 326 +251 190 205 326 +769 755 792 794 +295 318 333 334 +506 499 502 508 +319 257 252 325 +206 205 326 327 +344 340 330 345 +320 317 323 325 +870 868 0 876 +257 319 320 325 +317 30 320 323 +357 362 328 370 +319 318 317 324 +241 28 223 336 +323 40 199 324 +340 0 296 345 +321 317 313 328 +61 491 499 507 +324 206 192 326 +205 192 206 326 +325 324 192 326 +212 205 206 327 +326 205 250 327 +250 205 212 327 +318 324 326 327 +333 318 327 334 +317 323 40 328 +323 317 30 328 +534 64 535 552 +378 4 377 381 +295 35 296 339 +335 338 341 343 +346 2 348 393 +324 318 317 329 +324 317 40 329 +583 0 65 593 +353 349 348 355 +365 5 367 391 +40 317 328 329 +328 317 313 329 +344 0 340 345 +0 342 214 496 +282 293 295 333 +250 326 327 333 +260 259 282 333 +293 282 259 333 +857 855 852 860 +330 327 331 332 +405 409 410 422 +213 212 327 330 +365 367 375 391 +499 502 503 506 +334 295 296 339 +243 249 242 335 +242 237 284 337 +243 242 284 337 +338 243 334 339 +339 0 296 340 +52 379 46 749 +331 329 2 332 +243 338 334 341 +319 282 318 333 +208 249 250 335 +318 282 295 333 +243 250 249 335 +249 241 242 335 +345 0 296 346 +335 207 208 336 +223 185 219 336 +340 332 330 345 +353 2 331 354 +333 250 243 334 +327 250 333 334 +332 318 295 334 +332 330 327 334 +0 340 342 344 +338 0 284 339 +340 338 0 342 +512 510 23 515 +297 296 0 346 +407 403 402 441 +223 219 220 336 +208 186 28 336 +242 238 237 337 +0 284 237 337 +0 237 238 337 +240 0 238 337 +340 330 341 342 +215 240 336 343 +240 335 336 343 +345 332 330 353 +49 388 386 394 +337 335 240 343 +382 384 395 397 +597 595 528 602 +391 396 5 403 +337 0 284 338 +499 61 462 501 +339 338 0 340 +20 156 491 521 +334 332 330 340 +337 240 0 343 +395 384 371 397 +550 563 573 575 +240 215 0 343 +341 207 335 343 +336 335 207 343 +340 334 338 341 +330 334 340 341 +342 0 214 343 +214 0 215 343 +342 214 207 343 +207 214 215 343 +207 341 342 343 +342 340 330 344 +367 357 375 391 +454 451 0 455 +0 297 346 387 +352 403 442 444 +2 345 346 348 +0 384 389 395 +506 358 504 509 +365 375 376 397 +444 352 402 447 +384 376 371 397 +352 43 347 447 +360 434 428 763 +345 296 332 346 +401 48 392 403 +345 332 2 346 +368 357 367 391 +48 396 391 403 +331 213 330 353 +200 198 196 518 +331 40 200 354 +354 362 40 518 +348 345 0 349 +456 349 0 497 +516 6 44 517 +345 344 0 349 +350 44 359 510 +495 62 0 496 +329 40 331 354 +358 355 354 359 +396 395 48 397 +25 196 23 518 +872 798 874 918 +353 348 2 355 +43 355 358 359 +355 43 351 359 +2 348 351 355 +520 25 506 522 +423 0 425 449 +0 473 472 479 +519 197 25 522 +349 348 345 353 +352 351 43 359 +428 54 426 443 +399 396 47 400 +498 358 504 506 +422 373 374 427 +373 4 366 420 +388 387 386 394 +423 418 404 427 +0 56 402 447 +685 667 678 690 +211 207 202 505 +313 369 42 388 +328 323 40 363 +444 402 56 447 +372 364 366 747 +341 330 212 505 +384 301 0 389 +328 313 314 369 +704 94 702 749 +357 328 369 370 +351 2 354 370 +360 6 361 367 +347 0 348 393 +720 709 95 750 +362 357 44 368 +486 474 484 488 +353 330 344 356 +455 460 498 503 +353 213 330 356 +70 433 435 559 +457 460 461 498 +399 398 396 407 +707 87 88 709 +44 6 362 517 +930 198 199 931 +307 37 0 383 +362 354 40 370 +314 322 328 357 +70 553 69 561 +726 720 85 750 +387 42 393 394 +420 694 704 757 +386 0 49 394 +359 351 354 370 +313 328 329 370 +412 409 404 422 +359 352 351 368 +42 329 2 370 +23 512 515 534 +510 63 350 511 +204 156 20 521 +6 357 44 362 +45 707 703 709 +367 368 391 442 +201 27 20 521 +510 44 362 517 +422 54 423 427 +201 197 521 522 +371 310 314 375 +357 322 361 375 +48 388 49 394 +600 598 594 633 +678 667 687 690 +362 328 40 363 +362 357 328 363 +357 322 328 363 +362 6 357 363 +6 322 357 363 +757 4 366 759 +797 795 798 805 +310 309 314 375 +314 313 315 369 +379 52 46 414 +359 354 362 370 +351 359 368 370 +313 329 42 370 +378 4 748 752 +422 405 404 423 +705 87 45 709 +369 368 357 370 +384 382 376 397 +380 4 378 381 +359 362 368 370 +368 362 357 370 +310 308 309 376 +37 308 310 376 +357 6 44 367 +361 6 357 367 +746 377 378 752 +381 372 4 747 +391 48 371 397 +102 93 94 748 +44 6 360 367 +328 314 357 369 +396 398 47 421 +5 396 397 421 +371 314 369 375 +700 88 709 711 +705 95 702 764 +95 705 680 764 +364 361 309 375 +328 40 329 370 +354 329 40 370 +396 47 395 397 +375 371 310 376 +41 299 300 385 +415 0 87 417 +399 406 0 408 +365 364 366 372 +361 364 365 375 +351 42 2 370 +401 400 396 407 +315 301 310 371 +315 314 369 371 +315 310 314 371 +46 4 378 380 +290 297 41 390 +711 709 726 750 +420 374 373 427 +743 703 750 751 +42 388 392 394 +421 373 374 422 +423 405 0 449 +50 418 419 427 +762 758 429 763 +377 307 0 383 +759 366 758 766 +378 377 0 381 +379 46 380 414 +601 591 595 602 +434 360 428 435 +412 50 373 422 +421 54 398 422 +409 405 404 422 +373 366 372 374 +366 365 372 374 +428 426 374 429 +433 426 428 434 +584 586 588 646 +438 433 560 689 +439 444 57 450 +739 0 737 741 +88 707 709 711 +703 702 93 749 +308 364 376 747 +369 313 315 388 +766 760 802 808 +745 378 379 748 +378 46 379 748 +0 301 385 389 +410 0 47 413 +318 295 316 390 +381 377 0 383 +12 75 76 762 +380 378 0 381 +434 559 560 607 +371 48 388 389 +42 387 388 394 +366 4 372 747 +703 45 702 749 +388 386 385 389 +50 411 412 414 +440 439 57 450 +412 380 50 414 +405 398 406 449 +385 41 299 386 +302 300 289 385 +37 307 308 383 +388 48 49 389 +376 37 308 383 +412 0 410 413 +447 43 347 451 +371 301 310 384 +329 316 313 390 +310 37 376 384 +383 376 37 384 +383 37 0 384 +301 0 37 384 +383 0 382 384 +383 382 376 384 +435 428 433 443 +376 372 365 397 +332 318 329 390 +371 315 301 389 +56 55 0 402 +398 410 421 422 +625 621 14 626 +384 0 382 395 +386 41 299 387 +41 297 299 387 +384 371 301 389 +290 295 297 390 +346 297 296 390 +297 295 296 390 +385 315 41 388 +329 42 2 390 +329 313 42 390 +316 295 290 390 +414 50 411 424 +389 384 371 395 +0 346 348 393 +387 41 42 388 +388 385 315 389 +301 315 385 389 +388 49 386 389 +42 346 2 390 +346 332 2 390 +387 41 297 390 +387 297 346 390 +41 387 42 390 +346 42 387 390 +295 332 296 390 +42 313 41 390 +346 296 332 390 +47 382 395 397 +416 52 414 424 +49 0 389 395 +42 351 2 393 +346 42 2 393 +348 2 351 393 +368 352 351 392 +391 368 369 392 +370 369 368 392 +368 351 370 392 +42 369 370 392 +370 351 42 392 +391 369 48 392 +392 351 42 393 +0 405 406 449 +347 348 351 393 +415 87 45 417 +412 380 0 413 +421 410 413 422 +392 391 368 403 +408 405 0 409 +440 433 425 443 +400 0 399 407 +398 405 406 408 +367 44 368 442 +373 372 381 413 +435 367 428 442 +395 0 47 400 +398 406 399 408 +54 374 5 428 +406 398 399 407 +404 411 50 424 +411 0 412 414 +396 48 391 397 +395 48 49 400 +395 396 48 400 +402 56 55 444 +411 404 0 424 +416 414 411 424 +0 380 381 413 +417 51 52 424 +400 396 48 401 +400 48 49 401 +49 48 394 401 +400 49 0 401 +394 0 49 401 +398 54 441 449 +398 405 54 449 +392 368 352 403 +497 456 349 504 +684 681 0 698 +401 394 0 448 +410 398 405 422 +441 402 55 444 +65 0 66 542 +0 406 55 449 +446 0 347 451 +60 473 0 479 +441 406 398 449 +441 55 406 449 +430 418 419 431 +409 408 405 410 +372 373 374 421 +0 415 416 417 +380 50 373 412 +45 87 53 417 +510 350 44 511 +380 412 0 414 +710 714 11 732 +405 404 0 409 +0 401 402 407 +403 402 401 407 +403 401 396 407 +447 56 445 452 +442 403 441 444 +406 399 0 407 +406 0 55 407 +402 55 0 407 +393 347 0 448 +57 350 435 442 +408 398 405 410 +405 0 406 408 +412 404 50 422 +420 429 430 694 +399 398 408 410 +0 408 409 410 +0 399 408 410 +0 47 399 410 +47 398 399 410 +701 0 89 712 +412 373 413 422 +0 739 740 744 +410 412 413 422 +0 381 382 413 +421 413 373 422 +409 404 0 411 +5 374 365 428 +418 404 0 423 +5 365 367 428 +391 5 367 442 +411 409 404 412 +0 409 411 412 +409 0 410 412 +730 91 11 732 +46 50 380 414 +307 0 816 821 +414 411 0 416 +692 685 0 698 +411 404 50 412 +373 380 412 413 +0 382 47 413 +803 39 30 804 +765 758 762 766 +307 377 0 821 +11 710 732 742 +0 51 417 424 +413 382 47 421 +688 690 691 693 +433 425 426 438 +413 372 382 421 +50 419 420 427 +680 696 678 764 +430 419 420 694 +347 43 355 446 +4 373 46 420 +427 426 423 437 +420 373 50 427 +403 368 352 442 +444 443 57 450 +0 418 423 437 +0 423 425 437 +426 423 54 427 +374 54 5 421 +437 0 432 438 +422 374 54 427 +436 70 433 440 +410 47 398 421 +413 373 372 421 +425 443 449 450 +404 422 423 427 +422 404 50 427 +54 426 374 428 +0 51 418 431 +415 0 416 706 +0 69 549 550 +397 365 5 421 +397 372 365 421 +374 5 365 421 +374 365 372 421 +5 54 398 421 +360 367 428 435 +72 566 71 686 +442 5 428 443 +710 0 89 711 +770 791 826 827 +696 687 678 764 +416 0 417 424 +419 52 51 424 +419 51 418 424 +419 50 52 424 +418 50 419 424 +404 418 0 424 +436 0 438 562 +57 433 70 440 +576 68 549 589 +460 457 455 498 +5 391 403 442 +5 403 441 442 +691 690 692 693 +667 73 71 690 +425 0 437 438 +355 349 348 446 +535 64 67 552 +702 93 92 703 +705 702 696 764 +696 695 687 764 +686 96 687 695 +709 95 705 720 +442 57 350 444 +426 433 438 689 +428 435 442 443 +425 423 54 426 +360 761 762 763 +538 475 476 544 +778 776 0 779 +435 57 442 443 +429 428 426 434 +99 791 820 828 +68 549 551 561 +586 579 571 645 +575 549 0 576 +570 563 568 574 +427 418 419 430 +437 426 425 438 +429 426 427 430 +429 427 420 430 +427 419 420 430 +685 678 684 698 +693 419 430 694 +439 440 57 557 +696 678 685 698 +548 0 549 576 +512 64 510 515 +436 433 438 440 +55 441 444 450 +605 360 6 761 +442 350 352 444 +426 425 423 437 +430 426 427 437 +431 430 418 437 +430 427 418 437 +444 439 57 445 +418 0 431 437 +513 501 477 539 +0 160 159 529 +24 516 517 605 +516 515 24 517 +510 515 516 517 +362 510 517 518 +435 433 57 443 +433 57 70 435 +428 433 434 435 +468 537 543 545 +147 0 144 490 +401 392 394 448 +431 0 432 437 +352 444 445 447 +552 461 64 554 +0 348 349 446 +447 0 56 452 +458 439 445 558 +0 347 348 446 +933 118 873 935 +553 70 69 557 +546 58 0 555 +495 480 62 500 +0 455 456 463 +394 393 0 448 +503 502 501 513 +0 56 439 450 +449 0 425 450 +449 443 441 450 +441 403 402 444 +449 441 55 450 +440 425 0 450 +440 0 439 450 +352 402 403 444 +396 403 407 441 +407 398 396 441 +403 396 5 441 +398 5 396 441 +54 5 398 441 +425 433 426 443 +54 425 426 443 +407 406 398 441 +55 406 407 441 +425 440 443 450 +443 440 57 450 +444 350 352 445 +402 403 401 448 +63 43 350 445 +435 434 360 559 +435 44 367 442 +435 350 44 442 +368 350 352 442 +350 43 352 445 +441 5 442 443 +441 54 5 443 +444 441 443 450 +55 56 0 450 +55 0 449 450 +442 441 443 444 +355 353 349 504 +439 56 444 450 +452 451 0 454 +444 57 350 445 +56 439 444 445 +394 392 393 448 +66 65 542 547 +451 445 43 457 +563 0 564 568 +451 0 447 452 +393 392 351 448 +392 352 351 448 +347 351 352 448 +352 392 403 448 +447 0 347 448 +402 0 447 448 +447 352 402 448 +347 352 447 448 +402 352 403 448 +0 447 347 451 +446 347 43 451 +423 425 54 449 +443 54 425 449 +443 441 54 449 +67 546 554 556 +461 460 459 513 +453 454 455 460 +444 56 55 450 +489 487 0 490 +457 455 454 460 +476 466 464 477 +455 0 453 463 +454 0 453 455 +451 446 0 455 +469 0 59 470 +498 456 455 503 +349 0 446 456 +497 62 462 499 +445 439 57 558 +457 63 43 498 +43 446 451 498 +598 0 594 633 +556 69 0 557 +476 469 466 477 +436 550 560 561 +452 0 439 458 +452 445 457 458 +457 454 452 458 +474 60 0 486 +477 459 460 513 +70 435 511 559 +503 501 477 513 +548 542 0 582 +641 14 0 642 +455 446 0 456 +553 551 67 555 +510 64 63 511 +465 0 458 556 +463 0 453 466 +530 485 481 538 +464 0 463 466 +62 495 500 507 +473 60 0 474 +468 0 59 469 +0 456 462 463 +476 475 470 544 +63 64 461 554 +445 63 43 457 +342 330 341 505 +200 40 198 518 +354 40 200 518 +557 70 57 558 +72 76 565 607 +556 0 458 557 +465 457 460 554 +212 202 207 505 +440 0 436 557 +0 470 471 472 +0 59 7 468 +563 562 550 573 +468 467 0 469 +462 61 62 478 +460 463 477 503 +496 495 62 507 +456 455 446 498 +545 58 468 546 +469 467 466 477 +470 0 59 544 +471 475 476 479 +200 331 354 509 +464 462 0 478 +462 0 463 464 +472 473 475 479 +515 64 514 535 +454 0 458 465 +0 454 453 465 +460 453 454 465 +454 457 460 465 +458 457 454 465 +436 69 70 557 +440 436 70 557 +435 433 434 559 +556 553 69 557 +609 606 608 615 +542 58 66 547 +476 481 538 539 +471 472 475 479 +216 0 214 495 +466 0 453 467 +453 0 465 467 +479 478 60 481 +465 460 453 467 +465 459 460 467 +141 0 217 492 +453 466 467 477 +470 469 0 471 +467 466 0 469 +491 500 61 523 +23 198 517 518 +511 57 70 558 +148 154 158 525 +539 537 536 540 +0 79 80 639 +519 25 512 520 +471 0 472 479 +453 463 466 477 +501 499 61 502 +446 355 349 504 +363 362 6 517 +467 459 460 477 +471 466 464 476 +471 469 466 476 +475 470 471 476 +574 578 579 586 +471 470 469 476 +481 475 476 538 +478 61 62 480 +523 18 483 524 +489 158 148 490 +475 481 485 538 +462 62 0 478 +478 62 0 480 +606 360 605 761 +463 453 460 477 +463 464 466 477 +60 478 0 480 +472 470 471 475 +473 0 472 475 +472 0 470 475 +487 0 488 489 +489 486 488 493 +545 66 58 547 +144 0 487 490 +0 464 478 479 +545 67 58 546 +493 486 0 494 +217 143 149 492 +204 27 194 521 +644 622 571 646 +60 483 484 485 +519 512 23 534 +60 481 483 485 +537 536 513 539 +0 473 474 485 +158 0 146 490 +0 484 474 488 +474 473 60 485 +494 216 142 495 +20 212 213 505 +216 211 142 495 +211 156 142 500 +159 157 526 529 +500 18 483 523 +478 462 61 501 +500 491 61 507 +18 480 483 486 +7 468 543 545 +0 60 480 486 +154 142 155 525 +489 0 158 490 +477 476 469 537 +540 528 0 541 +0 648 649 652 +481 478 60 483 +536 513 459 537 +479 60 473 485 +474 60 484 485 +482 526 529 531 +475 473 0 485 +588 577 584 610 +489 484 18 524 +480 478 61 483 +491 482 61 502 +501 61 482 502 +476 464 479 481 +479 464 478 481 +481 61 478 483 +480 60 478 483 +552 459 461 554 +58 66 7 542 +67 64 553 554 +493 18 486 494 +435 57 70 511 +59 469 470 544 +539 536 532 540 +538 476 539 544 +482 501 502 539 +527 532 528 596 +475 0 470 544 +481 61 482 501 +459 461 513 552 +62 61 499 507 +484 486 488 489 +484 18 486 489 +446 349 456 504 +493 148 18 494 +216 143 0 494 +158 148 18 489 +157 163 156 525 +492 0 143 493 +460 455 463 503 +501 463 462 503 +910 617 909 913 +200 213 331 509 +536 528 532 540 +201 508 25 522 +349 356 497 504 +160 0 524 529 +482 529 530 531 +627 787 794 910 +483 18 484 524 +66 58 7 545 +641 0 630 643 +499 462 456 503 +516 44 510 517 +356 213 330 505 +501 477 463 503 +463 456 462 503 +0 144 487 492 +463 462 464 501 +67 459 552 554 +446 456 498 504 +214 211 216 495 +143 148 492 493 +480 0 486 494 +493 0 143 494 +493 143 148 494 +142 148 143 494 +494 480 0 495 +480 62 0 495 +0 216 494 495 +331 353 354 509 +517 198 362 518 +330 213 212 505 +496 62 0 497 +496 0 344 497 +349 344 0 497 +344 356 496 497 +356 344 349 497 +356 349 353 504 +495 211 142 500 +494 18 480 500 +480 18 483 500 +509 200 25 518 +142 18 494 500 +61 480 483 500 +202 20 211 505 +506 502 503 513 +356 213 20 508 +507 491 499 508 +25 200 196 518 +511 510 64 515 +433 436 438 560 +451 455 457 498 +43 451 457 498 +63 457 461 498 +355 43 358 498 +461 358 63 498 +462 456 497 499 +330 342 344 505 +214 342 207 505 +61 462 62 499 +538 482 531 539 +142 494 495 500 +481 476 464 501 +464 476 477 501 +481 464 478 501 +61 481 478 501 +478 464 462 501 +504 355 353 509 +500 495 211 507 +356 353 213 509 +496 356 505 507 +211 495 496 507 +491 61 499 502 +559 606 608 609 +502 501 499 503 +511 435 44 516 +508 506 504 509 +498 460 461 503 +499 456 497 504 +456 499 503 504 +503 498 456 504 +499 497 356 504 +211 20 156 507 +500 211 156 507 +356 344 496 505 +356 330 344 505 +496 214 211 505 +358 63 359 510 +214 207 211 505 +507 356 20 508 +213 356 20 505 +155 156 163 525 +477 460 503 513 +476 470 469 544 +353 331 213 509 +211 496 505 507 +505 20 211 507 +505 356 20 507 +497 496 62 507 +497 356 496 507 +499 497 62 507 +497 499 356 507 +359 63 350 510 +506 504 499 508 +356 499 504 508 +507 20 491 508 +507 499 356 508 +355 354 353 509 +504 358 355 509 +355 358 354 509 +508 356 213 509 +504 356 508 509 +44 362 359 510 +922 24 616 968 +204 20 27 521 +546 0 465 556 +508 201 20 521 +0 546 555 556 +503 461 506 513 +528 531 532 540 +513 477 459 537 +539 532 531 540 +538 481 482 539 +508 20 491 521 +73 667 685 690 +612 74 77 615 +506 461 358 512 +485 481 483 530 +25 506 358 512 +510 358 63 512 +358 461 63 512 +64 510 63 512 +64 63 461 512 +523 160 524 529 +160 157 523 525 +160 158 153 525 +491 156 157 521 +520 506 502 522 +204 157 156 521 +555 69 0 556 +508 491 502 522 +438 0 432 562 +618 115 74 632 +584 78 74 592 +509 358 354 518 +565 72 607 612 +517 516 6 605 +78 584 80 639 +354 359 362 518 +44 510 511 516 +661 660 659 664 +70 436 433 560 +435 360 44 516 +565 563 570 573 +586 574 578 588 +157 160 163 525 +513 461 506 520 +364 759 760 766 +587 577 68 610 +354 358 359 518 +359 358 510 518 +510 362 359 518 +509 25 358 518 +358 25 512 518 +512 510 358 518 +512 25 23 518 +510 512 23 518 +517 510 23 518 +155 163 154 525 +482 491 61 523 +482 61 483 523 +532 527 528 602 +543 537 59 544 +157 523 526 529 +459 467 468 537 +194 27 201 521 +966 598 601 967 +526 523 482 529 +601 963 966 967 +197 161 194 521 +502 506 508 522 +561 550 560 573 +0 595 597 598 +565 560 562 573 +64 515 534 535 +986 973 125 989 +590 535 533 591 +589 587 572 590 +909 906 787 910 +189 253 0 933 +530 529 0 531 +159 160 157 529 +156 491 157 523 +512 519 520 534 +537 513 477 539 +907 630 617 909 +501 481 476 539 +123 0 598 633 +154 153 158 525 +148 18 142 525 +500 142 18 525 +500 156 142 525 +523 500 18 525 +523 156 500 525 +148 158 18 525 +157 156 523 525 +460 457 461 554 +513 502 501 539 +538 0 475 544 +670 83 673 683 +573 609 610 612 +585 577 584 586 +482 481 501 539 +551 69 549 555 +483 523 524 530 +484 483 524 530 +483 482 523 530 +553 67 554 556 +7 58 468 545 +476 537 539 544 +540 539 537 544 +611 115 74 615 +594 583 0 595 +194 204 521 964 +485 483 484 530 +531 0 538 540 +527 522 520 532 +59 468 469 537 +532 531 482 539 +482 502 526 532 +483 481 482 530 +524 0 484 530 +485 484 0 530 +477 467 459 537 +529 0 524 530 +529 523 482 530 +524 523 529 530 +537 476 469 544 +958 0 165 959 +0 530 531 538 +531 482 526 532 +540 536 528 541 +562 0 432 564 +587 68 572 610 +816 810 815 821 +531 538 539 540 +459 536 537 545 +564 0 73 568 +0 58 7 542 +501 476 477 539 +545 468 459 546 +532 502 513 539 +0 440 439 557 +467 465 459 546 +514 515 535 603 +595 591 533 602 +548 0 58 555 +531 528 0 540 +536 532 513 539 +459 545 67 552 +532 482 502 539 +67 553 555 556 +532 513 520 536 +551 547 67 555 +546 67 58 555 +439 458 557 558 +58 67 547 555 +553 69 555 556 +58 547 548 555 +551 549 548 555 +781 773 619 794 +364 365 366 763 +469 59 537 544 +520 513 461 552 +530 481 482 538 +530 482 531 538 +543 59 0 544 +0 475 485 538 +0 485 530 538 +610 587 592 611 +543 0 540 544 +660 658 657 664 +547 542 58 548 +0 436 69 550 +547 66 65 583 +576 0 578 581 +837 13 809 839 +32 306 813 814 +642 0 637 650 +598 594 591 600 +66 0 541 543 +540 537 536 543 +541 540 536 543 +543 540 537 544 +578 575 577 588 +541 66 543 545 +541 533 66 545 +536 541 543 545 +536 533 541 545 +555 546 67 556 +350 63 445 558 +545 67 533 547 +67 535 533 547 +560 550 562 573 +526 531 532 596 +545 533 66 547 +605 613 604 761 +542 0 58 548 +69 436 70 561 +693 686 690 695 +430 429 426 689 +0 575 576 578 +564 0 432 691 +461 512 520 552 +461 64 512 552 +68 550 561 573 +686 566 71 690 +565 562 563 573 +550 549 68 561 +520 512 534 552 +554 458 457 558 +57 439 557 558 +458 445 457 558 +772 10 776 779 +549 68 551 589 +465 458 457 554 +571 644 82 662 +0 562 563 564 +789 788 114 793 +514 551 553 561 +513 536 459 552 +545 459 536 552 +67 545 533 552 +545 536 533 552 +757 756 754 767 +572 9 587 611 +535 533 534 552 +536 513 520 552 +535 67 533 552 +511 350 57 558 +69 0 549 555 +551 548 547 555 +771 755 96 781 +52 419 51 697 +686 687 690 695 +550 436 69 561 +554 546 465 556 +551 535 514 553 +551 67 535 553 +535 64 514 553 +64 535 67 553 +514 511 70 553 +64 511 514 553 +70 514 553 561 +546 459 67 554 +546 465 459 554 +899 901 902 915 +559 514 70 561 +459 465 460 554 +460 461 459 554 +457 63 461 554 +554 465 458 556 +76 72 12 607 +70 57 440 557 +458 554 556 558 +557 556 553 558 +554 553 556 558 +554 457 63 558 +554 63 64 558 +511 64 63 558 +554 64 553 558 +553 64 511 558 +553 511 70 558 +557 553 70 558 +550 69 549 561 +516 511 435 559 +516 514 511 559 +560 559 70 561 +630 629 628 641 +10 677 86 776 +611 610 609 615 +437 432 430 689 +438 437 426 689 +85 95 97 750 +685 692 696 698 +559 433 434 560 +640 77 622 646 +645 638 586 648 +589 572 551 590 +550 436 560 562 +559 70 433 560 +576 575 577 578 +571 568 569 574 +77 612 622 646 +697 52 419 704 +638 8 637 643 +568 563 0 574 +674 675 0 722 +74 584 592 610 +621 623 566 669 +77 72 12 620 +571 570 568 574 +581 580 576 582 +586 578 579 653 +645 586 579 648 +564 562 563 565 +432 562 564 565 +687 566 686 690 +437 430 426 689 +566 620 96 686 +620 75 96 686 +566 72 620 686 +620 72 75 686 +72 566 620 622 +672 671 673 683 +676 674 673 679 +805 803 812 814 +617 116 77 618 +86 680 95 720 +0 672 84 682 +756 75 96 773 +565 71 72 570 +586 578 577 588 +533 535 534 591 +549 550 68 575 +655 569 82 663 +636 79 0 639 +755 773 781 794 +599 592 9 611 +73 0 567 663 +591 19 600 603 +527 526 532 596 +590 583 593 594 +589 551 547 590 +528 531 0 596 +924 920 918 931 +533 583 590 591 +0 65 580 582 +657 0 655 664 +588 571 570 646 +588 586 571 646 +159 0 529 596 +565 564 71 570 +563 564 565 570 +568 71 564 570 +564 563 568 570 +574 563 0 575 +631 122 632 635 +594 591 583 595 +591 19 534 601 +586 638 571 646 +921 115 614 923 +587 9 81 592 +583 533 541 595 +535 551 514 572 +551 68 561 572 +561 514 551 572 +82 650 654 655 +80 585 586 648 +579 569 571 645 +569 568 0 574 +68 549 575 576 +995 994 0 1000 +12 607 612 615 +586 571 574 588 +574 571 570 588 +535 547 551 590 +531 529 0 596 +0 65 66 583 +575 68 576 577 +580 576 577 581 +549 548 576 589 +585 578 577 586 +612 610 74 615 +761 360 361 763 +662 71 566 667 +542 65 0 582 +548 65 542 582 +657 655 656 659 +648 585 586 653 +593 9 590 594 +569 571 574 579 +578 0 574 579 +0 569 574 579 +576 548 0 582 +572 535 551 590 +9 572 587 590 +0 580 581 582 +547 533 66 583 +583 547 533 590 +618 614 115 923 +644 623 82 662 +531 528 532 596 +584 577 587 610 +608 606 614 615 +577 575 68 588 +597 598 601 966 +591 583 590 594 +591 590 9 594 +575 573 68 588 +585 577 580 647 +527 161 526 596 +578 574 575 588 +575 563 573 588 +585 584 80 586 +567 73 663 667 +577 580 581 585 +578 577 581 585 +686 693 694 695 +597 528 527 602 +580 0 581 585 +189 181 190 934 +582 576 548 589 +572 551 68 589 +582 580 576 589 +577 68 576 589 +582 548 65 589 +577 587 68 589 +65 0 580 593 +609 607 606 615 +548 547 65 589 +649 648 645 652 +575 574 563 588 +574 570 563 588 +577 585 584 647 +586 577 584 588 +635 634 592 639 +607 12 606 615 +12 116 77 620 +123 598 600 633 +599 115 592 611 +582 65 580 589 +576 580 577 589 +81 9 593 594 +587 577 580 589 +68 587 572 589 +589 547 65 590 +65 547 583 590 +601 595 597 602 +632 115 74 635 +644 82 637 645 +970 928 120 997 +541 528 0 595 +591 533 583 595 +80 0 585 648 +80 8 0 648 +9 587 81 593 +541 0 583 595 +587 9 590 593 +583 65 590 593 +590 589 587 593 +65 589 590 593 +589 65 580 593 +580 587 589 593 +951 120 952 972 +593 583 0 594 +531 526 529 596 +593 0 81 594 +595 594 591 598 +0 594 595 598 +526 161 159 596 +988 0 898 994 +939 928 914 970 +612 77 12 615 +965 0 597 966 +520 527 532 602 +9 591 594 600 +601 597 527 602 +528 527 596 597 +534 519 520 602 +0 528 596 597 +595 528 0 597 +946 120 951 972 +974 0 121 986 +788 884 883 904 +19 519 534 601 +592 9 81 599 +115 592 74 635 +928 120 960 970 +967 123 600 978 +514 535 572 603 +117 15 940 943 +918 900 117 940 +610 612 74 646 +635 592 78 639 +872 323 931 937 +610 588 573 612 +997 995 954 998 +0 973 986 989 +101 0 740 746 +771 96 687 774 +420 4 366 757 +612 609 610 615 +570 573 588 612 +607 573 565 612 +165 159 157 964 +165 157 163 964 +323 363 799 931 +515 24 19 603 +600 9 591 603 +591 595 598 601 +598 595 597 601 +19 591 534 603 +515 19 534 603 +204 195 166 964 +591 598 600 601 +534 520 552 602 +520 536 552 602 +534 591 601 602 +534 533 591 602 +535 515 534 603 +590 591 9 603 +590 9 572 603 +591 590 535 603 +590 572 535 603 +591 535 534 603 +600 123 633 978 +633 123 0 979 +616 599 115 921 +572 514 603 608 +794 773 619 910 +516 360 605 606 +561 68 573 609 +570 565 573 612 +572 68 561 609 +608 572 514 609 +572 587 610 611 +921 614 922 923 +785 782 783 792 +572 561 514 609 +763 762 758 766 +325 323 872 937 +360 6 516 605 +763 364 361 766 +754 100 752 759 +374 428 429 763 +619 96 620 773 +116 619 620 773 +592 74 610 611 +592 115 74 611 +614 115 611 615 +605 516 606 608 +605 24 516 608 +515 516 24 608 +515 514 516 608 +606 516 559 608 +559 516 514 608 +603 515 24 608 +120 946 951 961 +784 779 770 826 +603 514 515 608 +607 559 560 609 +561 560 559 609 +561 559 514 609 +752 377 815 821 +514 559 608 609 +607 72 12 612 +609 573 607 612 +977 121 973 986 +609 572 68 610 +609 68 573 610 +588 573 68 610 +763 758 366 766 +374 366 365 763 +120 929 928 960 +875 870 873 935 +610 609 572 611 +609 608 572 611 +611 74 610 615 +819 810 816 821 +603 572 608 611 +72 77 12 612 +0 971 972 974 +980 122 635 982 +916 921 922 923 +894 939 940 991 +621 619 620 629 +686 75 96 756 +611 609 608 615 +12 604 606 615 +203 194 197 929 +611 608 614 615 +606 604 614 615 +922 613 605 925 +604 116 765 911 +12 607 606 762 +46 4 420 757 +30 799 803 804 +608 611 614 616 +608 603 611 616 +603 19 600 616 +611 603 9 616 +603 600 9 616 +616 115 614 921 +942 944 951 961 +916 613 919 923 +918 799 798 924 +9 599 611 616 +599 9 600 616 +687 764 771 774 +599 9 81 633 +905 902 903 917 +798 900 918 938 +594 81 9 633 +905 903 904 917 +323 199 198 931 +604 765 800 911 +773 765 116 793 +612 72 77 622 +620 77 72 622 +570 71 72 622 +610 74 584 646 +570 72 612 622 +729 727 91 736 +116 773 793 910 +644 637 638 645 +622 644 571 662 +620 566 96 621 +566 72 71 622 +82 569 662 663 +661 655 82 663 +679 674 673 682 +81 587 592 647 +587 584 592 647 +593 587 81 647 +585 580 0 647 +577 584 587 647 +0 593 81 647 +593 0 580 647 +607 434 76 689 +577 587 580 647 +593 580 587 647 +586 584 80 638 +655 654 0 656 +661 624 666 669 +77 622 629 640 +665 660 658 670 +0 665 671 683 +683 665 83 684 +683 0 665 684 +770 92 97 772 +625 668 669 775 +624 14 0 625 +668 625 10 775 +774 10 625 775 +639 81 592 647 +644 571 82 645 +630 640 641 643 +973 975 125 989 +626 619 621 628 +628 619 621 629 +625 14 0 626 +6 605 761 801 +941 932 118 944 +968 922 920 976 +14 628 629 641 +626 14 0 628 +620 619 617 629 +620 617 77 629 +622 620 77 629 +623 566 622 629 +623 621 566 629 +638 79 8 643 +78 79 638 643 +594 9 600 633 +622 566 620 629 +621 620 566 629 +641 629 623 644 +77 617 618 632 +971 960 120 974 +568 0 73 663 +622 623 629 644 +628 14 0 641 +640 631 78 643 +627 619 628 909 +793 116 910 911 +617 628 619 909 +0 870 876 935 +630 631 0 907 +631 0 122 636 +907 906 0 909 +635 78 631 636 +571 569 82 645 +631 78 79 636 +631 79 0 636 +630 617 632 907 +992 975 983 993 +924 919 795 938 +568 569 0 663 +906 787 0 909 +637 8 0 643 +628 0 630 641 +971 120 972 974 +0 628 630 909 +633 0 81 634 +979 975 973 981 +635 631 122 636 +122 635 636 980 +971 0 121 974 +992 984 897 993 +990 988 125 991 +0 637 641 642 +637 82 642 650 +634 81 592 639 +78 631 79 643 +612 610 588 646 +8 79 0 643 +650 651 654 656 +655 82 650 659 +652 0 648 653 +636 78 79 639 +638 586 584 646 +584 588 610 646 +74 612 77 646 +655 650 654 656 +588 570 612 646 +622 570 571 646 +80 79 8 638 +79 80 78 638 +639 592 584 647 +0 80 585 647 +584 78 80 638 +14 624 0 642 +78 638 640 643 +650 0 651 656 +641 623 14 642 +76 75 72 686 +631 78 632 640 +632 630 631 640 +584 585 80 647 +639 584 80 647 +632 74 77 640 +632 77 617 640 +629 617 77 640 +617 630 632 640 +617 629 630 640 +640 629 630 641 +79 631 0 643 +8 638 637 645 +637 0 641 643 +641 640 629 644 +643 640 641 644 +643 638 640 644 +641 637 643 644 +637 638 643 644 +642 637 641 644 +82 637 642 644 +612 570 622 646 +642 641 623 644 +642 623 82 644 +656 650 0 659 +651 649 650 654 +679 681 682 683 +656 0 657 659 +640 74 77 646 +644 640 622 646 +78 74 640 646 +78 584 74 646 +638 78 640 646 +638 584 78 646 +644 638 640 646 +571 638 644 646 +8 637 0 649 +585 0 581 653 +649 645 650 654 +648 579 652 653 +652 579 0 653 +637 8 645 649 +648 645 8 649 +648 8 0 649 +86 676 677 679 +667 666 567 678 +651 0 649 652 +670 83 668 677 +586 585 578 653 +648 586 579 653 +650 642 0 659 +0 649 650 651 +83 680 681 684 +654 0 569 655 +656 655 650 659 +569 568 662 663 +579 645 648 652 +649 651 652 654 +650 645 82 654 +645 569 82 654 +652 579 645 654 +645 579 569 654 +579 652 0 654 +579 0 569 654 +652 651 0 654 +657 658 0 664 +654 569 82 655 +566 623 622 662 +71 566 622 662 +661 666 667 669 +570 568 71 662 +667 566 623 669 +663 655 0 664 +0 671 672 683 +0 655 656 657 +622 570 71 662 +82 623 661 662 +662 568 73 663 +650 82 642 659 +642 624 0 659 +665 567 666 684 +569 571 82 662 +570 571 568 662 +663 567 661 664 +659 624 0 660 +659 0 657 660 +658 657 0 660 +729 91 11 730 +665 0 567 684 +568 73 71 662 +642 623 624 661 +659 642 624 661 +659 82 642 661 +662 73 71 667 +432 437 438 689 +660 659 624 661 +0 676 677 776 +659 655 82 661 +664 0 567 665 +664 658 0 665 +0 564 73 691 +624 660 661 666 +568 571 569 662 +659 657 655 664 +657 659 660 664 +570 622 571 662 +661 659 655 664 +663 661 655 664 +663 0 567 664 +0 660 668 670 +567 663 661 667 +664 660 658 665 +564 432 565 688 +778 97 776 779 +660 666 668 670 +688 432 565 689 +670 0 658 671 +683 681 0 684 +52 417 416 706 +71 73 564 691 +567 664 665 666 +664 567 661 666 +665 664 660 666 +664 661 660 666 +662 661 663 667 +672 0 84 674 +677 83 86 679 +666 567 661 667 +662 566 623 667 +662 623 661 667 +83 677 86 775 +0 658 660 670 +607 76 565 689 +665 658 0 671 +83 681 683 684 +666 624 660 668 +660 624 0 668 +661 623 624 669 +805 797 796 881 +668 666 624 669 +668 624 625 669 +625 624 14 669 +623 14 624 669 +621 625 14 669 +623 621 14 669 +721 714 726 732 +560 434 607 689 +741 739 0 744 +673 0 672 674 +10 86 772 776 +671 0 672 673 +671 670 0 673 +735 727 731 737 +94 755 756 771 +679 676 674 721 +742 741 0 743 +676 673 0 677 +669 687 774 775 +673 670 0 677 +709 700 711 726 +732 675 91 777 +668 0 670 677 +734 770 778 826 +75 620 96 773 +744 708 93 745 +85 731 97 777 +731 85 732 777 +675 674 0 676 +732 85 675 777 +778 770 97 779 +625 0 10 780 +777 0 735 778 +755 769 773 794 +10 0 668 677 +90 0 84 682 +680 83 678 684 +680 679 83 681 +434 429 76 689 +677 10 86 775 +772 770 768 779 +75 758 762 765 +676 86 677 776 +690 71 688 691 +685 73 690 691 +564 565 71 688 +690 73 71 691 +685 0 73 691 +712 710 714 725 +670 665 83 683 +565 432 562 689 +688 564 432 691 +704 695 94 756 +565 76 688 689 +560 565 562 689 +84 672 674 682 +84 674 90 682 +679 83 86 680 +773 767 765 793 +426 429 434 689 +560 433 434 689 +700 699 719 720 +438 560 562 689 +87 45 53 705 +0 89 88 700 +731 735 734 778 +87 0 88 700 +681 679 83 683 +673 679 682 683 +679 673 83 683 +681 0 682 683 +682 0 672 683 +682 672 673 683 +83 665 666 684 +678 666 567 684 +678 83 666 684 +0 431 432 691 +71 564 688 691 +567 667 678 685 +667 567 73 685 +567 678 684 685 +684 0 567 685 +0 73 567 685 +0 53 692 698 +667 669 678 687 +718 717 716 724 +703 92 95 751 +417 51 53 697 +45 417 52 706 +45 87 707 709 +52 46 419 704 +71 72 686 688 +72 76 686 688 +76 72 565 688 +431 691 692 693 +693 688 686 694 +731 85 97 750 +431 688 691 693 +52 416 414 706 +693 430 688 694 +702 697 704 749 +696 680 678 698 +686 76 75 694 +430 432 431 688 +688 432 431 691 +0 675 676 777 +692 690 685 696 +431 430 688 693 +430 76 688 694 +76 430 688 689 +688 430 432 689 +701 89 710 712 +680 86 95 764 +429 434 76 762 +686 71 688 690 +678 685 690 696 +0 87 699 700 +691 0 431 692 +691 685 0 692 +766 765 758 767 +417 415 416 706 +94 102 748 754 +762 604 12 765 +606 434 360 762 +88 87 700 709 +690 685 691 692 +690 693 695 696 +751 97 734 770 +53 698 699 705 +0 675 91 730 +419 430 431 693 +51 431 692 693 +431 51 419 693 +692 53 696 698 +684 680 681 698 +678 680 684 698 +732 726 85 750 +781 768 755 792 +759 754 100 767 +719 700 720 726 +751 92 97 770 +695 687 690 696 +687 678 690 696 +922 616 921 968 +761 765 766 800 +740 102 101 746 +713 712 0 718 +693 51 419 697 +692 51 693 697 +692 53 51 697 +698 53 696 705 +53 692 696 697 +692 693 696 697 +696 693 695 697 +698 680 681 699 +698 0 53 699 +87 53 0 699 +414 379 52 706 +724 0 723 728 +709 705 699 720 +719 699 681 720 +86 95 85 720 +680 699 705 720 +86 679 680 720 +700 0 89 701 +697 53 45 705 +699 698 680 705 +731 97 734 751 +696 53 697 705 +702 696 697 705 +695 696 697 702 +762 12 75 765 +415 87 88 707 +706 45 415 707 +0 103 101 740 +702 92 95 703 +737 727 731 741 +414 0 379 706 +739 737 734 741 +768 782 784 792 +95 702 703 705 +45 703 702 705 +420 419 46 704 +694 419 420 704 +419 693 697 704 +694 693 419 704 +697 693 695 704 +695 693 694 704 +697 695 702 704 +695 94 702 704 +428 374 365 763 +45 702 697 705 +116 75 12 765 +87 415 45 707 +0 710 89 712 +694 75 756 758 +716 713 0 718 +0 90 84 717 +713 716 723 724 +706 415 0 707 +88 0 415 707 +705 699 87 709 +705 95 680 720 +752 748 102 754 +747 4 377 752 +4 378 377 752 +707 706 45 708 +0 706 707 708 +706 0 379 708 +102 740 745 746 +720 95 85 750 +709 720 726 750 +748 93 94 749 +707 45 703 708 +700 89 88 711 +711 710 0 742 +89 0 88 711 +97 731 734 778 +739 103 0 740 +743 0 708 744 +716 717 0 724 +719 90 701 721 +761 605 613 801 +722 0 717 724 +727 91 731 732 +97 731 750 751 +719 701 700 726 +753 102 101 820 +715 713 0 716 +85 679 720 721 +0 710 11 742 +0 715 716 723 +85 731 732 750 +699 700 709 720 +816 813 810 818 +717 90 84 722 +674 84 90 722 +710 726 732 742 +309 322 802 803 +0 778 779 826 +701 90 0 718 +716 0 723 724 +714 701 712 718 +90 701 714 718 +726 85 721 732 +712 701 0 718 +717 0 90 718 +717 716 0 718 +713 715 0 723 +722 714 675 730 +719 682 90 721 +682 674 90 721 +712 0 710 725 +676 85 675 721 +701 700 0 719 +699 0 700 719 +699 681 0 719 +682 679 674 721 +712 713 0 725 +718 716 713 724 +681 679 682 719 +0 681 682 719 +682 90 0 719 +721 714 675 722 +85 676 679 721 +90 701 0 719 +699 680 681 720 +719 681 679 720 +681 680 679 720 +718 713 712 725 +720 700 709 726 +91 0 735 777 +721 674 90 722 +726 710 711 742 +712 714 718 725 +90 717 718 722 +714 90 718 722 +721 675 674 722 +721 90 714 722 +713 718 724 725 +714 710 11 725 +104 103 0 834 +723 713 724 725 +0 713 723 725 +710 0 11 725 +903 883 904 917 +701 719 721 726 +721 719 720 726 +714 701 721 726 +85 97 776 777 +720 85 721 726 +89 701 710 726 +89 700 701 726 +711 700 89 726 +89 710 711 726 +86 676 85 776 +91 727 11 732 +750 95 97 751 +95 92 97 751 +714 710 701 726 +94 93 702 749 +730 714 675 732 +714 721 675 732 +721 85 675 732 +730 11 714 732 +726 714 710 732 +810 106 816 818 +735 731 734 737 +11 0 727 729 +729 0 727 736 +190 932 933 934 +308 376 383 747 +728 0 11 729 +758 429 76 762 +791 820 822 827 +915 902 905 917 +626 627 0 782 +796 803 805 814 +917 915 901 938 +744 741 739 751 +0 11 727 742 +739 734 733 751 +743 741 0 744 +734 739 741 751 +741 731 734 751 +750 703 95 751 +711 707 709 743 +694 686 695 756 +765 116 75 773 +0 842 112 888 +741 743 750 751 +697 45 52 749 +0 737 738 739 +735 91 727 736 +784 0 779 826 +778 0 735 825 +0 729 91 736 +0 91 735 736 +756 695 94 771 +94 695 702 771 +94 99 102 754 +747 308 364 760 +383 372 381 747 +835 0 106 851 +739 733 103 740 +848 841 847 851 +727 735 736 737 +704 697 52 749 +736 0 727 737 +383 376 372 747 +93 102 733 740 +819 104 0 835 +0 104 105 835 +98 0 831 833 +104 0 105 834 +791 784 770 826 +0 711 742 743 +383 381 377 747 +737 731 734 741 +737 734 738 739 +792 791 99 828 +732 727 11 742 +741 0 727 742 +741 727 731 742 +731 727 732 742 +744 703 743 751 +744 739 733 751 +744 733 93 751 +744 93 703 751 +0 707 711 743 +709 707 703 743 +364 372 376 747 +733 93 740 744 +812 804 805 864 +733 92 93 751 +740 739 733 744 +703 707 708 743 +740 0 744 745 +94 92 99 771 +708 0 379 745 +378 379 0 745 +702 45 697 749 +379 708 745 749 +744 0 708 745 +744 93 740 745 +0 378 745 746 +377 378 0 746 +745 740 0 746 +381 4 377 747 +383 377 307 747 +383 307 308 747 +810 807 813 815 +738 737 823 825 +100 759 767 808 +834 833 832 838 +361 367 365 763 +859 856 812 864 +708 45 703 749 +4 46 378 748 +746 378 745 748 +815 307 816 821 +819 816 0 821 +306 39 309 814 +678 669 666 775 +803 309 39 814 +802 760 309 814 +46 420 704 757 +111 110 0 845 +745 102 746 748 +745 708 93 749 +704 46 748 749 +93 708 703 749 +709 711 743 750 +743 711 742 750 +703 709 743 750 +731 741 742 750 +748 94 754 757 +743 742 741 750 +750 731 741 751 +703 93 92 751 +748 746 378 752 +694 76 75 758 +942 181 180 948 +704 94 748 757 +781 627 782 794 +620 75 116 773 +748 102 746 752 +800 761 613 801 +13 840 841 850 +752 100 753 815 +811 829 839 886 +813 760 807 814 +752 102 746 753 +746 102 101 753 +114 789 793 911 +753 752 102 754 +100 752 753 754 +748 4 46 757 +754 94 99 755 +822 103 104 834 +99 768 770 791 +932 941 942 944 +764 695 687 771 +755 96 756 771 +86 97 772 776 +791 99 768 792 +797 796 795 805 +801 800 761 802 +798 795 799 803 +887 865 880 888 +733 99 92 770 +751 733 92 770 +434 607 76 762 +763 761 762 766 +252 192 325 873 +434 606 607 762 +12 76 607 762 +765 762 761 766 +948 947 942 949 +747 377 307 815 +758 757 759 767 +100 807 806 829 +94 704 756 757 +366 420 757 758 +420 366 429 758 +757 420 694 758 +694 420 429 758 +756 757 758 767 +761 604 606 762 +765 75 758 767 +758 366 429 763 +839 98 837 843 +813 306 308 814 +0 38 307 816 +100 810 807 829 +694 429 76 758 +762 429 434 763 +428 365 367 763 +361 360 367 763 +361 761 763 766 +604 12 606 762 +758 76 75 762 +746 101 0 821 +886 881 883 887 +776 0 676 777 +15 918 920 931 +761 606 360 762 +789 795 800 919 +827 738 103 834 +758 75 756 767 +759 757 754 767 +758 759 766 767 +0 98 110 833 +830 791 822 831 +916 915 912 919 +613 911 919 923 +934 932 118 941 +92 702 95 764 +675 0 91 777 +669 668 666 775 +901 899 900 938 +677 83 668 775 +751 734 733 770 +883 114 904 917 +86 10 772 775 +834 0 105 838 +114 787 788 904 +625 669 774 775 +103 822 827 834 +767 765 75 773 +0 625 626 780 +308 813 760 815 +788 787 884 904 +731 91 735 777 +732 91 731 777 +702 92 94 771 +764 702 695 771 +626 0 780 782 +96 695 756 771 +784 770 768 791 +95 92 764 772 +771 764 92 772 +92 95 97 772 +790 788 769 794 +911 114 789 919 +627 626 781 782 +764 92 702 771 +768 755 771 781 +618 116 604 911 +776 676 85 777 +769 790 828 829 +803 798 795 805 +945 932 193 961 +855 854 852 860 +794 787 788 910 +773 769 767 793 +669 621 625 774 +805 859 864 880 +767 755 754 769 +767 754 100 769 +789 806 796 881 +811 806 807 829 +768 784 791 792 +626 625 621 774 +776 10 0 779 +806 881 883 886 +626 780 781 782 +782 0 780 784 +949 953 0 955 +39 306 812 814 +764 86 95 772 +97 95 86 772 +772 764 86 775 +774 772 10 775 +781 780 768 782 +773 96 755 781 +825 734 826 827 +976 113 914 992 +322 309 39 803 +812 306 32 814 +779 10 0 780 +768 771 772 774 +806 811 807 881 +96 621 687 774 +680 83 86 775 +764 680 86 775 +678 680 764 775 +764 687 678 775 +774 687 764 775 +97 86 85 776 +785 791 792 830 +777 97 776 778 +0 782 783 785 +735 731 777 778 +932 190 181 934 +777 776 0 778 +823 0 738 824 +772 774 10 780 +10 774 625 780 +768 772 779 780 +779 772 10 780 +925 922 920 926 +203 193 194 961 +774 626 625 780 +772 768 774 780 +781 619 627 794 +919 795 613 924 +784 782 0 785 +773 619 96 781 +774 96 621 781 +621 96 619 781 +621 626 774 781 +619 626 621 781 +780 774 626 781 +832 822 831 833 +626 619 627 781 +0 894 895 898 +363 6 322 801 +770 734 733 827 +783 788 790 794 +766 361 761 802 +782 627 0 783 +782 780 768 784 +779 768 780 784 +792 781 782 794 +517 24 605 925 +779 770 768 784 +876 875 117 935 +807 796 760 808 +859 32 857 866 +308 309 760 814 +792 782 783 794 +306 265 39 812 +306 32 265 812 +793 765 116 911 +937 15 117 943 +785 0 98 786 +783 0 785 786 +617 907 909 913 +619 617 909 910 +0 627 628 909 +787 627 0 909 +15 914 113 940 +783 627 0 787 +877 882 888 890 +735 0 736 823 +0 825 826 832 +105 833 834 838 +825 778 0 826 +826 827 831 832 +881 880 797 882 +892 895 0 936 +101 746 753 821 +766 759 760 808 +865 880 881 887 +865 840 842 887 +768 781 782 792 +307 813 815 816 +785 783 786 790 +920 922 916 976 +106 816 0 819 +752 746 377 821 +614 613 605 922 +995 998 999 1000 +916 976 983 992 +765 761 604 800 +813 810 815 816 +767 766 765 808 +767 759 766 808 +783 782 627 794 +176 167 179 956 +783 787 788 794 +787 783 627 794 +822 98 830 831 +813 308 760 814 +806 100 769 808 +800 765 766 808 +834 824 0 838 +770 733 99 791 +783 790 792 794 +793 773 769 794 +910 909 906 913 +98 0 110 843 +788 769 793 806 +871 872 874 875 +0 784 785 831 +804 39 311 812 +733 102 99 820 +800 766 802 808 +887 112 842 888 +822 820 103 827 +110 841 843 845 +13 811 810 829 +812 803 39 814 +828 809 753 829 +734 778 825 826 +796 807 760 814 +802 309 803 814 +807 810 811 829 +819 101 753 821 +983 975 124 993 +753 810 100 829 +361 6 761 801 +801 361 322 802 +832 738 827 834 +793 789 788 806 +874 864 869 879 +30 311 320 804 +109 856 867 869 +882 880 877 888 +322 361 309 802 +159 165 959 964 +935 893 118 943 +935 118 873 943 +940 939 893 943 +747 307 308 815 +857 861 862 865 +363 30 323 799 +270 305 852 858 +766 364 361 802 +970 939 928 997 +960 970 121 977 +761 613 604 800 +102 740 101 820 +38 305 32 817 +39 30 322 803 +934 0 182 948 +613 795 800 801 +801 605 613 925 +0 843 844 845 +766 761 800 802 +760 309 364 802 +361 364 309 802 +39 311 30 804 +859 812 32 866 +866 805 796 881 +810 100 807 815 +801 795 800 802 +800 795 796 802 +799 322 30 803 +322 801 802 803 +322 799 801 803 +802 801 795 803 +801 799 795 803 +802 795 796 803 +810 13 106 818 +861 842 0 862 +912 915 917 919 +323 30 320 872 +799 798 803 804 +802 796 760 814 +740 733 103 820 +788 790 769 806 +826 791 784 831 +308 306 309 814 +796 802 760 808 +822 104 105 834 +746 752 753 821 +784 791 785 831 +804 803 39 812 +869 109 856 871 +100 769 828 829 +793 765 800 808 +793 767 765 808 +793 769 767 808 +806 769 793 808 +806 793 789 808 +800 789 793 808 +806 789 796 808 +800 796 789 808 +796 800 802 808 +100 767 769 808 +809 13 810 829 +0 824 825 832 +818 32 813 866 +737 0 738 823 +832 0 824 838 +753 810 819 821 +815 810 753 821 +778 735 734 825 +737 735 736 823 +105 0 835 836 +828 792 791 830 +828 790 792 830 +740 102 733 820 +101 753 809 819 +833 0 832 838 +734 739 733 827 +809 753 820 828 +831 822 98 833 +839 786 98 843 +829 811 806 886 +841 837 110 843 +880 877 878 882 +860 0 108 867 +786 790 884 886 +810 809 753 819 +803 804 805 812 +109 31 266 853 +810 753 100 815 +107 0 106 817 +104 101 809 819 +98 785 786 830 +305 38 0 817 +38 813 816 817 +826 784 0 831 +816 0 38 817 +308 307 38 813 +38 306 308 813 +104 0 101 819 +827 791 826 831 +306 38 32 813 +859 812 805 864 +855 852 107 857 +760 759 747 815 +759 752 747 815 +813 308 307 815 +813 307 38 816 +813 38 32 817 +817 107 0 852 +839 837 13 841 +878 864 874 879 +850 106 107 851 +109 108 0 867 +862 0 860 867 +857 32 818 866 +850 107 849 851 +810 807 811 818 +807 810 813 818 +864 859 856 867 +858 856 859 867 +860 108 858 867 +860 858 859 867 +871 869 868 876 +852 817 107 857 +811 13 810 818 +753 101 809 820 +101 104 809 820 +101 103 104 820 +734 737 738 825 +823 735 0 825 +737 736 0 823 +790 792 769 828 +786 785 790 830 +830 98 785 831 +847 841 840 850 +779 778 770 826 +791 770 733 827 +103 738 0 834 +817 305 32 852 +811 840 850 865 +820 104 809 822 +820 103 104 822 +0 785 98 831 +0 106 819 835 +868 257 31 871 +809 810 753 829 +733 739 103 827 +836 105 0 846 +738 823 824 825 +792 790 785 830 +823 737 735 825 +734 735 737 825 +820 733 103 827 +824 0 738 834 +820 791 733 827 +739 738 103 827 +824 823 0 825 +819 13 809 835 +0 305 817 852 +835 106 13 851 +829 809 13 839 +829 13 811 839 +738 734 825 827 +837 98 110 843 +753 100 754 828 +820 753 102 828 +102 753 754 828 +820 102 99 828 +754 99 102 828 +769 754 100 828 +769 755 754 828 +99 754 755 828 +755 769 792 828 +792 99 755 828 +827 822 831 832 +829 828 809 830 +820 809 828 830 +809 820 822 830 +828 791 820 830 +820 791 822 830 +789 796 797 881 +829 790 828 830 +825 738 827 832 +824 738 825 832 +809 104 819 835 +0 107 106 851 +840 811 886 887 +811 881 886 887 +841 836 835 851 +832 824 738 834 +830 829 790 839 +110 833 105 846 +833 822 105 834 +833 832 822 834 +836 835 837 841 +840 13 811 850 +305 0 270 852 +853 265 270 858 +850 13 106 851 +786 0 98 843 +110 0 833 846 +848 0 836 851 +110 111 0 846 +848 836 841 851 +835 809 104 837 +104 822 105 837 +822 104 809 837 +98 822 830 837 +833 822 98 837 +835 105 836 837 +255 257 31 868 +822 833 105 837 +833 98 110 837 +838 105 833 846 +836 111 110 846 +837 809 830 839 +809 829 830 839 +806 788 790 886 +934 118 0 941 +786 98 830 839 +837 110 836 841 +847 840 842 850 +830 98 837 839 +847 0 845 848 +32 812 814 866 +841 840 839 843 +843 0 110 845 +850 840 842 865 +818 106 107 850 +839 13 811 840 +856 804 812 864 +885 112 840 887 +871 868 257 875 +849 848 847 851 +0 836 111 848 +0 111 845 848 +836 841 845 848 +818 107 817 857 +256 252 257 870 +807 813 814 866 +818 807 811 866 +838 0 105 846 +842 0 112 844 +112 840 842 844 +111 836 110 845 +843 841 840 844 +887 885 112 889 +841 844 845 847 +844 841 840 847 +844 840 842 847 +841 835 13 851 +841 13 850 851 +305 270 265 858 +849 0 855 861 +844 0 845 847 +844 842 0 847 +857 818 850 865 +968 920 969 976 +107 818 850 857 +850 849 847 851 +265 270 271 853 +836 0 835 851 +304 265 271 853 +271 269 304 853 +31 304 264 853 +107 0 849 851 +850 818 811 865 +256 257 255 868 +866 796 807 881 +848 847 0 849 +0 848 849 851 +887 886 885 889 +852 305 32 858 +806 789 788 883 +817 32 818 857 +32 817 852 857 +858 852 854 860 +323 320 325 872 +818 811 13 850 +270 269 271 853 +269 264 304 853 +269 266 264 853 +270 268 269 853 +269 268 266 853 +268 270 108 853 +268 108 266 853 +31 264 266 853 +860 859 862 867 +0 854 855 860 +0 862 863 867 +862 861 842 865 +811 865 866 881 +311 804 812 856 +853 31 311 856 +311 265 853 856 +265 311 812 856 +911 912 114 919 +880 862 863 888 +856 265 853 858 +812 32 265 858 +852 32 857 858 +812 265 856 858 +856 853 108 858 +857 858 859 860 +853 270 108 858 +858 812 32 859 +858 32 857 859 +853 108 109 856 +853 109 31 856 +270 852 854 858 +108 270 854 858 +255 109 0 868 +107 855 857 861 +856 812 858 859 +847 842 0 861 +855 0 860 861 +842 847 850 861 +849 847 0 861 +849 850 847 861 +889 882 883 903 +872 320 325 875 +881 811 865 887 +880 865 862 888 +862 842 0 888 +255 0 256 868 +856 109 31 871 +320 31 257 871 +865 818 811 866 +812 859 805 866 +866 865 859 880 +865 859 857 866 +107 850 849 861 +861 0 860 862 +804 30 799 872 +320 804 871 872 +861 860 857 862 +859 857 860 862 +805 796 814 866 +865 857 818 866 +812 805 814 866 +840 112 842 887 +870 252 257 875 +880 878 797 882 +877 0 879 892 +813 32 814 866 +814 796 807 866 +864 856 804 871 +320 311 31 871 +918 872 799 931 +843 839 786 885 +799 30 323 872 +863 859 864 867 +856 31 311 871 +868 31 109 871 +801 799 363 925 +190 192 252 873 +181 180 195 942 +874 869 871 876 +865 811 840 887 +949 948 947 950 +875 868 870 876 +892 879 900 936 +868 0 256 870 +947 119 949 955 +939 990 894 995 +256 0 253 870 +864 869 871 874 +843 786 0 885 +114 912 917 919 +881 789 806 883 +909 907 906 913 +797 881 882 883 +935 0 893 936 +941 0 948 949 +0 868 869 876 +871 320 872 875 +189 0 182 934 +874 871 875 876 +873 117 875 935 +865 862 859 880 +0 634 979 980 +882 883 887 889 +804 799 798 872 +113 916 920 924 +787 114 788 910 +325 257 252 875 +257 320 871 875 +887 882 889 890 +320 257 325 875 +947 179 166 957 +252 870 873 875 +325 252 873 875 +919 915 917 938 +872 117 874 875 +900 899 113 938 +876 0 935 936 +917 797 789 919 +940 893 117 943 +933 932 118 934 +0 189 933 934 +869 863 0 879 +876 874 869 879 +805 866 880 881 +885 840 839 886 +883 886 887 889 +883 884 886 889 +933 189 190 934 +958 959 946 972 +894 893 0 895 +890 877 882 891 +114 906 912 913 +874 878 879 900 +944 943 928 945 +0 631 122 907 +879 0 876 936 +869 0 876 879 +614 605 24 922 859 862 863 880 859 863 864 880 -859 864 805 880 -859 880 805 866 -859 865 880 866 -859 862 880 865 -0 124 985 122 -877 863 880 878 -950 179 956 176 -901 899 896 892 -890 877 882 891 -0 885 889 112 -0 988 897 993 +0 863 877 879 788 789 114 883 -886 887 840 811 -885 887 840 886 -0 888 842 112 -773 619 794 910 -112 842 887 888 -887 842 865 888 -829 886 811 806 -886 806 881 811 -786 790 886 839 -884 786 886 885 -991 898 895 894 -882 878 877 880 -882 797 878 880 -787 884 783 788 -0 884 783 787 -890 888 882 877 -15 918 931 937 -891 896 901 902 -895 940 991 894 -0 862 842 888 -922 613 614 605 -881 883 806 886 -883 788 806 886 +797 789 881 883 +877 863 878 879 +891 0 877 892 +790 788 884 886 +112 887 889 890 +843 840 839 885 +122 631 632 907 +790 783 786 884 +990 994 995 1000 +844 0 112 885 884 788 883 886 -888 887 882 880 -877 888 880 863 -865 888 862 880 -887 888 865 880 -885 887 112 840 -112 842 840 887 -840 842 865 887 -0 950 948 949 -885 889 112 887 -892 900 879 878 -889 882 887 883 -889 887 886 883 -884 886 883 889 -0 891 902 896 -0 950 955 956 -874 918 798 900 -878 900 879 874 -0 885 884 889 -884 886 889 885 -885 887 886 889 -0 892 877 891 -912 915 919 916 -204 166 964 195 -0 896 892 891 -985 983 908 124 -892 900 901 899 -0 891 903 902 -0 891 877 890 -950 177 948 180 -0 898 896 897 -0 903 891 890 -0 893 895 894 -891 901 896 892 -914 928 939 15 -943 117 935 893 -901 896 899 902 -974 972 0 952 -199 323 937 931 -945 15 937 943 -914 991 992 113 -908 124 122 985 -0 953 952 119 -957 179 167 956 -0 952 953 998 -955 947 950 949 -899 940 900 113 -991 899 992 113 -892 900 899 895 -527 161 596 965 -900 117 936 874 -117 943 940 893 -941 118 996 944 -899 940 113 991 -891 902 901 903 -992 897 984 915 -918 940 113 900 -617 116 618 913 -903 890 882 891 -889 890 882 903 -952 972 120 974 -632 908 122 907 -923 604 911 618 -913 912 906 114 -794 627 910 619 -925 198 363 517 -23 198 926 517 -909 913 906 910 -896 899 895 892 -123 973 0 979 -878 797 882 901 -899 896 895 898 -897 896 899 898 -913 906 907 909 -912 913 911 114 -993 125 992 975 -773 794 793 910 -904 883 788 114 -0 909 628 630 -632 617 618 913 -0 889 903 890 -787 904 788 114 -0 898 897 988 -114 911 789 793 -0 787 904 884 -787 884 788 904 -884 883 788 904 -884 889 883 904 -904 889 883 903 -0 903 889 904 -0 904 889 884 -933 190 934 189 -927 197 963 929 -914 970 969 977 -0 905 902 903 -0 909 907 906 -632 907 630 617 -918 15 113 940 -121 986 0 973 -0 787 906 904 -906 787 114 904 -905 906 114 904 -0 906 905 904 -992 984 983 915 -902 901 915 899 -939 943 893 940 -801 925 363 6 -926 925 24 517 -932 945 873 943 -895 940 899 991 -975 989 981 993 -635 115 908 632 -635 632 908 122 -0 989 981 973 -925 517 363 6 +843 0 844 885 +878 797 805 880 +878 805 864 880 +863 878 864 880 +863 877 878 880 +882 881 880 887 +880 797 805 881 +883 881 882 887 +844 112 840 885 +117 872 874 918 +840 843 844 885 +884 885 886 889 +944 928 939 997 +908 907 913 985 +787 783 788 884 +842 865 887 888 +880 863 877 888 +886 885 840 887 +888 882 887 890 +889 0 112 890 +888 887 112 890 +788 783 790 884 +900 899 895 940 +0 783 787 884 +786 783 0 884 +958 119 0 972 +788 806 883 886 +839 790 786 886 614 616 921 922 -253 190 933 189 -902 899 915 897 -125 976 992 975 -983 915 984 912 -903 917 904 905 -924 795 801 799 -971 966 0 965 -117 918 872 874 -903 917 883 904 -986 121 977 973 -613 795 801 924 -918 798 872 874 -922 976 916 920 -121 960 970 977 -903 917 905 902 -913 909 907 617 -632 913 907 617 -992 915 983 916 -918 15 940 117 -918 940 900 117 -912 911 919 114 -614 604 923 618 -0 985 907 122 -902 915 905 984 -882 797 917 901 -955 956 950 957 -903 882 917 901 -917 901 915 902 -0 933 934 189 -903 901 917 902 -882 797 883 917 -883 789 917 797 +885 786 884 886 +931 15 918 937 +863 0 877 888 +113 899 940 991 +862 0 863 888 +885 839 786 886 +873 192 325 937 +842 862 865 888 +874 798 878 900 +181 182 180 948 +179 167 164 957 +112 0 888 890 +114 788 883 904 +878 877 879 892 +953 119 0 955 +0 896 897 898 +981 975 973 989 +947 942 180 948 +877 891 892 901 +930 203 929 945 +989 981 975 993 +885 0 112 889 +884 0 885 889 +939 914 15 940 +182 181 934 948 +0 950 955 956 +882 891 901 903 +892 899 900 901 +891 890 0 903 +891 877 882 901 +911 800 613 919 +990 914 939 991 +921 922 968 976 +943 15 928 945 +896 0 897 902 +936 893 117 940 +900 918 113 940 +953 949 119 955 +911 789 800 919 +943 118 932 944 +949 119 951 953 +983 124 908 985 +0 902 903 905 +892 896 899 901 +900 895 892 936 +896 891 0 902 +899 895 892 900 +879 878 892 900 +325 192 199 937 +895 892 0 896 +892 891 0 896 +0 895 896 898 +979 0 980 981 +999 0 987 1000 +882 877 878 901 +632 122 907 908 +795 613 800 919 +910 906 114 913 +902 891 0 903 +935 873 117 943 +896 895 892 899 +899 896 897 902 +891 896 901 902 +901 896 899 902 +905 0 902 984 +951 946 942 961 +913 911 618 923 +0 903 904 905 +882 890 891 903 +890 889 0 903 +799 801 795 924 +912 905 114 917 +600 599 616 978 +898 895 896 899 +898 896 897 899 +944 943 118 996 +943 939 893 996 +984 897 915 992 +789 800 793 911 +936 895 893 940 +24 23 19 926 +896 892 891 901 +900 878 892 901 +901 891 902 903 +883 889 903 904 +889 883 884 904 +903 889 0 904 +889 884 0 904 +787 0 884 904 +901 797 917 938 +798 918 924 938 +873 870 933 935 +921 908 115 923 +928 914 15 939 +635 122 632 908 +765 793 800 911 +617 619 116 910 +630 632 631 907 +794 788 793 910 +908 913 912 985 +905 114 904 906 +904 114 787 906 +904 0 905 906 +904 787 0 906 +913 907 906 985 +635 632 115 908 +971 121 960 974 +970 960 121 974 +981 0 124 993 +906 907 0 985 +253 189 190 933 +876 117 874 936 +910 114 911 913 +618 617 116 913 +926 925 198 931 +906 905 114 912 +632 618 115 908 +936 117 900 940 +924 795 798 938 +872 799 798 918 +915 113 916 992 +793 788 114 910 +939 893 894 940 +908 632 618 913 +604 618 911 923 +116 617 910 913 +936 900 895 940 +907 632 908 913 +632 617 618 913 +114 793 910 911 +203 197 196 929 +932 181 193 942 +928 15 930 945 +911 116 910 913 +911 618 116 913 +114 905 904 917 +921 916 922 976 +915 905 912 917 +915 901 902 917 +902 901 903 917 +954 951 944 997 +901 882 903 917 903 882 883 917 -904 917 114 905 -931 15 930 920 -931 926 930 198 -23 196 926 198 -900 940 899 895 -920 931 926 930 -939 970 990 997 -953 949 954 951 -943 937 873 117 -922 920 916 924 -920 930 926 969 -940 893 939 894 -0 177 948 950 -961 942 932 193 -929 961 928 945 -942 947 180 195 -908 923 921 983 -929 120 928 961 -125 970 914 977 -799 925 931 363 -952 954 997 951 -912 915 917 919 -323 931 199 198 -919 795 938 797 -926 198 925 517 -192 190 932 873 -982 635 908 122 -924 798 918 938 -970 120 928 960 -979 978 123 973 -119 946 947 951 -914 15 113 920 -920 15 113 918 -924 922 920 925 -605 925 801 6 -605 517 925 6 -115 614 923 618 -970 960 969 977 -893 117 935 936 -912 923 916 919 -0 902 905 984 -945 961 932 193 -912 911 923 919 -115 923 921 908 -969 928 15 930 -936 893 940 895 -923 604 613 911 -916 920 113 924 -924 920 113 918 -323 931 198 363 -931 930 199 198 -918 799 798 924 -924 799 798 795 -193 190 181 932 -24 922 605 925 -922 613 605 925 -613 605 925 801 -613 801 925 924 -924 801 925 799 -799 801 925 363 -901 917 915 938 -613 922 924 925 -0 118 933 935 -938 798 918 900 -916 915 938 113 -972 119 946 958 -927 196 197 929 -920 925 926 931 -924 920 931 925 -925 926 931 198 -121 960 977 967 -194 946 195 964 -161 962 194 964 -927 519 197 196 -927 23 519 196 -926 23 927 196 -19 23 927 926 -19 23 519 927 -19 519 601 927 -194 946 964 962 -964 946 195 166 -600 968 616 19 -945 937 873 943 -946 942 195 947 -943 15 937 117 -951 946 961 120 -921 922 616 968 -997 928 939 970 -951 942 941 944 -964 194 521 204 -947 948 942 180 -926 196 930 198 -926 196 927 930 -914 920 113 976 -959 971 0 965 -945 192 932 873 -0 933 870 935 -192 190 193 932 -161 959 964 159 -972 120 962 946 -944 942 932 961 -924 918 113 938 -947 942 949 951 -0 950 949 955 -166 958 164 165 -876 875 935 870 -0 935 870 876 -0 995 994 1000 -0 934 182 189 -194 193 961 203 -937 323 872 931 -117 875 935 876 -929 197 962 194 -944 943 939 928 -0 935 876 936 -0 936 876 879 -0 936 879 892 -875 325 937 873 -873 325 937 192 -199 325 192 937 -960 928 969 929 -161 962 959 965 -161 962 964 959 -194 962 961 946 -199 323 325 937 -937 323 325 872 -875 325 872 937 -117 875 872 937 -918 872 937 117 -15 918 937 117 -947 942 951 946 -899 900 901 938 -878 938 901 900 -878 797 901 938 -940 939 991 894 -0 955 953 119 -165 959 0 159 -914 940 113 15 -914 939 940 15 -998 953 954 952 -996 943 893 939 -119 958 0 957 -968 922 926 920 -0 955 949 953 -951 941 954 944 -928 943 939 15 -928 945 930 929 -941 934 118 932 -0 934 118 941 -117 943 15 940 -942 947 949 948 -929 120 961 962 -181 193 942 195 -118 932 873 943 -119 972 0 958 -929 945 930 203 -199 203 930 945 -199 203 945 192 -203 193 945 192 -945 192 193 932 -969 930 926 927 -596 161 159 965 -161 965 959 159 -962 120 961 946 -914 977 969 976 -123 121 0 973 -957 167 0 956 -194 929 961 962 -962 197 161 194 -943 944 945 928 -943 944 932 945 -967 963 601 966 -165 958 0 959 -527 963 597 601 -123 967 598 966 -958 972 959 946 -990 995 999 1000 -941 948 934 942 -948 180 182 181 -947 950 949 948 -934 948 182 181 -942 948 934 181 -974 971 0 972 -0 948 941 949 -119 953 952 951 -981 975 124 982 -119 949 953 951 -947 179 957 950 -990 988 125 991 -956 167 168 176 -0 176 956 168 -957 956 0 955 -956 167 0 168 -119 957 955 947 -121 971 0 974 -981 980 979 982 -966 960 971 121 -913 985 906 912 -997 995 990 939 -990 1000 987 994 -952 953 954 951 -0 954 995 998 -119 947 955 949 -981 975 982 979 -958 972 0 959 -982 980 122 124 -972 971 0 959 -899 898 895 991 -957 179 956 950 -119 957 0 955 -954 996 997 944 -990 999 970 986 -0 949 954 953 -0 941 954 949 -956 179 167 176 -0 906 985 905 -960 120 928 929 -0 176 950 956 -963 197 962 929 -951 942 961 946 -946 195 942 961 -959 972 962 946 -0 985 984 905 -957 164 0 167 -164 179 167 957 -164 166 179 957 -966 598 0 597 -951 942 944 961 -958 946 947 119 -957 958 947 119 -957 166 947 958 -958 166 947 946 -164 166 957 958 -959 972 971 962 -972 120 971 962 -966 963 601 597 -967 927 968 19 -966 971 960 963 -964 959 165 159 -969 927 968 967 -19 968 24 926 -985 912 905 906 -633 978 599 600 -977 969 968 967 -960 927 969 967 -990 995 1000 994 -967 960 966 121 -157 964 165 159 -157 161 964 159 -204 964 194 195 -163 166 964 204 -163 166 165 964 -157 964 204 163 -166 964 958 165 -976 992 983 916 -600 967 968 19 -601 519 963 927 -927 519 963 197 -963 519 527 197 -963 527 161 197 -963 197 161 962 -119 946 951 972 -601 519 527 963 -157 964 163 165 -157 161 521 964 -964 161 521 194 -927 968 926 969 -969 968 926 920 -975 125 989 993 -920 969 15 930 -969 928 930 929 -960 971 962 963 -19 967 601 600 -19 927 601 967 -967 927 601 963 -967 927 963 960 -967 960 963 966 -969 929 930 927 -983 923 916 912 -983 908 124 982 -982 908 124 122 -123 977 121 973 -970 928 939 914 -999 995 998 1000 -970 928 969 960 -914 969 15 920 -914 928 15 969 -971 965 962 963 -914 928 969 970 -971 959 962 965 -969 920 976 968 -634 599 982 635 -599 115 982 635 -990 994 988 991 -979 973 0 981 -616 600 599 978 -976 920 113 916 -971 121 0 966 -972 119 0 952 -119 951 952 972 -980 635 982 122 -616 978 599 921 -634 982 979 980 -0 993 897 984 -636 635 980 122 -977 978 976 975 -978 921 976 975 -922 968 976 920 -125 986 977 973 -0 902 984 897 -982 115 921 908 -982 115 908 635 -975 983 124 982 -992 976 983 975 -633 599 978 979 -121 967 977 123 -633 979 0 634 -633 123 0 979 -967 600 978 123 -633 123 978 600 -978 968 616 600 -921 968 616 978 -975 989 973 981 -0 994 988 987 -125 977 975 973 -124 993 983 975 -990 994 987 988 -123 978 977 973 -634 980 0 636 -0 980 122 636 -0 124 122 980 -978 975 977 973 -636 635 634 980 -634 979 0 980 -921 923 916 983 -993 992 983 975 -977 967 978 123 -978 977 968 967 -978 976 968 977 -921 976 968 978 -633 599 979 634 -987 999 990 986 -999 995 997 998 -897 988 992 993 -989 986 125 973 -979 981 0 980 -975 978 982 979 -979 599 978 982 -978 599 921 982 -599 115 921 982 -975 978 921 982 -634 599 979 982 -0 988 993 989 -975 125 973 989 -0 954 998 953 -992 897 915 899 -908 923 983 912 -985 906 907 913 -0 993 984 124 -0 981 993 124 -975 993 981 124 -975 982 921 983 -908 985 912 983 -0 985 906 907 -999 974 970 986 -894 994 990 991 -984 992 983 993 -992 988 125 993 -125 986 970 977 -986 121 970 977 -974 121 970 986 -0 998 1000 999 -121 974 0 986 -991 939 940 914 -991 940 113 914 -997 996 939 944 -0 986 989 973 -0 986 987 989 -986 989 125 987 -0 995 1000 998 -997 998 954 952 -997 995 954 998 -996 894 995 939 -954 941 996 944 -0 999 987 986 -999 998 997 952 -951 954 997 944 -990 987 125 988 -976 992 916 113 -992 915 916 113 -992 899 915 113 -993 988 125 989 +797 882 901 917 +882 797 883 917 +519 196 197 927 +0 934 941 948 +926 196 23 927 +618 908 913 923 +883 797 789 917 +924 113 916 938 +947 946 942 951 +954 952 951 997 +801 613 795 924 +883 789 114 917 +999 998 0 1000 +925 799 363 931 +614 24 616 922 +965 962 959 971 +117 900 874 936 +968 926 927 969 +925 924 799 931 +177 182 0 948 +945 203 929 961 +0 953 954 998 +0 893 118 935 +924 799 801 925 +900 874 798 918 +15 939 940 943 +978 973 123 979 +967 968 969 977 +920 924 925 931 +797 795 789 919 +908 618 115 923 897 898 899 991 -991 897 992 899 -991 988 992 897 -991 988 125 992 -125 991 992 914 -995 894 990 939 -0 1000 994 987 -894 994 995 990 -0 995 894 994 -944 118 996 943 -996 118 893 943 -0 118 893 996 -0 996 893 894 -0 996 894 995 -0 954 996 995 -0 941 996 954 -0 118 996 941 -120 928 997 970 -997 974 120 970 -952 974 120 997 -951 997 952 120 -951 944 997 120 -120 944 997 928 -997 996 995 939 -954 996 995 997 +926 198 930 931 +164 167 0 957 +600 19 601 967 +918 900 113 938 +912 916 919 923 +15 918 117 940 +919 911 912 923 +913 912 911 923 +942 195 193 961 +940 895 894 991 +924 613 922 925 +962 946 194 964 +634 599 633 979 +914 15 113 920 +918 113 15 920 +161 157 159 964 +604 613 614 923 +922 614 613 923 +911 613 604 923 +926 23 19 927 +618 604 614 923 +325 199 323 937 +969 920 914 976 +922 613 916 923 +943 928 939 944 +915 113 899 938 +196 23 198 926 +613 922 916 924 +922 920 916 924 +613 916 919 924 +900 798 878 938 +801 6 605 925 +6 517 605 925 +801 363 6 925 +6 363 517 925 +363 198 517 925 +922 605 24 925 +924 922 920 925 +924 801 613 925 +930 920 926 931 +113 915 916 938 +920 925 926 931 +925 198 517 926 +198 23 517 926 +925 517 24 926 +517 23 24 926 +927 929 960 969 +24 922 925 926 +204 166 163 964 +159 959 161 964 +920 926 968 969 +967 927 960 969 +926 922 920 968 +976 125 914 977 +19 927 967 968 +616 24 19 968 +944 120 951 961 +946 194 195 961 +929 203 194 961 +927 196 197 929 +15 928 930 969 +978 633 599 979 +971 962 959 972 +997 954 952 998 +945 193 203 961 +194 193 195 961 +944 928 120 961 +198 196 926 930 +198 199 196 930 +203 196 199 930 +928 960 969 970 +969 914 928 970 +929 927 196 930 +927 926 196 930 +196 203 929 930 +901 900 878 938 +901 878 797 938 +873 190 192 932 +190 193 192 932 +190 181 193 932 +941 934 932 942 +124 0 122 985 +181 932 934 942 +118 0 933 934 +195 193 181 942 +958 946 119 972 +0 121 123 966 +949 941 0 954 +878 798 797 938 +959 0 159 965 +180 179 166 947 +879 874 900 936 +935 893 117 936 +945 929 928 961 +325 872 875 937 +873 325 875 937 +117 873 875 937 +875 872 117 937 +199 930 931 937 +950 0 176 956 +161 197 194 962 +942 941 934 948 +119 946 947 951 +958 166 946 964 +918 117 872 937 +931 930 15 937 +931 918 872 937 +919 797 795 938 +919 917 797 938 +924 918 113 938 +990 939 894 991 +932 943 944 945 +194 929 961 962 +15 928 939 943 +895 894 893 940 +976 916 113 992 +976 975 983 992 +899 900 113 940 +0 176 177 950 +941 949 951 954 +179 164 166 957 +120 944 951 997 +599 634 635 982 +928 944 120 997 +177 179 180 950 +180 947 948 950 +942 180 195 947 +974 970 120 997 +193 932 942 961 +961 946 194 962 +601 598 600 967 +961 929 120 962 +961 120 946 962 +937 199 930 945 +199 203 930 945 +937 192 199 945 +199 192 203 945 +193 203 192 945 +932 193 192 945 +937 873 192 945 +192 873 932 945 +943 932 873 945 +873 937 943 945 +161 527 963 965 +929 194 197 962 +943 937 15 945 +930 929 928 945 +937 930 15 945 +967 600 19 968 +596 161 159 965 +983 984 992 993 +636 0 122 980 +180 182 177 948 +596 159 0 965 +194 946 195 964 +194 195 204 964 +521 161 194 964 +959 958 946 964 +951 949 953 954 +977 975 973 978 +987 986 125 989 +119 947 949 951 +988 987 125 989 +963 597 601 966 +947 949 950 955 +947 180 179 950 +949 0 948 950 +950 176 179 956 +944 932 945 961 +949 942 941 951 +944 941 942 951 +949 947 942 951 +120 951 952 997 +994 990 987 1000 +977 973 125 986 +916 113 920 976 +971 959 0 972 +914 969 976 977 +914 939 970 990 +975 973 125 977 +120 962 971 972 +0 954 995 998 +953 952 951 954 +954 953 952 998 +953 949 0 954 +952 119 0 953 +15 930 920 969 +940 914 113 991 +898 897 988 991 +994 0 894 995 +986 974 0 999 +902 897 915 984 +977 970 121 986 +616 19 600 968 +0 167 168 956 +929 120 928 961 +956 167 179 957 +179 950 956 957 +179 947 950 957 +956 950 955 957 +950 947 955 957 +955 947 119 957 +955 0 956 957 +955 119 0 957 +956 0 167 957 +902 915 905 984 +970 969 914 977 +958 165 166 964 +596 0 597 965 +164 165 166 958 +957 164 166 958 +166 947 957 958 +947 166 946 958 +0 164 957 958 +164 0 165 958 +957 947 119 958 +946 119 947 958 +957 119 0 958 +959 962 946 972 +942 946 195 961 +166 195 946 964 +527 601 519 963 +197 519 927 963 +527 519 197 963 +519 601 927 963 +969 968 976 977 +962 959 946 964 +165 958 959 964 +960 120 929 962 +194 161 962 964 +119 952 0 972 +973 123 977 978 +527 197 161 963 +962 161 197 963 +197 929 962 963 +197 927 929 963 +929 960 962 963 +929 927 960 963 +19 926 927 968 +926 24 922 968 +161 521 157 964 +166 165 163 964 +959 962 161 964 +527 597 963 965 +597 527 596 965 +0 123 598 966 +920 930 926 969 +967 121 123 977 +929 930 928 969 +960 929 928 969 +930 929 927 969 +930 927 926 969 +975 125 976 977 +991 990 988 994 +966 963 960 967 +966 121 123 967 +960 121 966 967 +966 123 598 967 +598 123 600 967 997 974 970 999 -997 999 970 990 +976 975 977 978 +122 908 124 985 +634 633 0 979 +968 616 921 978 +978 975 973 979 +973 0 123 979 +633 599 600 978 +965 963 962 971 +963 960 962 971 +963 966 960 971 +963 965 966 971 +113 914 920 976 +962 960 120 971 +121 960 966 971 +990 987 988 994 +984 905 0 985 +0 987 988 989 +902 0 897 984 +960 967 969 977 +912 906 905 985 +991 898 894 994 +635 115 599 982 +599 978 979 982 +908 921 115 982 +115 635 908 982 +921 599 115 982 +979 973 0 981 +973 121 0 986 +968 967 600 978 +600 616 968 978 +983 124 984 993 +915 916 912 983 +988 0 989 993 +0 984 124 993 +987 990 999 1000 +914 970 125 990 +634 0 636 980 +978 921 975 982 +0 124 122 980 +979 978 975 982 +992 897 988 993 +980 635 634 982 +123 121 973 977 +979 634 599 982 +599 921 978 982 +912 905 984 985 +921 616 599 978 +123 967 977 978 +983 912 984 985 +124 983 984 985 +986 125 970 990 +912 915 983 984 +988 898 991 994 +905 915 912 984 +921 975 976 978 +977 968 976 978 +968 921 976 978 +977 967 968 978 +978 123 633 979 +952 974 997 999 +952 997 998 999 +899 898 895 991 +989 975 125 993 +980 0 124 981 +980 124 122 982 +980 979 981 982 +124 980 981 982 +981 979 975 982 +981 975 124 982 +908 635 122 982 +976 921 916 983 +923 912 916 983 +923 916 921 983 +923 908 912 983 +923 921 908 983 +975 921 976 983 +982 921 975 983 +982 908 921 983 +124 908 982 983 +982 975 124 983 +906 0 905 985 +984 0 124 985 +121 970 974 986 +940 899 895 991 +898 894 895 991 +975 981 124 993 +988 897 0 993 +940 939 914 991 +984 0 897 993 +113 915 899 992 +970 990 997 999 +992 125 975 993 +986 987 125 990 +981 973 0 989 +898 0 894 994 +987 0 988 994 +943 893 118 996 +939 943 944 996 +125 975 976 992 +915 897 899 992 +991 113 899 992 +991 125 914 992 +984 915 983 992 +994 987 0 1000 +999 990 995 1000 +994 894 990 995 +998 0 952 999 +941 118 0 996 +893 0 118 996 +893 939 894 996 +987 988 125 990 +992 988 125 993 +125 914 990 991 +118 941 944 996 +991 988 125 992 +991 897 988 992 +991 914 113 992 +986 970 974 999 990 995 997 999 +998 997 995 999 +990 986 987 999 +954 941 0 996 +954 944 941 996 +0 952 953 998 +893 894 0 996 +995 0 894 996 +954 0 995 996 +894 939 995 996 +944 939 996 997 +996 954 944 997 +995 954 996 997 +996 939 995 997 +990 939 970 997 +970 986 990 999 974 952 0 999 -0 952 998 999 -1216 2641 2757 2818 -2469 2514 2936 3157 -8 834 188 1220 -3339 4966 3103 4970 -1544 1619 227 1581 -325 1968 1944 299 -3492 3049 3481 430 -5179 5244 5242 5261 -475 1120 2 1056 -1164 1088 2776 2829 -690 335 1254 1303 -2987 2506 2720 353 -1100 1063 33 216 -3368 3053 4123 3190 -3190 3053 382 269 -3677 3719 3668 3611 -2913 3589 3565 3396 -86 58 3788 3904 -2021 2112 1567 1110 -1938 219 1214 2756 -1511 1629 1475 193 -3165 3087 403 3131 -290 3657 419 154 -3755 44 3687 3725 -2515 948 832 1211 -5079 838 809 4938 -599 4080 2018 582 -4089 3887 4079 4119 -789 2556 1174 663 -3777 3553 3875 3946 -2661 308 2800 1115 -1156 2025 1830 2032 -2151 3751 2107 3938 -936 12 872 1150 -4088 461 4131 4045 -1828 2406 2347 2329 -795 961 708 1260 -3751 2307 3914 520 -3941 50 75 569 -3367 3064 3597 3948 -84 1680 1009 1844 -2369 4091 2204 2335 -291 2041 1765 1668 -1188 700 713 177 -23 3046 3668 3068 -4086 1953 2029 1826 -3932 3979 502 3898 -2044 3993 1138 4129 -3517 3120 3051 3361 -3619 2082 3873 3895 -2333 3940 4074 38 -1987 2369 1446 2808 -716 690 1303 1276 -1355 1445 122 1786 -1718 493 1779 1444 -2542 2986 3099 3063 -2477 2727 1998 2516 -673 350 599 4087 -17 86 406 3789 -4830 5233 4892 4914 -752 866 765 732 -1854 1581 1596 1070 -4156 4655 4343 4257 -380 911 2950 298 -1373 1416 1372 862 -3411 3145 3517 3120 -3965 4053 1734 3992 -348 738 1199 762 -4092 535 4070 4152 -4523 4506 4498 4535 -804 936 1094 5076 -2502 390 2697 2531 -2257 210 2170 2310 -3606 3645 3628 3631 -2468 2988 428 2906 -4046 566 1995 38 -2799 2519 401 2805 -895 2907 2999 2472 -2116 4064 2017 4115 -543 4410 4671 4753 -140 1104 1118 138 -3622 2275 3814 3686 -2988 2785 2930 2947 -973 2564 411 894 -1397 40 1415 747 -2188 425 3917 2811 -638 1980 17 58 -4714 561 469 4242 -4065 4151 4187 4185 -3133 3121 3039 3181 -4585 624 1565 1513 -1422 162 1425 1080 -3766 4512 4538 4386 -3289 2846 2993 2870 -4539 3335 4588 4461 -963 776 677 989 -375 2526 1740 2630 -1191 2567 310 2678 -1058 441 5102 4804 -2001 2196 2185 2406 -2112 1618 2312 2103 -603 3929 3962 337 -3469 3304 650 3391 -966 940 1013 990 -858 767 837 982 -1158 3253 161 1121 -370 5123 5100 5265 -576 4341 3975 4323 -145 5114 141 619 -4102 4225 4114 4343 -2861 2835 2684 2600 -2052 2096 2101 1702 -852 814 1207 2675 -603 3758 3929 3952 -2153 2157 2134 1647 -4302 4374 337 4468 -1100 5021 1804 187 -1622 1473 1177 1467 -1501 1878 1848 1204 -2166 1599 1966 447 -1107 3245 3477 3282 -1319 1342 1241 1439 -53 1660 208 1738 -583 1508 584 1709 -867 933 963 865 -769 773 869 754 -3653 4209 3644 3960 -2555 2476 897 884 -874 145 1258 618 -842 632 861 833 -2075 2225 511 2252 -380 2917 2918 2925 -796 2894 902 1020 -462 3247 721 3409 -4327 5147 5156 5065 -3562 3177 3692 3690 -837 786 2854 339 -1346 1345 1314 1162 -1096 80 1168 4798 -2645 2856 2728 2871 -1052 804 80 1096 -108 1005 1278 899 -863 769 754 712 -4984 4699 5055 4879 -1071 214 1309 916 -962 108 128 900 -1661 748 2757 1554 -2196 1994 2185 2173 -3012 2462 2907 895 -355 706 777 646 -1818 1412 1853 1411 -1109 2365 3046 2366 -626 1814 1677 1123 -1122 792 1247 1244 -531 22 435 2077 -1027 4947 4225 4250 -1470 1678 4600 1521 -601 3553 3875 3881 -1521 1672 208 1682 -2117 1644 4019 4275 -1477 1590 263 1410 -1127 105 1023 2771 -1331 1455 4652 91 -1735 1486 1472 4602 -1150 173 872 937 -1193 1160 1069 842 -320 1119 217 1217 -603 3913 3970 4106 -4441 4445 3941 4439 -1831 1635 1848 1204 -2102 3593 4018 1916 -1261 1302 1081 848 -3438 4904 1163 5294 -1008 1066 1071 164 -1840 2217 2048 2179 -1527 1869 1327 739 -4409 4111 304 4420 -1157 43 707 832 -1788 1056 1094 672 -2848 884 1103 2892 -225 187 1756 1804 -1155 395 2700 1937 -4290 4482 4109 1674 -268 3998 3997 1697 -4402 629 4156 4549 -4762 4554 906 4807 -1962 2000 1953 2023 -116 1120 180 475 -1158 2 1121 748 -563 331 2003 3655 -1112 3925 604 3943 -3753 498 2306 3721 -1990 2036 1668 2041 -259 1666 20 1923 -493 4261 1764 1136 -1480 1504 1547 627 -4111 1690 197 1626 -196 1508 1698 1475 -275 1423 1374 4596 -2481 374 2724 1958 -1774 1619 1643 1737 -1797 855 693 225 -1320 1540 1590 1389 -1799 1758 1677 1777 -5077 5325 5094 4388 -5048 1797 1762 1801 -1906 1759 273 2177 -1372 1362 1363 851 -1496 158 122 1749 -3927 4480 2033 4448 -72 2266 2338 1714 -3066 3591 3693 3397 -2980 3052 426 3032 -1419 316 2960 3006 -144 1308 1047 1051 -4891 1425 1012 4919 -12 1387 1328 1778 -166 1101 1218 2608 -1394 1544 1465 227 -19 2688 363 2755 -2057 273 1369 2155 -2158 1532 510 246 -3443 3245 438 3494 -2377 1822 2809 2001 -2172 2069 2142 1585 -201 180 1815 1796 -1531 1616 1520 1234 -218 4 1177 1487 -4125 4116 490 2010 -4317 1117 824 1795 -1831 1390 1344 1340 -1719 583 2098 2111 -3055 2352 684 1608 -3824 3827 3795 3823 -1186 701 1195 1157 -1201 1049 1240 758 -2690 1954 2700 1977 -2415 457 2465 2394 -2053 2259 2270 509 -3679 4022 669 551 -1176 763 1196 1210 -1590 1540 1205 1537 -511 2217 2193 2224 -1710 2401 1937 2189 -3700 2367 3698 3731 -3381 3538 728 3419 -1398 1726 221 1725 -4406 4262 4358 4412 -321 2950 2955 2936 -321 2945 2955 2946 -3681 4171 3670 4205 -3972 3286 4235 4078 -3240 431 4150 4244 -3622 2072 2318 3686 -1346 999 1312 1314 -1764 4176 574 4261 -3536 3104 3524 3546 -2564 2854 303 846 -1651 1087 1640 1653 -1539 1704 193 2129 -3104 479 3527 3530 -512 2283 2110 330 -4147 3086 3069 3681 -1390 1524 1389 160 -1781 510 2123 2131 -1715 4095 3718 2338 -326 2268 2075 1212 -782 4930 5206 3196 -183 4010 4004 2107 -14 3741 1732 3333 -3925 3996 3932 3943 -1330 1007 1617 749 -1714 1986 1609 2063 -1932 206 220 2146 -1200 1540 1562 625 -1343 277 198 4601 -2037 2121 1578 2161 -275 610 1343 1452 -1228 960 1106 1418 -724 3231 2701 4824 -658 3463 2872 3450 -3826 3818 3838 4038 -2030 1143 2054 2031 -2227 2273 486 504 -2260 3853 3903 3845 -2524 4992 4972 1085 -1266 1162 336 1382 -1724 2006 2702 1975 -2511 296 2954 2946 -2879 2378 2969 2535 -1971 22 3331 482 -42 1677 750 626 -5056 4801 4785 4393 -4322 4509 4737 5080 -2884 2540 353 2472 -2586 2657 2574 2467 -288 2772 2953 2917 -4254 3449 1792 4858 -321 2925 63 2631 -5 2181 1213 2455 -2292 1989 2320 2290 -5183 1129 1171 1097 -359 1830 1959 1555 -2332 257 2856 2643 -176 3318 4073 1698 -2773 352 413 372 -513 2212 2234 2226 -2393 2464 2501 2427 -1965 2012 2788 30 -2251 2024 2225 2060 -797 2636 2605 97 -2747 1164 1084 2767 -2066 1916 2067 1686 -1931 1759 1929 1568 -2288 2174 1766 2137 -1873 1591 1931 1560 -213 1829 2927 2931 -2169 1223 1847 1817 -1941 1915 2485 2487 -1568 1928 1832 1950 -891 166 1086 364 -3150 249 248 298 -2779 2378 1964 2789 -1998 2368 1419 2380 -1926 1928 1886 1566 -5 2495 1940 3025 -3792 2322 1662 266 -2610 2594 1044 2585 -2775 3301 1822 2529 -3665 3074 454 3710 -2390 261 2080 371 -386 3690 532 189 -2973 3044 3111 3154 -3697 903 2509 3294 -5111 4820 5117 4916 -1199 1265 1190 10 -967 1266 949 286 -101 115 3963 2168 -3291 3301 3308 662 -914 766 136 846 -2380 372 1419 366 -2986 2798 2956 3077 -3982 1112 604 4026 -859 2527 2718 2572 -1608 2353 2352 2820 -409 3188 2964 2810 -2354 3657 3807 541 -894 2328 745 2634 -682 1242 67 1295 -2770 2919 2893 2934 -1138 3275 57 367 -2499 2486 1941 2696 -305 2286 368 2405 -294 11 2794 3015 -752 472 731 795 -949 149 1148 1272 -773 963 776 869 -1409 2030 2095 1143 -829 905 2505 2497 -825 2816 2401 302 -3341 5195 5158 1036 -3365 650 3406 3140 -378 1608 3271 2220 -861 2666 219 2721 -320 1217 1395 1150 -1325 2771 2823 1130 -340 3005 2479 2890 -3673 350 4134 4087 -413 2429 352 2337 -3017 2726 2479 2395 -106 5308 5295 5322 -330 2224 2308 1840 -3005 305 340 3018 -3137 3411 3399 2680 -199 2525 2400 2718 -2897 897 96 923 -1975 450 2006 742 -2428 2309 1924 2454 -2879 3270 2896 362 -2563 393 2595 2569 -131 2904 2952 63 -532 3071 547 3693 -14 4059 3614 1732 -2543 1757 2607 698 -2253 2145 2281 2103 -2829 1914 2886 2866 -3630 331 3669 3689 -2511 2510 2772 2553 -2873 2664 1834 2579 -2544 2589 822 2557 -71 2456 391 2532 -390 2730 2592 2490 -911 2935 2545 1090 -2553 2544 822 379 -2534 2651 2605 2567 -1215 2765 1939 181 -2764 1145 1129 1088 -3141 3499 3097 3117 -3332 2494 3428 3073 -2968 714 3155 3119 -2475 2906 427 895 -2784 76 484 2786 -2668 2591 2753 2708 -3087 21 2609 3146 -3986 2151 3990 1971 -3399 3496 3487 3517 -592 577 3636 58 -3375 3374 3166 680 -2245 1912 2437 2465 -2810 2940 345 3131 -1181 1274 1249 1872 -854 905 745 83 -3724 3306 3379 2869 -2380 368 305 2941 -430 3460 3200 3470 -4102 4359 4344 1503 -2006 2666 2832 2551 -2008 3115 2335 2477 -1829 2406 2001 2931 -4042 22 3331 4083 -3736 3770 1140 3753 -1984 2029 1446 1987 -3842 3916 3780 3891 -2054 985 1990 1633 -2585 2672 539 702 -85 3840 3994 3822 -2528 212 3044 3111 -400 2472 2905 2540 -2889 74 2947 2547 -2546 2490 2586 2467 -3465 6 3126 414 -525 4765 540 252 -3482 674 3375 2838 -501 3293 3308 3321 -3396 3589 3623 3408 -3393 1707 2087 154 -1057 755 3358 4990 -3695 2942 3714 2367 -222 3460 3470 3391 -3950 4181 4179 4291 -1757 1918 1209 2753 -98 4711 4936 943 -2923 3134 3511 3145 -3096 3184 3058 2843 -3077 2982 3052 3062 -661 956 980 4748 -4060 4283 4254 950 -119 1637 2172 2152 -3740 2273 1405 505 -2376 1964 2005 2378 -376 917 2830 2660 -2620 456 2839 2663 -563 3584 2003 2305 -3483 3042 3594 3567 -329 3736 3753 3761 -2664 2887 2725 2912 -451 2713 883 2600 -2237 2461 237 2434 -718 751 784 743 -1440 4434 4397 2091 -547 1972 1963 3605 -4095 34 2342 1715 -3156 133 3324 2758 -5196 904 3214 3261 -4277 3327 4800 3344 -2551 742 878 2704 -3341 5142 5195 3210 -4887 3405 4240 726 -5064 4935 5306 5328 -4842 87 3435 4906 -741 874 704 933 -709 794 771 744 -702 807 803 354 -5341 5309 5344 5335 -3644 3920 3934 3653 -187 8 1086 891 -3758 3981 3939 3951 -1963 3637 3604 3086 -3726 3065 2379 3696 -3481 3492 3245 260 -4712 3319 952 4890 -2783 3156 714 3211 -3833 695 290 694 -1744 1763 1863 1548 -2050 1983 1446 401 -3077 3059 3186 3063 -283 3799 559 3786 -3136 3522 3106 3201 -4410 4505 4121 4245 -4124 3300 4832 850 -4228 4041 1987 228 -1393 1465 1700 1486 -4476 4481 4487 4390 -194 1443 1806 54 -3122 4967 4960 3082 -2061 2195 1962 1953 -3574 3107 3583 3092 -3729 3754 3696 4020 -191 3813 3735 1510 -586 3273 4264 4164 -3779 3842 3641 3855 -3267 3309 433 2015 -3999 3949 4039 46 -4334 4025 4013 4047 -3682 283 559 1510 -448 2248 2319 512 -2206 2288 2452 1663 -3863 2021 2104 1618 -569 598 4483 4139 -2086 238 1823 1125 -1645 221 2124 264 -1746 2193 130 242 -505 261 2321 2343 -2048 2242 306 2217 -1609 2230 2173 2426 -5216 3242 2898 658 -2609 1659 3188 3091 -3066 3688 3630 3760 -1230 764 718 743 -3933 3818 3826 534 -3683 37 4119 3798 -4106 3947 2356 3908 -4198 4181 3336 4298 -4553 1102 4400 4557 -2020 1830 2815 1156 -3240 3303 586 431 -3319 3296 1502 3349 -3961 4274 600 4520 -1406 634 628 1557 -4373 4108 590 4084 -3178 4542 4531 4543 -3393 3833 154 2366 -3655 331 381 3691 -4252 3661 4390 4236 -3651 519 3946 3850 -68 3920 3101 3934 -3669 3281 3630 3728 -2010 4116 643 2016 -573 606 1784 4515 -1175 424 2556 657 -4701 4236 4164 431 -346 3727 3810 3662 -3830 3640 3796 4064 -4752 4522 1316 79 -3910 3744 3996 3984 -3783 3782 3759 3549 -2091 4525 1440 1400 -3075 460 381 2938 -1453 567 4295 4056 -739 1436 1407 1431 -705 2687 4842 3345 -239 3285 4045 4099 -2613 2300 2337 3706 -3924 1973 3797 1730 -2287 3621 3667 3757 -3920 3762 3673 4042 -4183 4023 4145 3675 -3653 2364 1706 1673 -2613 3713 3706 3034 -504 3769 3813 486 -3646 3856 3897 3845 -87 3439 3435 2806 -3894 3720 4438 4051 -3576 564 452 189 -3617 1113 563 3886 -3050 3514 3298 3142 -2099 4010 75 4002 -3763 1126 548 4335 -2083 3636 3885 3767 -4440 38 4046 508 -3158 3241 3454 726 -1782 4522 1335 2027 -4293 4471 4455 3831 -4542 4502 4531 538 -255 4011 1326 3800 -1393 1331 4650 1352 -1708 4096 4176 107 -591 3849 406 597 -3865 3767 2191 3779 -2018 1973 2053 2065 -627 1504 1516 1611 -1842 1719 1449 2098 -26 1703 4009 4082 -1475 123 231 1722 -2066 123 1701 1686 -4305 4398 1727 4170 -4851 3449 499 525 -4175 4214 4291 4465 -1012 4650 880 849 -3384 3387 665 4220 -529 2017 3640 4504 -3921 577 592 597 -406 3862 591 3788 -4152 4253 4362 4370 -4237 1479 4511 4386 -3767 3847 3919 1484 -4945 4234 4112 3447 -591 577 1980 3844 -508 1997 847 695 -1823 57 26 4082 -4472 527 4451 4521 -3856 157 3816 3790 -4287 4823 3030 4692 -167 113 101 3926 -3871 4040 190 342 -3754 3755 2077 3729 -538 4502 4218 4472 -3266 5247 906 4857 -4533 4170 4398 4361 -4520 4274 4386 4571 -1469 4383 1481 277 -5041 4932 4351 5051 -3830 3910 4003 3983 -5165 5146 4277 4112 -1526 1452 1031 1516 -3983 3984 3999 3951 -4444 1126 4195 4360 -2127 1658 2113 2272 -128 945 827 1081 -108 801 979 899 -1313 690 1268 678 -1396 1227 1462 1328 -4405 4512 4511 4499 -3161 3329 681 660 -1514 1469 90 4560 -1200 274 1593 1320 -1072 1841 291 152 -1564 195 580 1594 -528 1357 1606 1525 -4313 4109 2381 184 -3993 4404 4279 4324 -1227 1401 689 1462 -676 129 1105 1166 -1277 1293 1305 1268 -1407 1360 528 978 -4428 4590 4510 4583 -3214 3222 904 3270 -4450 641 3930 4489 -1717 86 2260 3900 -3913 3849 3921 3962 -4638 4660 4635 4403 -3969 3983 637 3640 -3433 3437 4906 4871 -2008 3115 2011 537 -3266 5289 4762 906 -3329 3333 681 3362 -1272 1298 1040 149 -1331 1455 1394 1465 -1455 1545 1497 1523 -3717 1675 4524 4414 -3446 361 3248 102 -4546 3766 4534 4513 -1074 4805 4789 5233 -4556 4575 655 4561 -4508 4565 4555 4754 -4513 4538 4534 653 -3408 3389 3414 3407 -732 539 765 702 -515 3144 280 5215 -4301 5338 4941 3434 -3355 3430 623 4832 -4845 445 4393 4763 -2504 338 2293 2317 -737 28 756 765 -903 2846 3305 3294 -3234 4853 3371 589 -4913 4836 3451 4816 -3176 796 5097 3264 -4048 4368 1943 3958 -1707 2087 239 4099 -4211 3415 3372 1673 -1771 1367 1441 1421 -5173 178 1104 2637 -57 1823 2021 1110 -3471 3504 2948 432 -1381 4589 4204 4782 -2832 861 1101 632 -865 927 925 95 -682 1254 697 620 -4060 950 3084 3614 -3486 2937 725 407 -623 645 3190 850 -348 678 1305 1232 -4990 5201 3358 5016 -4722 685 232 3276 -4959 2010 2784 684 -3477 2633 3475 3429 -5170 3226 5239 5098 -5076 4937 1788 5144 -1351 1428 1064 631 -620 1250 10 52 -777 1275 1035 783 -1209 2543 2707 2678 -1661 1158 201 1135 -3179 482 1971 4075 -3960 4139 598 482 -3226 3035 5098 5150 -890 1277 678 1313 -1584 383 948 1184 -5289 3196 5058 5321 -43 1187 1752 832 -1201 1202 234 1208 -732 424 657 472 -969 1197 994 977 -874 774 470 945 -3240 3371 4714 550 -890 1283 149 1280 -851 1184 948 177 -712 779 36 1237 -743 471 720 1297 -3104 3546 3526 3508 -3950 4179 4455 4471 -793 708 142 744 -43 2571 723 1185 -481 3123 399 3205 -5171 2825 786 766 -1300 1311 52 1235 -719 741 771 733 -518 751 784 458 -720 717 738 771 -784 719 1242 709 -3324 133 3354 5166 -5243 3409 3243 3035 -1188 833 842 713 -1017 3257 279 3225 -3377 680 3204 3503 -467 3406 2782 570 -3389 3491 3457 3387 -3455 3545 245 3506 -4460 4374 3922 3930 -790 2653 789 798 -752 803 863 354 -2610 702 657 60 -751 717 794 780 -1275 1251 1261 941 -858 973 767 993 -3386 3462 3488 3426 -789 869 866 663 -719 874 67 761 -1538 175 549 1098 -1647 1007 1533 1634 -717 470 759 823 -465 376 917 868 -518 794 458 709 -471 712 770 779 -411 802 886 347 -952 1502 5164 5005 -1875 84 1901 1418 -146 188 1833 1220 -1652 1556 271 1294 -1801 1762 1765 291 -784 733 458 718 -354 812 731 60 -2644 817 2852 2650 -142 125 823 759 -1077 5036 838 436 -663 1262 769 803 -899 848 857 1261 -1186 235 1417 1053 -754 774 741 770 -799 5147 810 970 -762 774 770 738 -1284 761 67 1265 -2397 896 240 2439 -518 780 778 795 -60 663 803 657 -5060 2824 715 339 -104 735 2849 977 -3224 5150 3260 924 -756 1082 125 142 -744 759 771 761 -471 717 719 770 -1856 1544 1774 1700 -1259 125 775 356 -775 759 761 704 -1269 773 774 945 -356 95 983 987 -149 691 1255 1307 -794 764 780 793 -708 744 1296 1284 -733 812 778 764 -4608 1096 1003 1014 -4942 882 267 4288 -691 941 1042 1307 -718 751 720 458 -1536 1653 1651 1652 -5187 715 2855 136 -3229 5046 5145 5003 -5224 5226 5256 5215 -987 730 28 737 -927 875 987 730 -2648 2724 2575 1958 -1291 1211 1257 153 -778 795 863 712 -778 471 733 743 -764 354 793 36 -2834 667 132 5186 -2626 2709 310 2678 -974 2634 730 866 -930 760 968 865 -857 920 990 1049 -619 900 942 988 -745 2611 852 2328 -765 756 731 472 -836 70 140 4350 -2650 2578 887 2635 -2571 1752 2716 2543 -472 918 1262 961 -3164 3236 3214 2834 -5082 25 5033 4965 -760 858 1016 856 -1247 1292 999 1235 -752 780 863 823 -5172 3217 2704 2759 -112 820 2647 896 -1951 2648 2575 2790 -1146 2647 1752 1187 -753 2656 2655 2665 -3381 3550 3505 3569 -2526 2557 2630 2489 -1191 2439 814 2674 -1175 1207 2653 2556 -2910 393 389 2443 -867 812 754 741 -4315 1947 1136 229 -1915 359 2487 1555 -1197 2505 1188 829 -618 964 900 988 -1198 860 1147 875 -860 358 826 1187 -1862 1893 1204 1378 -1263 862 1279 1324 -177 700 24 1210 -723 129 2662 2603 -1056 2 2580 1077 -2968 3195 3198 2895 -872 804 1052 877 -914 136 881 104 -25 755 5033 5091 -5286 5121 3338 3451 -1937 1753 2700 2565 -893 5004 5155 5007 -723 129 165 959 -5107 5101 5074 3081 -2476 2552 901 2619 -1388 1593 1424 1531 -339 2643 257 894 -598 3762 4168 3644 -988 892 757 171 -4675 4647 588 4349 -4060 489 681 4837 -1252 207 707 1157 -2604 112 802 2606 -916 1073 943 1255 -875 411 860 886 -1120 5081 201 1158 -810 992 940 968 -757 800 1001 1041 -970 735 104 810 -2489 343 2629 2599 -854 829 828 1196 -2688 676 363 129 -1264 64 1273 831 -812 731 142 793 -1246 915 983 892 -124 799 677 974 -867 798 737 60 -124 866 869 823 -1171 742 2704 1097 -737 356 867 125 -3232 3236 2583 2992 -4761 4793 3803 4309 -33 1000 836 164 -2844 2566 883 2576 -738 470 128 704 -975 854 828 790 -943 916 1046 1058 -1000 5102 836 1058 -465 883 2835 2566 -5229 4893 5248 4162 -4891 588 1317 4349 -5028 837 5175 982 -5292 782 4239 5135 -878 935 456 873 -179 127 2897 2915 -2493 2855 2728 2856 -854 745 1207 2653 -2651 2640 2635 805 -1977 2508 2638 2743 -2793 2981 2890 2980 -706 1312 697 1306 -936 475 320 1094 -989 864 920 848 -1096 4939 841 4608 -846 347 83 971 -400 2975 77 148 -1207 814 1196 763 -127 2573 375 901 -2589 2639 2867 2847 -141 619 1001 757 -145 962 801 827 -844 897 923 2598 -2834 2583 2877 132 -3114 664 2843 333 -3280 636 463 2200 -358 411 2564 2568 -644 185 607 5324 -2619 2570 2582 2863 -2844 2562 2576 2491 -2635 2552 2640 2627 -2711 2933 2911 2958 -392 3233 63 2631 -5177 5096 3229 5162 -1413 1383 4643 4670 -339 970 837 4327 -1201 1202 864 920 -1026 876 144 853 -450 935 742 1914 -807 2672 1043 1291 -4680 938 1034 4704 -892 915 991 800 -4987 1027 5056 4708 -3268 2376 2535 2921 -2582 375 2628 901 -768 1139 2826 2874 -677 992 968 989 -1004 1018 965 966 -974 790 975 677 -4882 1608 4841 2220 -1071 1079 1008 1391 -962 5116 942 799 -1542 1229 1861 2019 -1035 1042 1004 1046 -470 962 964 124 -3334 2117 1644 3283 -917 2713 883 2841 -33 1100 891 70 -1152 1066 164 1050 -919 4689 1032 1067 -1415 1285 1332 1322 -856 103 1016 998 -783 734 1041 1048 -930 968 979 801 -876 441 1035 853 -1011 5038 4962 5035 -704 775 964 618 -1132 1240 1245 1201 -2723 2715 2752 2712 -698 24 1122 707 -336 1312 355 1162 -446 4362 2974 679 -1812 1776 997 4674 -480 746 1960 5010 -1179 972 1026 1073 -4734 1381 4752 4782 -4233 3009 1085 4719 -445 4829 4833 4917 -1171 1145 2787 1975 -1014 982 1168 995 -1193 842 2689 1142 -278 1373 1159 1324 -36 807 1237 1293 -145 930 900 933 -964 356 124 95 -933 945 963 827 -926 4683 1059 1003 -1001 998 926 103 -1483 336 1270 1336 -799 925 856 942 -1055 703 976 995 -760 914 858 971 -974 970 973 894 -1063 1000 953 4667 -971 975 83 735 -798 865 927 971 -927 875 973 993 -1013 969 1054 990 -2642 767 703 995 -1205 1436 1497 634 -942 998 5113 619 -4393 4808 4796 445 -4482 4552 4764 4639 -1015 104 881 958 -864 986 1281 776 -1243 1284 1250 1265 -1222 423 1221 1969 -983 987 1147 1203 -776 790 986 789 -848 827 801 989 -95 892 925 988 -103 991 976 800 -992 920 994 990 -856 925 993 991 -992 735 994 975 -993 1198 703 991 -977 958 969 1167 -1018 5141 1005 4936 -1646 951 1359 4314 -979 940 5138 966 -254 811 1277 1311 -872 877 1026 972 -899 966 1004 857 -4810 1128 5326 1010 -965 781 1060 1013 -932 1005 926 1001 -1004 996 141 1035 -5102 5105 4350 5014 -1414 740 271 1556 -173 929 1680 1396 -40 1079 1322 1178 -3228 1728 1002 5077 -4609 1022 4825 944 -588 215 4652 5020 -103 1014 1003 976 -1015 958 781 1013 -1016 982 5149 1014 -810 1015 5148 940 -3221 3258 5085 724 -996 4683 926 4746 -5014 4729 4804 5103 -1129 1088 2886 132 -5211 5161 2679 4897 -1011 4568 4676 5039 -161 4974 5015 3253 -4731 4718 4792 4703 -1839 1744 1855 1341 -1071 1000 916 953 -155 4639 5057 921 -2401 2641 1937 1949 -5201 5168 3210 5044 -5336 4835 1037 5223 -1526 614 1430 1547 -1034 938 4656 4731 -1050 1152 1069 1118 -4622 919 1032 4902 -932 943 1005 691 -3438 1163 360 4243 -5009 1030 5023 5185 -1946 1873 1226 2744 -5263 5231 5010 4308 -1280 646 1279 1239 -941 857 1042 1049 -783 1041 932 1047 -1262 1174 1289 918 -2675 2585 1175 327 -1047 1051 1053 1061 -876 1047 932 1059 -214 1042 1046 1045 -1240 1251 1239 941 -235 800 1041 1053 -937 1033 1061 1052 -1066 1420 214 1045 -836 140 1050 1060 -1049 758 1054 1045 -1053 1055 976 1061 -1054 1160 969 1069 -8 5033 834 178 -1121 1131 1077 436 -876 98 877 1059 -1046 1058 1060 965 -1059 1052 1061 1003 -1045 1050 1054 1060 -4356 5077 4551 1728 -4603 972 12 1387 -1463 689 1429 1406 -2677 1813 1466 1144 -1334 1051 173 937 -938 4670 4703 4679 -4776 4767 4717 4527 -1033 165 1055 1105 -1853 1533 61 1634 -929 144 1026 173 -1135 1661 1216 626 -953 1339 5032 853 -4847 4892 652 4811 -4646 4699 4821 5055 -1573 1639 1879 1819 -834 1057 2787 755 -1634 1650 1843 1819 -929 1310 1009 1392 -1428 1497 91 1433 -1258 1190 618 171 -769 1282 1237 1262 -1923 1637 2152 2093 -1155 1710 2554 311 -285 4268 4975 955 -1687 475 1219 320 -1612 1532 1506 258 -396 9 1020 1679 -1257 1176 1208 1210 -3233 392 3038 3265 -3227 1170 5098 5095 -2790 1951 2384 2970 -3319 3283 4712 3276 -70 891 1104 178 -5068 4931 3081 5137 -781 893 140 138 -301 2360 868 3216 -1410 1407 1380 739 -4250 3346 4947 4163 -12 4977 116 936 -2692 676 217 1119 -523 4607 3057 4337 -2522 1880 1740 179 -80 1094 1119 672 -1069 632 1167 1118 -278 1161 1361 1332 -120 3395 3429 3312 -5144 4995 5047 1788 -3659 4120 3372 151 -2342 2285 673 18 -2279 3680 3819 3820 -3775 190 342 3838 -3576 3649 564 3631 -3337 4967 4395 4960 -2593 30 2771 1127 -2979 2509 2803 2956 -229 2012 1965 1765 -1033 1119 1105 80 -1118 166 1101 1104 -187 5082 855 8 -188 1057 105 1130 -948 153 1323 1252 -1800 1685 152 1816 -3752 3403 4184 4154 -2324 509 2285 2079 -567 3796 616 4276 -1135 161 1571 1115 -1002 3213 5327 4986 -5182 396 301 1020 -1529 1121 365 1131 -1130 1145 1057 2764 -1267 1246 1301 946 -1996 2363 2300 3629 -1814 1936 1578 1927 -1072 693 1762 1127 -194 1806 824 1154 -1947 4282 1984 1983 -3991 1225 350 47 -2758 924 3409 3035 -4089 420 1942 3595 -2293 3267 3307 3111 -1238 959 2693 1185 -1222 357 1921 282 -1554 1925 1559 1065 -396 1131 957 2560 -2497 2636 2705 816 -1202 828 1176 986 -1270 355 1299 1337 -1861 1884 1769 1886 -33 364 1385 164 -1569 1736 4598 1384 -1217 1033 1153 937 -1173 1152 1193 1368 -2054 1136 2031 1947 -181 1084 2539 1215 -1221 31 524 2049 -851 234 177 1208 -693 855 105 188 -1323 1318 1181 960 -1186 1195 1055 165 -1106 1345 1162 1272 -286 137 949 1161 -1036 172 5120 5118 -311 2560 9 2830 -1166 2616 5176 2792 -632 2223 1167 1165 -1166 995 1105 1168 -138 1167 958 5174 -5211 2791 5184 5045 -1091 3261 3243 5196 -301 957 2007 868 -1395 1687 1772 1888 -1894 1153 1217 2488 -1203 28 2397 1043 -2610 1044 821 539 -1203 240 1147 1089 -227 117 1366 1480 -1844 1429 1009 1182 -1391 1339 1427 953 -1380 1340 1410 1390 -410 1159 1321 1228 -1327 1178 1338 1431 -4218 4108 4084 4472 -707 1238 698 1185 -1184 1142 2607 713 -758 234 1160 1362 -829 1196 816 700 -1195 826 723 43 -1193 1362 1363 1368 -335 1269 1081 1302 -2515 820 2647 97 -1257 1245 1244 1208 -1189 165 1153 959 -1218 1220 1724 2702 -234 1197 1160 1188 -860 896 1187 240 -1198 703 1195 826 -994 1197 1202 828 -67 1258 1254 335 -1589 274 1388 625 -915 235 946 701 -915 1198 701 1147 -986 1174 1176 1289 -830 169 1865 118 -241 978 1342 1360 -1681 1214 2723 2539 -112 896 886 821 -1192 701 1157 1089 -2601 440 2708 692 -1089 240 832 1211 -2439 24 1210 792 -2118 2269 266 2040 -299 2450 1820 2453 -2612 2762 19 1206 -1155 2762 395 2766 -2593 1841 1072 0 -166 1152 1173 364 -1219 217 1194 1233 -1086 1218 1220 1813 -1219 2 748 1194 -1633 985 1156 2050 -985 2059 1852 1143 -317 1851 1599 2166 -1592 1454 2182 2232 -1138 3836 3275 4404 -1930 1918 1038 2691 -1391 631 621 1427 -1181 278 1361 1872 -931 1404 1819 1843 -1242 1260 518 1297 -1336 1361 1338 1327 -1305 1268 1295 682 -2608 1938 1218 2677 -226 1344 1315 1552 -716 811 1276 1263 -1250 1243 1286 1293 -708 1243 961 1082 -1363 1142 1897 1184 -1048 1040 1273 1298 -946 1048 1273 235 -1357 121 1360 1403 -1230 720 348 1297 -1237 984 1236 1282 -153 1264 1252 1192 -1267 946 1264 1192 -1132 1281 1302 864 -153 811 1318 1263 -1848 1274 1390 1253 -1610 410 1576 1902 -1268 984 690 1236 -1301 734 1304 1048 -1122 1372 851 1244 -1869 1878 1380 1248 -678 1199 1283 10 -1299 777 853 1309 -1330 1617 1573 1520 -792 1290 1192 1089 -128 1278 1199 1081 -1269 1282 773 1281 -1305 36 1230 1296 -734 171 1278 757 -756 1043 1082 807 -831 1247 1235 1264 -862 1263 1245 1244 -984 1269 762 335 -336 1321 1346 286 -1287 1132 1276 1245 -633 1250 1232 620 -1259 775 1265 1190 -1434 967 1148 1338 -1317 1426 4891 1387 -1332 646 1161 355 -1240 862 1416 1239 -410 1438 1248 1869 -1283 1278 691 734 -52 1286 1267 1235 -697 999 633 1313 -1258 141 1275 1261 -1040 1345 1300 831 -1304 706 1300 1040 -1246 1288 1259 983 -1082 1259 1243 1288 -1254 1275 706 1304 -984 779 1295 762 -1298 939 1860 1308 -1236 1287 1276 1292 -1286 1288 1267 1290 -1282 1281 1287 1289 -1043 1203 1288 1290 -1291 1287 1257 1289 -1292 918 1290 792 -811 1291 1293 1286 -1292 961 633 1236 -1468 749 1615 1580 -1284 1296 1232 348 -779 1297 1260 1295 -1296 709 1230 1242 -1239 646 1285 1307 -1148 1255 1333 1310 -1280 1306 716 1279 -1132 1302 1303 1251 -1301 1190 171 1246 -52 10 1304 1301 -1303 1283 1280 1251 -682 633 1260 1232 -1314 1311 890 1300 -777 783 1308 1298 -1309 1307 214 1285 -1310 1308 1255 144 -1322 1309 1299 1079 -999 716 1313 1306 -254 890 949 1314 -1277 1311 620 697 -1306 137 1312 254 -1234 1320 1593 1403 -543 4758 4392 4497 -1809 1352 880 1271 -1159 1247 1346 1324 -1357 1375 121 1595 -625 202 1315 1589 -1266 1500 1181 1382 -1009 939 1337 1310 -1610 1122 1159 1874 -1318 831 1345 960 -1529 365 2818 1967 -574 2000 2023 2383 -175 1636 1231 1182 -1385 621 1656 216 -4647 4675 5029 4351 -1530 271 1256 1652 -647 1459 162 575 -939 1272 1106 1337 -1392 1433 1339 1299 -1397 1368 1420 1066 -571 4525 4572 4547 -1382 1231 967 1348 -1322 1332 1338 1148 -1182 1231 1270 1337 -1179 1425 1073 1333 -1180 1605 1552 230 -1025 1525 1394 1458 -121 1545 1205 1562 -275 277 1512 1430 -230 1589 1520 1234 -1324 1279 137 1161 -1266 1318 254 137 -4282 2383 1984 4228 -1500 1527 1336 1483 -1883 1891 1905 1354 -1590 1360 1403 1410 -1392 1433 1429 689 -1810 1459 575 1317 -1622 1586 1467 1587 -1884 1349 2742 1919 -1726 1569 1672 53 -1520 1388 1468 1531 -628 1319 1241 1597 -1432 1565 4613 1495 -1723 1631 1771 997 -634 1205 1350 1241 -1382 1228 1106 1231 -1189 1186 207 1417 -1898 1189 1238 207 -4895 4869 4864 4877 -2071 2139 1766 2097 -1177 1473 1471 1451 -671 1670 1445 1450 -1435 1153 1189 1334 -220 1887 1639 2154 -1865 1650 1605 1831 -1464 1512 4612 1492 -207 64 1252 1874 -1418 64 1874 960 -1430 1478 1490 198 -1523 1319 1487 1545 -1457 1688 1515 4613 -4673 4624 4348 4604 -1883 830 1858 1900 -3167 4488 2033 4222 -1253 1550 1098 1180 -4525 1400 675 954 -1321 1361 286 1336 -913 4621 1448 4548 -1445 1151 4599 1670 -1150 1396 1395 1328 -4551 4919 4986 5072 -216 1427 1271 1063 -1356 1200 1522 845 -1589 263 1540 202 -230 1248 263 1180 -929 1392 1227 1179 -1079 1333 1351 1391 -575 2922 491 1776 -1341 218 647 1523 -1385 364 1172 1889 -1385 1008 1632 621 -1334 1680 84 1435 -1532 1683 246 1654 -1587 1580 1625 1623 -4001 546 1381 1509 -631 1422 1428 1458 -4482 4109 4310 4741 -1315 1350 1241 1552 -1229 1861 1879 1893 -448 2228 3733 3773 -1407 528 1456 1064 -1098 634 1406 549 -1518 4559 4615 4599 -2169 2147 357 1713 -160 1350 1180 1098 -1551 150 1864 1542 -1760 1755 150 2149 -4653 4631 4662 913 -1640 1647 1530 1007 -1860 84 939 1418 -1273 64 1417 1860 -758 1420 1416 1362 -747 1415 1373 278 -323 213 340 2538 -1417 1051 1860 1334 -1793 671 1805 1450 -1401 91 1459 1426 -1452 1478 198 1474 -1439 1564 845 1594 -1426 215 1339 91 -1422 1425 1271 1427 -1227 1426 1387 1179 -689 1080 1557 1401 -1064 1351 1178 1431 -1374 1031 1343 1491 -549 1434 1429 1182 -1691 1626 1358 1553 -1351 1434 1080 1333 -1433 1436 1270 1431 -1488 1368 1849 1397 -978 1507 1434 549 -1548 1605 1550 1865 -1524 1274 1500 1527 -1562 1424 1593 121 -546 4421 4361 459 -1780 1598 1786 671 -4857 5318 5316 3266 -4357 1444 1450 493 -1443 1660 54 1476 -1384 53 1367 1660 -421 1994 484 51 -4669 4338 1448 4709 -1383 1447 4612 4645 -2194 581 2067 2076 -1421 1367 1443 4352 -1366 1491 1489 1546 -1423 277 614 1499 -4081 3763 4046 548 -2109 1696 1224 1642 -647 648 1489 162 -1548 1406 1463 1550 -4329 1376 4586 4427 -1839 1459 1401 1341 -1458 1422 1331 1352 -4427 4524 1675 4615 -1763 1462 1846 1463 -621 631 1461 1773 -1461 1064 1574 1456 -4611 4408 1371 4594 -647 1471 218 491 -2518 1065 1888 1896 -1353 1478 117 1504 -1652 1356 1579 1294 -1669 610 624 4396 -1499 156 1481 1561 -1465 1489 1366 1486 -1736 1494 163 1473 -117 1490 1472 1366 -1499 1586 1423 1678 -20 583 197 2111 -1444 1518 1693 4340 -1524 1537 160 1538 -1526 1467 1374 1423 -3980 1482 594 4503 -1487 195 1177 1546 -610 4418 1565 1470 -4372 4490 4227 1479 -1507 1500 967 1348 -595 3840 2188 3685 -4423 3717 4401 1676 -491 1471 163 1549 -1375 1595 227 1480 -1775 1435 1519 1894 -1471 1451 4354 1455 -1491 1473 1494 1374 -1490 1430 1492 1451 -1493 1491 1371 4338 -4594 1494 1492 4618 -1490 1472 1493 4595 -4524 4559 1358 4418 -1607 1521 1638 208 -648 978 1080 1557 -1718 1709 1708 1693 -1474 1470 1452 1534 -1483 1438 1321 1348 -1903 118 1900 1877 -526 3271 746 3280 -415 4367 1785 4166 -1467 1526 195 580 -4114 4127 4896 4344 -1087 2157 1890 1640 -1436 1537 1483 1538 -123 197 1701 1690 -4660 1400 4337 4587 -3721 504 498 3740 -1561 1607 1626 20 -4408 1343 4396 1371 -4584 4583 90 4111 -4585 3717 624 4401 -4306 1376 4584 4585 -1579 1522 614 580 -2019 1845 2126 2154 -1660 1638 1476 1408 -1649 1488 1632 1889 -1356 226 1256 1344 -1561 156 1496 158 -1516 1388 1563 1564 -1375 1394 1525 648 -1438 1537 263 1477 -628 1523 1341 1557 -614 1504 1031 1478 -1438 175 1348 1538 -1890 2142 2122 2135 -1833 1130 1325 2767 -1639 1414 1330 1641 -1356 1615 226 845 -2130 221 1087 1398 -1755 1624 1070 740 -1536 1579 1499 1621 -4588 4510 4435 4419 -1539 1655 785 1534 -241 1524 1507 1477 -1527 739 1507 1477 -1561 1682 259 1536 -274 1389 241 202 -4637 4580 4475 4399 -1411 1866 1957 931 -1576 1891 1859 1905 -772 1855 4 218 -1342 648 1546 1375 -1547 1545 1451 1480 -195 1031 1546 1563 -1606 1437 1456 483 -1486 4354 4602 4649 -1878 1456 1380 1437 -1411 1588 1857 1866 -1234 1340 1403 1604 -1692 1607 1432 1638 -146 1813 1144 1800 -825 302 1961 1945 -1653 1007 749 1623 -528 1497 1525 1428 -2485 2698 3014 1941 -1685 1144 1926 1769 -1566 315 1886 1919 -1470 1521 1511 1539 -1439 1563 1342 274 -1564 1522 1547 1562 -1563 1522 1424 627 -90 1358 1626 1481 -324 1954 1560 1977 -18 2266 2068 4095 -313 1954 319 1753 -1355 1737 1671 1151 -2055 1741 1806 1790 -4946 1127 2012 1762 -4431 4411 4409 3839 -1256 1076 1831 1650 -1877 1463 1846 1844 -1787 1839 1729 1810 -1543 1249 1848 1903 -2137 1935 1934 2178 -276 2073 1134 2126 -1468 1516 1534 1611 -1294 1614 1611 1399 -61 4 1613 1625 -1928 2126 1845 1832 -1923 2056 2111 2138 -1610 1859 698 1897 -224 2141 1766 2174 -1671 1474 1353 1621 -1399 1353 1611 1621 -1748 1895 1747 1551 -1200 1344 1389 1320 -160 241 202 1350 -315 1879 1887 1836 -1642 1224 2246 2240 -845 625 1439 1315 -1595 1424 1614 627 -1319 1487 1594 1613 -61 1613 1597 1602 -1606 1596 1357 1604 -1771 1441 1751 1777 -1223 2064 2147 119 -1749 1666 1630 1629 -2513 2676 2478 1978 -1616 1604 1596 1603 -1634 1617 1602 1650 -1602 1552 1597 1605 -1437 1604 1340 1370 -628 1597 1548 1744 -1511 1496 1553 1629 -232 344 928 362 -2340 272 1826 514 -1323 1249 1584 1885 -1580 1587 580 1579 -2122 2130 1087 2129 -1596 1581 1595 1614 -1615 1594 1580 1613 -1294 1616 1531 1614 -1615 1617 226 1602 -271 1603 1256 1616 -507 2150 100 2254 -4 200 1622 1625 -4540 4593 4428 4557 -1655 1586 1587 1534 -1619 1737 117 1353 -1399 1556 1624 1654 -1623 1533 1625 1725 -1399 1581 1619 1624 -1565 1432 196 1511 -4567 4558 3335 4380 -4232 4057 4294 4013 -1607 1600 1722 20 -1722 1754 1948 1600 -1359 1735 1670 4688 -1680 1396 1846 1519 -2035 2009 423 1221 -1078 740 1070 1603 -169 1879 1891 1893 -1327 1872 1876 1869 -447 1657 1750 1083 -1553 1496 4559 1518 -1530 1369 1076 1648 -258 1506 1641 1414 -2057 1640 1530 1651 -2144 1454 2176 1592 -1725 200 1726 1751 -159 934 4772 3340 -1781 510 1786 1780 -1802 1799 1771 997 -1648 1414 114 740 -1819 1639 2153 1647 -1858 1846 1519 1900 -1078 1603 1370 1573 -785 258 2129 1641 -785 749 1330 1468 -785 258 1556 1654 -1655 1623 1398 1653 -1621 1654 1683 1536 -1778 1328 1772 1787 -2064 2133 1745 1637 -2150 4016 2115 617 -3098 2957 3129 516 -1445 122 1444 1518 -693 146 1072 1800 -326 2283 2322 2248 -2180 2201 2374 506 -3828 2065 2118 2114 -4096 3937 3808 2090 -1600 1694 2133 193 -2073 2125 1742 2149 -42 192 1790 1803 -3717 4414 1469 4396 -1367 1631 1384 4687 -1678 1586 1569 1672 -158 1671 1355 1683 -4210 557 4149 670 -4247 4256 182 4208 -4661 4611 1460 649 -1485 4581 4430 4396 -1742 203 291 152 -156 1474 4597 1671 -2763 2877 2776 1088 -1397 1008 40 1632 -2612 1206 2624 2660 -1539 158 1704 1683 -1682 1672 1398 1655 -2062 1741 2055 2100 -1123 1559 1814 1866 -312 584 4096 1708 -1172 1086 1756 1813 -1376 4329 1689 1691 -1688 4411 3839 1690 -1508 196 1689 1691 -1692 1690 1688 1432 -1709 1691 1693 1553 -1498 1692 4323 1476 -1749 1704 2131 1666 -2096 4014 4057 2113 -1847 2192 2210 1454 -4010 3825 183 4028 -304 1702 2096 197 -2281 2145 2211 2298 -1776 491 772 1723 -584 1702 4100 1508 -111 1698 4269 1701 -582 3603 3986 3331 -259 1694 2130 1682 -4300 4152 4362 4097 -4123 557 3368 4149 -3920 435 4042 669 -1720 1686 576 1498 -1722 123 1498 1692 -243 2685 1084 2747 -3356 4258 4985 4933 -4839 2183 4213 4251 -2097 2059 1409 2222 -210 2280 272 2276 -265 3278 461 2331 -2003 4146 3598 4173 -3870 3646 3845 638 -1720 54 1754 1498 -2094 2066 581 231 -1718 1764 1708 2047 -4372 4452 3980 4391 -583 1709 1630 1629 -1359 1700 1774 1735 -1194 2766 2762 287 -246 1643 1755 1624 -246 1643 1355 1786 -2116 4376 4360 585 -4675 1062 4986 1010 -1743 1575 1856 1811 -2113 553 4007 2114 -3791 3727 3990 1971 -382 3272 2117 269 -4232 4294 3836 4404 -4058 1791 3854 66 -1723 163 1736 1631 -1737 1472 1151 1735 -200 1622 1569 1736 -1779 122 1781 1749 -5168 5167 4994 4961 -2865 1103 96 2897 -1684 1570 1781 1779 -1777 1677 1803 1667 -1729 1818 1857 1758 -1025 483 1854 1606 -1657 2131 2123 1750 -2226 2212 2246 511 -1772 1787 1588 1857 -1763 1858 1588 1863 -208 1694 1738 1600 -1637 1745 2142 2122 -1774 1598 1643 1760 -700 816 806 2515 -2440 1568 1950 840 -1988 1779 1630 1718 -2134 1725 1412 1533 -1772 1687 180 1815 -1946 440 383 1761 -1789 1743 1816 203 -1887 206 313 1832 -1818 1777 1751 1412 -2607 2754 2681 1757 -205 1135 1571 750 -1773 1461 1748 483 -194 255 1720 2004 -1795 750 1117 42 -1867 1585 1365 314 -5037 5011 5338 5299 -4078 4217 3403 4062 -1149 1866 1559 1896 -2538 2327 1920 2421 -1598 1359 671 1646 -1172 1756 1656 1747 -1787 1839 1462 1763 -1751 772 200 1723 -1849 1904 1868 1488 -1811 1393 1700 951 -203 1598 1760 1742 -1804 216 1656 1809 -1741 54 1738 1754 -1790 1645 1441 1803 -1741 1645 264 1738 -4296 571 1783 4506 -4387 1782 4566 4248 -3167 538 4222 4456 -4344 4316 4328 1503 -1645 1726 53 1441 -1656 1773 1747 1575 -688 5033 178 1108 -1758 1796 1812 1799 -1668 1570 1805 1780 -1798 3898 1734 4053 -297 4849 4215 4124 -4697 1802 1795 1421 -4158 4682 4749 4855 -1793 1765 229 1805 -225 1807 1789 1797 -5043 201 205 1796 -3336 3940 1791 4181 -1801 203 1646 1789 -1661 1554 1123 1815 -1802 750 1799 205 -1793 1801 1646 4698 -1742 1668 1780 2125 -116 1778 180 1808 -1806 1421 1795 1790 -493 1805 1136 1570 -1796 1808 1812 4700 -1804 1809 1807 4104 -1808 1778 1810 1317 -1809 1352 1575 1811 -1812 1810 1729 1776 -951 1807 1789 1811 -1554 1219 1065 1687 -152 1134 2073 1685 -1816 1756 225 1800 -1815 1857 1123 1758 -317 1851 1835 1842 -1743 1856 150 1760 -1229 1078 1076 1648 -1213 2445 1945 1961 -2706 2663 2710 2614 -223 328 2008 2516 -599 2053 673 509 -1908 2420 2437 2465 -2316 2022 2429 2337 -1986 1609 1921 45 -1952 1950 1934 1959 -3026 35 1968 2438 -316 1998 2516 418 -524 2058 302 31 -1573 169 230 1370 -1759 1582 2177 319 -748 1529 2757 2766 -2575 2732 388 2769 -2143 1817 2136 2162 -1886 1845 1861 1591 -1868 1859 1897 2746 -2823 2764 4998 2763 -1575 1458 1773 1025 -371 174 1892 2190 -626 2034 1936 1216 -1817 2162 2194 581 -1864 1078 1862 1229 -1876 1574 40 1178 -1582 1517 1836 1887 -1632 1461 1574 1649 -2042 317 1696 2109 -1248 169 1576 118 -1775 1898 1901 1435 -2400 2620 2725 2887 -1817 2056 1223 2138 -1222 2173 1994 1921 -150 1070 1854 1864 -1855 1853 61 1744 -1856 1854 1544 1025 -1729 1818 772 1855 -1747 1743 1551 1816 -1748 1649 1895 1378 -1543 1946 1584 1837 -1416 1415 1420 1285 -931 1404 1149 1836 -1863 1843 1865 830 -1748 1864 483 1862 -1411 1853 1863 1843 -1862 1370 1437 1204 -1542 1551 1685 1769 -1966 1766 2097 2206 -1775 1905 1837 2741 -175 1636 1253 1274 -1982 2760 2819 2779 -2781 2485 2685 2750 -1636 1228 1875 410 -1891 315 1038 1919 -1885 1372 1323 1373 -1902 747 1872 1876 -1877 1875 1636 1844 -1878 1501 1876 1574 -1253 1877 1550 118 -1635 1076 1591 1404 -2910 2848 2443 1103 -2424 1899 2045 2447 -2641 1936 1927 1949 -1893 1378 1884 1349 -1883 1896 1149 1354 -1610 1898 1874 1901 -324 1836 1149 1560 -1759 1591 1369 1845 -1172 1889 1466 1895 -1888 1519 1395 1894 -1506 2156 1528 2057 -1635 1873 1543 1349 -1840 2164 2299 2207 -1404 1883 1635 830 -2740 1488 1889 1173 -1588 1858 1888 1896 -1769 1895 1466 1884 -1898 1584 1238 1837 -1897 1363 1885 1849 -2425 2059 1881 2222 -1904 1378 1649 1501 -1902 1849 1885 747 -1901 1249 1903 1875 -1904 1576 1501 1902 -1775 1905 1900 1903 -1904 1543 1868 1349 -2231 1924 206 1933 -2251 2187 2193 2225 -2393 3019 2482 1824 -2301 2310 2386 2459 -1922 2386 2214 2409 -2139 2071 2036 1990 -408 2455 2500 2464 -2294 2110 2026 2080 -385 917 2360 2841 -1940 1956 318 825 -170 3808 1962 312 -3861 3850 3946 3638 -1226 1978 440 2752 -1560 1873 1354 2743 -2438 1770 2435 2229 -1143 1826 1852 2029 -1991 1910 2230 2175 -193 2133 1583 1083 -1906 377 1929 2441 -1144 2765 1926 1939 -1559 1927 324 1925 -1926 1134 1928 1882 -1927 1582 324 319 -1924 2219 313 2440 -1931 2676 1226 2690 -315 313 1930 1954 -2180 273 2069 2174 -1934 1952 2444 1906 -1933 1577 1827 2177 -2070 1577 2037 2058 -1134 1841 2039 1882 -243 181 840 1028 -2762 1233 19 2508 -395 2508 1977 1925 -325 2778 1915 1944 -318 351 1558 2495 -4020 1140 3696 4185 -668 4270 4384 4367 -5 1992 1940 1945 -1944 2032 1555 1820 -1859 1038 1757 2745 -824 1137 1154 2009 -1988 1630 2132 2098 -1028 1882 1950 1959 -1753 319 1827 1949 -815 2829 1092 2866 -1933 1827 1961 2441 -3742 495 186 45 -1931 1566 1568 236 -3967 3336 3752 4058 -2779 2819 1915 2778 -1542 2019 2073 2149 -199 2671 791 2466 -302 1949 1827 2058 -4266 5164 5066 952 -1820 1555 2105 1952 -495 1916 186 2067 -477 3655 3598 460 -3008 449 322 2686 -1117 308 2009 2035 -119 2172 1867 2208 -2747 1325 2817 1982 -1828 2347 5 2181 -2059 2071 985 2025 -2111 2094 2096 2127 -694 1731 404 290 -3764 460 3598 4189 -553 2104 579 2114 -2313 2115 2074 2162 -2560 376 287 957 -2768 2731 2698 2750 -1566 1939 236 888 -1601 1918 2715 2572 -2227 2811 3891 3799 -3790 597 3788 86 -4045 3285 3278 2014 -1999 2807 1967 1870 -2009 2786 1137 484 -2028 1347 421 1137 -3305 3145 2923 3299 -272 2095 2195 1826 -490 4090 421 51 -1948 1754 2076 2062 -2265 2086 3805 300 -2055 1911 192 423 -2403 2301 1922 2402 -2385 1993 1944 2032 -2185 2049 2777 1992 -1446 1852 2050 147 -3986 75 4010 2151 -2355 1133 3694 3699 -598 3603 3762 3331 -1829 323 56 2297 -2747 2776 1982 2781 -1326 4265 186 4331 -418 99 223 2503 -2727 2941 2380 2558 -189 452 1716 3549 -2047 1764 2023 2031 -2775 2377 2352 449 -287 2612 416 376 -5092 2787 5189 1171 -2809 643 417 1822 -1965 1983 1947 1633 -685 228 2808 537 -2016 3291 643 3301 -4973 308 1117 1571 -3115 4098 2801 3289 -3237 1981 3010 2345 -501 3090 3297 3321 -3283 537 3276 2011 -4376 78 590 3971 -579 26 4043 4027 -1517 2153 1957 931 -2034 2035 524 2661 -673 507 3991 18 -1825 2348 2203 2457 -2004 1326 186 2028 -2026 2106 2119 309 -2045 2070 1969 31 -1913 2024 2079 2302 -4506 571 4505 4410 -2031 2023 2029 1984 -45 2028 421 1921 -357 2062 2076 282 -282 2004 2028 1154 -1992 31 1945 2045 -4379 1379 4054 209 -2041 2020 2039 1841 -2041 1965 1633 2020 -1911 2037 2121 192 -2036 1935 276 2039 -4042 4022 4083 4087 -2037 2034 2058 1936 -2256 2213 1212 2252 -42 2035 192 2034 -2063 2169 2215 1847 -2199 2409 2241 2216 -3991 4018 47 2068 -1881 2025 2032 2446 -2350 4106 4024 2356 -2004 2076 2067 1720 -2164 513 2460 174 -2050 1156 2519 1993 -484 1221 2049 1994 -2349 2613 2316 2370 -2066 2094 2102 111 -579 2104 1823 238 -282 423 2055 1154 -1684 1990 1570 2054 -2098 2132 1851 1583 -220 1890 1641 2135 -1935 1830 1959 2039 -1222 1969 1899 1713 -2075 2255 309 2106 -2068 2074 4018 495 -2148 1988 2030 1684 -272 2042 2214 2276 -2132 1657 2148 1599 -579 4027 1664 2258 -1719 2052 312 584 -1449 1962 2047 312 -1567 2061 2044 4094 -2171 1932 2135 224 -2137 1935 2071 2025 -1365 2070 1911 1969 -3785 2291 253 3792 -1814 1578 1667 1957 -2280 1974 2061 2195 -2255 2060 130 266 -1449 1988 2047 2030 -3657 3704 154 605 -2330 2362 2342 2285 -2026 1125 2085 2119 -2391 1913 2302 330 -2300 2337 2286 2387 -3553 3864 3861 49 -3643 3789 3905 568 -2163 2085 2257 2088 -2084 2285 2262 2079 -1989 509 3806 2324 -435 669 3597 3705 -2089 2302 2084 2299 -2392 2088 2163 2348 -4011 1665 4265 4384 -459 4539 546 4588 -2144 2239 2201 2209 -2129 2122 1083 2135 -1970 2052 2128 1719 -2169 2194 1986 357 -1698 111 1695 1970 -1713 1365 1867 2147 -581 231 1948 2056 -3763 4029 566 4008 -2139 2123 2148 1684 -2102 4014 4416 111 -170 4017 2101 2052 -2262 2165 100 384 -1973 507 2053 2254 -1961 2398 2454 2441 -2060 2244 2024 2268 -268 32 3829 3911 -3636 3817 3933 3847 -2315 1847 1454 2143 -261 2244 2290 1913 -1475 231 1970 1583 -100 18 2262 2266 -617 4015 1695 1730 -2256 1973 1730 1664 -1658 4017 1974 2128 -4305 78 4276 1727 -1732 4116 159 934 -2416 2258 1212 1664 -2024 2270 2079 2165 -2121 2124 2159 2140 -2036 2120 2125 276 -1612 1528 1750 2093 -2100 2140 1745 264 -2125 2158 2120 510 -2121 2124 1803 1667 -1517 1582 1578 2161 -1970 2128 617 2136 -2127 2115 2162 2094 -259 1612 2093 1651 -1612 2131 1532 1704 -1694 2130 264 1745 -1948 2133 2064 2056 -2132 1666 1657 1923 -114 2158 2149 1755 -2069 1528 2057 2093 -2138 1835 2127 2176 -2070 1577 2442 314 -1583 1851 2136 2167 -1911 2140 1365 2100 -2139 2120 2141 2123 -2142 2159 2140 1585 -1750 1528 2141 224 -2314 1835 2109 2176 -2167 2192 1642 2092 -384 2187 1699 2205 -273 2160 2174 2178 -2097 2148 1599 1409 -2147 2100 2064 2062 -1957 2134 1667 1412 -1618 1658 2312 2272 -1995 2333 32 404 -1083 447 2167 2171 -2019 2154 114 1648 -2153 1517 2155 1369 -2156 2154 2160 220 -1890 2157 2159 2155 -2156 1506 2158 114 -2157 221 2124 2134 -2156 2120 2141 2160 -2155 2161 2159 2146 -2160 2126 276 2178 -1835 2128 1974 1842 -2330 2084 2250 2089 -1892 2048 2249 2459 -2119 2213 2103 2253 -1223 119 2192 2167 -2152 2166 2138 2144 -3926 337 3908 4203 -2095 317 1409 2042 -2250 72 2338 2389 -2152 2201 2069 2172 -447 2171 224 1966 -514 2425 1852 147 -1932 1585 314 2146 -2402 1922 2430 2432 -2136 2143 2271 1642 -206 2178 1934 1832 -2146 2161 1577 2177 -2422 174 2218 2236 -1932 1663 2231 2288 -1968 2414 299 2245 -2211 1224 2298 2233 -4755 4235 4210 1712 -2231 2415 2428 2450 -99 147 1993 2385 -2243 3737 2362 2324 -1907 2249 2242 2145 -3685 1484 3918 85 -243 2487 2683 2685 -2388 1840 2207 2417 -3858 3767 3857 578 -1696 2166 2209 2144 -242 2242 511 1907 -1842 1449 2195 2095 -2074 2194 495 1986 -99 2369 147 2204 -3641 3779 3857 3918 -3997 3998 3834 2416 -2043 2232 2210 2239 -3347 3223 904 3247 -2092 1663 2171 2208 -2317 2504 2727 2558 -2022 2250 2316 2389 -2295 41 2196 2426 -2249 2145 2257 2310 -506 2221 1867 2208 -2190 1892 2348 2457 -2201 2209 2206 1966 -2092 2192 2210 2208 -2199 1696 2216 2209 -2246 2212 2182 1699 -1746 306 2211 2242 -2254 2040 2165 2270 -2063 2230 1910 2215 -2042 2214 2216 2222 -2043 2215 2221 2210 -242 2226 513 174 -2419 2460 2412 2179 -1929 2474 2676 2735 -928 362 5000 5164 -2452 2222 2206 2216 -2215 1899 2221 1713 -2603 2616 2642 1166 -2255 242 2251 371 -309 2253 1907 130 -2217 1746 306 2235 -3680 283 1979 3842 -1405 2277 3787 3774 -2407 2420 1920 2418 -1922 514 2425 2214 -2180 2184 1906 2444 -2233 1224 2199 2240 -2410 2182 2232 2234 -2411 2233 2235 306 -2226 2236 2240 2234 -2179 2237 2235 2412 -2236 457 2238 2413 -2237 2374 2239 2241 -2240 2238 2092 2199 -1592 2235 2239 2232 -2238 2375 2451 2043 -2193 513 2212 2187 -2294 2186 2263 2371 -2110 2283 2323 2106 -2407 2394 2181 408 -1746 2211 1592 2247 -2252 2281 2246 2271 -2278 1662 2318 505 -2299 2187 2205 2164 -2163 2170 2331 2203 -2224 2308 1907 309 -130 2253 2247 2040 -2252 2225 384 2165 -2104 2256 1618 2213 -2283 2075 2060 2224 -2114 2254 2040 2272 -2084 2262 72 2205 -2065 2261 2118 2259 -2258 2265 2269 238 -3901 284 3904 638 -4000 2265 3785 2258 -2085 2112 2257 2103 -3621 2344 2243 2373 -2418 2419 2436 2433 -2261 1989 2292 2259 -2112 1567 210 2280 -3629 2373 2372 3667 -266 2323 2106 2269 -1212 2259 2268 2270 -2213 238 2269 2119 -2272 2311 2247 2176 -2256 2150 2271 617 -448 283 2277 2279 -4034 3879 3945 3866 -2277 3815 81 2279 -2296 2315 1714 2063 -2273 3786 2228 2275 -2279 3778 3686 2248 -2273 1111 2275 2278 -2266 2074 1714 2313 -2247 384 1699 2311 -3037 2372 3703 2286 -1662 2255 2244 261 -3330 3752 4154 3274 -2078 1125 1110 2085 -2282 2388 2081 352 -2336 3704 2354 554 -506 314 2442 2180 -4093 3953 3673 3762 -2110 300 2321 2294 -2072 2292 2318 2322 -2291 2265 300 2323 -662 3308 1141 3112 -2290 2324 2243 1913 -2404 2339 2204 2403 -2298 2276 2310 2386 -1998 2368 2339 2404 -2182 1699 2296 2315 -1892 2308 2088 2249 -552 1133 2081 3703 -2389 1909 1991 2458 -2080 2026 2088 2308 -3703 3037 3702 3698 -4339 4371 4229 4093 -452 3880 3671 3759 -191 3734 3676 2357 -3330 3274 4119 37 -371 2251 2302 2299 -377 2474 2695 2427 -2205 2296 72 1909 -2281 2271 2312 2314 -100 2150 2313 2311 -2280 2312 1974 2314 -2315 2311 2313 2143 -2298 2314 2276 2109 -2339 1825 2051 2203 -2529 662 2202 2984 -253 2291 2319 2248 -3773 2318 2320 505 -2319 300 3772 2321 -512 2290 2320 2344 -326 2291 1662 2323 -2322 2292 2244 2268 -2086 1125 2186 2294 -2327 2429 2326 2405 -2423 2325 2457 2417 -1770 2368 2435 2325 -2644 2594 802 347 -2435 2404 35 2402 -2163 2355 2331 2078 -1715 2349 2330 2250 -303 2857 2568 2853 -50 4075 3751 2151 -3538 3093 3107 2812 -41 3010 2370 417 -2733 3705 3679 2287 -552 1825 368 2081 -265 2340 2170 210 -2297 2316 2370 2295 -3718 1609 2426 2338 -4174 4213 4251 4220 -461 4088 1110 2078 -3739 512 2344 2358 -3674 2321 2263 2343 -3115 2014 4098 3272 -3799 3823 3795 3786 -1968 35 2385 2430 -2387 2089 2022 2207 -2331 3694 2051 3278 -4148 4201 4021 2046 -2984 2703 2890 2479 -232 344 2005 2799 -344 2378 2760 2879 -346 3737 2287 3621 -2363 1996 2330 2362 -2046 521 3777 4141 -2306 3749 3672 3745 -2372 2343 2373 2390 -3100 3627 2542 3570 -1097 2886 1914 3089 -2367 2621 3698 2985 -2355 3738 2078 2186 -2371 2355 1133 2392 -3393 557 2365 3056 -151 3372 3016 2364 -3936 531 151 3729 -3654 437 244 2361 -323 2297 2327 2429 -51 41 2196 2809 -2335 2051 2339 2477 -2243 2363 2373 2391 -3707 2358 2267 2282 -2371 2263 2358 2267 -2238 2415 1663 2451 -2432 2409 2241 2413 -2885 449 2775 922 -2799 2005 223 2503 -449 322 2353 289 -478 3592 3668 3046 -323 413 340 2002 -4359 629 4102 4156 -4840 4973 4943 4993 -3800 1326 1347 4069 -1092 2776 2781 2971 -2347 2185 1992 2424 -1909 2296 1910 2410 -2388 2392 2081 2348 -2286 2390 2387 2190 -2203 2170 2403 2301 -2358 330 2391 2388 -2390 2080 2371 2392 -2387 2391 2363 2089 -307 2462 2484 1908 -2245 2414 237 2434 -3005 3012 369 2536 -2703 2926 3000 2726 -1174 2556 763 2672 -2487 2105 2683 2486 -2841 3138 2864 2576 -374 2615 1850 2659 -2817 359 1028 243 -2436 1991 2329 2175 -2295 2389 2426 1991 -2406 2297 2295 2329 -2421 352 2325 2417 -418 2404 99 35 -2437 2229 2438 2245 -3114 3102 3094 3064 -2375 1910 2043 2410 -2411 2386 2409 2233 -2410 2234 2412 2460 -2413 2411 2236 2218 -2433 2375 2237 2412 -2181 2449 2394 2431 -2374 237 2184 2449 -2198 3785 3792 2118 -2405 2190 2326 2422 -2461 2264 2229 2434 -2422 2218 2423 2264 -2421 2461 2229 1824 -3018 2405 1770 2420 -2417 2179 2419 2461 -2436 2326 2458 2419 -2385 2425 1881 2430 -2424 2173 1899 2230 -2340 514 2204 2403 -2456 307 2502 2309 -2184 2464 377 2453 -2368 1825 2325 368 -2347 2175 2424 2431 -2430 2432 2448 2414 -2175 2375 2431 2433 -2432 2413 2434 2264 -2394 2433 457 2418 -1920 2327 2329 2436 -2402 2435 2423 2264 -1824 2407 2482 408 -3027 1920 1828 2407 -820 1211 763 2672 -2441 1753 2565 1929 -1952 2440 2105 1924 -2137 2444 2446 2288 -1880 822 2526 2595 -2442 1933 2445 2231 -2446 1820 2450 2444 -2045 2445 2447 2442 -2448 1881 2446 2452 -2449 2431 2447 2451 -2450 2448 2415 2414 -1213 2445 2184 2449 -2374 2241 2448 2452 -2221 506 2447 2451 -2454 2455 1213 2428 -2105 2486 2453 377 -2453 2499 299 1912 -2492 2427 390 2490 -2326 2022 2458 2207 -2423 2457 2301 2459 -2458 2460 2164 1909 -2459 2048 2411 2218 -2420 2422 2418 457 -2492 148 2530 2393 -2627 2570 2626 2622 -2465 307 2428 1912 -237 1824 2464 408 -2478 2670 1958 2496 -2559 429 295 2527 -2944 74 2889 2511 -2521 1 2972 2959 -3127 2998 2840 2959 -2547 2976 3013 2947 -77 294 3013 427 -2965 2943 2514 2961 -2309 2219 2694 2480 -400 2492 2523 2546 -127 2552 844 2578 -2370 3034 56 417 -1601 2466 2715 2737 -2960 369 2351 366 -2490 2474 2669 2513 -2712 2525 199 2715 -2437 1908 2483 3028 -2482 2484 2500 3029 -2483 2393 2501 2530 -1558 318 2780 1871 -2454 2398 351 2695 -318 825 2189 2398 -2689 2608 1173 2740 -2569 2559 819 859 -429 2456 391 2480 -908 2919 2596 2914 -2456 2475 2532 2462 -2616 885 2835 2861 -3479 3408 3389 398 -1941 2499 3024 325 -2466 2722 2748 2737 -358 2568 2859 1146 -2720 3004 2789 3014 -2455 351 2495 2500 -1912 2501 2499 2483 -2500 307 2502 2484 -2696 2427 71 2501 -2686 2001 2377 2777 -3290 662 3295 2202 -826 2642 2603 358 -2976 2828 11 3013 -2726 2926 2785 2590 -1938 2677 888 1939 -333 2682 1116 3058 -387 2906 2908 2549 -2468 387 288 2946 -2885 2984 2529 2927 -2527 2480 2670 1601 -2521 2473 2561 1 -1191 2543 1752 24 -1822 2529 56 1829 -2595 2526 2573 2569 -2677 1466 2740 2742 -76 2049 2623 2777 -2600 2624 2684 2591 -2930 2514 2947 2469 -2581 1103 2865 2893 -2533 2540 2532 2475 -4925 285 4956 4768 -2481 2537 374 2572 -2517 2443 96 819 -2467 2513 2719 343 -2980 426 3000 2703 -328 2317 2516 2512 -2484 2462 2531 2652 -2530 2532 71 2884 -2531 2492 390 2523 -2592 2550 2523 2587 -2649 394 2606 2673 -3269 922 289 2991 -2975 3001 2726 2395 -2601 2614 2710 2525 -1770 1419 3018 3006 -1155 2554 2738 1206 -2523 2550 294 427 -3140 2680 3490 3304 -3716 55 2359 3574 -692 383 806 2515 -393 2549 389 2559 -2904 2934 2796 392 -2549 2475 2587 429 -2888 2471 2905 428 -4093 4307 3953 4056 -2510 2546 2588 2544 -2533 2795 2540 2632 -465 416 2792 2835 -2476 2598 844 909 -2837 387 2899 393 -1084 2748 2539 2761 -127 2563 2573 2597 -821 2397 28 539 -389 2574 819 2559 -2002 2793 2890 2202 -2544 2467 2557 2489 -2767 1164 1975 1145 -2889 2514 2943 2955 -3220 2914 908 2656 -2848 379 2595 2555 -83 2849 905 257 -2683 2440 840 2735 -878 2728 2759 873 -2673 2635 394 97 -905 2611 2332 2497 -379 2489 2517 2597 -907 2640 2463 2577 -713 806 2717 2607 -343 1978 2525 2601 -2517 897 2555 2597 -2589 295 2667 2557 -815 791 2664 1834 -873 2399 908 3219 -2570 2646 2626 2851 -2665 2476 2619 805 -388 2911 2711 2847 -834 2702 2637 2787 -2847 2867 2522 2918 -923 907 2625 2831 -3250 902 2978 870 -2694 2722 2731 2669 -2674 424 1044 327 -2592 295 2587 429 -2586 2588 2533 2546 -2549 2587 2639 2589 -2588 2574 898 389 -3020 3011 2507 2999 -2520 2712 402 2710 -391 2729 2533 2586 -1115 2661 1216 2818 -2328 2649 2606 327 -379 2443 2563 2517 -2833 2491 2932 2827 -2569 2598 2573 2555 -2552 2597 901 2599 -2598 859 2628 2602 -456 2520 110 2663 -2602 2572 2537 1209 -2599 2601 2622 2627 -2505 2223 833 2860 -2611 2636 852 2605 -2604 2646 310 394 -2534 2675 852 2594 -1185 2571 1761 383 -2488 2688 217 1233 -516 3189 2862 403 -327 732 1175 2634 -2568 2604 802 2853 -2006 1214 2666 1681 -3694 552 2051 558 -2622 1821 2537 2615 -2614 2620 2400 2625 -2223 2493 2855 1165 -2912 2866 2664 2796 -2658 2865 2887 2873 -844 2640 907 2578 -1850 451 2827 2615 -2942 3037 2361 2986 -2602 2463 2614 2625 -2805 2519 2815 2819 -2520 2714 1681 2712 -2622 2582 2615 2628 -797 2577 2706 2463 -2678 909 2463 2602 -2599 2625 2629 923 -859 2628 2659 2630 -2629 96 2658 819 -2882 298 911 2900 -2639 2909 2711 2550 -686 3428 3448 3426 -347 2610 2653 798 -805 909 887 2567 -1146 2604 310 2647 -2580 2692 672 5013 -888 2756 2691 2744 -2588 2908 898 2632 -2619 909 2570 887 -1028 0 2765 1882 -2505 2849 977 2223 -2871 2644 303 846 -2328 2643 2853 753 -2868 139 2844 2656 -2852 2577 2605 2651 -2636 814 1191 816 -2761 791 815 2748 -2594 2650 2534 2673 -753 805 2651 2649 -2650 2646 394 887 -3022 2530 2884 2907 -886 2634 821 730 -2971 2969 2789 2720 -2863 2868 817 2851 -2871 2562 2645 817 -2732 2667 295 2719 -2659 2618 2667 2630 -2718 2400 2658 2629 -1681 2714 450 2761 -30 2020 2593 2815 -833 2721 2717 2860 -451 2600 2836 1821 -2575 388 455 2617 -817 2915 2863 2578 -363 416 2612 2684 -2657 2873 2574 2658 -2721 402 2754 2717 -2584 2670 2730 2480 -2669 2466 2671 2513 -2670 1958 2732 2719 -424 2439 2397 918 -2649 2567 2534 2674 -820 2585 2675 2673 -2606 2674 112 1044 -2219 1601 1930 2736 -1233 1065 2518 2508 -692 97 797 2627 -2701 5159 3257 1021 -3241 373 3313 2541 -1761 2755 2693 2745 -3697 3698 3702 2509 -2189 2398 2565 2734 -2721 2666 2520 110 -1710 1871 2189 2749 -3007 2503 1964 2778 -550 4870 4874 3371 -2689 861 2608 219 -959 2688 2488 2693 -1930 236 2739 2691 -1226 2690 2751 2638 -2702 2832 1101 2637 -2689 2681 2746 1142 -2695 2734 2584 2474 -2486 2694 2696 2309 -351 2695 2697 2502 -2698 2731 71 2696 -1976 2697 3015 1558 -2891 2885 3008 2927 -181 840 236 2739 -2679 279 5097 2791 -1194 287 2692 2580 -2351 3033 2528 2396 -868 465 5188 813 -1146 2709 2859 2716 -2626 2836 2709 1821 -692 2708 2709 2716 -1209 2710 2707 402 -797 2706 2705 2707 -2708 2537 1821 2591 -2579 910 2795 2632 -2624 2481 947 2591 -2714 456 935 2725 -2624 2713 2660 2724 -1978 2478 2481 947 -2717 2707 806 2705 -2662 2668 2571 2716 -374 343 2659 2719 -2671 2718 2657 2527 -11 2828 2654 2498 -363 2684 2668 2662 -2496 2584 2749 2734 -2738 947 2751 1206 -2714 199 2725 791 -2724 1850 2713 455 -369 2396 2536 2507 -56 3034 2002 2202 -2566 885 2825 139 -2730 2769 2592 2732 -2731 2729 391 2669 -2697 1976 2730 2584 -2671 1834 2729 2657 -3699 2336 3700 3731 -2722 2683 2735 2694 -2734 2565 2736 2219 -2737 2739 2676 2735 -2478 2496 2738 2736 -2539 2737 2739 2723 -2738 2700 2690 2736 -2488 2518 1894 2741 -2740 2742 1868 2746 -2518 1354 2741 2743 -888 2742 2744 1919 -2638 2745 1038 2743 -2681 2746 1946 2744 -2741 2745 1837 2693 -1999 311 1710 1967 -2648 2749 2554 2496 -2748 2750 2685 2722 -2790 1871 2749 1976 -2752 2691 2723 2756 -1918 2751 947 2753 -2752 2754 402 440 -1761 2668 2755 2753 -2681 2754 219 2756 -2755 2751 19 2638 -0 2765 146 1833 -3168 1139 462 3453 -2825 813 2566 3218 -2353 1870 2820 2807 -2554 2660 2830 2648 -1214 1724 1938 1215 -1838 1679 2878 2807 -1838 1131 4997 396 -395 2757 1925 2641 -1833 2767 1215 1724 -2766 1529 311 2560 -1976 2769 2790 2794 -2768 2729 1834 2795 -2900 2892 349 2914 -1115 161 2822 365 -387 2916 2908 296 -2798 3037 3036 305 -2813 3089 3265 3231 -328 2005 3302 2376 -9 1679 1999 2384 -2519 1993 2778 2503 -1956 2777 1940 2686 -2780 1870 1956 322 -2485 2781 2779 2789 -1871 2384 1999 2780 -3388 3474 3158 726 -3247 481 3223 3212 -685 2799 2808 401 -2975 2507 82 2999 -1983 4889 401 2788 -1077 957 2580 2007 -2786 4840 2800 308 -2780 2654 322 2498 -1092 815 2768 2750 -1169 2701 5183 4824 -3152 2832 1165 2551 -2803 889 2558 2979 -2768 2795 2987 353 -2769 2550 2711 2794 -2911 2545 2617 2924 -4151 3179 3936 4020 -341 2773 2803 2981 -2352 2377 2784 76 -2805 30 2788 2821 -2013 3713 3034 3290 -3383 3068 3070 3379 -3036 2798 2793 1116 -3082 3352 5225 5273 -2800 76 2623 2820 -561 4149 3355 3385 -2760 1982 2823 2763 -2010 2809 51 2784 -2808 2008 2369 223 -3091 2966 345 409 -3680 85 1979 3822 -3085 3124 2334 3048 -2935 3138 2774 3191 -4216 4174 3615 3394 -2661 524 2816 2623 -2817 2815 359 2819 -2401 1967 2818 2816 -0 1325 2593 2817 -1870 2623 2816 1956 -2805 344 2760 2821 -2800 4841 2820 2822 -2771 4927 2821 2823 -365 2822 2807 1838 -3221 2871 2825 766 -715 2759 2728 2824 -924 3244 3259 2875 -2839 2831 2596 2620 -2506 2990 2720 3011 -2830 385 9 1951 -1164 450 2829 2761 -2863 2582 2932 2827 -2692 416 676 2792 -2865 2919 2596 2887 -2903 808 902 796 -2493 878 2551 110 -2663 2858 2850 2706 -2848 2949 2899 2553 -3473 3163 432 3374 -2827 451 2844 2868 -2928 2470 2926 3002 -1914 935 2399 2912 -3723 3064 3114 3730 -903 2923 3306 443 -2839 2645 873 908 -3059 3159 3160 3186 -664 3090 93 3094 -2873 2581 2579 898 -2563 179 1880 2837 -2564 767 2642 2854 -2868 2836 2857 2851 -2655 2850 2852 2577 -753 2851 2853 2646 -2644 2852 2332 2611 -2849 136 2855 257 -2854 786 2616 885 -2857 885 139 303 -2856 2850 2858 2332 -2859 2857 2861 2836 -2497 2858 2860 2705 -2603 2861 2662 2859 -2860 2493 110 2858 -2609 2937 3121 3146 -2655 907 2665 2831 -2919 2399 2912 2934 -2618 2522 1740 2833 -385 1951 2617 2924 -2916 2581 2910 898 -2655 2839 2645 2850 -412 3654 3096 3100 -93 3094 3333 3741 -2656 2643 139 2824 -280 3180 3324 3148 -2667 2618 388 2847 -924 3169 2875 3209 -2874 3212 2826 3174 -3492 3427 3049 3533 -2878 2978 1679 902 -2763 2877 2896 2879 -2878 289 378 2353 -3159 3160 3142 3106 -3209 3149 3174 3263 -2631 3224 3262 3209 -3130 3159 3124 3512 -2652 2531 3015 294 -2376 2921 2512 2699 -2360 1020 385 2894 -2618 2833 1850 455 -2909 2933 2547 2953 -2468 428 2561 2954 -2558 889 366 2351 -3011 2699 3004 3020 -179 2770 2893 2925 -2918 349 2892 2522 -3038 2886 132 3265 -3223 835 3222 3147 -2878 2903 5001 378 -884 375 1740 2932 -515 3352 3180 3326 -2553 2837 2910 2916 -2631 2770 2935 3191 -3107 2963 3093 3543 -3137 3471 3472 3513 -2896 3214 2834 5002 -2911 2545 380 2918 -2906 427 2547 2909 -2510 74 2905 400 -2652 148 77 3021 -2510 2772 2639 2909 -2908 2888 2632 2905 -2899 1880 822 2867 -910 2796 2904 2579 -2841 2617 455 2864 -16 3069 3458 3400 -2915 2562 2491 2770 -2914 884 2932 2665 -2899 2917 2867 2772 -296 2916 131 2949 -2904 2893 131 2581 -2491 2864 2833 349 -3006 2929 3019 3028 -2928 922 3002 2885 -1393 4650 4649 4550 -2843 442 3184 1985 -2796 3038 2866 2983 -2949 2892 131 298 -2396 2840 2998 2507 -2960 2512 2699 316 -3113 2840 3033 2921 -3017 2920 3021 3012 -2998 2997 82 2521 -316 418 3007 3026 -2915 2897 2596 2831 -910 2977 2888 2952 -349 2864 2545 2935 -2900 2813 2934 392 -248 2951 1 3149 -680 3135 3204 2862 -547 3605 3132 3600 -3624 3497 3480 3613 -3151 409 2961 2945 -3706 3036 413 2002 -3716 3707 437 2621 -2473 2944 2561 2945 -2966 2468 2943 2945 -2940 2944 2943 249 -2949 249 288 2511 -428 82 2521 2471 -674 3375 3106 3142 -2837 2925 2917 2946 -63 2951 2952 248 -2950 3171 2994 2936 -380 2953 2950 2933 -2954 2888 2952 296 -2889 2953 2955 288 -2954 248 2561 249 -3067 3058 1116 341 -3062 3003 1659 3091 -2977 2983 910 2987 -3072 2469 2470 2967 -2927 3017 2479 213 -2964 2940 2473 3153 -3293 3155 2968 3348 -2901 3059 3088 3484 -345 2961 2965 3187 -2966 2473 2997 2964 -2810 2989 2965 2944 -2972 2992 2990 2959 -3223 399 2962 835 -2978 289 2654 2991 -1092 2983 2971 2987 -2384 2978 2654 2970 -2976 2469 2994 2967 -3119 3135 3108 332 -4363 4858 950 4619 -2988 2536 2785 895 -2977 2506 2471 2972 -2933 2958 2976 2994 -2877 2969 2971 2583 -1116 3032 2793 3295 -2982 212 2528 889 -2982 2798 889 3005 -3001 444 2980 2981 -2924 3250 2970 2958 -2317 3033 2351 2512 -3096 2361 3058 2986 -2621 341 2985 55 -2794 2958 2970 11 -74 2989 82 2975 -3003 2988 2997 2966 -2967 2991 2828 3002 -2992 2969 2990 2535 -2967 870 2991 3199 -3291 3321 3342 93 -2977 2972 2951 3232 -3129 3003 3000 2996 -3125 2997 2995 2998 -2996 2965 2989 2930 -2470 2996 2926 2930 -77 2590 2785 3013 -2528 2995 3001 2396 -2982 2536 3000 3003 -2840 2921 2990 3011 -2957 3001 2995 2989 -2498 2891 3008 3023 -2981 372 366 2395 -2538 213 2920 3027 -3008 2931 2686 3025 -3004 2699 1964 3007 -4622 4902 4975 955 -4091 3278 2335 2014 -3002 2891 2828 2590 -148 2395 2929 3019 -2472 2506 2999 2471 -3015 2498 1558 3023 -2884 353 2698 3014 -3068 2365 3070 3056 -2960 3020 369 2929 -372 2421 2538 3019 -3012 3018 2920 1908 -2891 2590 3017 3021 -3020 3022 2907 2929 -3021 3023 2652 3029 -3022 3004 3014 3024 -3025 2495 3023 3029 -3026 3024 325 3007 -1828 3027 3025 2931 -3026 3028 3006 2438 -3029 2482 2920 3027 -3024 2483 3022 3028 -602 4528 4724 5040 -3132 3618 3567 3604 -2979 3045 212 3307 -2984 3112 2703 2928 -2477 558 2727 2801 -1139 696 722 5241 -3702 2773 2941 2803 -2621 2282 2303 2773 -2924 2894 3250 1090 -3052 3062 3098 89 -3108 3298 3135 3050 -3296 3302 3268 3277 -453 3586 3585 3568 -3162 3541 3049 3170 -3098 332 3129 426 -3067 3052 3032 3182 -3729 151 2379 44 -3061 3087 3110 3322 -3185 3099 3063 2812 -2876 3524 6 3043 -3486 3060 3040 565 -48 3102 3329 3094 -212 444 3039 3045 -13 3948 3101 14 -4437 4545 4164 3273 -3276 3302 232 3296 -3597 2364 3016 3367 -4702 1102 4589 4353 -443 2985 2509 2956 -485 3061 2845 2963 -3310 3050 3501 3313 -3059 3062 3133 3047 -444 2957 3039 3061 -485 3107 3048 55 -4067 2408 39 2842 -3663 478 4186 3592 -3284 211 3071 517 -2956 3077 3045 3183 -44 3016 2802 3725 -3565 3554 2913 262 -2802 3417 3363 3016 -3075 381 3630 3066 -3147 3197 3127 2959 -3569 3421 398 3502 -3398 329 3076 3664 -3071 3076 547 3398 -3075 3281 4189 3074 -341 444 3067 485 -3105 3206 3118 3187 -4221 3467 3370 3433 -3561 3534 3590 3608 -5012 1095 5026 843 -4890 494 3351 2804 -3315 4893 4162 5320 -679 3103 4970 4275 -3390 3571 2812 3538 -4172 4192 477 262 -3047 3091 403 21 -3130 2963 3159 3136 -3138 2360 2774 3216 -2015 3305 3120 2846 -2957 2810 516 3087 -3572 496 3573 3525 -2334 2901 3130 3506 -2846 3051 2870 2408 -3606 3895 3873 3559 -443 2869 2985 3099 -3137 397 3192 3399 -3039 1659 3044 3121 -3096 3100 55 3048 -2869 2359 3099 3571 -535 3053 4099 4070 -3364 3366 3051 2408 -4619 3 3084 4664 -3481 256 260 710 -3153 3207 3197 3078 -2880 487 3128 2948 -3063 2901 2334 496 -3267 3040 2973 3309 -3427 3537 3540 3542 -3047 3128 3146 3133 -3112 426 332 1141 -3033 3111 3113 2293 -3198 3195 3112 2928 -2842 2408 3306 903 -417 2345 2013 643 -3122 5258 4308 4258 -3502 3496 397 3515 -3078 3125 3154 3127 -3154 3205 399 2973 -65 3297 3090 48 -2862 3135 3098 89 -3660 3116 494 4890 -3148 714 3156 3377 -2812 3511 2883 3185 -3129 3187 2996 3118 -3200 430 3478 3170 -3072 3118 3195 2470 -3106 3522 3110 3166 -1659 3125 2995 3044 -3093 3088 2883 3507 -21 409 3189 3202 -3420 2938 3031 3594 -3061 3110 89 3160 -442 3378 3510 3516 -2937 3121 3040 2973 -3088 3484 487 3532 -3468 2902 3097 373 -2399 3089 2813 3219 -3173 3535 3288 3485 -3241 2541 3144 361 -3472 3246 397 3515 -3513 2948 2880 565 -3155 3310 3148 3180 -3140 3463 658 3365 -1985 65 442 3514 -403 3166 2862 3110 -3172 3072 2895 3199 -2872 3143 3123 3500 -3150 2881 2936 3157 -321 3209 3149 3151 -3150 3208 3153 2940 -5013 2792 5176 5188 -3151 3105 3157 2961 -3119 3118 332 3195 -2962 3309 399 3143 -3123 481 462 3168 -3149 3197 1 3153 -2782 3399 3487 570 -3088 2845 2883 2880 -2845 2880 3133 3181 -3355 3366 3368 623 -3043 3533 3521 3532 -3460 3531 3504 2838 -3249 808 3259 3176 -3523 21 3166 3374 -3128 3165 3146 407 -4299 4303 1379 1784 -2758 3382 3156 3169 -3168 3208 3211 2874 -3126 3507 3532 3043 -3233 3232 2951 3263 -3212 3197 3147 3174 -3539 3139 3546 3369 -2875 2881 3172 3249 -3297 3313 3310 3326 -3215 3164 3260 667 -3606 3631 135 3617 -4671 4410 530 3803 -2797 694 3954 3274 -2898 3353 2872 3143 -3160 3298 89 3182 -3183 3181 3045 3299 -3184 3186 3067 3182 -443 3185 3183 2923 -3184 3048 3186 3124 -3183 3185 485 2845 -3188 2964 3125 3078 -3189 3187 345 516 -3188 3131 3203 2609 -13 14 4060 681 -3225 2900 2813 3220 -3474 3499 3097 3476 -3238 3321 3342 3350 -3360 3297 3238 3326 -835 3154 3113 3127 -5297 4288 267 699 -3157 3172 3072 3105 -835 3277 3268 3113 -3236 3147 3222 2992 -3471 414 3126 3504 -3504 3532 487 3531 -3503 3131 3203 3208 -3204 3206 3202 3189 -2937 3205 725 3203 -3206 714 3119 3204 -3078 3207 3205 3203 -3105 3208 3211 3206 -3169 3202 3207 3151 -2882 2874 2881 3150 -466 4867 5199 1029 -3212 3169 481 3207 -2875 3211 2783 3172 -4962 5038 4724 1128 -463 808 636 2903 -3224 3262 3176 3264 -3217 4824 1097 3089 -813 5085 3216 3218 -2759 3217 3219 3221 -2576 3218 3138 3220 -3221 3191 3219 2562 -1017 3220 3218 2824 -636 2895 3269 3199 -2783 2968 2200 2895 -3225 768 3215 2882 -3191 724 3231 3224 -5089 696 687 5221 -5159 3260 5150 1091 -4351 1010 4810 4932 -3230 912 5099 787 -3229 5177 5004 5155 -3225 3264 279 2774 -2994 3171 3250 870 -911 1090 3171 3262 -3384 4714 665 4242 -4935 4770 4807 4969 -3199 808 3249 870 -4133 2014 4041 3272 -3359 3193 3351 3194 -3451 4907 4231 4836 -705 525 4839 252 -570 2680 3242 3140 -3454 3241 3326 515 -1170 5098 5242 722 -3409 3261 2826 3247 -3493 479 222 120 -3478 3455 3509 3141 -133 2200 3244 2783 -3445 3391 650 3392 -3164 3174 3236 3263 -2983 3038 2583 3232 -4947 4651 4728 3292 -5308 5296 5288 5344 -105 5080 1023 3358 -4965 5094 4301 5024 -5105 3528 4715 4320 -4885 5276 5283 4888 -5150 724 2679 4897 -1017 5060 5086 5018 -3260 3261 3164 2826 -768 3227 3176 3259 -1170 3244 463 3259 -2882 3263 3215 3233 -3262 2881 3249 3171 -3215 3265 667 3231 -1090 2894 3264 2774 -1442 5217 644 607 -501 3108 3320 1141 -3269 3041 922 3198 -3270 3268 2535 3222 -378 3271 3269 636 -3270 3296 1502 362 -3237 1732 2345 4116 -4369 499 4280 3054 -2284 4075 3179 2307 -1225 4080 350 3953 -1093 2016 684 3055 -3293 3041 3198 3308 -1715 2349 3010 1981 -5190 5000 5160 5164 -5005 1502 904 3347 -536 4143 3076 3736 -3395 3527 120 3491 -3342 934 1093 2016 -3520 3066 3398 3710 -551 3711 1981 4066 -3968 4072 251 4477 -3987 3402 4122 3396 -3139 3537 3536 3529 -2013 3291 93 3290 -2801 3289 3294 2504 -3289 2011 2993 338 -4984 3251 4648 4945 -433 2962 3277 3349 -333 664 3295 3290 -3294 3307 2979 2504 -3055 3041 3271 526 -3120 3175 2015 3194 -3299 3181 3040 565 -1985 3298 3182 3320 -489 4837 4159 3337 -3302 338 2011 328 -3041 3055 2775 3301 -3345 4856 3449 525 -2541 3468 3482 102 -664 3090 1985 3320 -3114 3378 412 2843 -3295 3320 3032 1141 -338 3277 433 2293 -501 3108 3155 3310 -3309 3060 3143 3175 -5237 5285 3357 5230 -1107 3509 3499 3493 -3175 3411 3060 2680 -3518 3526 3369 3580 -5312 5017 4815 3083 -3381 3390 3569 3515 -4991 4957 4266 5066 -4269 304 4049 4409 -1093 526 480 3350 -3305 3267 3299 3307 -433 2015 3193 2993 -3484 3047 3522 3523 -4278 4733 4922 4751 -462 721 2872 3450 -3776 4126 3670 3768 -3242 3175 3194 2898 -464 5282 5146 4744 -4234 4838 5165 4876 -623 3051 645 3361 -2284 3909 2307 4144 -1997 290 1703 419 -3395 398 3505 3479 -645 269 3334 2870 -3362 3333 934 3342 -1627 4574 94 4475 -522 4076 1955 1798 -3300 1114 3338 4231 -4159 5280 839 3337 -3356 4963 3 4258 -4970 3660 4912 1644 -5075 466 360 5140 -3193 3334 3283 2993 -4608 5111 5154 5149 -5290 5249 5282 464 -3303 550 4215 4875 -1099 4648 3356 4672 -3280 3348 2200 3354 -3349 2962 3347 3353 -3350 526 3348 3293 -3193 3319 3351 3349 -3082 3238 3350 3352 -2804 3351 3353 2898 -3352 3348 3354 3180 -5219 3347 721 3353 -2806 3161 660 3386 -3346 3339 4163 1711 -3311 4308 5258 5178 -436 5079 3253 683 -3360 3362 4960 3238 -3432 3361 3359 3194 -3431 48 3329 3360 -3359 3334 645 4912 -3364 3418 3366 3070 -3516 3378 3363 3102 -5256 3392 361 3144 -3363 3161 3102 3367 -3056 3368 3366 39 -1706 3367 13 3161 -3485 3314 3173 3548 -4240 3079 3456 4913 -705 665 2687 4244 -670 3416 1109 2365 -3448 3426 3413 3437 -2838 3165 407 3503 -2948 432 407 3486 -3473 3382 3498 3461 -3500 725 3123 3382 -3134 3379 3364 3306 -3552 2802 3378 412 -3591 3520 3594 3483 -3455 245 818 3316 -3376 3503 3377 3168 -3480 3497 2802 3552 -4213 3234 589 3412 -3386 3413 2806 3415 -736 3385 3355 3418 -3407 727 589 3400 -4221 3475 3489 2782 -727 2494 656 3448 -3316 3552 3510 3085 -438 3473 102 3248 -3248 3461 3365 5252 -2364 3653 435 531 -4178 2814 4063 4224 -3424 3282 1107 3332 -3401 16 3287 434 -3562 211 3692 3632 -3284 3074 3075 3588 -3097 405 3158 373 -3401 2913 3387 3666 -3400 3396 3987 3407 -4171 3404 4187 3287 -1124 1768 4216 3771 -3402 4147 3764 3565 -5228 3456 467 3406 -3405 3446 726 361 -656 3387 3412 3401 -2494 656 3422 434 -133 3244 722 1139 -4337 4587 4574 4636 -3313 65 3514 373 -3407 3384 3414 4212 -3373 4242 3385 3414 -656 3413 3415 3412 -3416 3414 3385 670 -3415 3372 3417 3422 -3418 3416 3070 3421 -3386 3417 3363 3462 -3578 3583 245 3573 -3618 3693 3132 3591 -3422 3417 3073 3480 -3623 3416 3408 3421 -4910 4791 4825 4898 -3508 3526 3395 3505 -4426 5254 5269 5283 -2633 736 3373 3489 -2876 3530 3540 3109 -3429 398 2633 3502 -686 3428 3499 1107 -660 3488 3431 4854 -3430 3487 3361 3432 -4395 3431 3360 3454 -642 4853 3079 4870 -659 5337 5009 5151 -4124 469 561 4832 -5214 5088 5209 5017 -4853 3373 4242 642 -4952 172 1036 5334 -561 4720 4149 4755 -5127 5218 4620 5246 -5064 5299 5037 5325 -5315 5311 4241 5302 -222 3493 3476 3470 -4953 5241 5238 5243 -3446 3494 3248 3456 -3495 3406 3445 650 -4914 4905 4918 596 -3457 2633 3389 3373 -297 4259 586 3303 -5264 280 3324 3453 -5281 3239 839 666 -5234 4940 5203 5285 -5240 3461 3450 2758 -3432 570 3242 4886 -728 3381 3508 3246 -3405 3445 5253 3370 -3448 3477 4853 727 -3459 3464 3491 2913 -3458 3589 3479 3582 -438 3492 414 3163 -3392 3376 3463 3453 -3502 3418 736 3496 -3144 3498 280 3461 -3581 3518 3458 3551 -3481 430 3509 3493 -3563 3589 3582 3625 -3475 3477 3494 3079 -3469 3471 3137 3304 -3476 3468 102 3470 -3443 414 3469 438 -3468 3200 2902 674 -3141 2902 3478 3512 -3391 2838 3482 3376 -3475 3192 2782 3495 -3467 686 3388 3474 -3443 3192 3495 3469 -686 3457 120 3467 -3246 3126 3507 3472 -3491 3459 2494 3332 -2939 3383 3421 3569 -479 6 3104 3465 -3490 3304 432 3473 -3567 3380 453 3547 -2963 3322 3136 3521 -3519 3139 3556 3369 -3050 680 3501 3375 -3488 405 3431 3158 -736 3487 3430 3489 -3388 3488 3426 4871 -3498 2541 3501 3482 -3479 3282 727 3458 -479 2876 6 3460 -3245 3465 3312 3443 -3495 222 3445 3467 -3494 3476 3474 3446 -3117 3462 405 3516 -2939 3668 3383 3611 -3463 3490 3500 3376 -3429 397 3192 3312 -3498 3501 3148 3377 -3490 3060 3500 3486 -3117 3073 3428 3462 -3382 3374 725 3202 -674 3200 3201 3163 -3424 3579 3332 818 -3507 3544 728 3093 -3478 3170 3506 3130 -710 3424 3509 3455 -3465 3508 3312 3246 -3134 3390 3511 3515 -442 3510 3124 3512 -3472 3513 2883 3511 -2902 3142 3512 3514 -565 3145 3513 3411 -3141 3316 3117 3510 -3134 3364 3496 3517 -65 3516 405 48 -3314 3527 3464 3519 -3485 3529 3518 3557 -3284 3534 3588 3380 -3542 3484 3162 3533 -487 3322 3128 3523 -3531 3322 3522 3165 -3540 256 3049 3541 -3535 3092 3539 3543 -3527 710 3314 3424 -3526 260 3282 3518 -4603 3255 4658 4977 -3288 3537 3530 3519 -3536 3427 260 3529 -3163 3533 3201 3523 -3201 3170 3136 3162 -3531 2876 3162 3521 -3520 3575 3080 3572 -3525 3537 3139 3555 -3530 256 3540 3288 -3535 3109 3288 3529 -245 3085 2334 3583 -3173 3525 3573 3545 -3536 3524 3427 3109 -3542 3524 3043 3544 -3521 3109 3541 3543 -3542 3525 3544 2901 -3543 3545 3541 3506 -3544 3539 3546 728 -256 3173 710 3545 -3483 3572 3586 3555 -3587 3369 3577 3580 -3669 545 2003 4173 -3579 3613 818 3578 -3558 3568 3464 3554 -3390 3383 3379 3571 -157 2082 29 3619 -3602 3604 3551 3069 -3547 3535 3556 3557 -3557 3485 3555 3586 -3556 3519 3568 3555 -3551 3585 3596 3581 -3628 3784 3095 3884 -3610 3574 3570 3583 -3587 3572 3080 3577 -3397 3628 135 3688 -3596 3566 3466 3626 -3661 4193 4180 3648 -16 3566 3069 3404 -3565 3563 3602 3764 -453 3483 3568 3031 -3042 3567 3557 3551 -818 3480 3073 3316 -3611 3560 2359 3571 -3085 3552 3100 3570 -3534 3092 3561 3547 -3577 3092 3419 3539 -2542 496 3560 3575 -3574 3534 3609 3709 -563 1113 3637 3809 -3548 3561 3578 3573 -3550 3612 3419 3577 -3580 3550 3582 3505 -3581 3314 3548 3579 -3464 3580 3558 3582 -3581 3466 3459 3579 -3419 3560 3538 496 -3809 3671 4191 452 -3042 3587 3601 3558 -3547 3556 3587 3042 -3586 3548 3561 3585 -3520 3398 3600 3590 -16 3459 3466 434 -3588 3607 3601 3080 -211 3380 3420 3618 -3065 2379 3659 3624 -170 3993 3808 4324 -3380 3600 3132 453 -4143 4142 4185 1140 -3602 3563 3558 3601 -2087 39 3056 3722 -4172 1963 1716 1972 -4171 4137 3670 4065 -3588 2938 3594 3601 -3590 3596 3600 3585 -3554 3566 3596 3605 -1997 4081 1703 4046 -3605 477 3031 3554 -460 3602 3604 2938 -3628 73 3177 3095 -3590 3664 3626 3608 -3607 3609 3612 3080 -3708 3575 3610 3608 -3611 3609 3560 3612 -15 3610 3570 3497 -3613 3610 3578 3608 -3625 3612 2939 3550 -382 4300 679 4275 -2814 3972 4078 4063 -3691 3632 3618 3637 -3874 3177 3690 564 -3420 3591 3031 3616 -3851 3553 3634 49 -3645 3646 3896 3784 -2354 2263 554 3674 -3774 81 4030 253 -434 3659 3422 3624 -3625 3592 3623 2939 -3466 3626 3624 3613 -3563 3607 3663 3625 -3716 3719 2359 3695 -73 3559 3606 3562 -1133 2267 3703 3700 -386 536 3071 517 -3177 1113 73 3632 -3692 3397 3616 3631 -4141 4148 3964 3671 -3649 3619 3878 3886 -4312 4786 4623 4726 -406 2108 3841 568 -3655 3616 477 3576 -3859 1917 3866 3641 -3776 3642 4182 4206 -4373 542 641 590 -500 2197 3638 3916 -3967 4058 3639 4071 -2083 3865 3905 3853 -847 474 4140 126 -73 3851 3895 3620 -1717 3620 560 3790 -3771 3959 4120 4211 -4160 3564 4379 4224 -1113 3650 3634 3851 -3649 3964 4141 3908 -3841 3933 3832 534 -3776 4126 4207 4192 -3393 557 474 126 -2367 3695 2869 3724 -3637 532 189 1963 -3750 3715 3733 3662 -22 3727 346 2077 -4507 4535 4562 4505 -3623 4122 1109 3592 -4772 4258 3340 3122 -533 3564 4160 4161 -541 3674 3656 3772 -3664 3065 4188 3626 -3074 3665 3663 3607 -329 3726 3664 3708 -4205 3681 3400 4219 -3700 554 2267 3714 -15 2379 3497 44 -386 3549 536 3783 -3325 250 3599 4184 -2305 3633 3584 4183 -3701 3677 3719 2357 -4092 2289 367 555 -3621 2344 3715 3662 -4033 556 3759 3782 -3753 2306 3696 3726 -3708 3672 3726 15 -4284 4165 4292 3978 -2336 3738 239 3699 -3685 1111 2811 2227 -250 262 3666 4126 -3882 504 3743 3760 -3892 3795 3811 520 -4532 4417 4481 4486 -1484 3680 2188 3779 -81 3778 253 2278 -3756 23 3719 3695 -3562 3883 3689 517 -3688 3690 386 3848 -3689 3617 135 331 -3616 3692 532 3693 -3632 135 3691 3397 -3691 211 381 3420 -1996 2613 2349 3711 -437 3687 3627 3654 -497 3676 478 1942 -2682 3730 333 3713 -244 2361 2303 2682 -3679 2733 1996 3711 -2733 3667 3629 244 -3745 3716 3672 3709 -3706 2303 3036 2682 -2300 3629 2282 2303 -2077 3755 2287 3705 -2087 3704 2336 3722 -552 3702 2941 558 -3746 2372 3714 2942 -3709 3677 3665 3609 -3575 3710 3708 3701 -3709 3284 329 3761 -3699 3712 3694 3285 -4066 3711 3713 3730 -3712 558 2801 3697 -437 3757 3667 3707 -3748 3674 3739 3656 -2942 2542 3627 3701 -649 1669 1514 1485 -4091 265 4086 2340 -3672 15 3627 3687 -3976 4169 4417 562 -3761 1510 191 3745 -3597 3723 3725 3705 -3722 2842 3724 3731 -3725 3723 412 3654 -3068 3722 3724 23 -3665 3676 478 3677 -1731 3732 541 3657 -536 3743 3736 3760 -2366 605 3046 497 -3731 2842 3697 3712 -2733 3723 244 3730 -3727 3791 3750 3754 -3735 3656 3740 1405 -3750 3754 2306 3749 -498 3812 3750 3733 -454 3281 420 3728 -3807 2186 3738 2354 -3737 2362 4022 3679 -3740 2343 3715 3746 -448 3739 3733 1510 -269 2870 4067 4098 -4094 1953 4113 4086 -3682 3889 3728 3769 -544 3834 3801 3955 -3746 3701 2357 3721 -3739 3707 3748 3745 -3865 3843 3867 3858 -3749 3715 3757 3746 -2357 3734 3756 3748 -3735 3732 3734 3656 -2333 37 3912 32 -2284 1955 1124 4076 -454 191 420 3676 -3734 605 3732 497 -3756 605 23 3704 -3749 3755 3687 3757 -3756 554 3714 3748 -113 476 3956 3982 -3879 3675 2305 545 -517 3682 3728 3761 -3760 3721 454 3710 -847 1997 2289 555 -2099 1453 4044 567 -3566 1972 3404 4188 -3793 4118 3812 3791 -651 92 4537 4512 -568 595 2191 578 -3967 4178 3325 4184 -3770 3743 3888 559 -420 3769 4089 3813 -3403 4217 3647 4155 -3662 3810 2320 3773 -1405 3774 3772 2319 -2228 3622 4031 3773 -3984 3995 1112 3981 -3652 3639 3325 4190 -3878 29 2356 3945 -3821 3686 2278 3792 -578 3685 2197 500 -3781 3882 422 3889 -3848 3876 3783 3780 -3887 3675 545 4079 -3781 545 3669 3889 -3620 3869 3896 3559 -4032 2261 2072 2416 -486 2346 3787 2277 -3793 3786 2228 3812 -17 592 1980 3816 -3904 58 2083 3902 -3881 1980 601 3646 -1731 3765 3732 3954 -2416 2072 3778 326 -3985 3798 3787 3765 -4178 4298 3967 4447 -3683 233 3798 2346 -1126 542 4008 4195 -3836 553 4043 3988 -520 3938 3793 3795 -1979 2346 3890 486 -574 2383 4127 4344 -3827 3824 3996 3744 -3835 3911 4030 3998 -3178 871 4121 4543 -3811 3943 3824 3837 -3806 3989 1989 3810 -2086 3807 4082 3805 -3737 4083 3806 346 -1916 4265 1665 3593 -3584 3964 3576 4192 -541 4005 3805 3772 -3804 3683 3899 4037 -3765 3813 3787 3735 -559 3770 498 3812 -3835 81 3815 3821 -2275 3823 3814 3819 -3788 3862 601 3906 -2108 3849 3893 3981 -519 3847 281 3919 -3815 3822 3820 1111 -3840 3819 1111 3821 -3834 3814 3820 3778 -2811 425 3823 3819 -3822 233 2346 3815 -3804 3801 233 3994 -4009 4000 1697 4027 -519 281 4026 4035 -3801 3835 3911 233 -3997 4006 4028 1664 -4004 2107 3932 3996 -4006 612 4008 542 -572 4467 4459 4199 -3877 3862 3651 3875 -3936 3960 531 482 -3744 3835 3821 2198 -3827 3802 3814 3834 -3797 1225 3924 1733 -3804 3838 3994 4038 -1112 3995 3837 281 -4584 1689 1572 4111 -3955 3820 425 1484 -3862 3636 3651 3885 -500 2227 422 3882 -3905 3885 3906 3747 -3921 597 3852 3963 -1717 284 560 3870 -3902 3853 3901 3900 -2108 3995 3818 595 -3689 3872 3781 3883 -639 3817 577 3931 -3857 1917 534 3858 -3645 3649 3619 3881 -3881 3908 3947 3844 -3846 3643 284 3870 -1734 3914 3909 3944 -3868 500 3859 3884 -601 3906 3864 560 -3850 2197 2191 3919 -3747 3885 3850 2191 -3855 3861 3860 3638 -3872 3873 3859 3884 -3859 3867 2082 1917 -592 3841 3832 3816 -3991 507 3924 4016 -3856 3867 2082 3897 -3643 578 3747 3868 -3638 2274 3876 3916 -3864 3747 3861 3868 -3869 3865 3867 3855 -3870 3868 3897 3784 -1717 3853 3845 3869 -3992 604 3944 4021 -3848 3874 3876 3860 -3874 3095 49 3860 -3617 3873 3886 3872 -3832 157 29 3947 -3866 3781 3879 3872 -3913 3921 3832 3947 -3634 3777 4141 3880 -2274 3759 3880 3876 -3886 3879 3878 2305 -3851 3852 157 3790 -3842 3682 3780 3883 -3688 3884 3848 3882 -3883 3559 3860 3855 -3843 568 3841 3858 -3634 3874 3880 564 -3888 3892 3782 27 -3889 3890 3887 3769 -3783 3780 3888 3743 -3891 3892 3888 3799 -422 3915 3890 1979 -3887 3890 4037 3683 -3913 3817 3970 3933 -562 4484 3976 4167 -3645 3896 49 3095 -3620 3784 3897 3895 -560 3864 3896 3869 -1791 3940 3912 46 -3944 3943 3914 3811 -3846 638 3901 3902 -3902 3846 2260 3900 -3901 3900 3789 3846 -3904 284 3905 3906 -3789 2260 3903 17 -3643 2083 3903 3843 -3816 3903 3843 3856 -4294 4334 4335 4318 -3650 2168 521 3852 -4058 3854 3330 4145 -612 3997 4004 544 -2107 3938 3827 3802 -3914 3898 3751 3932 -167 639 3893 3877 -3854 3912 37 3899 -3916 3917 4036 3891 -3641 3915 3866 422 -3915 3918 4038 85 -3917 2197 3919 2188 -3818 3857 595 3918 -555 1707 535 474 -639 591 3877 3844 -4458 729 4457 4490 -3979 4002 4445 3941 -3836 3863 553 4015 -3984 270 3999 190 -2168 4202 4106 603 -209 4379 4496 4446 -4370 4253 4264 4140 -3939 101 113 4302 -3977 3951 729 637 -3962 3939 3849 3963 -46 3829 3912 270 -2108 519 3893 3651 -4253 535 4123 474 -4492 4175 4453 4292 -4155 3833 2366 2797 -4138 4230 1665 4052 -32 3798 3911 3985 -3929 476 3931 4374 -1798 50 3898 3941 -3940 3923 168 38 -3957 4039 4040 3999 -190 270 3899 3804 -3871 3899 3854 4023 -4035 2274 3777 3946 -534 3945 29 1917 -3877 3852 3875 521 -3053 39 4099 4067 -502 3983 3969 3979 -4448 439 711 4480 -3957 615 476 3930 -113 3956 4459 4199 -2289 3275 4081 2548 -3179 4118 3791 4020 -3995 3744 3994 3840 -3952 3957 4040 3758 -3956 3977 3942 3951 -4313 4052 4384 668 -4177 3987 3647 4212 -3833 4217 126 695 -4085 527 4472 4387 -101 3931 639 3963 -3962 3931 3844 337 -3650 3809 3633 3966 -4455 66 4071 4200 -4153 4203 3964 4207 -3794 1955 3768 3642 -4236 3286 4476 4164 -4465 641 4214 3949 -167 3893 3982 4026 -4085 3974 2017 4274 -3615 4251 251 4161 -4923 4863 4834 4786 -4449 4107 3971 4582 -4257 107 4176 4156 -3894 4056 4295 3720 -4464 3930 4297 3957 -4485 4456 3678 4452 -46 4003 3949 3923 -1479 4500 4237 1721 -3775 3817 3982 476 -3970 3981 3758 342 -641 612 3949 615 -544 3775 3925 615 -3990 3793 3938 4031 -1703 1995 4009 404 -4205 3287 3959 3401 -4246 3797 4044 4007 -4009 4000 3805 4005 -1731 3985 404 4005 -2021 3863 1138 2044 -66 4040 3871 4200 -3593 47 4128 630 -3837 3955 3824 425 -3775 3955 3838 3847 -544 3829 270 3801 -2198 3910 183 3828 -2198 183 3802 4032 -615 502 3942 3925 -3825 3989 4032 2261 -4642 1400 4579 4660 -4008 4003 566 3923 -612 4004 4002 3979 -3910 268 4003 3829 -3990 3989 3810 4031 -4007 3828 4029 3830 -1730 4006 3988 4117 -3796 3830 2099 4002 -582 3986 3825 3989 -1697 566 268 1995 -574 4176 2090 4359 -4591 4625 4565 4353 -1628 4073 503 4049 -4015 1695 4232 2101 -4016 3924 4014 2113 -1658 3863 4017 4015 -2115 4016 4018 2102 -4017 170 2044 2061 -4125 159 4980 4157 -2797 3954 497 1942 -2350 3871 4023 4024 -239 3738 2038 4088 -4021 3944 556 4033 -2046 4026 4021 4035 -4412 4433 4049 503 -3970 3826 342 4024 -2018 3825 4028 2065 -4029 1697 3828 4027 -2099 4044 4028 4006 -3802 4031 3622 4032 -3985 4030 4005 3774 -3998 4000 4030 3785 -4023 3675 4034 4037 -4035 4033 2274 4036 -3945 3826 4024 4034 -3915 4037 4038 4034 -4036 3892 3811 4033 -4036 281 3837 3917 -3942 4466 4053 502 -3956 3942 3992 604 -4068 4090 490 3237 -555 419 2038 1707 -4080 3797 2018 4044 -3763 3988 4043 4029 -34 551 1981 4132 -3603 1453 75 569 -4305 503 4115 4389 -4262 4249 4339 668 -4415 4013 4025 3318 -4553 4375 4627 4540 -562 4226 4437 4342 -4442 4413 3937 3958 -4179 1791 66 4039 -4160 4488 4061 2033 -4459 4302 4468 4460 -2548 548 3976 4318 -4073 1628 4117 1695 -3642 1955 3909 1734 -4300 382 4070 4133 -3190 446 850 679 -4063 4054 4198 4298 -4197 4139 1768 4076 -4061 3394 3615 4160 -78 4276 542 4117 -4136 4154 3599 88 -4098 3285 3712 4067 -3948 3741 3064 4066 -4332 4113 4041 4133 -4316 2383 4228 4332 -68 4059 3101 4132 -4462 3642 4206 3965 -4264 4140 4235 3286 -304 4013 4115 4057 -50 4075 4139 4076 -3274 4074 694 2333 -4062 4074 3752 3336 -4291 4194 4175 4165 -3615 251 1768 4197 -3782 4144 4142 27 -3275 4043 26 4081 -3953 4080 3603 1453 -599 4083 582 3806 -419 3807 4082 2038 -4175 529 4453 1183 -4443 4376 3961 3971 -3718 3742 4090 45 -367 2038 57 4088 -34 4022 4087 2342 -3770 27 1140 4118 -4091 4086 4041 1987 -3718 4090 3010 41 -4134 3673 68 4371 -2304 2289 4167 2548 -2068 3742 4130 4095 -461 1567 4094 265 -1686 4138 1665 576 -4333 1705 4367 4270 -2013 2345 4066 3741 -3101 3948 669 551 -1701 4269 4138 4411 -4257 4340 4617 4357 -415 4290 109 2381 -4278 4911 4945 4234 -4949 4349 1808 4700 -4943 4973 4317 4233 -3926 167 2046 521 -4389 4115 3974 4420 -4360 4376 529 1183 -629 1402 4463 182 -4263 4969 4826 4962 -3839 196 176 1513 -596 613 4894 4914 -4331 4130 3742 4068 -1505 109 4976 4347 -4047 4073 78 4107 -228 2117 3272 537 -4064 4246 4007 4057 -4119 4089 3765 3954 -520 27 4118 2307 -4122 3647 1109 4155 -488 3803 4555 4507 -3287 4120 3659 4187 -4283 3934 13 1706 -4254 1792 3435 489 -4228 228 4958 4019 -3325 3681 4223 3652 -4272 3800 4267 1505 -4281 3993 4330 4129 -4128 47 4130 4134 -4113 4129 4094 4131 -4132 4134 4130 34 -4131 4045 4133 4070 -4068 4132 3237 4059 -4092 367 4129 4131 -4703 4643 4718 4723 -4144 4065 4137 4142 -4146 4190 3599 4136 -4096 4100 3937 4260 -4074 695 508 4062 -3928 3644 4072 4168 -3878 2356 3650 3633 -4173 4079 4136 3595 -3281 3595 4173 4189 -4136 3330 4079 4145 -4182 3909 4144 556 -4191 4137 4172 1716 -4171 262 4172 3404 -3633 2350 4153 4183 -3439 1706 2806 1673 -4251 252 4161 4193 -4154 2797 4155 88 -1705 68 593 4371 -3966 4206 4148 4201 -2284 4151 1124 4065 -3771 3936 4120 4151 -3975 184 2381 62 -4316 4019 4328 4275 -4717 4784 4527 1794 -3300 4966 4849 3338 -4054 3648 4063 3661 -4236 3661 3972 4150 -5088 3083 879 4942 -1099 4664 4901 3356 -540 499 3968 3054 -4480 4222 4077 3678 -4678 4366 4247 1503 -4093 4168 4229 3894 -4167 847 4140 4484 -3720 4358 4170 4406 -4417 4169 585 608 -250 4147 3599 3402 -4147 3086 4146 3598 -4143 4142 3549 1716 -4177 2341 2814 4219 -587 4084 3935 4077 -255 576 4011 3975 -3959 4174 4216 4205 -3768 3394 3794 4223 -711 439 4053 4466 -4252 3564 4309 4238 -522 4439 1798 439 -4190 3639 4145 4183 -3671 4148 4182 556 -3768 4216 3670 1124 -3595 88 4186 1942 -4187 3065 4188 4185 -3402 88 4122 4186 -4189 4186 3764 3663 -3076 4143 1972 4188 -4191 3776 4137 4182 -4192 4190 4146 3584 -4191 3652 3809 3086 -4150 4244 3564 4220 -4077 4474 4218 4222 -3796 4373 4445 616 -4407 4632 4796 5040 -4198 4062 4478 4078 -522 4197 4479 4061 -3831 4200 4202 3952 -3965 3992 4201 4199 -4153 4200 2350 4202 -4203 4199 4201 3926 -4202 2168 3966 4467 -4547 675 4591 4564 -3666 250 4177 3987 -4207 4071 3639 4153 -4206 4336 3966 3652 -1674 4285 4319 4365 -4210 126 4217 4235 -4211 1673 4209 2183 -4210 4212 3647 670 -4213 3959 4211 3412 -4212 3384 1712 2341 -3969 4373 587 4445 -4838 3345 1792 4842 -4177 2814 3403 4184 -4209 3960 3771 1768 -4194 4486 1183 606 -4174 3666 4220 4224 -2341 4219 589 4193 -4240 3079 4871 3388 -1379 4194 4165 1784 -4178 4126 4224 4446 -3394 4223 4219 3648 -4639 4290 109 155 -4051 4406 4377 4249 -4372 4391 1482 4493 -4125 4069 1347 490 -2304 4370 4342 4167 -4324 4415 4413 3937 -3337 4395 3239 4854 -4014 1628 1733 4416 -4694 955 4105 5034 -4103 3328 596 4924 -2183 4072 4209 251 -540 533 3968 4161 -4405 594 3980 4511 -4303 4180 4543 4299 -882 5302 5265 5311 -467 3370 4836 4221 -3442 5247 5276 5301 -3234 87 3437 3413 -1036 4835 5106 5158 -252 4766 4193 3371 -4780 488 4555 4508 -4294 4117 3988 4335 -1674 4166 4290 4429 -1783 4498 4578 4520 -4342 4048 4226 4368 -4951 1099 155 4976 -1712 3972 2341 4150 -533 4180 4514 4271 -593 3934 4283 3928 -446 4720 4124 297 -4439 4474 4479 4441 -4285 1674 4623 4922 -3975 4101 62 4345 -1711 3339 3660 3116 -4280 3449 4858 4751 -4138 4411 4629 4341 -194 255 4272 4345 -247 4048 4279 4413 -4825 4287 4910 4110 -4851 3928 4072 499 -2090 3808 2000 4330 -3317 4978 4882 1960 -4282 4127 4983 4315 -4992 4943 4982 1085 -1702 3318 4415 4100 -1943 4281 4330 4097 -4252 4530 4390 4303 -4315 4261 4127 4346 -4377 4406 4361 4421 -527 609 3971 4503 -3614 4157 3084 159 -4335 4064 1126 2116 -613 464 5286 4894 -4728 4103 3323 4684 -630 4307 4339 4262 -4364 3273 4259 4569 -4270 4339 4128 4371 -1137 1347 4881 4267 -4123 4720 446 4253 -4473 4480 3678 4496 -4569 4208 4773 4256 -4797 5202 4908 4894 -4928 602 4969 4263 -3196 5320 782 5112 -4444 4417 4360 4486 -182 4247 4102 4225 -4077 4439 439 587 -4452 3678 4436 3935 -572 4336 4495 4467 -1733 1628 4246 3907 -4440 548 4444 3976 -1782 4533 4502 4387 -3977 4450 4470 4466 -4061 4448 522 3794 -3167 4379 4238 4469 -4059 1705 3614 4333 -4938 5093 659 3254 -3929 4374 115 4055 -4271 4531 3167 4238 -5126 5110 5059 5067 -4334 4047 2116 585 -4627 1515 4590 4540 -4404 2548 4279 4318 -3357 4903 1039 3116 -4514 4766 871 4180 -4727 1402 4579 4742 -4321 4735 4606 4771 -4773 4787 3635 4725 -3958 4463 629 4442 -997 4674 4691 4706 -824 4272 4267 4317 -4157 1785 4069 4333 -229 4315 4105 4694 -4307 3907 4056 4358 -4463 4640 4368 4208 -3255 4713 5101 5071 -4311 4738 4777 4778 -293 4814 4634 4693 -107 4329 4340 1693 -3593 630 4230 4416 -4767 4682 4803 4735 -5167 5262 5088 5214 -914 134 5028 5096 -1785 4157 4901 4664 -4341 1688 1457 4323 -4270 4128 4265 4331 -4332 4330 2000 4113 -4333 4331 4069 4068 -4316 4097 4332 4300 -4358 503 3907 4305 -4246 4276 567 3907 -4462 4207 4446 4293 -1102 1509 4589 3410 -4618 1492 1447 4354 -4048 4279 4281 2304 -4323 4616 4101 1476 -107 4260 4402 4329 -4229 4249 4051 4369 -62 4656 109 4347 -415 3800 1505 1785 -4261 4257 4346 4357 -4272 4347 4695 4345 -4114 4343 4622 4346 -4704 4679 4609 1377 -4356 849 880 4104 -4939 1006 804 5076 -1329 3228 5035 611 -4696 4686 1450 4357 -3057 4012 4771 4400 -1549 4338 4628 1489 -4407 4718 4745 4632 -4658 1062 4349 4949 -4345 4101 4352 1443 -4169 247 4318 4334 -415 2381 4011 4384 -616 1727 4108 4289 -4497 4273 608 1440 -1705 593 950 4363 -2974 4364 4366 4362 -4363 4280 4365 4369 -4364 4208 4366 4368 -4363 4365 4166 4367 -1943 1503 4366 4097 -4365 668 4249 4319 -4364 4370 3273 4342 -593 3928 4369 4229 -4281 4092 4152 2304 -4491 1721 1482 4227 -4195 3640 4214 529 -4302 3939 115 729 -4382 4423 4631 4050 -1727 2017 4108 4085 -4226 4273 4758 4640 -4545 4758 4437 4392 -2033 3648 4299 3927 -4576 1627 4570 4575 -4436 4473 4494 4470 -4394 4375 4553 4424 -4418 610 4414 4601 -4359 3958 2090 1943 -4649 4604 4673 4550 -4537 594 92 609 -4443 1783 3961 4296 -204 4827 4713 5071 -4397 4047 4107 4434 -533 4271 492 4488 -1721 4485 4511 4227 -4760 1316 4378 4529 -292 980 4407 661 -4738 4382 4606 4662 -4231 1114 4886 3432 -1669 1469 1676 1512 -4398 4389 4449 459 -608 585 4443 4397 -4637 1541 4625 4626 -523 4626 4353 4424 -4540 1514 4593 1485 -4630 4341 184 4629 -640 4590 4431 4510 -630 1225 4307 1733 -4517 4537 4237 622 -4169 247 4273 4226 -4785 4393 4196 4355 -4414 1464 4601 1512 -4432 1572 3318 176 -79 2027 3178 488 -4260 1689 4100 1572 -4422 4413 247 4025 -4412 4052 4262 4230 -1669 649 4383 4408 -4416 4049 4230 4269 -2101 4232 4324 4415 -3720 4170 4289 3684 -1495 4600 1481 4383 -1535 4583 4420 4461 -4435 176 4107 4419 -4642 4422 4273 1440 -4421 4659 4412 4433 -4430 4661 4375 1485 -4382 4400 4606 4430 -4776 4763 4777 4767 -5129 5109 3425 5119 -1457 1460 4592 4616 -635 1620 4580 4636 -4947 4728 4247 4678 -4423 1676 4424 4612 -4638 1572 4432 4403 -4431 4409 4433 4435 -4434 4025 4432 4422 -4389 4433 4435 459 -1535 4432 4434 4420 -4491 4292 4381 4492 -3054 4051 4438 4378 -4437 562 4476 4481 -168 4291 4181 4255 -569 4295 4441 4483 -4440 4444 168 4255 -4313 4629 4052 4659 -4398 4085 4387 4449 -4441 4295 616 4289 -4214 4195 168 3923 -4447 4336 4223 3927 -4446 3794 4462 4448 -4447 4298 3950 209 -4397 3974 4443 4573 -637 4465 4492 4297 -4453 600 4503 4500 -4292 4500 1721 3978 -3935 4084 4504 4451 -4577 4538 4570 4571 -4462 711 3965 572 -4469 1784 3978 4515 -4458 4468 4493 3922 -4494 4457 3922 4460 -3952 4055 3831 4464 -4055 729 4458 4464 -94 4582 4475 4419 -4336 4447 4071 4455 -4313 4536 4319 4109 -4459 4460 4470 3977 -4450 3969 587 4466 -4297 4465 4179 4039 -3831 4203 4293 4468 -4055 4467 4457 115 -4456 4485 4299 4499 -4297 4381 4464 4471 -4473 711 572 4470 -1183 3961 600 606 -4471 4284 4381 4495 -4194 4255 4486 4487 -3335 4570 1541 4461 -3968 4438 4477 492 -4476 4478 4484 3286 -4479 4197 4483 4477 -4255 4198 4478 4487 -3950 209 4165 4284 -4438 492 4529 3684 -182 1402 4605 981 -4478 508 4440 4484 -4477 4483 3894 4168 -3978 4496 4469 4391 -4474 4289 4218 3684 -492 4474 4479 4488 -4390 1379 4487 4054 -4492 637 4490 4504 -4491 3922 1482 4489 -4490 4372 4494 4436 -4450 3935 4489 4436 -4494 4457 4495 4227 -4491 4493 4458 4381 -4473 4293 4496 4493 -4284 4495 3927 4485 -4522 4361 1316 4533 -69 4248 4518 4546 -4516 4544 622 4469 -4451 4521 3980 4452 -4577 4513 4546 4556 -573 4296 4532 606 -4451 1479 4274 4504 -4453 4489 4503 590 -488 2027 3658 4563 -4542 1782 69 2027 -3658 4519 4121 4561 -4245 4564 654 4781 -4813 4634 4974 293 -4587 635 4403 1535 -4237 594 4391 622 -3766 4534 92 622 -4501 4538 651 655 -4701 4252 4309 4526 -4516 4521 538 4456 -4523 4517 4515 4499 -4516 4518 4521 4405 -4498 4520 4517 4537 -4535 4544 4507 4534 -527 4518 4248 609 -4515 4517 600 4500 -4497 4525 571 543 -4542 69 4516 4544 -649 1460 4613 1495 -4522 546 1335 1381 -4541 4760 4514 4761 -1068 4158 4786 4834 -4843 4799 4554 3030 -4530 4392 4481 4532 -4760 4531 4529 4271 -4530 530 573 4303 -4529 4533 3684 4502 -4497 608 4532 4296 -651 4519 655 4512 -4519 69 4546 3658 -4463 4642 4640 4579 -3766 4386 4518 4405 -4513 92 655 4454 -4573 4572 2091 94 -4306 4401 1620 4050 -4545 4526 4701 4775 -573 4506 4523 530 -530 3803 4544 4238 -4523 4543 4519 4499 -3054 4378 4541 4774 -4498 651 4535 4501 -1335 4204 4567 4563 -4670 1383 4669 4663 -184 4630 4741 4654 -2922 4647 4385 4674 -4658 5071 1386 1062 -981 4740 4730 4732 -4050 4607 4382 523 -4846 4528 4805 185 -4245 4749 654 4121 -4576 653 4501 4562 -4626 1620 523 4636 -4591 4574 1627 4625 -1408 1638 1495 4600 -4593 624 4580 4581 -4562 653 4507 4565 -4563 3658 4561 4556 -4564 4505 4562 4547 -4508 4563 4565 4204 -4564 4012 4561 654 -1783 4572 4573 4578 -4576 4547 4572 1627 -4679 4703 1022 4721 -4280 4285 4774 4751 -4380 4454 4575 4475 -4578 609 4454 4582 -4566 1335 4539 4567 -4449 4566 4539 4582 -4558 3410 3335 4637 -4380 653 4625 4570 -4556 4567 4577 4380 -4501 4576 4578 4454 -4248 4577 4566 4571 -4734 4536 4001 4310 -4428 4560 4583 1541 -4593 4560 4626 1676 -4573 3974 4571 4461 -635 4580 1513 4419 -3839 4590 1515 1513 -1514 1515 90 4613 -4630 4592 1457 4627 -4588 3410 1509 4510 -2091 94 4587 1535 -675 4337 4591 3057 -4306 4584 4403 635 -4204 4589 4558 4012 -4586 4653 4427 4631 -1620 4401 4560 4581 -4610 4595 1464 1493 -4596 1494 4594 4598 -4595 4597 4601 198 -4598 1678 4600 4596 -4597 1151 4595 4599 -1408 4598 4614 1384 -4559 156 4418 4597 -4596 4383 4408 275 -163 1549 4618 4644 -1063 4667 4866 3528 -4385 1377 5029 4710 -4482 4726 4623 4764 -4394 4645 4424 4311 -4553 4633 4743 1102 -781 4729 893 3343 -4348 5035 1011 4707 -4611 4594 4663 4614 -4621 1464 4610 1675 -4621 4430 1448 1371 -4524 1376 4585 1358 -4615 4610 4666 4599 -4616 1460 4614 1408 -4340 4427 4617 4615 -4101 4657 4685 4616 -4602 4338 1493 4665 -2974 4684 3103 4678 -5255 4953 3440 5270 -1383 4612 4611 4661 -1034 3009 4347 4695 -4256 4605 3635 4921 -1377 4669 4679 4709 -4558 4575 4012 4399 -4557 4399 4400 4581 -4635 4050 4586 4306 -4649 4354 4710 4652 -4402 4260 4442 4638 -4402 4549 4586 4635 -1413 4661 4592 4375 -4355 4723 4735 4196 -4635 4742 4607 4660 -4509 4322 4768 4925 -4630 4633 4627 640 -4557 4428 3410 4637 -4399 4636 4574 1541 -640 4629 4659 4431 -1027 4225 981 4732 -4536 4377 4319 4759 -5073 5062 5069 4880 -4421 4001 4536 4659 -913 4645 4662 4135 -4673 4665 4602 4688 -4643 1448 4606 4723 -4831 1075 4987 5025 -4550 849 1329 4681 -3292 3346 4988 4797 -2922 4628 1549 4385 -575 588 4652 2922 -4915 4984 3251 5057 -4650 4628 1012 162 -4654 4592 1413 4657 -4655 4549 4740 4653 -62 4654 4656 4657 -4343 1032 4655 4732 -4655 4653 4689 4617 -4866 4551 4356 3528 -4642 4638 4442 4422 -640 4001 4633 1509 -4621 1675 4631 4423 -4739 4394 4643 1413 -4548 4610 4665 4666 -4678 3103 4328 4163 -4669 4663 4618 4644 -4685 4614 4663 4687 -972 5104 5032 4603 -5290 4830 5227 5267 -4624 4548 1447 4665 -913 4548 1067 4689 -79 3178 4760 4761 -5025 4988 3346 4971 -4385 1377 4644 4691 -951 4550 4314 4681 -1329 849 5020 1728 -1022 4792 4825 4692 -4693 5093 4814 5069 -4166 4619 4664 4429 -4348 1067 4568 4624 -4705 919 4686 4696 -5041 4647 4700 4674 -4717 4754 1794 4325 -4804 4729 965 1018 -4619 4278 4858 4911 -4686 4617 4689 4666 -4352 4685 4680 4687 -4686 4666 4688 1670 -4691 4687 4644 1631 -4670 4657 4685 938 -5026 5110 4954 5126 -4314 4673 4688 4705 -4676 4785 602 5040 -4322 4968 5070 4677 -4695 4233 4317 4697 -4346 4622 4694 4696 -4352 4680 4695 4697 -4696 4698 4694 1793 -4706 5049 4697 1802 -4988 5314 1075 143 -5042 4104 1807 4681 -540 4514 4765 4541 -4771 4778 4757 3057 -1067 4135 1024 4568 -4705 4707 4348 919 -4691 4704 4680 4706 -4314 5050 4705 4698 -4704 5051 4609 4898 -921 4731 4792 4791 -4624 1447 4721 4710 -4604 4709 5030 4628 -5104 5032 4736 441 -4772 1093 4978 480 -5024 4388 5012 4320 -4839 87 705 3234 -4937 3255 5076 4977 -5019 5006 5042 4737 -1068 4682 4756 4158 -1024 4730 4355 4135 -5034 4768 5052 955 -4254 4283 3439 4851 -4568 4723 5039 4709 -4959 684 4882 4978 -4135 4645 4632 4721 -4969 3030 4807 3213 -4734 4752 4759 4312 -4727 3635 4605 4776 -4310 4734 4726 4779 -4429 3251 4922 4278 -1019 4608 4683 5111 -4552 4739 4745 4718 -4708 4732 1024 1032 -4731 4639 4552 4656 -3323 4852 4924 4899 -4579 954 4725 4727 -4777 4325 4632 4311 -5101 5072 5107 4711 -4716 5043 5081 293 -4321 4739 4743 4394 -4730 4740 4738 4662 -4552 4741 4739 4654 -1402 4549 4742 4740 -4310 4741 4633 4743 -4778 4742 4607 4738 -4816 4913 5254 3327 -4730 4763 4355 4777 -5138 5141 1018 5132 -4843 4808 4801 4811 -445 4833 4803 4767 -4784 1794 4555 4793 -5267 5227 5276 4857 -3323 4852 4569 4259 -954 543 4725 4753 -4752 79 4795 4780 -4756 654 4682 4771 -4839 4851 3439 2183 -4757 4717 4754 4781 -4702 4779 4756 4782 -4759 4377 4378 1316 -4640 4725 4758 4773 -4392 4671 4530 4526 -4671 4794 871 4526 -185 4770 644 5131 -4745 4425 4764 661 -981 4763 4605 4845 -4701 431 4860 4766 -4765 4244 4859 4309 -4425 4748 4325 1068 -4719 4634 5053 2524 -4811 4829 4789 4808 -5058 4762 3235 4884 -4702 4754 4311 4353 -1644 4712 4979 3660 -4774 4759 4312 4285 -4545 4773 4775 4569 -4774 4788 4541 4861 -4726 4425 4779 1068 -4321 4745 4735 4425 -4321 4743 4779 4702 -4778 4727 4776 4757 -4781 4245 4753 4784 -4782 4780 4756 4508 -4757 954 4781 675 -5103 5107 5027 4936 -4158 4780 4795 4749 -4792 4407 292 4692 -3635 4787 3973 4527 -4312 4788 4786 4795 -4787 4862 4794 4775 -4769 652 4799 4802 -4916 5115 5141 5027 -4987 4708 3423 4902 -4676 1024 4708 4785 -4794 4865 4749 871 -4795 4793 4761 4788 -4787 4794 4784 4753 -980 4803 4799 4196 -4648 4963 4286 4945 -5004 5173 138 5174 -4808 4796 4789 4528 -5203 4816 464 5286 -5055 4747 4823 292 -4829 4869 4789 4806 -4748 4325 4806 4796 -98 1019 4683 4936 -4847 652 4857 4554 -4833 4803 4855 4802 -3235 185 5328 4724 -4747 4799 980 4769 -5069 5062 5210 5206 -4962 1002 4826 3228 -1074 4879 4769 4747 -5222 5344 4835 5106 -5034 4509 4946 5048 -5008 5006 4677 4322 -4822 3315 5298 5320 -4744 666 4800 5204 -5108 5222 5059 4819 -5138 5090 5132 5148 -5063 5278 5345 4817 -5103 5027 5126 334 -4831 1075 4828 4928 -5314 4815 4828 5317 -4928 4843 602 4801 -5085 279 2791 3216 -1011 4676 3423 4263 -4880 4110 4810 5073 -5325 5307 4388 5332 -5298 4822 4884 4821 -4920 956 4802 4769 -59 4878 5279 4668 -4821 4646 4910 4872 -489 4854 3435 660 -4748 956 4806 4834 -4833 3973 4855 4527 -4243 5335 4812 1030 -666 4240 3239 4887 -850 3300 4912 4970 -3328 4215 4849 5121 -4714 4755 1712 3240 -2788 4889 4948 2382 -4948 928 2821 4927 -4215 550 469 4848 -4823 4528 4747 4846 -5218 5241 4953 5089 -4915 661 5057 4764 -4554 5131 4847 4843 -4846 5316 4805 1074 -4870 4906 4842 5281 -1792 4911 4838 4159 -4893 5259 5192 5291 -586 4720 4755 4264 -4751 4856 4733 4861 -3437 3457 3433 665 -4832 4231 4907 3430 -4834 4806 1794 4864 -4852 3303 4875 4860 -1442 4750 607 4805 -2974 4259 297 4684 -4860 4865 4766 4874 -4861 4856 4859 4765 -4852 4860 4862 4775 -4863 4861 4865 4788 -3973 4899 4864 4862 -4863 4865 1364 4855 -4862 4793 4859 4864 -4603 4919 4891 4658 -5142 3210 4990 5181 -4961 5088 4942 5212 -4905 4802 1364 4964 -4848 5287 2687 3433 -642 3489 4907 4221 -5061 4831 4909 4956 -5300 5089 4900 5296 -4875 4877 4859 2687 -4856 4876 4874 3345 -4875 4924 4877 3328 -4876 1364 4874 5139 -4894 4908 4830 5290 -143 4892 4811 4918 -4826 4935 4641 5064 -4889 4282 4958 4983 -4722 928 4948 4266 -5006 5077 5094 5019 -4828 5131 4770 4928 -3256 5284 5192 5246 -4395 4887 3454 5235 -4836 4950 467 4886 -5246 5218 5300 3256 -2786 4881 4959 4840 -5010 3122 480 3082 -4866 215 1271 880 -5279 59 1074 4879 -5237 4850 879 3083 -4112 4277 4286 4878 -4924 1364 4905 4899 -1505 4982 4976 4901 -3257 5018 1021 5221 -4902 4707 3423 5052 -4733 4863 4895 4923 -5205 5232 4873 5293 -4896 4981 4163 4328 -1034 4898 4791 3009 -5220 4933 5231 4308 -4961 5293 4994 172 -3447 4869 4920 4895 -642 4907 469 4848 -4906 4871 4854 3239 -4286 5178 5313 4878 -5073 4910 5053 4872 -4263 3423 4909 4831 -4684 4103 4849 4966 -4837 4960 3362 3340 -666 3370 4744 5287 -4112 4964 59 3447 -4651 4917 4845 4921 -5132 334 5115 4790 -4915 4920 956 4923 -4879 3447 4920 4984 -4866 5032 215 1386 -4918 4905 4829 4917 -4922 4923 4915 4623 -4728 4921 4256 3323 -4921 4899 4917 3973 -4234 4876 4895 4733 -5193 4929 2524 4634 -5015 4974 4993 4929 -5015 4841 2822 4999 -4884 4823 4287 4821 -4926 4934 4925 4991 -5342 5122 5011 267 -1095 5124 5110 5136 -611 3228 5008 5006 -4971 1711 4957 4903 -5084 5191 5193 4929 -468 5058 3235 4880 -4804 4783 996 441 -4715 4965 688 5024 -4301 5070 25 4941 -893 4350 5007 5014 -5258 3452 5280 4967 -659 4938 5075 5140 -4868 4162 5292 782 -2382 4105 4983 4268 -5310 5336 5124 5304 -3292 4103 4797 596 -4974 1571 4973 4813 -155 3251 4429 1099 -4840 4882 4841 4993 -4356 5019 4104 5021 -4887 5204 5224 5235 -4987 5025 4250 4975 -5140 5208 3438 5333 -5251 4844 4620 3444 -5054 4690 5185 5152 -4956 5017 5209 5061 -4872 4972 2524 4955 -3317 4992 4985 4933 -4881 4125 4959 4980 -4889 4958 685 4722 -4912 1114 3359 494 -1739 4868 4904 5208 -944 3213 4110 4810 -3339 4797 4966 5202 -4914 5146 5233 4869 -4937 5083 809 3254 -3 4963 4911 4159 -4940 5234 1114 494 -4693 5193 5194 5210 -3235 4287 4724 4110 -3084 3 4837 3340 -4972 4672 4933 5220 -4956 5025 285 4971 -2382 2012 4105 4946 -1023 4946 4926 4509 -4976 4951 1085 3009 -4114 4250 4896 4975 -3528 4715 5021 1100 -4979 4722 4266 4712 -4980 4978 4985 4772 -4958 4981 4019 4979 -4982 4985 4901 4980 -4983 4268 4896 4981 -4881 4943 4267 4982 -3292 143 4651 4918 -4957 4981 4979 1711 -1728 5020 1128 1386 -4791 4646 921 4951 -4699 4672 5313 4648 -5152 5099 5078 5185 -436 4867 683 4997 -4993 4929 4992 3317 -4991 4268 4957 285 -4926 2382 4948 4991 -1739 5239 5170 4904 -5004 5173 5003 1108 -5003 5189 5046 5092 -2764 4990 4998 5181 -1838 4997 4999 5001 -4998 5016 4927 5000 -4999 3279 2220 5001 -4998 5002 5000 2896 -5180 5197 5001 2903 -787 4996 5047 4995 -841 4798 3230 4995 -746 3280 5179 5244 -4932 4883 4814 4716 -4939 841 5054 5144 -5053 4932 5073 4814 -5087 3434 1037 5143 -952 5245 1039 4890 -5206 4930 5333 1767 -4713 5068 5151 3081 -2637 3152 5173 5189 -1006 4939 1019 5074 -1023 4926 4927 5016 -683 5084 5015 4999 -5220 3315 3436 4955 -4897 3258 5213 5130 -4949 4883 4716 5083 -4675 5030 4986 1012 -4977 5083 4949 116 -5162 5172 5086 5046 -5087 5145 1037 5158 -4937 3254 5151 4713 -4646 4672 4951 4972 -3081 4690 5054 5074 -4820 5067 4790 4783 -4327 881 5177 5156 -1329 5030 4604 5035 -5029 4710 5038 5020 -5169 5322 5303 5324 -4667 1073 4919 4711 -809 838 1056 1788 -4233 4719 4813 5049 -5029 944 4609 4351 -5092 5091 755 5142 -5069 1767 5093 3441 -944 5039 3213 5030 -1022 4721 5040 5038 -4692 4196 3030 5039 -5042 611 4681 5050 -5043 4716 4700 5041 -5042 4737 5048 1797 -5194 1029 5140 5208 -5213 5086 1169 5046 -787 5022 5045 4996 -5087 1108 5003 5091 -5049 5043 4813 205 -4698 5050 5034 5048 -5049 5051 5041 4706 -5050 5052 611 4707 -5051 5053 4898 4719 -5052 5008 4909 4768 -5143 4954 5007 5026 -5056 143 1075 4801 -5055 292 921 5057 -4651 5056 1027 4845 -699 4770 4935 5297 -4304 4817 5133 5067 -3258 766 5162 5096 -4872 4955 5062 5298 -4641 5061 4809 5297 -5124 5304 4819 5278 -4880 468 3441 5326 -134 5133 5153 5078 -3317 5191 5231 1960 -4304 5136 5059 5027 -5307 5310 5012 1095 -4641 4809 4677 5037 -5079 5194 4938 4693 -4551 4388 4320 5072 -5071 5332 4736 1386 -4641 4909 4826 5008 -5103 843 5014 5026 -5087 5091 3341 4941 -688 4350 70 4715 -4883 1010 204 1062 -5128 5065 4989 5222 -5080 3358 25 5070 -5079 293 5081 3253 -5082 4737 855 5080 -5083 5081 1120 809 -5021 4965 5019 5082 -5016 5190 5201 4934 -5086 1017 4824 3217 -3258 5022 5085 5045 -5009 5047 5023 5075 -4326 3436 4162 4868 -4873 4844 5205 3226 -5116 5115 4818 5147 -5075 5047 5036 838 -2007 4996 5036 5184 -4301 4677 5037 5094 -3254 4883 5093 204 -5159 1091 5200 5198 -5128 5060 912 4327 -5159 667 5186 2701 -1091 696 687 3243 -5145 3229 4989 5128 -5207 106 5169 5343 -5105 4320 843 4736 -877 5104 1006 98 -4783 5074 1019 4820 -5102 4667 5105 4711 -5104 3255 1006 5101 -5130 4812 4243 5118 -843 5137 4783 4736 -5124 5223 5110 4817 -5236 4426 5127 5284 -4931 5108 4690 4304 -5132 334 4729 3343 -5319 4288 5217 5311 -979 5114 5138 5116 -5113 5116 108 5141 -4790 5133 4916 5090 -930 5114 5113 5090 -334 5126 5153 5133 -5106 5296 1163 5221 -5226 5127 4426 5269 -1163 5221 5170 5161 -5165 4838 839 5281 -5321 4930 5339 5343 -5322 5250 5169 106 -4931 4944 5108 5063 -5305 5303 5278 5330 -4820 4304 4690 5117 -5270 5119 3440 5109 -5130 5096 5099 5078 -5254 5204 4426 5224 -5018 5128 5157 5106 -4762 4884 5316 4846 -4746 4916 5111 4818 -5115 5059 5117 5065 -5299 5310 5307 5340 -5288 882 5265 5342 -4931 5278 5067 5137 -1095 5136 5107 5331 -998 5113 4746 4818 -5165 5146 4877 5287 -4941 5044 3341 4952 -4746 4790 5114 996 -5036 466 4867 5184 -5144 5009 5054 5151 -688 5143 1108 5007 -5023 787 5099 5157 -613 4964 5139 3327 -760 5090 5148 134 -4818 5147 5149 1016 -3343 5148 5156 1015 -768 3257 3227 696 -5024 3434 5143 5012 -4954 5153 4989 5155 -5152 5117 5065 5154 -5155 5153 5156 3343 -841 5152 3230 5154 -5154 134 5028 5149 -5158 5213 5145 5130 -360 5157 5023 4243 -5097 3227 2679 5095 -3279 5179 5197 5163 -5195 5200 1021 5120 -5060 5171 5022 912 -5160 5167 5168 5190 -1960 2220 3279 746 -3328 5139 5121 613 -5219 721 5243 5238 -5163 5261 1739 4326 -5163 1739 5199 1029 -5031 5123 5323 5100 -5120 687 4994 5200 -5162 715 5172 5187 -5022 5171 813 5188 -4995 672 4798 5013 -4798 5176 1168 5175 -5177 5187 5174 881 -5174 1165 5187 3152 -912 5028 5175 3230 -4908 3357 5312 5237 -5160 5005 5196 7 -5181 5198 5002 5186 -5182 4867 4997 5180 -1129 5183 5181 5186 -301 5184 5182 2791 -5092 1169 5142 5183 -1037 5223 4989 4954 -5182 5097 5180 796 -5175 786 5171 5176 -5189 3152 5172 2704 -2007 5013 4996 5188 -5191 5084 5163 3279 -5066 4934 5214 5190 -5315 4885 4850 5277 -4968 4925 4934 5209 -5070 5201 5044 4968 -5211 466 5161 360 -1170 463 5179 5197 -5198 5196 5160 5002 -5180 5095 5199 5197 -3210 5200 5168 5198 -5161 5095 5170 5199 -683 5084 1029 5194 -4963 4286 5280 5258 -5204 5236 3452 4800 -4816 5129 4950 5203 -4900 5089 5251 5239 -4809 267 5212 5011 -5303 5295 5100 5266 -5044 4961 4952 5212 -5193 4955 3436 5210 -4968 5209 5212 4809 -1169 5195 1021 5213 -5208 4868 5206 5210 -5045 5211 5018 5157 -5231 4326 5191 3436 -5216 788 658 5275 -5235 5215 515 5273 -3266 5112 5289 5250 -4888 5269 3440 4844 -5166 5225 5244 3354 -4971 5312 4903 5017 -3226 4897 5120 5118 -4817 4812 5223 5078 -1030 5222 5185 5108 -4950 5129 5228 788 -5272 2804 5245 5219 -5119 5257 788 5275 -4668 5233 5282 4750 -5224 5253 3405 5256 -5230 879 5255 5262 -3311 5229 5274 5263 -5214 4903 5066 1039 -4900 5248 5268 5292 -59 5227 652 4964 -4967 3452 5235 5273 -4886 4950 5216 5234 -5203 5109 5285 5249 -3311 5259 4893 5178 -5271 3444 5264 5166 -5260 5205 687 4994 -5257 3453 5264 5241 -4844 5240 3444 3035 -5243 5260 3243 7 -5242 5166 722 3444 -5005 5219 7 5245 -5244 5225 5263 5010 -4888 3440 4885 5277 -5250 4241 5322 607 -5255 5277 5232 879 -5259 5236 5284 3344 -5247 5311 5217 5123 -5255 5205 4953 5260 -5253 3392 5256 5257 -5228 3456 5252 5254 -5129 5253 3425 4744 -5248 5251 4620 5229 -788 5252 5228 3365 -5269 5252 5226 5240 -5202 3357 4940 3116 -5237 5249 4850 5290 -5242 5251 5239 5261 -5167 7 5260 5262 -4326 5261 5229 5263 -5262 5245 5230 1039 -5275 5240 3450 5238 -5135 4239 5308 106 -5305 5309 5207 5343 -5291 4668 4750 5318 -5232 5277 5300 5302 -3425 5257 5119 5218 -5271 5127 4620 5274 -5272 5270 5275 5238 -5273 5274 5271 5225 -5234 5272 5216 2804 -5272 5285 5270 5230 -5271 5226 5215 5264 -5315 3256 4241 4750 -5268 5246 5192 5248 -5063 4819 5136 5125 -4892 5314 5317 4830 -5202 5286 3338 4940 -4848 3451 5121 5287 -3344 3327 5283 5227 -5284 5282 3425 3256 -5283 5109 5249 4885 -3452 3311 5236 5274 -4277 5280 4800 839 -5281 4870 4913 5139 -5294 5135 3252 5341 -5217 699 644 5323 -5259 3344 4668 4878 -5315 4850 5267 5319 -5293 4942 5232 882 -4904 5292 4900 5294 -5293 5288 5296 172 -5207 370 5345 5303 -3252 4873 5294 5118 -5062 5298 3196 5058 -5061 4815 5297 4828 -3441 1767 5134 5339 -5268 4888 4873 5301 -5302 4241 5300 5308 -3442 4239 5301 5268 -5207 5295 5125 5031 -5063 4944 5309 5305 -5125 5304 5266 5340 -5321 5339 468 5329 -4827 5134 5068 5331 -5265 5301 3252 370 -5304 473 5345 5266 -5134 5337 5068 4944 -3442 5112 5250 4239 -5313 5220 3315 5178 -4988 5312 5314 4908 -4699 5313 4822 5279 -3442 5192 5276 5291 -5131 5317 1442 4847 -5279 4822 5316 5318 -5267 5317 1442 5319 -5291 5320 5318 5112 -4815 3083 4288 5319 -699 5122 5306 5323 -5123 5247 370 5031 -5169 5321 5289 5324 -5323 906 5031 5329 -5326 3441 204 4827 -1002 5064 5325 5327 -5326 5328 5332 1128 -468 4807 5329 5327 -5306 5324 5330 5328 -5340 5329 5125 5331 -5307 5330 5137 5332 -4827 5331 5072 5327 -5011 5334 4952 5338 -3438 5333 5341 5335 -5334 5336 473 4835 -5335 1030 5337 4944 -5338 5336 3434 5310 -1767 5333 659 5337 -5306 5122 5299 5340 -5339 5305 5134 5330 -5288 5342 473 5334 -5135 4930 5343 5341 -5266 5342 5100 5122 -5345 3252 473 4812 -5309 5295 5344 4819 +995 939 990 997 +986 0 987 999 +894 2550 2566 2551 +1735 197 1635 1761 +1268 942 941 1277 +4884 1340 1258 1359 +745 734 763 752 +183 1459 1561 215 +385 1254 1053 936 +111 765 682 749 +1787 1555 1636 1702 +3482 3412 3424 517 +4388 4216 3975 178 +1941 2744 350 290 +2065 1659 2146 1611 +2907 408 2910 2831 +3013 5140 5308 4835 +26 58 780 1002 +180 772 1138 1007 +3520 3136 3466 3201 +4220 2317 4178 3645 +671 3074 461 3185 +704 1314 1307 1066 +2813 2970 919 2783 +3202 2557 3474 3463 +3158 201 1170 810 +4919 464 4921 1142 +1919 2345 4098 3745 +123 15 948 970 +1382 1601 1547 1026 +4219 4304 4305 47 +3414 3407 434 3433 +4152 1693 1445 4354 +972 1107 701 260 +936 910 997 72 +54 259 241 1525 +3727 3651 4151 3875 +4145 1794 4281 4444 +193 133 227 1542 +1153 850 1164 766 +3597 231 3530 724 +2083 366 1954 2107 +1154 829 956 168 +794 4185 420 3374 +3878 3777 3776 2213 +221 549 1442 1688 +3022 2922 3021 2508 +3098 3213 3217 2606 +3262 4951 3106 3087 +2036 2008 28 2016 +167 69 4970 1807 +1381 1565 1346 772 +4661 4935 3092 3353 +4191 3040 4173 3783 +177 2267 2227 181 +1961 1077 262 1779 +33 1705 1704 1694 +1551 1602 1610 1608 +738 963 1200 805 +861 333 961 588 +15 140 628 1011 +1108 2398 2700 2571 +613 2713 1930 2499 +1874 1128 1367 1366 +136 3044 3525 3495 +339 914 3224 5170 +1951 2251 1980 2043 +1770 1442 1787 221 +628 1163 949 988 +827 97 777 399 +1097 1812 1157 1177 +4822 48 1813 978 +4166 3579 3036 3656 +3384 3402 694 687 +994 862 975 32 +2599 395 342 967 +777 1242 860 399 +1021 4272 987 859 +1063 1446 1332 1846 +5092 5098 5193 3158 +1284 1294 1288 766 +881 852 105 2614 +1395 2150 1955 2137 +3371 3277 4872 4282 +5004 3347 603 3255 +2060 2233 2185 2207 +2999 4211 1463 3247 +444 2947 393 570 +3428 3497 3512 3392 +2957 2996 3026 1998 +1284 1216 352 708 +1601 1599 1600 1026 +4969 346 540 3339 +5121 5268 5076 915 +119 190 411 770 +3291 1132 4112 555 +787 142 985 888 +3467 2804 2557 3475 +972 110 2604 732 +67 818 767 702 +3839 3645 3652 3749 +1246 763 860 734 +666 743 793 853 +1016 5115 5067 4936 +1483 1625 1496 1452 +638 4183 4143 554 +3218 5137 5295 4789 +2888 2625 79 804 +3550 3148 3373 3428 +176 682 147 745 +3434 1010 4865 383 +2164 2319 2203 3601 +175 2677 96 1133 +783 765 7 749 +2460 2775 2749 2734 +3662 522 3652 3397 +1266 1260 1282 1201 +400 2890 2615 2521 +208 1389 978 1099 +277 322 1883 1922 +1773 1137 1078 1797 +1060 1111 92 1162 +2182 1921 1924 2175 +1610 1608 1532 1399 +645 610 646 3845 +151 26 462 752 +888 2599 2386 868 +2279 242 225 2163 +450 3413 3406 2135 +1049 1007 219 149 +424 3077 4177 4065 +818 784 822 699 +4833 5091 4237 5045 +941 1301 1268 1271 +1637 1923 2170 2028 +207 1419 36 1415 +504 3000 3709 2203 +1515 212 1587 1628 +582 62 3202 3474 +5000 4944 4934 5003 +863 784 818 769 +1770 1787 568 274 +1163 151 1189 58 +193 222 207 1557 +1545 819 94 877 +2563 4984 2687 262 +242 2130 2029 1657 +1225 1489 275 1736 +358 3301 3033 455 +735 107 380 745 +938 1887 415 3199 +185 4669 199 127 +1115 1130 1624 2705 +1305 140 754 123 +2340 1125 534 3802 +2856 2613 2555 785 +1355 194 1358 1550 +2129 1950 2415 2086 +2372 2388 3038 3725 +4341 4319 657 1511 +696 4246 4785 4776 +1570 207 222 1379 +1476 1694 1647 1525 +1465 1736 569 4523 +4184 4604 4581 4553 +369 2775 1338 2734 +1920 1862 1808 1760 +1336 1234 1397 1552 +421 1735 1648 1761 +1800 1229 48 264 +1213 1385 1149 40 +1304 1297 354 802 +4398 1718 4470 4374 +4553 4376 4552 4430 +3963 4232 4333 1126 +4666 4362 4435 1505 +3817 4089 4087 584 +110 701 1186 1231 +760 863 107 934 +2064 52 1699 2287 +4251 10 4248 4407 +1599 227 984 1524 +1149 254 16 907 +1644 2287 2289 52 +2009 1660 2069 1091 +1496 1466 5 1452 +3641 515 3530 2866 +149 1034 5033 1176 +1955 297 1991 255 +2477 2534 2511 2940 +276 1337 616 1471 +4277 1272 1722 4083 +92 1025 2771 218 +1875 1396 1090 1061 +2051 1969 1996 883 +1425 141 36 1542 +1751 259 154 1539 +2926 2997 2913 2364 +1324 1772 498 1674 +1686 1 1441 1324 +4338 665 1506 1722 +149 823 1060 219 +3671 516 3394 495 +2883 3088 905 23 +3720 2306 3799 2269 +2198 2190 1951 2052 +1384 1147 1680 1632 +710 3264 3222 2919 +1065 1255 1345 1329 +141 159 133 625 +1807 1643 116 1146 +1399 1499 1496 1501 +498 1611 1324 1680 +2422 2448 2387 1921 +1439 1528 477 135 +2687 2504 1928 262 +889 1048 219 932 +1479 690 1484 5 +1216 1239 2591 280 +2635 2675 2390 2335 +305 770 1220 190 +214 127 907 199 +3353 4844 4892 4070 +43 65 627 1406 +1600 159 141 1352 +278 389 2236 2439 +2058 1843 1591 4017 +2043 125 2044 2052 +1851 587 4032 2097 +179 1425 36 1313 +1854 1775 1772 1757 +2026 2005 1150 1724 +3823 3855 3746 3738 +38 289 3671 3695 +4565 4612 4585 1593 +2772 2910 408 2544 +3728 3774 3748 2331 +3685 3750 3823 3778 +1384 1654 1653 616 +3014 2485 3033 3008 +1929 2149 1912 1859 +1918 2447 1949 1638 +2971 1821 2976 286 +2126 2123 2121 33 +2282 2309 125 144 +2121 2123 1917 2053 +4146 4681 4709 4928 +2637 1592 2996 2242 +744 3932 1012 5026 +2147 2164 2322 586 +1449 631 1763 4664 +3801 3285 301 4209 +3101 2904 3572 3602 +1522 1383 1462 1516 +4411 4440 3903 3796 +2077 2230 3799 1353 +772 180 1875 1061 +1209 186 2137 1666 +1950 2315 2430 2192 +3249 3120 3176 3314 +3540 3543 3521 3178 +1704 1750 33 194 +1153 1179 1190 31 +2297 501 2294 2304 +53 143 2012 213 +718 2585 2590 841 +1827 1807 167 1819 +4873 5257 4815 5282 +2160 2100 2131 1866 +4417 3311 4081 3826 +2173 2069 1091 1960 +2019 1719 1711 1669 +3403 3372 550 3518 +1609 616 1495 1526 +1553 1134 1782 1526 +1560 1352 1566 1557 +1669 4327 1734 139 +959 1802 1744 145 +1494 1477 188 1518 +117 1948 1940 1912 +2480 223 2392 2402 +336 2385 2829 2884 +871 216 790 1545 +2624 3318 2815 3152 +875 854 898 4950 +3185 611 4047 3814 +4425 4310 1790 4620 +2315 2189 2262 2261 +240 2841 1997 2365 +4967 3363 4804 4324 +2730 3308 3176 567 +231 3597 3393 3605 +2712 2711 2474 11 +1876 1394 1274 608 +2667 3494 379 3435 +2996 2957 2473 2438 +2425 2313 2809 2041 +1792 1793 1556 1340 +3266 3263 717 2993 +186 1989 2400 1521 +3081 1896 3156 2972 +2115 421 2054 1681 +509 2278 3709 429 +249 4192 4164 4360 +1353 2077 2064 2097 +1382 1204 1207 1547 +2424 1104 3032 2809 +2701 2510 2603 218 +2450 2422 2214 2233 +2773 2703 1194 1193 +2039 1937 1895 1612 +1431 1949 350 2428 +3333 3374 4212 3293 +2236 1619 2444 312 +2442 2120 311 363 +1638 1943 403 2178 +1883 322 1925 1840 +2824 417 2380 1871 +2711 855 2475 2286 +1367 1882 1350 355 +2366 402 2511 2325 +2256 2188 2282 982 +2109 1755 2098 1666 +3279 1139 3309 2838 +314 117 1863 1852 +2115 1662 421 1752 +4495 4251 4248 4178 +4037 533 3854 3986 +1980 2060 2185 1951 +2690 396 1834 1868 +3674 584 3949 3809 +3121 2568 2352 3138 +3909 3851 521 3889 +2216 2418 1873 2240 +425 1139 3251 2840 +360 993 57 2825 +3180 3250 3160 2810 +3575 3559 3573 3506 +444 2611 279 2513 +2903 2954 2385 2948 +3996 600 4072 423 +3226 63 3222 1169 +392 3232 2595 464 +878 2555 395 805 +808 852 2792 73 +787 2548 2591 352 +2351 3031 1759 2870 +2586 2923 2958 2589 +3147 688 90 3297 +2184 402 2366 2281 +2588 2559 838 894 +3783 3851 3785 528 +2759 309 11 2423 +2241 2445 2447 2178 +1280 88 343 786 +3005 3123 2920 2959 +1295 986 169 1281 +1885 1274 1394 317 +2859 427 357 2572 +356 730 2791 2790 +2806 2380 146 2706 +2220 2588 2545 2580 +333 861 862 1198 +891 828 2834 2826 +962 574 1021 950 +1918 2389 312 2428 +2490 2924 2870 1759 +1919 4099 4100 2313 +1699 2188 2038 39 +4017 2928 3290 2058 +2322 3712 1644 586 +163 1952 1223 2737 +2595 1142 2558 2822 +2942 3164 3127 3048 +4160 2991 424 1473 +5282 4956 4922 4873 +2909 2922 2508 2480 +3345 679 3350 3297 +3134 2939 3177 2441 +3159 2968 3139 3103 +3952 3941 3987 3944 +292 3430 3404 3485 +147 764 399 750 +3896 602 3901 560 +656 927 880 991 +2846 747 108 4678 +2654 2591 2548 1232 +1179 1153 6 1117 +2640 2877 825 2902 +3217 2606 809 4964 +2965 2479 3034 2808 +2481 2480 2393 223 +2475 2519 2708 2468 +1208 2585 718 2584 +1997 3260 340 414 +2666 2611 2952 85 +2513 2875 410 2905 +341 2855 73 964 +851 2741 2714 327 +2470 2672 2655 2399 +2552 2607 2827 2700 +380 67 735 74 +2831 115 2884 2515 +2325 3684 3046 2707 +2407 318 347 2333 +2394 2286 2334 313 +2674 2720 2671 2579 +2181 2279 2299 2099 +3488 3425 2799 660 +504 3709 3787 2228 +410 233 13 2515 +2002 2290 2329 2182 +2397 408 2520 394 +92 639 1060 1034 +2338 2337 4138 3792 +3400 3656 489 3653 +3255 392 417 4854 +1003 148 2912 3110 +452 1127 1126 2049 +4994 2379 315 414 +3661 4123 3400 3656 +561 4004 558 3830 +1777 1129 41 3056 +299 323 2143 166 +4402 4408 620 4262 +492 4000 338 482 +128 1783 514 372 +3676 3629 3615 332 +3715 3713 3667 3078 +2861 730 356 881 +3011 2589 2907 2916 +1123 3705 3771 300 +2843 3146 3123 2959 +3290 3319 1713 2928 +4475 4468 4389 3981 +3285 4281 4462 4260 +470 3492 3035 29 +1880 1250 1870 1900 +569 1225 1435 779 +3141 3144 3059 2942 +3345 4931 603 1058 +4032 3834 1967 4045 +3378 3677 3694 3631 +5273 5287 5278 5210 +3090 3177 476 2998 +533 4035 2066 3895 +85 336 2933 2513 +3072 515 3527 3639 +4051 4417 665 3291 +2966 2280 3717 3736 +2223 2305 3754 2321 +3984 3798 2090 3970 +517 3412 3407 126 +3019 2102 3483 611 +774 1915 416 2058 +1668 2054 1666 1654 +4299 3939 4352 4346 +2528 146 2706 3009 +2289 1953 2303 2080 +3573 3479 3482 3625 +4814 5134 5131 901 +3531 3520 912 3164 +4833 4710 4314 5041 +4150 540 19 635 +754 123 1000 842 +3104 1731 3438 3484 +673 4968 24 340 +1306 1158 1298 803 +1414 2708 2464 1909 +4774 4796 4680 4769 +3745 1104 567 2424 +3292 1919 4098 2349 +3433 2852 3450 434 +1116 4965 4264 2963 +811 3204 3125 2947 +2852 3437 3450 3435 +3229 5167 5129 5081 +752 934 842 751 +442 3128 2981 2926 +1438 1674 212 1625 +3607 3162 3576 3560 +703 3083 687 5245 +2303 1956 2072 1206 +2949 2947 2937 2616 +4137 3922 2336 423 +1409 952 1398 576 +4883 1005 5030 4726 +610 1737 538 3934 +4563 4422 4507 642 +3838 3991 2091 3822 +3900 3910 3843 3865 +3623 413 3619 3399 +4038 4084 2991 1473 +554 4149 496 617 +2040 3962 600 423 +2967 3731 3660 1509 +599 593 3780 3904 +200 3599 3616 3393 +4000 491 3636 4060 +1463 4215 4176 4206 +210 196 1620 1631 +3376 3607 3377 3559 +887 3081 2353 2307 +2357 505 2085 261 +1954 1749 2067 2083 +4225 4169 3956 4182 +3953 134 407 3710 +1749 501 2358 2067 +2426 2427 2187 1706 +2292 2373 2288 1956 +2936 3055 3150 3380 +2055 300 2228 3778 +2324 2321 2278 2305 +4412 4487 4115 3936 +2071 2260 2026 2232 +2185 1951 2190 2250 +3077 424 4131 4111 +3609 445 3691 184 +200 2866 3071 3634 +9 450 3418 3627 +564 3064 2011 1129 +3639 3650 3072 3631 +3839 4193 4195 3648 +3879 3872 330 3882 +113 2980 3596 4066 +3899 3637 3875 3650 +3707 560 3845 3897 +2992 3327 3348 3269 +3845 3857 562 3819 +2342 3681 3682 2086 +349 3886 3527 3917 +3356 658 4183 4143 +3724 3717 3730 3714 +3742 3710 3795 2179 +3840 3954 4468 4450 +3758 325 443 3859 +3947 1972 4036 152 +3864 3670 3921 3733 +4267 3744 4079 4090 +3528 3706 4025 3552 +485 3570 592 3934 +3570 3930 3370 3918 +461 90 671 3336 +1537 2733 609 1519 +4532 4503 4772 4445 +4794 5241 4882 5302 +639 5014 1034 761 +799 712 822 793 +2284 2048 2337 552 +2017 1646 572 2107 +2715 2503 1182 1906 +1665 4607 4575 43 +2352 270 3044 3107 +1470 1798 1817 1811 +546 3788 3772 3723 +1923 2187 1973 2035 +491 4000 103 1791 +1645 4038 93 3825 +3643 2266 3923 3751 +714 3521 1131 3524 +1851 559 419 3779 +561 558 3953 3710 +646 524 381 3898 +559 4019 419 3828 +526 3858 3054 3608 +3481 3390 3464 3547 +2973 518 2332 3132 +4045 4059 4028 4032 +4661 3242 3254 4663 +2104 4077 288 468 +1734 1764 1617 139 +1466 161 436 4580 +2217 2905 2634 85 +1993 1673 1968 1966 +1713 547 1742 1963 +4422 4050 4538 4542 +5116 5073 5067 362 +4303 4363 4296 4477 +1315 483 1540 1379 +1851 4032 3969 3712 +742 842 751 1253 +4130 4506 4306 4487 +4025 724 669 3697 +2664 636 2845 4243 +3044 136 3115 3389 +3949 3817 3334 3724 +174 4084 1990 328 +2276 4022 3311 4081 +2021 247 2267 368 +595 226 4004 2096 +1168 1111 1167 57 +973 1098 1191 879 +2440 1989 2069 2176 +4263 4104 2276 4008 +593 538 594 597 +610 592 602 494 +602 592 3926 3902 +4031 3834 587 1469 +1469 3831 4006 3972 +3934 592 599 3906 +3987 3841 1708 3998 +597 494 3780 3905 +338 3972 4289 492 +1434 4566 1095 4578 +593 594 646 381 +3346 438 82 3304 +4289 2350 4467 4280 +4378 4279 4016 4502 +3451 3360 2476 3214 +1141 1769 1349 1373 +622 1315 1327 291 +1624 541 1194 2660 +122 485 593 3780 +283 3057 3069 451 +4625 1464 4644 4571 +60 2689 2472 2575 +3635 4135 3955 3846 +4104 4301 4023 4411 +271 236 1613 188 +3759 4067 4486 491 +1311 1258 1333 1359 +1493 1211 1467 1516 +3928 1640 1677 422 +4885 5040 4727 4714 +952 608 800 1349 +4460 4527 4504 651 +1527 4622 911 4509 +1540 1536 1415 207 +4595 1493 1527 1462 +4234 4608 4288 221 +66 780 58 748 +3326 4262 1718 3928 +4513 4554 4526 4388 +248 4310 1410 4431 +1099 1130 5018 1145 +4184 4581 4162 1272 +3620 3552 3554 3612 +3744 3341 3814 461 +713 4241 581 3431 +4293 4560 4331 4558 +103 3397 3662 1791 +2592 5104 411 544 +4317 4133 4416 3963 +4528 4520 4519 4490 +2943 4517 486 4470 +4393 4500 4167 4184 +4518 4522 4517 3974 +3751 122 3871 3054 +3871 122 602 560 +1014 947 3995 1743 +4470 4456 4472 1718 +3870 3820 3853 3850 +651 4524 4525 4504 +4533 4522 650 623 +4716 4499 4052 4542 +4511 4541 4591 4347 +4515 4527 4460 4547 +977 1007 1031 1049 +923 5158 5190 382 +4219 4343 4667 157 +4175 4190 4174 529 +4689 4798 3168 977 +406 671 688 2782 +4159 4715 4642 4641 +4961 3451 700 3357 +4954 4244 4810 4963 +4894 4266 5311 5240 +198 446 4416 1701 +699 100 822 1287 +4557 4549 4293 4533 +949 1000 998 940 +4188 580 4186 3658 +1731 3234 3241 2800 +19 540 660 3220 +4179 5310 5307 5002 +464 5173 955 3232 +747 4884 744 1340 +5215 3421 3357 3355 +773 2701 2739 1025 +899 810 789 944 +1311 977 1031 1013 +3275 375 3354 3187 +4093 4394 4538 4422 +5109 5225 3245 5345 +764 769 7 107 +4886 4723 4956 4609 +912 3523 3060 3139 +3241 3467 703 3438 +4929 4265 3119 5130 +71 3460 479 3451 +2799 660 346 2878 +1370 1441 1442 1738 +215 1500 1330 1452 +1676 1472 4565 4573 +1396 1155 1053 939 +816 1251 1013 1006 +71 3487 3477 2557 +2804 3241 3476 2800 +4736 4722 4802 158 +5343 3329 915 5179 +2903 2385 2907 2831 +784 666 129 767 +729 662 3460 3233 +31 1188 175 1190 +97 769 798 764 +685 479 3183 876 +846 1306 20 840 +994 983 940 969 +940 983 791 746 +1445 4772 4052 4503 +1202 856 937 88 +5324 5309 5308 4948 +205 2828 938 2659 +4902 4901 4240 3442 +869 768 545 786 +636 2664 3277 4207 +2945 3534 557 3519 +3445 3082 3555 3536 +5025 4917 4828 4655 +1003 296 3264 2990 +391 263 844 2584 +4323 5196 5227 5205 +5202 5229 5314 5059 +722 3431 3406 4217 +3413 4242 721 3938 +729 3234 5230 3187 +580 4121 4123 38 +853 787 985 793 +2612 1185 2610 2632 +744 4865 747 4703 +3484 3513 3488 1731 +723 5071 3183 700 +2792 357 427 852 +866 869 806 781 +931 872 96 1144 +1185 2648 2610 2665 +4 803 99 1305 +399 760 147 763 +1293 846 840 933 +4708 5041 4885 4229 +937 965 56 864 +2570 2629 921 2523 +1597 1313 1471 1491 +1226 1041 1195 1045 +806 578 781 1247 +793 799 2386 100 +246 727 674 4668 +107 759 147 4 +966 706 960 806 +727 383 674 1405 +1021 950 628 988 +765 759 7 111 +782 380 759 1265 +475 760 578 763 +123 934 475 4 +1333 1110 843 1381 +1261 151 1296 462 +1359 1173 977 3168 +1085 850 1070 1190 +2696 2679 2636 2610 +1992 1936 1942 1730 +749 750 745 1240 +778 176 735 751 +4204 879 973 544 +768 781 827 1283 +751 735 99 4 +702 682 782 380 +111 782 7 749 +37 847 78 1217 +1241 97 699 798 +822 712 762 1249 +798 702 138 682 +218 1197 831 92 +1048 834 989 926 +254 49 16 1074 +931 676 872 1109 +452 3993 2130 2057 +2623 921 2620 2527 +4044 5050 4798 5031 +74 1205 1241 67 +781 863 827 760 +436 1741 1259 4551 +998 15 628 859 +762 731 778 742 +783 764 765 750 +798 782 111 945 +138 799 129 699 +1199 871 790 153 +352 865 787 712 +725 343 94 786 +5002 1481 5155 5244 +677 809 828 2793 +1200 785 280 805 +856 706 937 806 +3252 839 870 2848 +725 545 743 100 +3064 2339 41 3066 +969 998 859 971 +2832 2006 2836 826 +4360 4115 4446 4192 +767 702 769 783 +867 545 784 743 +1377 1343 1327 622 +2731 2656 2668 1890 +1271 1245 169 1044 +1087 1240 465 734 +105 2647 2584 2600 +341 790 56 877 +791 746 731 742 +921 2596 2620 2545 +927 870 880 342 +387 789 810 5189 +677 23 809 908 +472 3145 3110 2953 +2957 3024 2979 2502 +844 819 1208 1036 +2992 3085 2936 3109 +2578 2549 2564 2546 +693 1031 1068 989 +887 2984 2514 1224 +129 827 138 97 +813 2678 821 142 +1974 1185 2483 2621 +1208 819 832 2573 +768 129 545 666 +1166 199 845 999 +2682 2651 2602 1152 +2865 386 2937 2882 +837 879 3337 796 +778 818 762 67 +789 2830 361 2849 +931 1133 1959 40 +1417 3444 4924 4978 +1196 1029 770 1178 +2650 885 821 2652 +5161 1020 845 5169 +771 1062 1059 1042 +910 936 1256 856 +2748 2613 2858 872 +4904 1130 826 1115 +2523 2629 348 2565 +3253 880 792 2812 +928 1279 704 736 +1974 263 2600 2483 +475 960 462 578 +1332 1322 1756 753 +2654 813 718 2673 +5039 833 5075 823 +704 1299 1158 736 +1288 766 1201 1232 +979 939 889 958 +5172 1170 1169 1947 +1267 756 1201 37 +2715 2743 396 1834 +730 2662 79 342 +2673 2548 725 100 +282 968 969 971 +2676 893 2562 316 +708 835 791 1244 +1365 1070 1361 1190 +4107 4988 5054 5135 +892 75 780 795 +1087 933 74 99 +57 958 360 979 +360 72 995 1057 +138 778 866 176 +868 738 865 888 +864 937 869 786 +966 867 731 863 +868 869 866 799 +954 864 867 124 +865 731 867 712 +918 792 808 2377 +1152 280 785 2682 +732 773 2605 836 +2609 2740 1788 1054 +2794 903 2813 2702 +282 990 967 927 +5245 3454 5250 703 +142 878 888 805 +877 2573 2599 341 +826 589 761 2832 +839 382 808 913 +79 2625 427 2652 +1015 5092 5216 5182 +1863 192 1935 1852 +2598 2621 2889 2600 +2636 2585 832 2648 +2887 2827 2631 2644 +500 3103 1896 817 +877 124 94 864 +214 907 1062 848 +2682 2699 2650 2856 +361 2886 899 2627 +5143 4272 1002 859 +855 1952 2765 2711 +348 0 2565 2495 +2696 2398 2718 2683 +1891 1052 1900 1849 +1715 1605 1776 1078 +1018 990 946 282 +891 905 677 2797 +1326 1356 1325 1362 +5179 904 3211 458 +2883 905 903 2794 +2919 902 2908 874 +5034 3229 901 5051 +201 2886 902 899 +5170 5192 5112 3224 +180 889 219 1162 +1170 810 2006 2836 +5214 5251 5236 5035 +32 835 949 940 +1095 4601 4155 624 +684 459 3520 2942 +920 2812 2792 880 +3226 3265 63 3232 +91 697 3449 3211 +5227 5155 4323 5019 +5194 3153 3221 2839 +5038 4313 2895 870 +1944 21 2558 2785 +913 2855 2825 993 +775 2574 807 739 +4828 4792 4856 4787 +991 1017 961 656 +4025 4189 3640 3706 +5098 1015 5038 4998 +1042 943 771 950 +382 5163 808 875 +1263 1295 1302 840 +955 1118 2835 5173 +3455 5222 1069 5035 +773 732 829 956 +214 962 999 976 +860 736 1286 1246 +974 475 752 176 +5112 5219 3221 5192 +6 835 32 1117 +791 738 708 865 +710 148 1003 2898 +848 692 1062 1046 +706 910 705 668 +1269 131 2 1297 +1312 1320 1066 2 +1039 1006 926 1011 +1171 677 2797 2780 +1265 1262 1240 783 +987 898 994 969 +4747 1100 951 647 +26 998 1000 970 +668 66 1296 910 +1011 362 926 748 +4746 947 5037 2018 +1432 483 1035 622 +5118 4686 4080 5050 +967 965 968 868 +4951 5003 929 673 +1086 40 931 1161 +3253 1032 4997 1113 +975 861 976 848 +4639 275 1663 1736 +1000 974 746 842 +57 923 980 1167 +1048 5073 932 362 +965 995 56 964 +992 963 967 395 +983 963 738 954 +974 968 746 866 +964 954 875 73 +983 854 954 966 +854 705 946 795 +971 974 948 26 +970 795 854 5143 +96 1152 31 1144 +1097 1157 589 761 +966 960 970 934 +958 996 72 997 +932 996 980 958 +655 678 755 659 +69 116 1811 1156 +848 1161 1086 861 +999 976 1017 961 +5058 4696 3092 4963 +3964 1658 1657 319 +706 705 965 968 +1419 1026 179 1134 +94 1036 725 2386 +354 1261 1296 1256 +75 1018 996 946 +1043 997 66 748 +1047 771 816 1006 +992 898 991 875 +990 923 993 382 +993 995 990 964 +992 991 333 920 +946 995 72 705 +862 994 992 963 +987 976 1021 975 +988 1046 32 975 +780 668 948 795 +823 932 5039 980 +462 948 668 960 +4632 4843 4842 4700 +5048 5143 892 15 +938 415 717 2955 +4685 4253 4853 4721 +484 4758 5210 4829 +943 693 989 4936 +16 655 1174 127 +1077 4888 4930 4984 +1541 1652 1495 1583 +2395 108 4939 5032 +943 5067 950 58 +2395 246 4711 1023 +4689 678 1427 693 +1101 1100 1084 647 +925 882 4932 5191 +5074 101 5073 5101 +980 1018 5069 923 +4784 1017 987 898 +5125 1069 4932 5038 +5075 833 4925 5168 +996 362 75 748 +4770 5125 4720 2895 +5090 4315 4813 1012 +2906 2876 2851 2615 +190 1109 1999 676 +89 984 1570 27 +1940 1730 2764 1863 +1686 1370 1440 1744 +1814 1219 831 1097 +5331 5068 4914 5119 +1074 678 655 816 +957 5189 2880 2795 +4170 4799 5113 5115 +411 544 185 1178 +1409 1461 952 1343 +985 813 2673 2587 +4229 3434 3322 4673 +5252 5274 5250 4693 +1189 1226 1045 943 +4970 5047 3242 3362 +741 1067 1278 1059 +1043 1045 834 926 +1042 1046 1044 988 +1043 802 1045 1304 +1042 1044 741 1039 +1053 1043 939 997 +1048 989 1049 5101 +771 1047 214 962 +127 1047 655 4783 +1180 1883 1975 1799 +1596 1425 1313 1543 +896 1850 1760 1845 +6 1245 692 1046 +2860 2552 2849 873 +5037 4892 5056 2018 +5188 5187 5004 4854 +1117 1198 1200 862 +4729 438 1160 3299 +1068 834 1061 1041 +119 411 1166 199 +1062 254 1059 191 +834 889 1061 939 +76 1572 1072 1580 +1321 1307 1066 1282 +206 1378 1319 1301 +20 942 1064 1277 +1041 1251 1248 1068 +1067 816 1074 1059 +1019 930 5219 3221 +857 1128 1874 756 +1483 1498 1488 1475 +1398 1446 1336 1063 +1715 1817 1773 1805 +772 1346 1031 1068 +1926 2553 1938 4975 +4643 4318 4692 4649 +1008 3254 3362 53 +1556 897 118 1741 +1561 1437 1498 1530 +1609 1606 1872 1782 +1209 1654 1351 1609 +1084 4286 1101 4647 +5241 5271 5320 5111 +4679 1082 1014 4659 +1368 1201 756 1188 +1143 1155 956 979 +803 1158 1242 860 +1268 1275 1334 1266 +1624 1194 2658 1203 +1806 191 1861 1278 +2175 268 182 1667 +4763 4071 4311 4750 +1458 1748 1502 1234 +3426 4881 5076 3235 +601 911 4415 4421 +4090 2577 2963 1116 +973 1029 68 1178 +1203 589 1099 1130 +116 1098 1156 632 +4423 4782 947 1014 +1082 1939 1014 4695 +4237 5053 4775 4954 +5117 3351 5077 4063 +3302 468 3278 304 +1576 1394 1848 1846 +4697 2845 4831 4875 +31 1152 1187 1239 +2646 2496 2609 59 +1025 1111 1168 773 +1348 1135 753 1411 +588 1109 119 1161 +5117 5042 5015 4725 +2795 1168 957 2653 +3320 3292 4092 1749 +150 1739 837 1120 +1160 3339 471 1096 +1202 385 1057 936 +5000 5203 929 5186 +4870 3277 3371 3294 +1947 1142 4919 1115 +1488 1498 1424 1151 +3415 3185 1671 3074 +429 3753 3739 2305 +3684 3672 3577 2798 +2001 152 2027 3803 +2033 2093 416 172 +2033 416 2053 2019 +1070 1881 61 1368 +518 420 3706 3554 +1098 837 632 150 +3459 557 3541 3197 +1646 2017 93 1645 +2745 110 1231 829 +1382 1869 272 984 +1675 1793 1815 1110 +1792 1812 1793 1177 +118 1813 1792 4076 +1411 1196 16 1174 +3314 3308 321 332 +2075 4082 2017 4085 +607 1342 1346 1248 +370 24 1120 1938 +1198 1179 1144 1086 +1199 1143 972 732 +1926 632 1146 5017 +2504 1145 208 1779 +1678 204 1653 1629 +2743 2728 1586 2677 +1197 168 180 1162 +2210 2071 2456 229 +1121 1437 1594 1491 +824 1107 972 871 +260 37 385 1217 +1385 1365 1361 40 +1361 1179 692 1086 +1099 1157 978 5085 +68 1156 973 5086 +1298 465 846 1087 +4396 1507 4601 1487 +1058 3151 1116 3298 +956 1162 1111 979 +1161 1149 119 907 +1296 140 1304 66 +1276 1254 1267 37 +5228 4873 4878 4723 +1167 1060 3261 823 +4997 588 1166 961 +588 1113 1109 2748 +339 849 2883 1214 +5181 23 849 908 +2660 2006 944 2773 +2790 2830 2848 2791 +1174 1348 1175 755 +1176 1138 1173 1007 +1177 1176 1173 5028 +1178 1174 1175 185 +1136 68 1175 5027 +1097 831 1176 1034 +260 385 1155 1143 +1050 1230 1948 1932 +1424 1608 1252 1499 +548 1964 2510 1460 +1852 1789 2131 1604 +2809 3289 1931 2041 +820 733 726 2594 +175 1188 2542 1903 +1188 1107 2651 1232 +1187 1186 701 1085 +140 1303 1304 1039 +756 260 857 701 +1193 1219 1203 589 +2578 2655 2466 2461 +307 1220 1191 2003 +1089 609 2767 307 +741 1278 1301 1271 +1197 1375 831 1138 +770 1213 1196 1149 +1143 1199 1057 360 +1198 1144 785 2613 +790 1202 1057 56 +1085 114 850 847 +1216 1117 1200 708 +1089 1191 1391 1098 +303 1639 1849 1309 +1289 1286 1283 777 +2324 2194 2323 480 +303 1849 1869 1429 +391 813 821 2463 +1910 255 2138 1081 +1569 2044 2196 1888 +1615 4576 1515 619 +4589 4616 1839 4613 +2510 1460 1197 168 +1947 1944 1169 2558 +2768 2724 2726 2694 +88 1217 216 1202 +766 1239 1216 1153 +1390 1917 1915 2053 +1220 1616 1191 1029 +1193 2603 1219 218 +1994 2255 1841 2265 +2297 2081 2070 2295 +1844 369 2760 2736 +2325 3046 817 2940 +1684 145 1741 436 +741 1310 1251 1039 +4660 4647 1235 4309 +1229 1800 1802 1744 +1773 167 1228 1805 +2694 1975 2693 1180 +1365 1905 175 1133 +1239 847 384 1187 +4603 1464 4540 4629 +165 1357 1485 1093 +1227 4659 4665 4605 +1308 1255 1327 1369 +2122 1832 1642 1635 +1461 1407 1432 1342 +216 1217 1232 1107 +1265 945 803 759 +1262 777 1289 767 +1087 1262 1265 74 +1285 1294 1284 1244 +1256 1243 1247 856 +1273 1254 802 1053 +1263 1253 933 99 +1253 1244 1285 742 +1300 1373 1067 1141 +1280 1287 1283 768 +1531 1906 1824 435 +1300 1067 1226 693 +1433 1181 1397 1562 +1261 1247 1246 578 +1245 1164 1281 6 +206 1319 1236 1354 +1244 986 1281 835 +1280 1288 1287 2548 +618 1426 1371 3 +1454 1457 779 1405 +1325 1334 1316 114 +754 986 1263 1253 +945 1242 1298 1241 +1305 1261 928 1246 +1282 1270 1277 1266 +1242 945 1240 750 +1267 1088 1264 114 +1164 1275 1266 850 +2 131 1329 1088 +1312 1310 941 1303 +1264 1292 1279 1276 +1195 1273 131 802 +4230 189 4370 633 +1861 1275 1271 1245 +1879 291 355 1369 +1088 1273 1874 1267 +1294 1281 1270 1164 +2 1066 1279 1264 +1041 1374 1195 1090 +1295 1277 840 1270 +1249 1284 1257 352 +1256 354 1276 1254 +1290 1264 1064 114 +1285 1249 1205 762 +1243 78 1280 88 +1283 1286 1243 1247 +1285 1205 1293 933 +1257 1289 1249 666 +1257 78 1290 847 +1287 1291 1205 1241 +1288 1292 1291 1282 +1289 1290 1293 1299 +1293 1290 1294 1270 +1286 1291 1292 736 +78 1243 1292 1276 +354 1297 928 1279 +986 754 1163 949 +169 1303 1295 941 +1299 465 1158 1262 +1307 1298 846 1291 +1251 1376 1248 1328 +1065 1310 1195 131 +1305 928 1303 1306 +1189 1302 1297 1269 +169 1163 1189 1044 +1302 151 1263 734 +704 465 1314 1302 +20 1314 1299 1064 +1331 1356 1236 1326 +1204 1745 1864 1413 +1301 1378 1226 1269 +1427 618 1372 678 +1314 1318 942 1269 +1051 227 740 1543 +1306 1307 20 1312 +576 1492 608 1876 +1368 1323 1366 1260 +4678 1457 1453 1428 +1320 1321 1364 1312 +1065 1377 1255 1374 +1321 1318 1339 942 +1325 1318 1320 1064 +843 1407 1412 1333 +1369 1316 1879 1326 +210 197 196 1439 +1260 900 1339 1321 +900 1323 1308 1430 +1236 800 1331 608 +1461 1427 1342 1300 +1334 1339 206 1268 +1380 1484 1420 690 +1327 1363 1308 1529 +76 843 1685 1857 +1372 618 1322 753 +1260 1329 1366 1088 +1568 1824 1853 1576 +165 1360 1357 1072 +1613 1622 1614 188 +2783 1952 163 2712 +1329 1325 1345 1320 +3 674 1454 295 +4664 4602 4600 4730 +1372 1238 1328 1141 +1376 1363 800 1035 +4754 4941 3239 4933 +1364 206 1356 1339 +1372 49 1141 1074 +1894 1531 1574 1889 +1793 1110 1359 1173 +1858 1432 607 622 +1806 317 1728 1769 +1081 1468 1538 1652 +1360 1423 273 222 +2103 253 302 4002 +1255 1367 1369 1366 +1615 1670 1688 154 +1345 1308 1362 900 +1336 1559 1234 1447 +1688 154 1692 1676 +3 1348 618 755 +1352 1560 1336 1398 +1154 857 1396 1155 +1356 1363 1364 900 +1362 1331 1343 1535 +1378 1345 1362 1318 +1154 1695 857 1231 +61 1316 1354 1334 +317 1806 61 1354 +1897 1316 1128 1085 +1236 1354 1274 1323 +689 1444 1028 1663 +1412 1258 1428 1455 +1311 1333 1342 1346 +1374 1377 607 1248 +1319 1373 1806 1278 +1816 1589 1411 1196 +1377 1378 1343 1300 +800 1319 1376 1373 +1376 1065 1364 1310 +576 1398 159 1579 +1383 1475 1330 1483 +1411 1855 753 49 +1134 1553 303 27 +1420 251 1380 1523 +1468 236 204 1541 +1875 1860 1154 168 +1430 1492 1415 1878 +1604 1935 1643 1827 +1391 1740 1470 1616 +1470 1643 1391 116 +1218 1577 2039 1766 +1389 2658 1388 1203 +2382 2184 2420 2326 +4371 4109 4340 1785 +291 1105 355 1858 +2143 80 2109 2114 +191 1361 1861 692 +1551 1423 1252 165 +1360 483 1072 1379 +209 1626 121 1554 +4666 4624 4523 1480 +1652 2140 1606 1583 +1562 1566 1561 1558 +1985 2050 1804 2012 +4673 4654 4545 1408 +4678 747 4551 1259 +1702 1692 4234 221 +1447 1446 1238 1322 +4551 1404 4675 4580 +1560 1035 483 1534 +4659 4679 4362 631 +1110 1375 1381 1138 +1458 1322 1447 1371 +1309 1416 1685 1572 +1619 466 2482 2437 +1386 625 1536 133 +1748 1413 1838 1552 +4989 4705 830 4116 +4122 3940 4974 3013 +133 1570 984 1877 +1383 1330 1482 4594 +1607 1563 1599 1524 +4727 4674 4253 4656 +1433 1397 1600 1352 +1594 1623 1181 1121 +227 1598 193 1051 +1427 1428 1258 2846 +1328 1426 1311 1013 +1371 1426 1448 1317 +1576 1889 1207 1848 +1386 1535 1529 1326 +2427 1995 1706 309 +1238 1446 952 1349 +1423 1595 1252 1566 +4644 4566 4625 601 +1436 1466 1501 436 +1453 1435 1502 1457 +1079 1546 1151 1491 +477 1528 1736 1465 +1441 212 1324 1587 +1028 1444 1764 1803 +1443 689 197 1439 +1443 65 689 43 +1503 1442 1441 1670 +1440 1370 1770 4309 +4530 707 4393 30 +1407 1072 1432 76 +1448 1357 1407 1412 +1559 1447 1461 1428 +1450 248 4713 4602 +4310 1449 1505 4425 +4604 4256 4715 4642 +1465 102 690 183 +1558 1459 1436 1317 +1556 1455 1259 1340 +1454 1458 1457 1371 +1676 1476 1472 1550 +1436 1259 1455 1317 +1455 1758 1093 1412 +1466 1453 5 4637 +1589 1182 1585 1213 +1035 1448 1238 1328 +251 1482 1490 626 +4149 84 497 4183 +1233 4318 4569 612 +1500 1438 1452 161 +1459 183 1435 569 +1548 1550 1615 619 +1655 1654 1384 1351 +2040 4030 595 596 +1389 1388 1567 551 +188 1563 1524 740 +4509 691 1456 1493 +490 3636 372 4060 +3967 4536 4549 4560 +1530 1522 1071 1380 +1456 1690 4405 160 +1630 1622 276 1488 +1479 1512 1486 4425 +215 1478 1480 4624 +1479 4400 1500 1400 +5141 5123 5259 788 +1420 1490 1462 4596 +1071 1627 102 1380 +1530 1490 1330 215 +1234 1558 1562 1502 +4620 4400 4598 1478 +1159 1581 1527 1512 +1121 1477 1071 1518 +1684 1772 145 1674 +1462 1482 1484 1512 +1437 740 1151 1518 +1529 1540 1386 1315 +1472 4592 619 626 +1653 1629 276 1516 +271 1613 1009 1571 +102 209 1520 183 +2100 2122 2131 1642 +1071 1520 1121 1079 +209 1181 1520 1562 +1480 4599 690 1465 +1502 1435 209 1554 +1485 1436 1501 1093 +1735 1618 1443 1752 +3311 4380 4359 4051 +1450 4687 173 4624 +4013 198 4133 4053 +4433 4589 1159 4623 +1633 2116 4409 1647 +3730 2246 4097 493 +4625 4628 4648 1839 +157 1714 2014 1734 +4598 1490 1487 1478 +4547 4549 4548 4557 +3967 4564 4572 4447 +1211 4593 135 1523 +1523 251 1494 619 +1763 4423 4735 4748 +276 1488 1491 1522 +2837 1944 2660 541 +1499 1498 1496 1561 +297 1698 2149 1910 +1518 1475 1530 251 +1383 1516 1628 1515 +1471 1421 1526 179 +33 1539 2126 160 +1524 1571 271 272 +1487 1581 624 626 +1438 212 1738 4577 +1535 1492 1430 1331 +1079 1522 1475 1484 +1347 1902 1250 1870 +1626 1631 1634 121 +2197 2165 1612 2117 +1535 1536 1540 1409 +1529 1430 1534 1363 +625 1534 1415 1557 +2819 1914 541 2785 +1655 2138 1351 2065 +1525 194 1549 1550 +625 1492 1534 576 +1613 1384 1009 1632 +1557 193 1543 36 +1542 1051 1546 1313 +1823 1639 1553 1584 +2591 2678 142 280 +1437 1566 1595 1543 +1572 303 27 1580 +1653 1668 1679 1467 +1668 2098 1662 1539 +1539 154 1467 1456 +1552 1601 55 1397 +1416 1572 1551 165 +272 1544 1382 1603 +1684 1837 1399 1501 +2063 1618 1750 8 +295 1605 1078 1454 +273 141 1542 1536 +1559 1402 1485 1453 +1558 1357 1560 1448 +273 1559 1360 1409 +1079 1520 1402 5 +1499 1252 1402 1485 +1421 1614 1597 1471 +1620 1582 1583 1631 +1769 1855 1728 49 +1546 1402 1433 273 +1604 1470 1789 1817 +1588 1651 1335 1857 +2308 1210 1577 1830 +159 1026 1419 1579 +1495 1607 1603 1526 +1552 1413 1547 1063 +2482 2529 2480 2437 +1347 1824 1885 1576 +2144 2155 2131 1852 +1335 1574 1429 1105 +1569 1390 1915 1843 +1650 1726 1589 1816 +1580 1847 1570 1379 +1547 1848 1579 1063 +1487 4623 1527 4597 +1564 1835 1584 1610 +1401 1564 1584 1009 +1582 1544 1583 1603 +1651 1460 1898 1860 +1834 1148 1934 2542 +135 1439 1590 1678 +1568 1853 1650 1864 +1651 1578 1460 1375 +1615 1587 1670 1679 +224 1908 2008 2036 +2732 2229 245 2426 +4235 1691 1689 232 +1597 1424 1595 1151 +1596 1594 1433 1546 +1595 1598 1597 1051 +1594 1596 1563 740 +1600 1599 1596 1425 +1421 1598 89 179 +1423 89 1598 222 +27 1602 1551 89 +1601 1603 55 1607 +1553 1584 1602 1571 +1567 1183 1387 1826 +897 1675 1758 1556 +2142 1080 1401 1823 +1571 1614 1602 1421 +55 1623 121 1181 +271 1652 1081 1080 +1838 55 1582 121 +12 1761 210 1681 +308 1533 2148 2105 +616 1541 1495 1337 +1623 1607 1337 1563 +1211 1590 1355 1467 +1388 1842 1814 1219 +1966 568 1809 1621 +1503 1621 1787 1555 +1414 2481 2442 311 +498 1757 2146 1564 +1618 1735 1617 2020 +1337 1634 1623 1477 +1608 1614 1622 1424 +2698 609 1089 150 +1626 1627 477 102 +1532 1625 1674 1399 +1625 1630 1628 1483 +135 1627 1629 1523 +1630 1147 1628 1494 +1627 1634 1629 1477 +1532 498 1632 1564 +204 1634 1631 1541 +1508 4410 1705 1694 +1532 1632 1630 1622 +1809 1 1686 1237 +8 2019 1669 1703 +1766 1908 132 1696 +313 2286 1942 239 +1544 1845 1204 1745 +4550 620 4541 4402 +1677 4587 4376 4420 +1497 1237 1826 1775 +1389 1387 1927 208 +181 2283 3804 368 +4059 555 1132 2025 +547 1132 4417 3826 +1984 4095 1508 160 +1753 2143 2094 166 +1818 1866 1867 1789 +1578 1588 1664 1865 +1585 1568 1589 1855 +1009 1351 1609 1401 +1548 1147 236 1494 +1468 453 236 1081 +1681 2054 1468 1538 +4646 4647 4350 4309 +3971 982 2128 144 +2127 982 2101 2256 +2161 2122 12 1761 +2387 2206 1921 182 +3841 3998 3991 3829 +1549 2152 323 1751 +4660 959 1370 1738 +1726 1650 1901 1867 +549 4577 4606 1738 +255 320 2114 453 +1682 2105 1091 1778 +2115 453 1549 1548 +4180 274 269 1636 +1443 1355 1590 1752 +1122 3294 3414 4870 +3794 3822 2055 3688 +2024 2173 571 1960 +1489 196 477 1626 +1756 1605 1836 1135 +1456 691 1691 1358 +3856 620 1641 4406 +1587 1680 1679 1147 +1590 1678 2115 1548 +210 1681 1678 204 +1611 299 1680 1655 +1781 1667 2094 2062 +2236 2389 1962 2439 +1225 1776 1489 1554 +1864 1413 1756 1332 +1635 197 1028 1774 +4440 4325 4353 3796 +4575 1355 43 1358 +4413 1593 1690 4326 +1689 1691 1694 1476 +1692 1690 1593 1676 +1691 1406 1704 1358 +30 4363 4083 4277 +1633 1690 54 160 +1881 1899 1905 1365 +1711 1637 2045 2042 +2213 2270 2360 3703 +1521 1989 2167 2159 +366 2030 1768 177 +1725 5135 4971 4962 +4015 1722 4255 665 +8 1704 1703 1406 +1707 1636 1702 4024 +259 54 1702 1692 +54 2034 1707 1633 +1431 1720 506 1933 +2033 1703 1705 4356 +3990 598 3647 4033 +2207 2190 2197 2165 +3247 4064 4140 2339 +269 2008 1696 1986 +4226 1794 3084 3759 +431 2075 2814 572 +1961 1511 4319 1820 +1854 1746 897 1073 +4435 4673 4690 4545 +2698 2801 2505 2524 +629 648 170 4347 +269 2049 2008 4312 +1706 2031 1973 2769 +3334 4140 3949 2339 +1701 189 4230 198 +2341 2434 2291 2348 +2081 229 2215 2210 +5009 1700 5020 4867 +1578 1664 1964 1842 +3280 3369 2802 3078 +1875 1350 1860 1565 +2797 1796 2704 2729 +758 1027 1943 1969 +670 463 3196 728 +4305 4069 4222 4304 +4872 4282 4145 4285 +568 1986 1511 274 +1621 1503 1 166 +145 1438 959 161 +3751 3570 485 3958 +1528 689 1663 1665 +2006 2660 1947 1115 +1925 1840 1388 1842 +1078 1225 1797 779 +3963 2814 4416 572 +4153 4399 647 4351 +1028 275 1228 1774 +1639 1795 1309 1835 +1818 1836 1715 1817 +2190 2163 2136 2273 +1837 1758 1416 1093 +505 4086 1114 502 +2061 1555 1751 259 +1662 1750 1752 194 +1751 1503 323 1670 +2150 1648 1960 2161 +2043 2044 2312 2413 +2153 2165 320 1991 +1675 1685 1758 843 +2100 228 1856 1620 +1748 1605 1756 1458 +1987 2986 344 364 +1893 1052 164 1780 +1 1611 1659 166 +1924 1921 2235 2204 +1517 4713 4308 248 +1820 1809 568 1440 +4068 3939 4153 4346 +1390 1637 1778 2045 +2200 2319 2201 2269 +2272 2188 2202 1699 +1858 1565 1350 607 +139 1444 65 4335 +4321 2095 4333 2814 +228 1774 1489 196 +1073 1813 118 1229 +1772 1775 1744 1686 +1774 228 1805 1642 +1854 897 1837 1684 +4158 3640 4185 420 +2039 1766 2175 1667 +3362 53 1807 1146 +1845 1760 1866 2160 +2132 2105 2151 1682 +1823 272 1850 1080 +424 3655 4157 4160 +3131 4304 2368 1970 +4946 4493 4068 1393 +4885 4690 4229 4706 +65 1618 139 8 +2762 873 2739 1892 +1649 1183 1840 1567 +4432 4433 284 4615 +4072 4062 638 554 +295 1137 1136 4668 +1136 1135 295 1348 +1712 35 3655 4485 +1818 1745 1866 1856 +1729 2837 2760 1844 +4698 118 1802 1741 +1815 551 1814 1812 +1862 1050 1833 1907 +167 4590 1228 1803 +4687 3434 4673 4675 +1228 4701 1797 275 +4350 1800 1820 1440 +1403 1968 2032 2013 +1826 1229 1073 1775 +1090 1367 1350 1374 +208 48 264 1779 +1859 164 1833 1850 +1832 1617 1764 1635 +2704 2646 2609 2729 +1812 1813 551 978 +1811 1798 1136 68 +1811 1137 1773 69 +1798 1616 1816 1029 +1816 1836 1798 1135 +1814 1578 1815 1375 +551 1746 1567 1073 +1649 1865 1795 1746 +1961 1831 1820 264 +1764 1714 1819 1803 +2335 2993 240 2841 +4010 2076 2030 3827 +1782 1845 1544 1606 +1250 1898 1574 1335 +2168 2149 2167 1912 +1642 1827 1604 1805 +1831 1387 1826 264 +3175 3206 3212 3125 +2334 1940 2435 1948 +2262 1843 1569 2261 +1832 2050 1827 1819 +1237 1993 1831 1809 +1808 1799 1932 1868 +851 1586 327 1902 +1745 1856 1838 1582 +1746 1865 1675 1815 +1838 1776 1748 1554 +1837 1416 1835 1610 +4155 1212 1510 4415 +1789 314 1867 1740 +1221 2215 2082 2224 +1726 1740 2688 1616 +1908 1577 1830 224 +2702 1223 1796 2731 +1823 1052 1639 1780 +1858 1105 1857 76 +1877 1848 1876 1579 +1847 1429 1105 1580 +1204 896 1207 1853 +1808 1052 1891 1782 +226 577 558 2021 +1575 322 1183 883 +1900 1588 1335 1849 +1856 1715 1776 228 +1857 1651 1565 1381 +1835 1795 1854 1757 +1855 1846 1568 1332 +1394 1846 1769 1349 +1872 1920 238 1808 +1385 1728 1899 1585 +1396 1874 1090 1273 +1883 1799 164 1893 +883 2686 1027 322 +1588 1309 1865 1685 +1864 1818 1650 1836 +1795 1780 1649 266 +1664 1649 1893 1840 +1907 327 1833 1870 +1134 1207 1891 1889 +1531 1868 435 1891 +315 1997 2365 2823 +1859 1910 2141 1080 +2405 331 2410 2234 +1070 61 1861 1275 +191 1728 1385 254 +1878 1847 291 1315 +1847 1878 1889 1419 +1876 1879 1877 1386 +1878 1274 1894 1323 +2503 435 1907 1901 +1882 1695 1897 1128 +1899 1881 1885 317 +314 1050 117 1862 +1955 1991 2009 2153 +1882 1894 1574 355 +1895 2163 2029 2136 +148 3166 3195 3228 +2412 2329 1924 1210 +1869 1429 1347 1877 +2608 801 2561 2716 +1870 1850 896 1869 +2793 2780 1999 1788 +1862 1901 1760 1867 +1897 1347 1885 1879 +1917 308 1886 2148 +3160 298 887 2514 +1903 1894 1881 1368 +1899 1824 1906 1585 +1898 1695 1882 1860 +1853 435 1901 896 +1900 1880 1664 1893 +1903 1904 1531 1834 +1897 1905 1902 1186 +1905 1906 1902 2715 +1903 1695 1904 1231 +1250 1904 1898 548 +1799 2714 1868 1880 +1637 1843 1923 1591 +2468 2467 466 2437 +2157 1521 1209 1872 +2237 2369 2409 2290 +238 1825 277 1922 +2148 2165 2136 1965 +2765 2733 1537 1952 +1218 2130 1577 452 +2451 1962 2389 2409 +1218 1895 2029 243 +2120 2452 363 239 +469 365 25 2079 +2162 1922 1859 164 +120 211 1762 1660 +2155 1912 1920 117 +1908 2002 132 553 +1888 120 1762 2196 +1977 314 2751 1740 +1075 2705 2504 1145 +2505 2524 1935 1643 +213 2505 2805 1985 +1932 2391 1948 238 +2691 60 2212 2471 +1982 2669 2803 1184 +2691 1929 1180 1833 +2769 2759 2229 1706 +2689 1586 2518 2684 +1927 883 2051 1387 +758 2816 1941 2766 +308 2196 2052 2198 +1075 2822 2705 1142 +4941 4754 4893 1101 +1943 1027 1829 277 +1936 11 1942 2711 +1949 758 1941 1638 +313 1730 1940 2168 +1519 2794 1214 919 +2403 2456 2071 2293 +2527 2559 2220 2582 +1739 1214 849 1120 +277 1180 1829 1929 +1942 309 1995 239 +2416 155 256 2304 +203 513 326 64 +1914 369 1338 893 +2067 2297 456 2070 +3248 502 2287 39 +186 1884 2106 80 +480 2302 507 2260 +1962 2450 2392 2133 +2011 3737 2781 3700 +2510 2701 2745 829 +268 1753 2094 1673 +53 2012 1714 1819 +1957 1683 1916 2199 +572 2107 3993 2057 +2688 1182 2503 1726 +2098 1913 2139 2126 +2020 2042 571 1617 +3922 3722 439 3811 +571 2028 1804 2042 +192 1992 2059 1730 +2036 4100 2041 1784 +2149 2178 2241 2394 +534 3832 3833 2340 +553 1720 2032 2000 +2600 2647 841 820 +2742 1230 1977 1050 +2734 2470 2655 2328 +2670 1975 2726 1925 +2536 2485 3047 2383 +2734 2710 2328 2863 +2411 326 2193 64 +3746 2091 3711 3794 +2563 2004 1931 2000 +3362 5047 4949 5017 +2125 2074 2116 1647 +2051 1403 2022 1928 +2014 2042 1711 1734 +1759 2965 3010 2396 +3832 3758 3833 3912 +590 297 2106 1698 +584 4028 4087 3805 +2208 1884 186 1755 +1969 2022 2023 758 +2050 2024 571 1832 +2082 2245 1221 2263 +2169 2023 1431 1949 +192 2059 2024 2144 +286 392 2595 1871 +87 2229 2491 2759 +1892 2771 2795 1025 +1973 1982 2015 2035 +3992 1125 3711 3835 +409 2262 2187 1923 +2771 2773 2832 1193 +1982 2381 2669 2769 +2294 2302 2297 229 +908 1171 1739 796 +2019 2045 2053 2063 +1719 1591 1711 47 +1884 2206 182 2117 +2476 3421 3186 2946 +518 3764 1958 3706 +1961 262 2013 1403 +2014 2012 2015 1804 +1511 2013 2016 1986 +2016 2013 2563 2000 +2014 2015 4219 47 +547 1140 1132 3248 +4153 951 4068 1055 +269 2007 1127 1636 +2094 2062 1966 1621 +586 2077 3779 1851 +1985 2031 1992 2805 +2031 2172 1992 1995 +1996 1673 1993 2145 +1645 4042 3827 4020 +512 2302 229 2082 +3711 1125 3823 3685 +2032 1968 2171 132 +144 1917 1886 2128 +1822 2103 1699 2064 +2032 2023 2022 1720 +1804 2028 2031 1973 +1126 1127 2034 1707 +2033 2123 2118 1705 +2041 553 2036 2000 +2035 1591 1970 47 +3827 4042 4263 4008 +2107 4010 3964 366 +308 1390 2196 1778 +3834 3743 1469 492 +1970 294 2035 1184 +1696 1968 1966 1986 +2299 225 1754 64 +225 2308 1754 1210 +1696 1766 2007 2062 +2091 3642 3836 3746 +4119 2337 2048 3802 +546 3734 2047 3824 +1719 416 2058 4334 +2051 1993 1403 1831 +2050 1985 192 1935 +2163 1937 225 203 +243 1127 1218 2007 +453 299 2114 1655 +509 2179 2226 1672 +2244 2249 2191 2238 +1963 2084 774 2928 +452 224 2049 367 +1996 1969 2174 2166 +326 2235 83 2204 +2121 2063 2132 1750 +2045 1682 2063 2020 +2007 2062 2061 1555 +2030 302 177 4020 +2156 12 2140 1538 +3833 443 4034 3642 +1953 2289 505 502 +3947 3952 3987 4036 +182 590 2106 268 +1953 1222 2257 2225 +2177 1945 1150 512 +2355 2283 480 2323 +4092 4098 3287 3935 +1984 2101 4011 2276 +3319 4113 1713 1140 +2101 2103 1822 4008 +2267 253 2021 302 +2912 3195 3265 3257 +2313 2384 2424 1919 +456 2253 2245 2227 +1724 2134 1222 2312 +2026 1994 1841 2232 +2084 2225 502 39 +2311 2083 3320 2057 +501 3292 2349 2304 +2349 2384 527 155 +3097 3469 3468 3182 +3682 3684 2342 2707 +2291 2111 2436 2374 +449 3800 3630 3954 +3948 2046 487 1981 +3922 4033 2108 2336 +3993 3933 3963 1126 +1648 1682 1960 2020 +4357 4290 4255 1771 +2097 587 4021 4002 +226 2096 4020 302 +2152 320 1965 1549 +2273 405 2119 2250 +2146 1497 266 1757 +2074 1658 3979 2076 +4103 4078 3793 451 +2076 2202 2030 1353 +3308 3629 567 3042 +2117 1781 1612 1667 +1955 2069 1989 2150 +2038 1963 547 39 +4003 2092 4019 3803 +320 2151 2153 1395 +2195 2112 2147 2271 +2089 2420 2408 2362 +2267 2110 2230 2227 +2221 2177 2210 2186 +2137 1666 1395 2054 +1668 323 299 1679 +4012 2118 1984 1508 +1533 2153 2105 2009 +2116 3933 2124 2034 +2099 2255 2180 2265 +2455 2454 312 1918 +241 243 2139 2061 +1659 2145 1497 1237 +2124 243 241 2034 +2123 2125 2128 2118 +2126 2127 2124 1984 +2125 241 1965 1525 +2136 2128 2125 1658 +2029 2124 2127 1657 +155 2382 2343 2384 +2309 1915 144 774 +1497 1575 266 1183 +2152 2139 1781 2061 +2240 1957 2199 2432 +2181 2081 2215 2299 +126 3408 4165 3626 +1747 1886 1913 2127 +2138 255 80 2114 +1209 2137 2156 1538 +2132 1965 2148 2121 +2142 2065 2146 1401 +2142 2162 2157 1872 +2160 2141 2140 1606 +1648 1395 2151 421 +2154 1575 2145 1996 +2161 2144 2122 2024 +2140 12 2100 1620 +2194 2201 247 2110 +1895 1612 1913 2139 +1825 1971 1521 238 +1753 2106 80 2158 +2152 1781 2109 2143 +2151 2098 2132 1662 +1755 2109 2117 1884 +2155 2144 2159 2167 +1575 2154 2162 1922 +2065 2157 2158 2138 +2141 2159 2156 1910 +2159 2161 2156 2150 +2158 2157 2154 1698 +2162 2142 266 1780 +1659 2158 2145 1753 +2160 2155 2141 1920 +1886 2052 125 1747 +247 2201 109 3720 +1913 1533 1709 1755 +2168 2167 2176 2059 +2166 1825 1698 2154 +2166 2178 1825 1943 +2446 2172 2211 1995 +2171 2175 2182 132 +2170 2172 2173 2028 +2174 2171 2169 2023 +2171 2174 268 1673 +2176 2173 2172 2059 +1091 120 2170 1778 +2166 590 2445 2174 +2113 2218 2071 2244 +2168 351 1971 313 +2228 531 2055 3815 +2202 2119 2272 2230 +2255 2257 2134 405 +409 2211 120 2170 +2232 2248 2224 2244 +2415 2419 1392 347 +2238 326 83 513 +2244 2191 2243 2113 +506 2002 2425 553 +319 1768 2300 366 +285 2343 2425 2313 +513 203 1709 1747 +2056 2247 2186 2193 +2259 256 2304 2295 +1980 2238 2417 2191 +2147 1206 2200 2271 +2230 2110 2269 2264 +2039 1210 1937 1924 +2205 1709 2198 1533 +2204 2197 203 1937 +2462 2216 1962 2133 +2324 1767 2194 2258 +2147 1767 2164 2269 +1768 2256 2180 2103 +2320 109 2278 134 +1762 2205 2060 2198 +2206 2207 2204 2197 +1660 2208 2205 2009 +2208 83 2205 1709 +2207 2206 2214 1991 +2458 2221 2210 2414 +1150 2209 2113 1724 +2290 2448 2182 2169 +2649 2661 2735 1930 +42 1697 3756 3600 +2400 306 2387 2208 +1724 1841 2134 2243 +2199 2367 2405 331 +570 2441 3133 3125 +2222 2433 2177 2239 +2454 2455 2468 2394 +1946 359 2620 2497 +2113 2209 2222 2417 +2218 2221 2406 2418 +448 3752 2372 2355 +2243 1841 2248 2183 +2070 2311 2300 2083 +3742 2319 2055 2306 +2080 2272 2112 52 +509 407 2179 3685 +1592 2806 1998 1933 +2195 253 2112 2180 +3926 2277 3927 3902 +2258 2183 2082 512 +2234 2240 83 306 +2233 2235 1873 2422 +2060 2410 2234 1762 +223 311 2392 1683 +2405 2434 1911 2330 +2185 2239 2193 2056 +2240 2418 2238 2218 +2239 2233 331 2133 +2449 2400 351 1971 +2426 2348 2341 245 +2215 2224 2247 2186 +2056 2186 2183 2177 +2303 2080 1994 2271 +1509 2285 4088 2358 +2243 2249 2251 2191 +2224 2265 2249 2183 +2247 2248 2250 2056 +2251 2249 2099 513 +2247 2250 2299 64 +3816 3733 3867 3786 +2257 2255 2080 2272 +3997 3999 3630 3840 +2253 2181 1221 2119 +319 2273 2202 1658 +2253 2070 2181 2300 +2200 2264 2263 2232 +3812 2261 2192 2310 +512 2292 1956 2324 +4099 285 2259 1830 +285 2002 2329 1830 +1994 2271 2264 2258 +2263 2195 2265 2258 +2119 1221 2264 2248 +3918 3926 556 3570 +2112 2077 586 52 +4023 4022 2276 4095 +1767 202 2201 2195 +1697 3705 3041 3740 +2245 2110 2263 2194 +2180 2253 1768 2227 +2279 2099 2256 1747 +4335 3344 4361 4327 +3287 4079 3741 3663 +591 2268 585 2074 +3859 3983 3852 2231 +2203 2319 510 300 +125 405 2282 2273 +2331 3719 447 3665 +2356 2342 347 2415 +242 2279 2300 319 +2359 2289 2072 1644 +2318 4188 546 3723 +3805 2246 2361 2359 +316 403 2455 1638 +181 3343 1954 177 +2370 507 2371 2294 +456 2283 2067 181 +2427 1911 409 2211 +2420 2089 2431 1723 +507 2293 2375 2260 +2370 2333 2292 1945 +2005 261 2288 2344 +2312 2310 1222 2192 +2798 3577 2333 2388 +261 2005 1953 1222 +2326 2366 2535 2808 +2043 2134 405 2251 +2225 2282 2257 2188 +2404 2403 2419 2457 +2005 1956 2303 2026 +480 456 2302 2245 +2085 2192 1950 261 +448 2375 1123 510 +202 3742 3821 2226 +3031 500 2940 2997 +2310 2044 2309 1569 +2311 2308 242 2130 +2308 2311 2295 2259 +2309 2225 2310 2084 +2081 1754 2295 2414 +2189 2079 294 365 +2973 3713 3068 3375 +256 2343 2429 285 +3838 3916 3837 3816 +4412 18 4449 3977 +4189 2284 2338 3764 +2278 109 1767 2226 +2203 2321 2322 3000 +510 2323 2320 448 +247 2320 2323 368 +2322 2321 1206 2072 +510 2200 1206 2260 +2798 401 1224 318 +2298 3020 1392 2383 +2981 3128 3172 3118 +2708 1976 1979 2464 +409 2330 2262 1888 +2237 2429 2329 2412 +234 3716 2280 3747 +3668 564 2781 3576 +2296 2356 402 2293 +2391 403 2562 1829 +217 2995 1821 3007 +4041 3797 2092 482 +412 546 2047 3791 +4064 2318 412 3763 +1710 3001 1721 794 +3824 3781 1972 152 +2438 2369 1723 2242 +2088 3039 527 2281 +2348 2315 2129 2189 +2294 2416 2370 2456 +4075 25 3131 4108 +2500 2640 2865 2570 +4166 3861 3596 4197 +1723 2343 2382 2242 +2086 3681 469 2085 +4491 4480 3982 604 +344 3112 2975 2981 +3116 550 3061 329 +2364 2968 3118 500 +3053 3058 3180 3102 +2223 2359 2373 2072 +2281 2333 3039 2370 +2371 2358 2967 501 +2359 2246 2357 505 +2285 2358 2355 2283 +3757 1697 2363 3702 +2285 3721 3807 3752 +3020 2978 2909 2111 +2360 3041 3723 3737 +2353 3128 3141 195 +2706 1871 286 2788 +347 318 2298 2707 +2431 2462 2406 2216 +1784 3409 2577 3289 +2421 1911 2341 2427 +2293 2288 2356 2344 +2288 2373 3065 2357 +2373 2375 156 2223 +507 2372 2371 2355 +2473 2438 2439 2089 +2388 2372 2292 2305 +2906 2851 2864 2486 +2848 3098 2662 870 +2803 4227 3299 2379 +417 2378 2380 3300 +2379 2669 315 358 +2824 2687 2818 2004 +1392 2348 2129 2383 +2637 1978 2382 2326 +2536 2079 2129 2086 +337 2611 698 279 +2587 985 124 743 +2440 2214 211 1660 +2296 156 2375 3698 +1683 363 1916 2421 +2501 217 2633 2971 +2334 2471 2394 1929 +278 2236 2444 1957 +2473 2979 2922 389 +403 2391 2219 1971 +4315 4865 1010 1012 +2534 2537 3030 1987 +2913 2774 2921 410 +59 2496 895 2684 +397 2499 2466 2489 +2241 2214 2440 297 +2864 2486 2702 2731 +2436 2408 2432 278 +2407 2301 2433 1945 +2431 2406 2301 2458 +2409 2216 2237 1873 +2367 2433 2404 2222 +2403 2408 2419 402 +2402 2111 2407 2909 +2405 1911 1916 2453 +1873 2411 2412 2235 +2413 2410 2417 1980 +2413 2330 2410 1888 +2412 2411 2414 1754 +2413 2209 2430 2312 +155 2416 2184 2281 +2415 1950 2457 2344 +2221 2411 2418 2193 +2417 331 2222 2239 +2420 2301 2407 2184 +2111 2291 2419 1392 +2428 2389 2438 2369 +211 306 2453 2234 +2428 2957 2502 350 +468 304 2536 2079 +2187 2189 2426 294 +506 2425 2242 1592 +2369 2290 506 1431 +363 2421 2423 309 +2315 2434 2430 2330 +256 2429 2458 2414 +2404 2291 2367 2434 +2402 2433 2462 2133 +2403 2406 2432 2218 +2431 1723 2237 2429 +2694 2562 2724 1829 +2462 2089 2402 2439 +1909 1573 1414 2444 +293 2421 2374 2341 +2374 1683 223 2436 +2445 2400 2387 590 +376 2539 2941 2217 +2502 2709 1619 312 +2904 3102 3053 2984 +2392 311 2437 2454 +2446 351 2440 2176 +2447 2445 2448 2169 +2446 2452 351 239 +211 2453 2446 2211 +2241 2452 2450 2454 +2449 2451 306 1957 +2453 2450 2452 1916 +2451 2449 2447 1918 +2448 2422 2451 2409 +2120 2219 2444 2449 +2120 2475 2219 2286 +2457 1150 1945 2344 +2456 2301 2458 2416 +2209 2457 2404 2430 +3003 2874 2956 3011 +2484 2645 112 3016 +2464 1192 2531 2467 +2432 2367 2436 2199 +2587 2614 1208 2584 +2461 2532 2328 466 +2579 2720 2478 2565 +2493 1192 2399 2467 +2466 2461 1909 2530 +2489 1909 390 2219 +2522 2638 2550 2498 +397 1976 2737 2519 +2489 2649 1930 2391 +2716 2713 2757 613 +2978 293 2393 2374 +290 2709 2710 2502 +390 2709 316 2455 +606 2010 2854 3216 +187 2508 2537 2796 +2521 2465 2615 2566 +2838 388 3002 3046 +374 389 1573 278 +2979 2482 389 1619 +1573 2481 2533 1414 +2612 841 820 2497 +2460 2749 2777 2564 +3032 237 1978 2637 +2376 2749 2401 2671 +3133 3141 3134 2964 +3479 3458 3482 3429 +2471 2399 2519 2468 +2920 2918 364 3005 +3026 1998 2706 2788 +2508 3018 2772 2529 +2543 2560 2495 2466 +2574 2931 2935 2784 +2493 2579 894 2526 +2725 1108 2518 2398 +2483 2598 2601 2220 +2469 2884 2515 2513 +2672 2526 2399 60 +2643 2750 2346 2567 +2390 3017 3025 2789 +2474 2442 812 2423 +1964 548 2714 1880 +213 1926 2505 1146 +2504 1717 1928 1927 +2554 2978 3030 3020 +3615 2802 3019 3715 +374 44 2477 2492 +2863 3015 2982 2532 +1959 1182 305 1213 +187 2535 2909 318 +2581 2559 2583 2550 +336 394 2498 444 +2960 1896 2974 817 +2551 2498 400 408 +2571 2575 2608 2716 +2671 2749 2655 2578 +2496 2755 2728 1934 +390 2676 2470 2489 +410 2907 2589 2875 +2549 2478 115 2551 +2933 2638 2643 2469 +739 838 2541 2567 +2686 1717 2658 1927 +2575 2588 2723 2526 +2495 2674 2525 2499 +775 2541 1946 2582 +3006 2911 2841 455 +2492 2533 2530 1573 +2531 2544 2529 2467 +2530 2532 2546 2461 +2509 2531 2533 2464 +2532 2529 2982 2482 +2396 2535 187 2965 +2534 3020 2511 2298 +3042 2424 1978 2384 +2396 2477 3022 2924 +3151 3335 3176 2730 +2586 2441 2939 2634 +2779 2640 2853 2570 +2527 2523 2559 2581 +1586 2677 2685 1186 +2544 2549 2551 2493 +233 2546 2543 2530 +2618 807 2630 359 +815 2544 2547 2531 +2564 2546 2910 3015 +384 343 853 1257 +2521 815 2560 2543 +0 2512 2569 2469 +0 2515 2521 2543 +398 2826 1054 2609 +2687 2824 1075 4992 +2506 3029 2996 2637 +2855 2861 153 341 +2948 2639 2877 2597 +95 694 3083 22 +919 2850 1214 370 +1946 2541 348 2512 +2579 2549 2578 2493 +2729 2628 2731 1890 +2435 2649 855 2334 +1982 4983 143 2015 +2484 815 2890 2547 +2465 838 2566 894 +2478 2565 2569 0 +2569 2523 2500 2581 +3060 329 2811 3139 +2750 2566 2567 2550 +2346 2540 2574 739 +59 2576 2626 2516 +2665 2871 356 2607 +878 821 2614 2652 +2494 2934 2570 921 +2576 2525 2516 613 +2684 2580 2571 2575 +2368 1096 4108 3278 +815 2517 2560 1192 +2465 2560 404 2495 +2576 2612 2632 359 +2567 2541 2583 2512 +2583 2527 2623 1946 +2643 2581 2582 2512 +804 391 2463 718 +263 391 885 2647 +2539 345 2962 2666 +2463 1036 2386 2673 +2630 359 348 2525 +2921 2520 428 345 +2679 2680 2636 263 +1545 343 384 216 +2832 2880 2771 639 +3473 3518 3512 3373 +2881 2621 2596 1185 +1997 340 2850 370 +2784 2594 807 2618 +2915 2851 2556 2619 +2601 884 2623 2497 +124 878 2614 73 +1974 841 804 884 +2620 2621 2598 2497 +2604 2718 2685 824 +2688 2747 305 1220 +2695 2602 2677 96 +2858 2695 2740 872 +2830 45 2848 387 +2572 398 2859 2697 +1890 2722 2723 2516 +1810 1108 873 2552 +726 733 757 2697 +2385 393 2875 336 +726 2679 2483 2580 +836 2825 153 1199 +2599 2573 2463 79 +2894 115 1024 2478 +3199 481 2898 2914 +3178 3529 3466 3526 +2632 2596 2631 2545 +2777 2903 2597 2987 +2601 775 807 2220 +2594 884 2601 820 +3213 2663 2897 2834 +2598 2934 775 2582 +3150 3469 281 3182 +2665 881 105 2648 +2631 2700 2632 2571 +2628 2729 891 2826 +2627 2641 2561 2644 +2630 739 2719 838 +2721 2545 2629 2588 +2626 2618 886 2722 +2618 2626 726 2580 +3016 2390 2675 2645 +570 2905 2539 2666 +3027 2874 217 3007 +757 2590 2650 885 +2554 2485 245 2383 +2750 2522 2929 2469 +2659 2778 2556 2915 +2876 386 2346 2540 +2864 2917 2869 2628 +3149 3225 3088 2828 +2522 2500 2865 2583 +2628 2869 2722 886 +2930 2987 2633 2460 +1810 2757 1108 2716 +2585 804 2648 1974 +885 2647 2625 733 +2212 2676 2562 2471 +890 2636 2681 832 +2680 2685 824 1187 +832 881 2573 2861 +2748 2862 2812 1113 +2680 2678 844 384 +397 2517 1976 1192 +2672 801 2671 2674 +4240 4283 4899 4241 +2751 2524 1089 1391 +2776 2639 2898 710 +1519 1739 1171 609 +2738 2212 2694 2693 +2891 2790 2377 852 +2847 2932 2622 2892 +4156 713 581 4274 +2625 2872 2572 733 +2875 393 2586 2634 +292 3404 3496 3448 +2672 2736 801 2713 +2004 2380 1931 2806 +2688 2742 2747 1977 +2517 2656 2486 404 +2668 2656 397 2499 +1036 844 853 2587 +2723 404 2656 2526 +2633 217 3011 2916 +2737 855 2649 2519 +2604 2542 1148 110 +819 2654 2681 1545 +2590 757 2683 2612 +2651 2681 2590 2654 +2682 2650 2680 2678 +2681 824 890 871 +2684 2685 895 2679 +1934 2683 2398 2576 +2602 2683 2542 2651 +2764 2524 2751 1863 +213 2381 2553 143 +2603 1964 2670 1842 +613 2690 2755 1934 +2691 2692 2689 327 +2690 1930 2693 1932 +2756 2690 2693 2741 +2691 2661 2692 1230 +2435 1215 2661 1230 +2605 2718 2725 2604 +2697 895 2699 757 +2607 2700 2696 2610 +2705 2819 1717 1624 +2696 2718 2857 890 +2697 398 59 2626 +2753 1959 305 676 +2401 2775 874 1844 +307 2746 2767 2747 +1729 2763 2762 1810 +1926 1938 2698 150 +2365 455 358 2491 +401 2088 2808 2366 +2328 2709 390 466 +2708 2474 2475 2442 +1979 2712 2474 3017 +290 893 316 1941 +290 2710 1338 2787 +2735 2472 2668 60 +396 2742 2503 1907 +548 2745 851 1904 +2472 2646 1890 2516 +2885 2902 2779 2932 +895 2695 2699 2602 +2720 2721 2853 2629 +2906 404 2719 2465 +2723 2722 2719 2630 +2721 2608 2644 2631 +2674 2608 2721 2525 +2764 1215 2765 2435 +2728 2740 2496 2695 +2751 2767 1215 1977 +2754 2752 2756 2741 +2518 2752 2725 1148 +2561 1729 2627 1810 +2538 3312 288 3302 +801 1844 2401 2561 +2809 2806 3032 1592 +1914 2768 541 2760 +112 163 1976 1979 +2212 2738 2736 2713 +1223 2737 2735 2668 +2676 2736 369 2470 +2661 2761 2735 2758 +1788 2740 2753 676 +2739 873 2725 2605 +396 2727 2742 2692 +2714 2741 2670 1975 +2745 2752 851 1148 +2759 2817 2786 11 +1959 2743 2715 1133 +2703 2762 2763 2754 +2754 2603 2670 2703 +2653 2825 836 1168 +112 2486 2484 2517 +2638 2894 2500 2569 +2658 2726 2686 1925 +2727 2753 2728 2743 +2739 2752 2754 2701 +2746 2753 2727 2747 +2518 2757 2756 2689 +2727 2755 2758 2692 +2755 2646 2758 2472 +2763 2756 2757 2738 +1998 1933 2744 350 +2761 1796 2733 1223 +2760 2768 2763 2738 +2780 2704 2746 1788 +2761 2746 2704 2758 +2686 2724 2766 1027 +2766 2724 1914 893 +2801 2764 2765 1936 +2726 1194 2768 2703 +2767 2733 1215 2761 +2818 1933 2004 1720 +5004 3765 5188 4931 +2003 2592 1999 190 +2492 3003 2774 233 +2003 2780 1171 307 +2956 2796 2772 2397 +2813 2702 112 163 +2778 2659 2914 3149 +2890 2619 2851 2484 +2776 2902 2639 2885 +2869 2717 2540 2931 +1892 944 2773 2762 +1958 3666 2332 3701 +660 3220 3130 3470 +2787 2785 21 1338 +2887 2881 2494 2596 +2783 2820 919 1537 +2787 2788 2821 2744 +2789 2786 2783 2712 +2786 2789 2365 2491 +2787 2971 2788 2501 +2662 2893 1172 357 +2862 357 2812 1172 +2855 913 730 342 +2795 789 1892 2849 +2837 902 1944 874 +2793 1999 1032 1113 +2477 2774 2924 2997 +899 2837 944 1729 +2899 1124 2325 2296 +3196 406 4890 688 +670 3055 695 3514 +2816 1717 2819 2766 +3313 3251 1727 2507 +3289 4981 2378 1931 +3487 95 695 3478 +2818 1928 2816 2022 +358 2732 2669 2229 +3587 3589 3606 3578 +2707 3047 388 2298 +1184 2732 304 294 +334 3280 2974 3100 +3159 3079 3121 2568 +913 2653 2791 839 +21 874 2930 2775 +4255 1771 1713 1742 +281 2900 3150 3174 +2817 2805 2801 1936 +2821 2818 2816 2744 +2805 2817 2381 2769 +2820 2801 2698 1537 +2822 2821 2819 2785 +2817 2820 2823 2786 +1938 2823 2820 370 +2822 2824 2821 1871 +2823 2553 2381 315 +920 2613 2748 333 +2552 2827 361 2627 +398 2873 2826 886 +3166 710 3222 2642 +2929 2933 2950 279 +2834 2606 1172 828 +400 698 2890 13 +2003 796 2592 879 +5079 2835 5206 3153 +2892 2622 2830 361 +5203 2833 929 5112 +5105 796 908 5049 +1519 2797 2794 1796 +2960 321 2972 2479 +3258 917 3216 3228 +2960 2974 332 3676 +3267 1821 2528 286 +3405 5109 3245 5123 +3080 3093 3270 430 +3143 3045 3207 3192 +1106 581 4283 3446 +383 4712 4884 1426 +3124 2896 2663 2891 +1172 2606 2377 792 +828 2862 1054 2793 +3226 2976 2595 2558 +2376 1024 2597 2777 +470 4240 473 3442 +2540 2906 2869 2719 +2476 3186 3274 5194 +2792 2555 920 395 +2857 153 2861 890 +2856 2859 2858 2699 +836 2857 2860 2605 +2857 356 2860 2607 +2858 2859 2862 1054 +427 2856 2555 2652 +2860 2791 2653 2849 +3017 3016 2509 1979 +2641 2376 2908 2401 +2643 2346 825 2934 +3691 516 3671 184 +3249 3243 3314 3317 +3182 3161 3129 3181 +2853 2641 2779 2644 +2997 2926 364 344 +2893 2872 2873 2572 +2871 2888 2881 2665 +2892 2871 2887 2827 +2459 3023 2918 2635 +2520 2611 2666 394 +2877 2640 2894 1024 +2876 2950 386 2556 +688 3325 3297 3296 +3204 3216 3105 3212 +1032 5105 5104 2592 +2872 2889 2784 2594 +825 2902 2914 2896 +902 3222 201 1169 +400 2929 279 2498 +2717 2917 2778 2897 +905 2897 2917 891 +2931 2873 2784 886 +2889 2872 2891 105 +2888 2935 2881 884 +2831 2777 115 2564 +2888 2893 2847 2662 +2873 2663 2893 2834 +2892 2891 2871 2790 +2750 2929 2876 2615 +918 5176 1022 5163 +2932 2882 2935 2847 +2886 2961 2885 2622 +938 2616 2949 2659 +2969 3063 2984 2798 +3316 3283 2815 3192 +4380 4022 3326 4268 +386 2778 2882 2717 +337 698 2988 2619 +3427 250 2443 3583 +2634 570 2964 394 +1024 2376 2853 2720 +13 428 2520 698 +2864 2915 2917 903 +2362 374 2511 2408 +3012 13 233 2547 +3267 3237 3307 2528 +3266 415 2078 3200 +2397 2925 195 2964 +2616 2882 2776 3091 +2908 2597 2639 2919 +2989 2675 2988 428 +2641 2908 2885 2886 +2924 2956 2874 2490 +2994 205 2915 903 +2923 2490 2998 353 +2923 2397 2956 2589 +44 2978 2393 374 +2920 2925 2921 345 +2796 2918 2537 364 +2998 2913 2923 2939 +195 2998 2870 476 +3277 4207 3084 4210 +3320 431 367 2057 +2829 2894 2638 2884 +2645 2970 2994 2813 +2779 2932 2494 2887 +2717 2896 2931 2663 +2522 2937 2829 444 +2574 2935 2865 2623 +2494 2896 2934 2889 +814 3295 3283 508 +825 2950 2933 481 +3548 3587 3594 3569 +2964 2925 376 2539 +3002 2307 1224 187 +3125 3194 3145 2441 +912 371 437 2968 +4473 4528 4422 642 +4094 4657 4181 4413 +714 3459 3533 3458 +3223 3262 2010 3215 +481 2952 85 472 +337 2949 2950 2556 +2948 2954 481 2898 +2877 2829 2937 2948 +3152 3079 3159 3048 +393 2954 2953 2947 +2962 2952 2955 811 +2952 337 2955 2949 +2953 2954 2990 1003 +2459 2918 2774 2921 +812 293 87 2423 +2959 2962 345 2989 +430 2958 353 2995 +2514 2840 2838 3046 +3149 3088 3213 2897 +3145 2586 2958 2953 +4324 1096 3844 471 +2913 2939 2487 2905 +388 1987 3002 2534 +3001 3748 3165 447 +3681 3065 493 2357 +3048 2942 377 2353 +3698 3673 3583 2899 +2976 2930 2971 21 +240 2970 2390 2789 +2838 3279 298 2975 +564 3736 3064 2314 +2514 2810 2840 3062 +2351 2972 3031 3081 +240 3263 2970 2850 +2979 3024 3021 2982 +2922 2506 2473 2362 +812 2977 2393 2481 +4166 522 4202 3632 +3170 476 2327 2351 +2977 2509 3018 2533 +3148 3564 3373 3403 +3062 2443 2899 817 +4895 4056 4307 4733 +1759 3010 3113 3004 +2988 2645 2994 2619 +2987 2990 2916 2903 +2990 2995 2916 2958 +717 2989 2988 2955 +372 4112 4089 490 +814 3283 525 3143 +296 1821 2995 3080 +2930 3264 2987 2919 +2989 2993 2335 2959 +293 2554 87 245 +195 2870 2796 2307 +2925 2920 2926 442 +4177 84 4149 4065 +3769 134 3051 2320 +3763 2966 2339 3064 +2965 3031 2479 2940 +2772 3018 2459 3012 +3006 2986 3005 3111 +3007 3004 2490 353 +3009 3004 3007 2528 +3005 2635 3006 2335 +3029 3010 3009 237 +3008 3006 3028 455 +2986 1987 3014 3008 +2675 2459 3012 428 +3015 3011 3003 2910 +4912 14 1418 4837 +3010 3034 3310 237 +2509 3016 3012 2547 +2633 3015 2863 2460 +2501 2863 3024 2710 +2492 3021 3003 2982 +3313 4078 2507 451 +2362 2535 2506 2326 +3023 44 2977 3018 +3023 3030 44 2537 +3022 3021 3027 2874 +812 3025 2977 3017 +3026 3027 3024 2501 +3025 87 3028 2491 +3028 3023 3025 2635 +3026 3029 3027 3009 +2554 3030 3028 3008 +3029 2506 3022 2396 +344 2975 3002 2307 +2485 304 3033 2732 +237 3032 3303 146 +3014 388 3309 3047 +3412 3448 3493 434 +3664 3632 70 3661 +3249 3335 3325 3323 +3732 3065 3577 156 +3065 2342 3577 2356 +3919 3718 3832 51 +3755 2363 2270 3728 +3682 2104 3047 2536 +3050 3512 3511 3392 +582 3061 62 550 +3142 3090 2844 3170 +401 2960 1224 2479 +2808 3042 3034 1978 +2951 371 2968 3126 +3117 3138 3058 3585 +3504 3043 3470 3365 +3712 3806 3969 3000 +3447 3501 3419 3495 +3103 3117 2354 2443 +645 562 3899 3650 +508 3295 3368 2800 +3554 420 3627 3418 +611 3185 3366 3328 +2354 3049 3122 3565 +3171 437 3144 3127 +684 3532 3531 2568 +3532 3539 3044 2352 +2974 3100 3063 2984 +3062 3595 3672 2899 +2973 3001 518 794 +2967 3039 3038 2371 +3067 794 3068 3374 +3334 3066 3069 3646 +3069 3066 2314 3070 +3483 3067 3068 611 +3422 3366 3375 3068 +516 3694 3556 3633 +3378 445 3637 519 +4295 4652 3939 4399 +19 3425 4887 1122 +3824 3783 3785 3734 +3677 3657 3693 3608 +3646 128 514 3334 +3367 1727 3099 426 +2951 3182 2811 3129 +3272 3266 2843 2993 +298 3118 500 2975 +3376 3377 715 3549 +2557 479 3467 3441 +2927 1712 3655 4177 +814 3354 3187 3233 +3591 3162 3427 3704 +3347 3256 3259 46 +2961 2642 3158 201 +3212 3137 3154 3206 +3123 3193 3045 442 +3124 3227 3149 2914 +4107 50 4945 981 +3154 2843 3200 3146 +3188 3144 3133 3175 +3555 3586 3548 3557 +3473 3472 3097 3122 +3107 3096 2087 3121 +3124 45 5102 2377 +3101 3078 3100 3667 +3099 2810 3102 3062 +3099 3102 3553 250 +2354 3101 3100 2443 +887 377 3179 3053 +4868 463 3453 4740 +3200 2879 3215 3154 +3232 3265 46 3259 +3518 3097 3468 550 +3147 3284 4866 3350 +3233 3379 814 3203 +415 3204 3200 811 +3113 3237 3142 3004 +3281 3113 3170 2351 +3111 3112 3286 2986 +3471 3549 3465 3541 +3136 582 3201 3161 +3439 2352 3544 3138 +3053 3140 3049 3445 +2353 3126 2327 3081 +5312 686 4742 5138 +257 3220 3184 3313 +3122 2811 3097 329 +3096 3180 3121 3058 +3090 3142 430 353 +3098 3091 3213 2847 +2941 472 1828 2217 +3172 3048 3152 3118 +371 3163 3059 3189 +3169 2327 476 2364 +3079 2868 3531 3164 +3325 2782 3249 3240 +4100 4101 2345 1784 +564 3611 3576 3551 +3094 2487 3134 2217 +3133 2487 3173 376 +3537 3510 3586 3557 +3531 3532 17 3115 +3155 3089 3190 3205 +329 3140 3116 3049 +3140 2568 684 377 +3138 3139 3546 3117 +2487 437 3169 2364 +3123 3045 3271 3111 +2844 3205 3269 2992 +3059 437 3094 3167 +811 2941 3146 2962 +430 3093 3194 3145 +3108 4947 4969 346 +3559 2983 106 3506 +2642 2961 3091 2776 +2815 508 2624 3383 +3339 3338 2538 1160 +3156 281 2951 3126 +2833 5112 917 3258 +3089 3155 3105 3093 +3137 3223 3154 3268 +3318 3152 3160 298 +3387 3382 3181 3163 +3217 3088 77 23 +3179 2951 2811 377 +334 3156 3179 1896 +3389 3115 2868 3486 +478 3593 3701 3086 +3167 3164 3157 3127 +3163 459 3129 371 +3809 3949 2966 3717 +2828 3224 1887 3225 +3520 3163 3382 3144 +4196 4719 659 755 +3128 3173 3171 3141 +2981 3192 3045 3112 +3189 3169 3188 3059 +2327 3189 3174 3126 +3177 3188 3169 3134 +3192 3172 3191 2815 +3385 3209 1828 3094 +3184 2538 257 288 +3193 3173 442 376 +3539 258 2617 3525 +3180 3160 3159 3103 +334 3179 3122 2354 +3486 3383 3157 2868 +2624 2087 3079 2868 +3460 3241 703 729 +3336 3176 3120 3342 +1122 3057 283 19 +2010 3273 2854 5207 +3296 3085 679 723 +3209 3171 3173 3094 +3191 3172 3171 3127 +3137 3214 3360 3203 +3189 3210 3174 3387 +2844 3170 3174 2900 +3194 3208 3090 3177 +3146 3206 3193 2941 +1887 3224 2078 3258 +3234 1731 4879 2799 +1131 3372 3403 3503 +5072 5076 4322 3235 +3228 3204 148 2616 +3110 3105 2912 3093 +17 3115 3202 3477 +3526 3201 136 22 +3381 3190 3205 3109 +2879 3110 3199 472 +3137 3207 3203 3143 +3208 3089 1828 3194 +3210 3205 3208 2844 +3207 3206 3209 3193 +3175 3210 3208 3188 +3207 3209 3388 3191 +915 901 3229 5121 +2879 3214 3089 1828 +45 3124 2961 2622 +606 3190 3212 3384 +2946 3257 3216 3105 +3215 2839 2476 2879 +5098 45 3158 387 +5303 5261 5304 104 +5020 5127 4322 4867 +671 3120 2782 3328 +917 935 1069 5157 +2828 205 339 2883 +2946 3421 3256 3155 +3166 63 3195 906 +5193 3227 3166 2642 +339 3263 914 2850 +3225 5157 3228 3091 +3227 2839 1887 3199 +3211 904 474 3305 +5236 5291 5139 3455 +4859 4786 4134 4744 +914 3106 673 340 +3357 700 3085 3109 +670 3196 723 3296 +1094 5019 3198 3321 +3273 5237 5256 5207 +3271 3276 2911 3111 +4942 4710 4237 4954 +4891 4954 4810 1344 +3470 3368 3462 3130 +695 685 3183 670 +1040 5055 3288 566 +3250 2867 3462 3318 +5130 5012 5328 5339 +2842 681 5302 5236 +4009 3767 4104 3796 +4185 3356 84 1710 +2017 4085 3343 1954 +3037 3130 257 2867 +3243 3472 3280 334 +3280 2802 3314 332 +4964 3253 4313 792 +957 5190 3252 839 +4930 566 1077 4319 +82 3260 3304 414 +3268 3087 3349 3223 +3258 3262 2078 3215 +3195 3153 3257 2839 +3272 3260 3087 3106 +3259 3267 3255 392 +5169 4997 5104 1166 +5079 46 3257 2946 +3264 296 3226 2976 +717 3263 205 2994 +2078 914 3266 3106 +2912 3265 296 3080 +3260 3272 2911 2841 +3256 3269 3270 3155 +525 3271 3268 3143 +3271 3272 3268 2843 +3237 3270 3269 3142 +3267 3259 3270 3080 +5267 5215 3236 3186 +5214 5211 5267 2854 +5234 3350 5255 679 +3307 3327 3282 3237 +1119 713 81 2927 +2577 3298 1104 3289 +3317 321 3281 2972 +3251 3250 1727 2810 +3279 3286 3316 3112 +3286 3312 3324 3276 +2936 3323 2992 2900 +4966 3331 3108 4773 +4233 433 249 4194 +3310 3282 3281 3113 +2275 3319 4075 2073 +3242 5043 4970 4590 +2803 3278 2368 1184 +4321 4101 431 367 +446 93 3760 4058 +469 1114 3812 2085 +3646 3294 4210 310 +3293 4047 1119 1671 +3325 2936 3296 3055 +2878 3295 3187 3234 +2878 3338 346 375 +3302 1160 3299 3278 +3300 3298 1058 2378 +3299 3304 3301 2379 +3303 3300 3307 146 +3303 2730 3298 1104 +3301 3312 3302 3033 +3300 603 3307 3255 +4839 5005 5081 3229 +4448 3977 3956 4228 +3301 3304 3276 2911 +3309 1139 288 2104 +3308 3310 321 3034 +3312 3286 3309 3014 +585 1504 4263 267 +2730 3282 3310 3303 +3328 3120 2802 3019 +3251 257 2867 1139 +5236 5123 5141 5251 +2900 3317 3323 3281 +3318 2867 3316 3279 +3317 281 3243 3156 +2075 431 3287 4092 +2928 3812 1114 2084 +5198 3235 5177 5144 +4865 4691 1037 4703 +3324 3283 3037 3316 +3327 3323 3335 3282 +3130 3037 2878 3295 +2901 4023 4379 629 +3324 3346 525 3276 +3220 3313 3365 3057 +3449 697 3455 5125 +5278 5250 5273 3454 +3284 4972 5281 4910 +5296 4958 5059 4896 +3414 3423 3407 310 +3077 1721 583 3067 +2538 3338 3037 3324 +3339 3184 540 4102 +5093 4904 5007 826 +3151 3297 3335 3345 +90 3151 3336 1116 +4330 4985 4959 4264 +4236 3363 4150 635 +4077 4102 4078 3184 +3248 4028 4059 2287 +4351 2274 4646 4341 +375 438 3346 3338 +3348 3345 603 3327 +5142 3349 82 3087 +3349 3354 3346 525 +3355 3348 3347 3256 +3108 4773 3275 375 +5005 4839 1103 5119 +4117 4953 4972 4978 +220 4864 50 4893 +679 3348 3355 3085 +3349 4846 3354 675 +529 3247 4190 4064 +3360 662 675 3233 +4913 3361 3937 4816 +4952 4864 4979 4941 +3357 3421 606 3190 +3907 4909 3358 4841 +1983 1077 1040 1779 +4869 287 3341 4267 +4236 3371 3680 3950 +3366 3050 3369 3328 +3365 3070 3416 3057 +3375 3369 3558 3078 +3514 3469 3240 3055 +3365 3504 3367 1727 +3955 3958 3931 539 +81 3432 1119 3364 +3495 270 3197 3501 +2983 3588 106 2593 +41 310 3423 3066 +3367 3551 3070 2314 +3538 499 3082 3564 +3082 499 3590 3580 +440 3690 3879 3072 +3380 3402 3381 3109 +3476 3379 3383 508 +3379 3384 3388 3203 +3385 3477 3157 3167 +3380 3387 3181 3150 +3381 71 3385 3214 +3382 3388 3384 3175 +3660 3615 3629 4074 +3388 3157 3383 3191 +3387 3381 3385 3210 +3478 582 3468 3161 +563 3557 3471 3536 +3622 3552 3620 3584 +86 3490 3043 3416 +3614 495 289 3594 +200 3556 3396 3616 +3695 3617 3396 3671 +3571 3395 3600 3394 +4144 113 638 3762 +4121 4129 3400 3623 +3408 489 3624 3479 +3401 418 3398 413 +3400 4129 4175 4200 +3379 3476 71 3460 +3439 3197 270 2983 +3498 2667 379 3493 +5271 2842 4790 5128 +3407 126 721 4214 +3333 450 29 3406 +3413 4132 2135 3399 +3844 4304 4980 2368 +4813 5322 4063 4118 +4261 4570 4806 5001 +3035 9 3429 450 +3429 722 126 3408 +29 3415 3333 1671 +3490 3416 3414 1122 +3415 3392 3422 3366 +3422 3428 3418 3550 +3423 3417 517 3056 +3463 3052 3420 3474 +3419 3480 3461 3475 +675 2010 3360 3223 +3423 3416 3417 3070 +3422 3418 3333 3374 +3428 3505 3497 9 +4902 406 3489 3074 +1094 3449 4880 5221 +3086 3560 3445 2904 +3424 86 106 3417 +2488 3448 3412 3413 +3461 3480 379 3484 +3433 4242 636 721 +4907 4903 4236 3371 +3431 4241 470 29 +1037 4708 108 1801 +4726 473 4871 292 +5100 3453 3441 4726 +3446 473 4683 4883 +3440 3453 685 463 +3542 3403 3116 3564 +3467 3441 3438 3461 +3083 3436 3440 3494 +711 4871 2852 3491 +4302 5099 5300 5065 +5056 4892 830 4208 +715 3427 3538 3117 +4243 3437 2845 4877 +3463 3496 3052 3519 +2667 3035 3429 3450 +915 3329 3426 5129 +470 473 4242 3448 +687 662 5211 606 +4790 5235 5276 5213 +3436 3454 3438 3104 +876 5100 3330 3453 +3230 4880 3329 930 +5297 5249 5099 4851 +5323 5321 5202 5319 +3502 2488 2945 3496 +3561 2945 1131 3503 +3402 3183 687 700 +3494 3420 3430 3440 +3469 3472 3240 3243 +3494 3447 3419 22 +563 3471 3481 3508 +3561 3537 3580 3114 +17 3522 3523 2617 +95 3083 685 3440 +2087 3516 3107 3389 +3462 3368 2087 2624 +3050 3511 3240 2782 +3464 3390 3537 3114 +3504 3462 3096 3250 +3096 2593 3504 3588 +3419 136 3475 22 +3478 3420 3474 95 +3380 3487 3402 695 +3486 3382 694 3201 +3475 3389 3516 2804 +3562 2488 457 3399 +3499 3430 3420 3515 +563 3464 3507 3534 +457 2488 3505 9 +3069 3714 3724 451 +728 3485 3430 463 +379 3484 3491 4871 +3477 3487 3181 3161 +3486 694 3476 2804 +3511 3489 728 406 +3490 3491 3488 3425 +3489 3392 3492 3415 +3485 3489 3492 3442 +3493 3491 3490 434 +3035 3404 3497 3492 +292 3463 3461 3441 +3372 3524 62 3052 +2667 3500 3447 3458 +86 3424 3498 3493 +3497 3500 3499 3404 +3517 3498 3501 3480 +3501 3498 3502 3496 +3499 3500 3372 3052 +3500 3505 3503 3458 +3502 3506 3197 3459 +3473 3050 3472 3369 +3424 3506 3502 3482 +3148 3503 3505 335 +3533 3510 3537 3481 +3521 3464 3540 3534 +3692 3690 3689 3882 +3568 3135 3507 3557 +3470 3043 3513 3488 +3043 2593 3517 86 +3511 3515 3514 728 +3368 3513 3516 2800 +3513 3517 3516 3480 +3514 3515 3468 3478 +3515 3512 3518 3499 +3517 2593 3107 270 +714 3526 3524 3447 +912 459 17 3167 +3541 3508 258 557 +3523 3466 3532 3539 +684 3466 3522 3545 +3525 557 3519 3495 +3524 3526 3178 62 +3519 2617 3525 3202 +445 3609 528 3664 +3696 3700 537 3610 +2617 3540 3547 3534 +4123 3644 184 38 +459 3060 3136 3129 +3060 3522 3136 3061 +3562 3507 3561 2945 +3508 3481 3529 714 +3756 3617 3658 3659 +715 3549 3390 3546 +3465 3507 3135 3471 +3560 3376 3445 3585 +3178 3522 3543 3061 +3547 258 3508 3529 +3542 3114 3521 1131 +3549 3541 3544 3439 +3544 258 3545 3539 +3546 3542 3543 3116 +3547 3546 3543 3523 +3536 3544 3545 3140 +563 3545 3540 3529 +3582 3095 2938 3569 +3082 3114 3536 3542 +106 3551 3611 3417 +3550 3558 3132 3375 +537 634 3391 3610 +3572 3558 3565 3101 +3056 634 1129 3611 +3095 3591 3590 715 +3071 3693 3394 3633 +3135 3510 3095 3390 +3553 3551 3588 3367 +3612 499 3148 335 +3427 478 3538 3572 +3575 3533 3465 3459 +3567 3533 3574 3479 +3696 3695 3571 3603 +2983 3376 3585 3439 +3585 3553 3588 3058 +3604 3590 3591 3593 +3619 3568 3578 3562 +3569 3587 3567 3510 +3568 3614 2938 3548 +2266 538 1737 539 +3703 3563 3396 3581 +3576 3553 3560 250 +3620 3574 335 457 +3573 3578 3575 3562 +335 3574 3580 3561 +2332 3132 478 3572 +3039 1124 3038 2296 +3574 3584 2807 3567 +3664 70 4106 3639 +3377 3575 3589 3465 +3571 3603 3582 3591 +3616 3581 3594 3548 +3602 3669 2969 2904 +3606 3391 3618 3578 +3564 3538 3565 3049 +3095 3589 3587 3135 +2807 2938 3586 3568 +3373 3565 3558 3473 +3586 3590 2807 3580 +3589 3555 3566 3377 +3581 3566 3555 3086 +3597 3644 3614 3619 +3607 3610 3162 3566 +3393 3582 3605 2938 +3598 3667 3673 3063 +522 2347 3652 4193 +38 3592 289 3618 +3672 3675 3732 3595 +3616 495 3634 3614 +2213 3396 3617 3692 +3742 3720 3710 109 +3583 3699 3668 250 +3605 3563 3604 3581 +3610 3606 3603 3566 +3606 289 3603 3594 +3584 3605 3604 2807 +3593 478 3612 499 +562 3677 3631 3076 +3679 3527 515 3613 +3593 3552 3528 3604 +3554 3612 3132 3550 +634 3607 3611 3559 +3661 4186 4123 3609 +3393 3592 3599 3569 +3675 425 3386 2507 +3599 3394 495 3582 +3600 3395 3535 3689 +3619 3597 3622 3584 +489 3592 3618 3567 +3625 3391 634 3573 +4493 4337 4751 4068 +3391 3623 4121 3618 +3624 3398 3622 489 +3625 3626 3623 3399 +3624 3620 3627 457 +3624 3627 4158 2135 +3626 3625 3056 517 +3927 3866 3924 3910 +3386 425 3682 2104 +2254 3944 3941 2090 +3608 440 519 3633 +4066 2980 3036 4126 +3631 3071 3634 3556 +3641 3633 516 3599 +3798 3929 3968 614 +4065 3960 496 1473 +523 3879 3886 3072 +3944 3978 4039 3984 +3641 3579 445 519 +4190 4129 924 1777 +3644 3639 184 3634 +3915 2066 3892 2046 +4120 4136 3651 556 +3641 3530 3656 3592 +4448 4297 18 98 +3293 3077 4047 3067 +4031 4006 4005 1708 +520 3911 3649 3718 +3651 4136 3648 3854 +519 3727 523 3054 +34 3643 3649 3925 +113 3596 4448 98 +4182 4200 4132 413 +3957 4195 4197 3893 +4282 3084 1794 1783 +3644 418 70 413 +3076 3678 3884 3819 +3697 3757 3535 669 +3689 3535 3890 3679 +493 3386 3681 3735 +4126 3613 418 3036 +4228 4201 113 638 +2275 3793 4091 4103 +3036 3579 3917 3527 +3699 2280 3668 3736 +3668 3747 3669 2781 +426 3699 3595 3099 +3602 3665 3666 2332 +3583 3666 3740 3704 +3902 3896 3874 535 +3395 2866 200 231 +1124 3676 3598 3063 +2969 3726 3699 3595 +3960 4084 328 3811 +3731 3598 3615 3715 +3672 3684 425 2840 +440 3678 3076 3608 +3873 3657 3677 3858 +4186 3785 3659 3609 +4365 3364 4157 4131 +3660 527 2967 2349 +527 3629 2088 3042 +3782 3761 3855 3877 +3676 1124 2088 401 +3787 235 2027 2228 +3836 3688 3786 3838 +4381 3839 4195 3929 +3686 3746 3738 1672 +3691 3617 3509 3659 +3509 3694 3691 3378 +2866 3689 3690 515 +3693 3509 3600 3883 +3556 3694 3692 3076 +3071 3690 3693 440 +3563 3697 3395 231 +3563 3702 3697 3528 +3695 3696 3658 580 +3726 2969 3739 2388 +3673 3665 3602 3667 +1958 3702 3701 3528 +3704 2781 3700 3162 +2360 3703 3700 3696 +3704 3702 1697 3571 +3701 3703 3669 3086 +3755 2270 3777 429 +924 2011 1129 537 +3842 3881 524 3869 +3920 3947 4041 3797 +3771 407 134 300 +3601 559 531 504 +1981 2001 2027 3815 +3804 3051 577 368 +3714 3736 426 2314 +530 3713 3715 3483 +426 3675 3714 2507 +2331 3753 3719 3739 +530 3165 3721 447 +3040 3847 3854 3648 +2280 3716 3729 3726 +202 3779 3601 2164 +3730 3717 2361 3729 +3969 1967 4003 3810 +3757 2363 552 2284 +4043 583 530 3483 +3726 3729 3732 156 +3698 3719 3673 3725 +34 4106 4120 3650 +3737 3041 234 3747 +3721 3719 3752 3725 +530 3721 1509 3731 +3732 3675 493 3730 +3038 3598 3731 3725 +3816 535 2252 3913 +4172 2048 4187 3075 +4074 3935 4098 3660 +3665 447 2973 3713 +3728 3764 2363 1958 +230 3877 3688 3778 +1123 3716 3740 3698 +2270 3739 3747 3669 +4091 4113 4269 2275 +2306 3601 531 2226 +3825 4038 3962 2040 +635 3793 536 4102 +25 4108 4077 468 +230 2046 1981 3688 +3740 2331 3728 3666 +3775 3763 234 2966 +98 4124 3762 3789 +3788 235 3772 3777 +556 1737 645 4120 +3729 3754 2361 2223 +3716 3770 3754 1123 +3769 3752 3753 448 +3772 3041 3705 3773 +3776 2213 3757 3535 +3756 2360 3723 3658 +1988 3854 533 3866 +617 1712 4258 4149 +4161 4015 4112 3291 +3892 3909 3848 3683 +3397 3749 4073 3920 +3764 3748 2338 3001 +3737 3763 2318 2011 +5212 4806 2770 4773 +4278 4332 4267 4079 +4055 3246 3831 4325 +3867 3818 3891 3880 +3000 3806 3770 3754 +3769 3774 3771 3753 +3709 3770 3773 429 +3790 552 3750 3755 +3774 3790 3771 3755 +3775 3773 3770 234 +3808 3792 3774 3748 +3888 42 3788 3756 +3778 3750 42 3705 +3777 3738 235 509 +558 3720 3799 2021 +599 494 610 3863 +3784 3855 2340 3823 +3888 3889 3683 3878 +3832 349 3075 51 +3781 3824 3888 3788 +3890 3075 349 3679 +2252 3914 3876 3686 +3685 3813 3790 407 +552 3784 3750 3776 +3749 3946 3847 3839 +3787 3791 3772 3773 +3790 3813 2337 3792 +3791 3810 412 3775 +3814 3663 3744 2102 +1981 3822 3815 1672 +3815 3821 3828 531 +1687 3246 3840 252 +3708 3802 2336 4119 +3985 3980 449 3635 +3830 3779 202 253 +3980 3945 2090 3981 +249 4164 4258 4224 +3803 152 2047 3797 +3802 3813 1125 2108 +3712 4028 3805 1644 +3804 1990 3807 2285 +3808 3051 3807 3769 +3806 3805 3809 2361 +3809 3810 3806 3775 +3807 328 3808 3165 +3811 3722 3808 3792 +1967 3810 3674 3961 +3320 4099 3292 2259 +3791 3787 3803 4003 +3793 635 3950 283 +3795 3711 3794 2179 +3733 2252 3874 2316 +4111 174 4043 583 +3768 3869 3881 3850 +3857 526 3868 3657 +3863 3904 3881 649 +3822 3829 3795 2306 +3821 3794 487 1672 +230 2027 3781 235 +3075 3784 2340 2048 +3743 4057 555 4048 +3827 267 1646 4010 +2037 3826 2025 1822 +561 3835 3829 3795 +3828 1661 3830 3821 +4001 419 3829 3799 +4009 4030 3767 596 +3040 1988 1972 3783 +1988 2066 1972 3892 +3922 439 595 2040 +4019 3998 3828 2001 +3838 2046 3915 3686 +3852 3978 3895 2316 +487 3836 2316 3686 +3687 98 520 3789 +3796 2254 3966 532 +4005 598 3944 1661 +3845 3863 3707 3869 +488 3908 3872 3887 +4330 4049 3409 2963 +3842 524 122 526 +4136 3986 3918 614 +4040 3919 3789 3718 +3914 3761 3908 3876 +4325 4438 4478 4055 +3818 3853 649 3870 +330 3912 3886 349 +2277 3942 3837 3906 +649 3863 3870 3850 +325 3758 3718 3649 +3892 3781 3683 230 +4430 3928 1677 4268 +3858 526 3897 3819 +3857 3894 562 3678 +533 2277 3895 3927 +4342 4299 4180 4312 +4448 3956 4250 2347 +3868 3867 3865 3887 +3780 3820 3842 3853 +3867 3896 3865 535 +3864 3898 3862 488 +3925 3628 3758 3912 +3862 3768 3864 2252 +3862 3897 3869 3819 +3818 3868 3707 3842 +3853 3905 649 3850 +3923 645 646 3885 +3873 3843 521 3884 +3894 3872 3879 3678 +3906 3670 3880 3816 +3925 523 3886 34 +3877 3887 3848 3786 +3876 3683 3878 3738 +3883 3877 3782 42 +3637 3873 521 3378 +3905 3874 3891 3768 +3820 3901 3707 3818 +521 3883 3889 3509 +3882 3884 3878 3692 +3887 3883 3872 3657 +3871 3899 3900 3924 +3637 3851 3875 528 +3876 3884 3843 3862 +3890 3782 3784 3776 +3890 330 3782 3882 +3785 3889 3888 3659 +3880 3896 3901 3768 +3642 3833 3761 3855 +3654 4135 4120 3959 +3858 3900 3899 3873 +3837 443 3859 3916 +381 3891 3670 3864 +524 3898 3857 3868 +3897 560 3900 3865 +3054 3894 3885 523 +3898 3885 3894 488 +381 3904 3891 3881 +3906 594 3670 2231 +4450 3976 4061 252 +3901 494 3905 3820 +3904 599 3880 3870 +597 3902 3874 3852 +4125 3361 4916 4858 +3909 3910 3848 3843 +3761 3912 3908 330 +3908 3628 3921 488 +4193 4151 3648 4191 +3866 3909 1988 3851 +3921 3916 3914 3733 +3848 3913 3915 3786 +3914 3916 3642 3836 +3895 3915 3913 2316 +4151 4191 3664 528 +3983 2266 3846 539 +3920 3847 3947 3040 +3762 3919 3708 4144 +3913 3910 3927 535 +2092 1967 3834 482 +3924 556 3926 3871 +3925 3923 3628 3885 +3651 3924 3866 3875 +2231 3923 2266 594 +2231 3859 3628 3921 +620 3856 4347 629 +3980 4464 3635 3687 +3931 539 3934 3942 +3970 3370 3958 3930 +4711 4719 4196 246 +3971 4012 2093 2118 +3930 538 485 597 +3735 4103 2073 4097 +4292 511 4467 4492 +3358 4911 4912 5154 +4223 4139 4147 722 +3073 4650 454 1765 +1418 4863 4705 4912 +3945 3988 378 3630 +3983 3984 3852 3930 +4124 3988 3945 4389 +3630 3841 378 3638 +3941 3946 3943 3800 +3789 3945 4040 3980 +3708 3919 2068 534 +3992 4034 3991 2091 +1721 328 583 3165 +4047 4131 3364 3814 +4291 4785 4636 4555 +2068 4040 378 4039 +559 3969 4003 504 +3981 532 2090 4377 +3370 3968 3959 614 +3861 3306 4407 503 +4442 4381 4250 3654 +3370 3959 3931 1737 +3955 4247 3958 3893 +3961 3636 4140 3674 +4138 4137 3960 3811 +4481 3743 4060 492 +172 1742 640 2093 +2038 3979 3971 982 +4498 4472 4574 4456 +4353 3840 3997 4459 +1514 4546 4516 1474 +4382 3970 3635 3955 +3953 577 3722 3051 +449 3968 4443 3931 +3993 3964 3933 1657 +4386 3994 596 600 +3974 4456 4497 4411 +644 4383 3973 3976 +10 4391 4114 4455 +4127 4358 3903 3974 +3306 2317 4355 4141 +4035 3638 3991 3837 +4010 4011 3964 2101 +3946 3800 3798 3929 +432 3954 3800 4441 +2350 4486 4384 4067 +3942 2277 3986 3918 +3942 3985 3638 449 +3986 4037 3984 3798 +3983 325 3985 3846 +2068 378 3990 598 +3943 3989 3941 3997 +3996 3990 3988 3994 +4041 3987 3989 1708 +3948 3978 1661 487 +3998 4036 3948 2001 +3971 2093 1963 774 +4006 3997 3989 3972 +647 4414 4543 4399 +4041 3989 4073 338 +3988 3994 2254 3966 +1661 598 3992 3835 +4005 4006 4009 2254 +554 496 4137 423 +4002 4004 4005 3830 +4001 4007 2096 1353 +3953 3722 2108 3813 +4031 587 419 4001 +4001 3647 3999 3841 +596 3999 3647 3994 +4021 4009 4008 4002 +4007 591 2037 2076 +3246 4007 3831 3999 +3826 3979 2038 1822 +4081 4012 3979 2074 +4317 3933 4011 2116 +1506 4268 4338 4430 +4463 4461 4441 4377 +4270 4373 1701 3760 +4388 605 4249 4506 +4099 367 4100 224 +4543 4414 4431 4626 +2108 4033 561 3835 +2097 2025 4059 2064 +2096 4030 4042 4007 +2268 2901 585 4259 +2268 615 3326 4262 +4026 4356 4171 1703 +4121 580 924 537 +4024 4295 4299 4180 +4232 4299 4352 4333 +1990 565 3343 3804 +4539 4548 4557 4515 +4048 4021 1469 3831 +4033 595 4004 3647 +226 439 577 565 +4019 2092 4031 1708 +4035 4036 2066 3948 +443 4039 4034 3978 +4034 2068 534 3992 +4039 325 4040 3985 +490 555 4045 3743 +4037 3952 4035 3638 +3946 3952 3847 4037 +3996 3708 3990 2336 +2037 2025 4048 4021 +4103 3817 4097 3724 +4783 4791 776 4669 +4038 565 4084 439 +4271 4226 4207 4147 +3950 3294 3646 283 +4054 4042 3825 4030 +3844 4329 4069 4324 +4447 4564 4508 573 +4401 1504 446 4058 +707 652 4393 4474 +4298 4552 4276 1506 +4055 4359 4057 4048 +3849 4254 4054 3767 +4852 4903 4146 2985 +3825 4479 4058 4054 +4057 4477 3291 4051 +3343 565 1645 4020 +496 4484 1473 3962 +3903 4358 4130 4454 +4141 4280 4067 1791 +5119 1103 3410 5029 +1710 3356 4138 2338 +4140 3636 2999 128 +522 3632 4191 4173 +617 4164 3982 4062 +1765 2018 3621 1785 +4332 1732 4339 4049 +4345 4351 4153 220 +4635 1092 4760 4256 +1791 4073 4280 338 +4072 3762 4124 3996 +4078 3735 4077 3386 +4079 3287 4101 2345 +4780 4704 4668 1137 +3342 4074 3745 567 +4074 3342 2102 3019 +4075 3766 2275 536 +5120 953 4672 4791 +585 4317 267 4011 +4112 4113 4089 1140 +4163 1693 4096 189 +584 490 4045 3674 +4087 1140 4086 3248 +4092 4088 4085 1749 +4088 174 4085 1990 +4086 4097 4087 2246 +4082 4111 2991 174 +4102 4108 536 1096 +4111 3741 4131 3663 +1114 2073 3319 4086 +4476 680 4392 4535 +4356 4276 2944 4410 +4419 2268 4408 1647 +4300 4083 4303 4338 +3935 4043 4088 1509 +469 25 2073 3735 +4017 365 3812 2261 +365 4017 3131 1970 +4075 3290 4222 3131 +3342 4090 3744 3336 +2102 3663 3935 4043 +615 591 4254 3246 +4752 4717 4500 4167 +3727 4151 4197 3579 +3092 858 4775 4963 +3745 2345 4090 2577 +4830 4812 4946 1393 +4450 4130 4306 4468 +514 4089 4091 3817 +2991 3760 4082 93 +4270 3741 4082 2075 +4525 4513 3975 4284 +511 4275 797 4492 +4349 4953 1417 5240 +4955 3352 4967 4804 +3410 4531 5029 4711 +2047 4142 4148 3797 +3893 3643 3727 3751 +724 4025 3398 3622 +4707 5024 1418 4801 +724 418 3613 3530 +4220 4073 3749 3943 +4909 3907 4928 4786 +4175 4174 3661 3632 +4554 4249 4279 3976 +4134 4786 4875 4697 +3640 3401 3398 4158 +579 4110 4061 4292 +3950 514 3680 4091 +4205 4139 3653 3408 +1506 640 4418 4276 +4862 3231 4128 4759 +3893 4195 4136 614 +4135 3649 3643 3846 +4000 3961 4148 482 +3961 4064 4148 412 +4169 4168 3938 4132 +3960 4065 1710 1721 +4062 4164 3977 4228 +4143 4172 4144 4119 +4142 103 529 4148 +4173 3397 4142 3920 +1733 35 4221 4354 +244 4812 4609 4056 +4168 4046 3938 4217 +4137 4138 4143 4119 +2999 1463 3759 491 +3341 4898 4908 461 +34 3911 4106 3917 +4494 4363 30 4444 +2018 1765 1743 4070 +5077 5013 5117 5087 +4589 1839 4601 911 +4697 4872 2664 4273 +4366 3680 4282 1783 +4165 4129 1777 3626 +4731 4747 661 4414 +4483 4161 1783 372 +4482 4373 4160 3760 +633 4493 4682 4370 +4083 4300 4393 4184 +301 4067 3801 4141 +4158 4213 4205 2135 +4182 2347 2980 70 +4105 4771 643 4682 +4176 4147 4139 4215 +503 4224 4209 4139 +4788 1033 4811 5133 +4181 4295 4024 4234 +4173 4142 4174 3734 +4172 4066 4144 51 +4187 4126 658 4172 +4126 3401 658 4199 +4224 4258 4168 497 +2999 3084 4210 128 +18 324 4475 4297 +5325 672 5064 5220 +4026 4327 3860 1669 +2944 4537 4171 4235 +3653 503 4202 4166 +529 4206 1463 103 +162 633 643 4163 +1777 3247 4211 41 +3613 4187 669 3679 +4186 4174 4188 3734 +4187 4189 669 2284 +924 4188 4190 2318 +4189 658 3640 3356 +3917 3911 4066 51 +4384 4462 797 301 +3596 4197 520 3911 +3285 4239 4209 4223 +520 3654 3687 4135 +3168 5031 3932 5028 +2347 3654 4193 4106 +4466 4461 4469 4377 +4200 4202 4206 4175 +4205 3653 4199 3401 +4202 4225 4206 3662 +4199 4182 4201 2980 +5001 4990 4996 4986 +5014 5007 5013 761 +4132 4200 4215 4165 +497 4199 4201 4183 +713 4046 2927 4217 +4927 4978 3444 4830 +4194 4287 249 4169 +4212 4177 2927 3293 +4212 4213 84 4185 +4210 4214 4211 310 +4215 4211 4214 4165 +4213 4212 4217 3406 +4213 4168 497 4205 +4391 10 4506 4487 +4207 4147 4214 721 +5293 4825 5303 4721 +28 657 4982 2016 +4389 4449 18 4124 +4145 4281 4273 4766 +1732 4332 4321 4101 +4245 4194 4271 3938 +4225 3801 4169 4176 +4224 503 4228 4201 +4046 4233 1712 4258 +4985 4981 4993 2378 +4141 4225 3306 3662 +4691 737 1037 1786 +4357 1722 1272 4298 +4427 4643 4336 4619 +4027 4276 4356 172 +4271 4281 4226 3285 +627 4171 4235 1406 +4612 4234 4181 1593 +3341 3432 4869 3364 +3238 130 5094 1102 +4512 4404 4239 4455 +4238 4260 4769 4194 +4683 2657 711 2852 +2657 636 4870 3433 +3431 3450 4243 722 +4242 3446 581 4245 +5136 663 4797 4962 +4243 4768 4274 4223 +4763 158 4722 4311 +4443 4382 4442 3959 +324 178 4375 4250 +4016 4127 4526 4505 +3861 4248 4297 3957 +4487 178 324 4412 +4655 4684 4750 4751 +1004 1422 4818 4823 +4359 4301 4104 4055 +1701 2095 4270 2814 +4750 4634 4071 1451 +4653 4760 4671 4540 +4226 3801 3759 4176 +4268 4022 4419 4418 +4741 4445 433 4239 +4910 5124 3411 4977 +4023 4456 629 422 +591 3311 4359 2037 +3340 4729 4966 471 +4929 5313 686 5328 +5065 664 5064 5279 +4324 3363 3766 536 +2901 4259 3856 4013 +4278 4365 4270 3741 +4255 4269 4015 4113 +4046 4274 4233 4223 +5145 5116 892 75 +4156 4221 4274 4759 +4271 2664 4273 4245 +4446 4115 4391 4520 +4232 4053 4094 4133 +4373 4367 189 1693 +4269 4290 4364 3766 +4378 4127 605 4466 +604 4062 4449 4072 +35 4233 4221 433 +3655 1733 81 4157 +4683 4831 2657 2845 +4539 4476 4512 4114 +4367 4307 4354 1733 +4706 4690 4688 1082 +4360 4455 4407 4209 +627 4605 4361 4335 +4480 604 4386 600 +2095 4372 4278 4332 +3951 4760 4765 4653 +4465 4130 3936 4454 +637 4539 667 4394 +4300 4374 4474 4437 +4026 4171 3073 4361 +4458 575 4488 4390 +4250 4178 3645 4381 +4053 4352 4658 4230 +4026 454 4027 3860 +4294 4163 4096 4429 +4254 4379 615 4387 +5294 5239 3443 5288 +4096 575 4458 4401 +3409 1732 28 1784 +4312 4342 1732 28 +4110 579 4502 4495 +4586 4285 4368 2985 +1763 4714 4423 4679 +1227 1656 4335 1444 +631 1450 4362 284 +4761 4246 1092 4395 +4334 3860 4305 1719 +5176 4998 3252 918 +5305 4315 460 4939 +1023 4833 4314 2395 +4850 4710 4942 4896 +4418 640 4081 4012 +4603 1076 1464 4648 +4663 3254 157 1714 +4585 4622 4565 4509 +4334 4222 1771 3290 +4757 3198 5341 3219 +5141 719 916 4881 +287 4267 4049 2963 +1687 3849 4386 3767 +4451 4420 4405 1689 +4341 4180 2274 274 +4936 4798 4920 4689 +4339 4049 4927 4830 +3340 4987 4980 3844 +637 4567 4539 4745 +4069 4290 4222 3766 +4334 1771 4027 172 +4333 4312 4321 2049 +4309 2274 4288 1770 +4537 4231 4641 4618 +3621 4581 4715 4650 +198 4013 4401 4096 +4340 4069 4344 4329 +4346 4372 4339 1393 +4327 3344 4343 157 +4344 3860 4343 4305 +4345 4342 4341 657 +4345 4346 4342 4339 +4070 4344 4343 4844 +1765 454 4344 4340 +653 3928 4437 1718 +4636 4645 4603 4627 +4705 4681 4116 4911 +1656 4590 4663 1803 +1743 3344 4695 4070 +4298 4027 454 4357 +4465 1687 4386 3966 +30 4285 4530 4145 +4360 4407 4412 3977 +4024 4232 4094 1707 +2095 4230 4372 4352 +3976 4505 4061 4518 +1504 4254 4263 4054 +797 4287 4355 301 +4295 4288 4399 2274 +4638 1410 173 4310 +4152 575 1693 4482 +4278 4369 4365 4869 +4269 4364 4366 3680 +4373 4365 4367 4157 +4366 4368 4277 4285 +4369 4370 4367 4307 +4368 4364 4371 4852 +4371 1272 4368 4162 +4370 4369 4372 1393 +4290 4357 4371 4340 +4366 4277 4015 4161 +4294 4458 4473 170 +4496 4248 4378 4469 +4657 171 4427 1641 +4198 4014 4443 3954 +4279 605 4388 4375 +3326 4301 4380 4398 +4379 1504 2901 4401 +4464 4297 3957 3687 +4247 4443 4463 3968 +4574 4522 4460 3974 +4192 4491 4385 3982 +4462 4384 4494 4444 +4289 4353 4325 3972 +4398 4403 4301 4438 +4378 4016 630 10 +4459 4220 432 3943 +4478 4489 4296 4438 +4521 3975 4216 4275 +4512 4093 4662 4532 +643 1445 4052 4163 +4476 4293 680 4533 +4828 4655 4311 4749 +4425 4433 4426 1159 +4737 4774 4772 4741 +4387 4379 170 4458 +3995 3073 4361 1743 +4599 1486 4621 1480 +4051 4338 4380 4303 +422 1640 4421 4498 +4387 4497 4411 4439 +4445 4532 4446 4238 +4408 4471 4326 1476 +1677 4408 4420 4419 +4287 178 4355 3956 +4405 4406 422 4095 +4419 4410 4418 1508 +4094 4409 4413 1633 +615 4403 3973 252 +4355 4251 511 2317 +4420 2944 4410 1689 +3995 4159 4018 4641 +4436 4625 1839 1095 +4417 640 665 1742 +267 4416 446 1646 +4317 4259 4133 4409 +4095 4406 4259 4409 +4326 1641 4406 4413 +1095 4471 4436 4402 +486 573 680 2943 +4308 4724 1517 1100 +4498 4428 4511 4541 +4396 1450 284 1478 +4396 4600 4602 4645 +4376 4651 4231 4587 +4578 4572 4424 4644 +4553 4437 4430 4300 +3856 171 4429 4013 +4432 631 4664 4018 +4431 4434 1790 4626 +1790 4434 4396 1507 +4432 4600 4433 4616 +4687 1716 4670 173 +4550 4415 4588 4421 +4347 4429 4591 4294 +4439 4390 3849 4387 +4453 4438 4440 4403 +4454 4439 1687 252 +4014 4475 4464 3981 +3957 4469 4463 4247 +4247 4377 4382 3970 +4485 4152 4385 35 +4462 542 4404 4260 +4455 797 4275 4404 +4050 4534 1514 4561 +3645 3306 3861 3652 +4220 4467 2317 4280 +4466 3903 4110 532 +4585 4588 4471 4326 +4540 4579 4671 4508 +4519 4490 4454 4439 +4061 4453 4292 4440 +4446 3975 4287 4238 +648 3973 3965 4262 +4639 4666 4545 4523 +4303 4296 4374 4398 +4468 4465 4389 3966 +4554 654 623 4383 +4469 4496 4014 4198 +4445 4192 4385 433 +4464 4442 4014 4382 +4463 4441 4381 3929 +4459 4292 4467 4353 +4450 4502 4279 4198 +4449 4465 3936 604 +4110 4459 432 532 +4442 4375 4461 4198 +642 4497 648 170 +4451 4421 4509 4405 +4511 4563 3965 648 +2943 4474 4529 4374 +4542 4052 4473 4294 +4178 4495 432 4441 +4284 4394 4093 4525 +4482 4479 575 4058 +4479 4480 4390 3849 +4477 4481 4478 4057 +4481 2350 4478 4289 +4480 4479 4484 3962 +4477 4363 4483 4161 +4484 4482 4485 4160 +4483 4486 4481 4060 +4444 4486 4483 1794 +4484 4485 3982 617 +4216 4251 579 511 +4489 4529 4494 4296 +4488 4491 4490 4390 +4492 641 4489 4453 +4492 4489 4384 2350 +4115 4490 4491 3936 +3621 4734 4162 1785 +4385 4488 4503 4152 +4306 324 4496 4475 +4495 4375 4502 4461 +3973 4470 4517 4403 +4424 3965 4578 4402 +4500 4762 4671 652 +4105 4499 4634 643 +4574 4563 4516 4507 +4466 4306 605 4496 +707 542 4529 4494 +4526 623 4513 650 +4358 4249 4506 4524 +579 4505 4016 4216 +486 4533 4501 4522 +4591 4452 4050 4542 +624 4320 4471 1472 +4565 4617 4611 4573 +4472 4424 4564 653 +4284 4392 4680 4238 +630 4504 4515 4114 +4574 4516 4583 4547 +654 4513 4527 4029 +4501 3967 4514 4549 +4519 644 642 4497 +4524 644 4519 4358 +4517 641 4518 4453 +641 4535 4521 4275 +4520 4525 4524 4391 +651 4507 644 4383 +4457 1400 4580 161 +650 4518 4521 4505 +4476 650 4521 4114 +4504 630 4554 4249 +4515 623 654 4557 +4529 4535 2943 641 +4503 4528 4473 4488 +4737 1445 4771 4354 +5316 4920 4118 5032 +4535 542 4392 4404 +667 4507 4394 651 +4540 4629 4447 4562 +4093 4528 4532 4520 +4548 1474 4582 4567 +4652 4657 4336 4181 +4739 680 4558 573 +4029 4293 4331 4284 +4257 1233 4452 4534 +4424 4571 653 1640 +4508 652 573 4474 +3995 4018 4659 4605 +4653 4762 4559 4753 +1404 4699 1716 4457 +3967 4572 4583 4582 +1513 4548 4514 654 +1513 4536 4547 4029 +1474 1513 4516 667 +4436 4587 4571 1640 +4654 1408 1405 779 +4657 4658 171 4053 +162 4640 171 4429 +4460 4526 630 4127 +4743 4556 4568 3951 +4562 4555 4753 4653 +667 4029 1513 4527 +4561 4755 637 4538 +4795 4738 4584 4544 +4567 1474 4561 637 +4447 4562 4560 4558 +4534 4568 4561 4556 +4472 4564 4501 486 +4511 1514 4563 4050 +4510 232 4320 691 +4628 1434 4630 601 +4536 4560 4568 4331 +4627 4567 4562 4555 +4579 1464 4651 4571 +4971 5174 3411 4999 +4569 612 4550 4541 +4546 1514 4428 4631 +4592 4575 4510 691 +3965 4501 4514 4383 +4573 4576 549 1688 +4593 4575 4592 1211 +4593 4599 1665 1528 +4583 4428 4498 601 +4640 4452 4569 4591 +4523 4637 1408 569 +633 162 4337 4658 +4630 4583 4546 4536 +4546 4578 4514 4582 +4756 4559 4717 4762 +232 4613 4320 4451 +4733 4771 4682 4307 +4427 4550 4588 1641 +4436 4613 4587 4451 +4155 1507 1212 4622 +4633 3288 4350 1800 +4508 653 4579 4437 +4576 4573 4595 1493 +4577 4576 4594 1515 +4599 4593 4596 1420 +4596 4592 4597 626 +4598 4594 4595 1482 +4617 4598 4595 1581 +1486 4596 4597 1512 +4594 4400 4577 1500 +1341 4426 4434 4649 +4155 4628 1159 911 +1341 1449 4426 4778 +1233 4781 4318 4348 +1451 162 4634 4640 +4543 4608 1235 4288 +4665 4607 4621 1665 +4611 4606 4608 549 +4605 4614 4607 627 +4681 4146 4955 683 +4778 4761 4635 4730 +4510 4615 4614 4607 +232 4614 4618 4235 +4619 1212 4585 4588 +4611 4626 4612 4608 +4617 1790 4611 4620 +4434 4649 1212 4619 +4623 4615 4510 4597 +4336 4619 4626 4612 +4231 4616 4618 4613 +284 4621 4615 1486 +4638 4606 4620 4400 +4589 4623 4320 624 +4622 1507 4617 1581 +1505 4637 1400 1479 +1510 612 1434 4415 +4618 4432 4018 4614 +4348 4630 4629 4568 +4645 1510 4566 4601 +4631 1233 4627 4534 +4627 4566 4631 4582 +4629 4630 4644 4572 +4916 4858 1001 4694 +4701 5043 4688 4590 +4671 4256 4500 4604 +4781 4610 4071 4692 +3951 4778 4781 4348 +4675 4580 4624 1459 +4666 4665 4362 4621 +4457 4699 4660 959 +4553 4604 4651 4579 +661 4652 4336 4414 +4692 661 1451 4643 +4231 4651 4642 1076 +4631 1434 612 4428 +4426 4648 4348 4628 +4663 4695 1656 3344 +1082 4688 1656 1227 +4649 4318 4645 1510 +4648 4600 1076 4616 +4658 4652 4337 3939 +4427 4640 4643 4569 +4650 4537 4641 3073 +4291 4257 4544 4556 +4698 1404 4703 4551 +716 4252 4395 4746 +1422 4787 4736 4732 +4537 4552 4376 2944 +4581 4552 4650 4298 +1235 1084 1410 4543 +4665 4639 1227 1663 +566 50 5055 4893 +4779 4680 4739 4392 +4350 566 4646 4319 +4431 248 1341 4731 +4660 1235 4638 4606 +4638 173 4457 1400 +4930 4982 4940 657 +4076 744 5026 1792 +5075 5033 4044 149 +4435 4690 4714 4679 +4499 4257 4634 4452 +5074 5113 5115 4080 +1801 1037 1716 1404 +5040 4818 1422 4821 +4678 1408 1801 4637 +4811 5113 5150 5110 +5314 5336 5344 5059 +383 1405 4675 1317 +4670 1084 4308 1410 +467 4745 4662 4512 +4349 244 4609 4845 +4586 4167 4734 4162 +4878 4283 4240 3437 +4752 4918 4734 4252 +1004 5041 4708 4939 +5115 953 5036 4920 +4435 4728 1801 1505 +4633 4286 4699 4647 +4328 659 4712 1013 +1716 1786 4670 4286 +4229 3322 4833 5045 +4730 4642 4635 1076 +1038 4826 5245 5211 +4717 4700 4632 4752 +4893 1101 4646 4351 +4977 981 4924 5124 +4895 4156 1106 4128 +4654 4704 4701 1797 +4688 4545 4701 4639 +1001 4738 4763 4694 +4698 4633 4699 1802 +5069 5160 5147 5039 +3322 4704 4654 727 +4703 5044 4698 4076 +3940 5057 1417 4349 +1786 4286 5046 4754 +4974 4952 4122 5066 +4685 737 4727 3434 +4946 244 5057 4923 +460 3238 4316 4809 +4118 5032 3932 1012 +4719 5032 4689 2846 +4732 4728 1763 1449 +4308 4728 621 4670 +1451 4751 4337 661 +652 4779 4762 4739 +4584 4694 4718 4105 +4756 4717 4859 4744 +3168 3932 4712 4884 +5167 5034 1022 5106 +1004 4218 5063 5333 +4803 4842 696 4246 +1165 683 4831 4889 +4821 5040 4782 4423 +4807 1112 5060 4973 +4740 484 3435 3436 +4708 621 1422 4728 +4727 4714 4713 4687 +4985 4931 4264 1058 +4610 4731 4692 1341 +4748 4159 4730 4664 +4735 4656 4713 4776 +4928 4786 4586 2985 +4682 4684 4923 4493 +1517 4787 4732 4749 +4656 4792 4824 696 +4744 4397 4530 4766 +4700 4764 4765 4559 +4716 4662 4755 4538 +4871 4829 4726 3104 +4769 4397 4766 4260 +3119 5313 5122 5314 +4795 4753 4745 4555 +4771 4718 4737 3231 +4743 4755 4680 4331 +4751 4747 4655 951 +4159 4748 4746 947 +4747 4731 4749 1517 +4395 4748 4761 4735 +4256 1092 4752 4252 +3621 4715 4252 4746 +4750 4694 4105 4684 +4544 4755 4743 4556 +1939 1344 5053 4706 +4745 4753 4739 4558 +4584 4718 4796 4774 +4322 5337 5072 4973 +4878 4873 1005 4901 +4766 4134 4768 4273 +4071 4291 4781 4257 +4776 4311 4610 4749 +4544 4499 4584 4716 +4700 4765 4246 1092 +4785 4738 4843 4795 +4738 4785 4763 4291 +4741 4737 4759 4221 +5292 4900 5066 4820 +4759 4862 4769 4245 +4768 467 4741 4239 +5179 1022 5034 5166 +4167 4744 4530 4586 +4397 4779 707 542 +3765 3284 4931 3350 +4397 4756 4779 467 +1102 5055 5054 4107 +158 4761 4778 4732 +5292 5136 5309 5066 +4776 4610 4636 4602 +4772 4774 4716 4662 +4822 5044 5088 4076 +4635 4760 4636 4603 +4979 4724 4941 1100 +5101 4044 4798 1049 +4950 5069 5145 1018 +158 4765 4764 3951 +3231 4125 4128 4733 +4656 4821 922 4735 +5152 4170 4811 5134 +4848 104 4825 4808 +3405 5302 4794 3452 +4044 5074 4080 5075 +4855 922 4803 4736 +4937 5095 5083 5023 +5294 5271 543 4790 +4764 4559 4796 4743 +4795 4756 4861 467 +4244 4942 5296 4867 +776 4328 4783 659 +5148 5151 5048 1033 +4857 4915 4842 4803 +4122 4856 4817 4820 +4843 4832 4842 696 +4828 4800 4792 4722 +4830 4117 4812 287 +5296 5059 5321 5127 +3411 5265 4910 3765 +4906 4725 5094 5062 +5226 4835 4819 4789 +4710 4891 4853 5041 +663 5066 3239 4952 +4676 4788 4170 4814 +4109 4804 4146 4852 +3410 5060 4849 1023 +458 5107 4811 5110 +5210 265 5258 5287 +3358 4841 4838 4832 +4837 4801 4855 4834 +4253 4674 4900 4820 +4832 4808 4836 4824 +4818 4801 4767 4834 +4856 4674 4724 4787 +5084 4970 4780 69 +4824 4825 4834 4253 +4819 4823 4855 4736 +4847 4789 4218 4823 +5272 5274 5235 4693 +5312 5243 4929 5345 +922 716 4803 4395 +1005 4901 4868 4740 +4804 4109 4208 4329 +4723 4886 4283 1106 +4802 4816 4857 4819 +130 460 4315 4691 +4820 4817 4847 4823 +4808 14 4837 4848 +4837 4857 4819 4855 +4835 3013 4836 4817 +5226 5154 5224 4816 +5168 3351 3305 4925 +4898 4922 4956 4908 +3361 4876 4816 4860 +4802 4800 1001 4722 +4860 4802 1001 4764 +4927 220 4940 4345 +4909 4681 4911 4889 +5255 5238 5215 3355 +4834 4848 5270 4825 +4835 4948 4847 4789 +5305 5322 5306 4813 +5318 5305 5306 4316 +5308 5311 3456 5140 +4869 4056 4812 4369 +5063 4809 4900 1004 +4968 1056 4994 414 +4792 4836 4817 4824 +922 4801 5024 4821 +4832 4913 4800 4836 +4860 3907 4859 4632 +3231 4861 4858 4718 +4861 4841 4858 4843 +4862 4860 4859 4796 +4861 4134 4877 4768 +5057 3940 5025 4917 +5058 4892 3359 3353 +108 2395 3322 727 +4947 3108 5283 5232 +4797 5062 3219 1725 +4829 4879 5278 3104 +4852 3363 4236 4364 +1119 4899 4241 1671 +4740 3435 3442 3485 +4895 81 4156 1733 +1165 265 4758 373 +4875 4876 4889 4909 +1106 4877 4874 4128 +5289 4874 4877 4841 +3446 4876 4875 4862 +4883 1165 4758 4683 +4890 5233 4868 3196 +4881 3426 3455 5222 +4880 5291 1094 4323 +5242 5294 543 5272 +484 5289 4878 3437 +4719 674 2846 3 +4933 621 737 1786 +683 4907 4831 4903 +4899 4908 4902 3074 +1008 4949 4990 4991 +4845 4723 5228 4874 +4947 4879 4897 2799 +3239 4900 4809 4933 +1055 4864 3444 220 +3353 1939 4661 4695 +5064 664 5298 4989 +4697 4903 4872 2985 +5063 3332 4316 5318 +4902 4922 4901 4890 +4840 4967 4969 4150 +2657 4907 4887 4870 +4767 4853 4891 4818 +4897 4758 711 4829 +4887 4897 711 3425 +3432 4886 4056 4895 +5008 5023 3337 837 +5033 5077 5031 5028 +5096 5095 4807 5009 +4899 4886 4908 3432 +4887 4907 4840 4150 +3361 4125 4845 4874 +4261 4806 5279 3331 +4845 4349 3937 5262 +4913 3937 3940 3013 +4915 3358 4912 4857 +5070 5338 4926 1030 +4916 4913 4917 4800 +4918 3907 4915 4632 +4915 4863 4918 716 +4923 4916 4917 4684 +5008 5171 24 1120 +5050 4686 4328 4531 +24 4968 5022 4975 +373 4840 4947 4897 +4709 4928 4918 4734 +4989 830 5058 4696 +4839 5120 5051 1020 +5121 4914 5012 5131 +4208 4844 4987 4329 +244 4125 4923 4733 +686 4827 4265 5315 +3254 1008 4935 4667 +2770 4773 4729 438 +5011 1019 5216 1015 +5040 4885 4891 1344 +5200 137 4999 5187 +50 4930 4945 4940 +4328 101 5101 1006 +5007 5042 5013 4793 +5132 5130 5332 5133 +4314 1010 4685 5317 +4667 4987 4935 4844 +1939 3359 1344 4782 +4316 3238 5062 4797 +5214 5267 5213 5180 +5174 5227 5266 137 +4935 4990 3092 4986 +4109 4709 5056 1785 +3147 4866 4922 4890 +5270 709 5137 4848 +1983 4988 4888 5016 +5153 5162 4784 282 +955 5079 5097 46 +4707 5058 3359 4810 +3352 4955 5280 4116 +3239 3238 663 1102 +4956 4953 4117 4609 +4955 4840 373 683 +5014 5077 5168 5033 +5293 3332 5292 5063 +3340 4986 4987 4976 +5103 5178 5175 5078 +5010 5211 5252 662 +4963 5220 1700 4244 +4962 4107 981 663 +3252 4998 5189 387 +4966 4969 4967 471 +4965 4972 3284 4264 +4965 4898 4117 287 +464 5187 4921 4854 +4965 3147 4898 90 +1040 3288 4822 48 +5220 5126 4570 1700 +3352 3331 4966 4976 +4757 5306 4725 5062 +4707 1418 4989 5298 +4992 5016 4921 1075 +4977 4978 4959 4972 +4696 4976 4986 4261 +830 4208 4976 3352 +5037 5024 3359 4782 +4981 4330 4982 3409 +4227 4980 4983 2803 +4983 4980 4667 4219 +4984 4981 4982 2563 +4991 4983 1008 143 +4227 4996 3340 4729 +4203 4945 4959 4977 +4330 4959 4940 4927 +4990 4949 858 5195 +1417 4924 4974 4894 +4888 4988 4945 4203 +4992 4993 4888 4984 +4994 4991 4975 2553 +4994 4996 4991 4227 +4854 4993 4992 417 +5198 5000 5199 5186 +4203 4993 5188 4985 +5190 957 3261 1167 +5191 4964 4313 925 +4934 4570 5195 5001 +4995 5227 137 1118 +3411 4999 5188 4203 +788 5126 5201 672 +137 5097 5187 955 +1056 5142 2770 82 +3305 3351 5015 5070 +5014 5168 5078 5103 +4204 5061 4937 3337 +4904 5184 5021 4919 +5197 5135 1725 4906 +4961 5231 5267 5215 +5167 5125 5129 4932 +5132 5269 3244 4926 +4204 4937 4154 5086 +4957 5006 4204 544 +5144 5005 1112 5072 +5022 4949 5017 4975 +5018 5016 1983 1145 +5017 5083 5023 632 +916 5020 3235 5198 +3219 5019 5155 1725 +5022 5023 5199 5008 +5016 5021 5200 4921 +4793 5021 5018 4904 +4979 5025 4122 4856 +5037 4863 5024 716 +5027 5089 246 4668 +5087 5026 5028 1177 +4905 5027 4196 1175 +5031 4063 5050 4118 +484 5210 5290 5247 +5029 776 4905 4196 +4712 4711 4531 1010 +4905 4669 4957 185 +904 4770 4720 5165 +5204 5194 930 909 +5330 5133 5068 4686 +1055 5025 4979 951 +5102 925 1019 918 +4702 845 5114 999 +4933 4674 621 4724 +4809 737 4685 460 +5144 1112 4937 5095 +5046 5044 3288 4633 +5043 5045 4780 4704 +5044 5046 130 4691 +5053 5045 5043 4706 +5054 1040 5082 1983 +1002 5116 4799 5067 +5093 5178 5182 2836 +4920 776 953 5029 +4925 5110 904 5165 +5169 5106 5156 5161 +5046 5055 1102 4754 +5096 4775 5047 858 +5053 3242 4775 4661 +1055 3444 5057 4946 +4863 5056 4705 4709 +4952 4924 4864 981 +3332 720 4805 4677 +4725 5117 5090 4813 +5080 5078 5093 5007 +4973 4942 4807 4867 +4896 4853 4958 4721 +4894 4179 4266 5124 +3443 4266 5307 5284 +4810 4777 4767 4707 +574 101 5048 1011 +5107 1030 5036 5118 +5159 4702 4784 1017 +4914 5121 5072 5005 +5250 5230 5252 729 +5070 3198 4757 5015 +5114 1016 574 962 +4672 1016 5114 4791 +845 1020 4791 4669 +3198 91 5208 1094 +1103 4957 4154 4905 +4960 5061 5081 5006 +5207 4951 2833 3262 +5177 5081 5061 5144 +474 5078 5080 3305 +5083 5096 5084 5047 +4793 5082 5085 5018 +5085 5082 5088 4822 +5086 5083 5084 1156 +5085 5087 5013 1157 +5086 5089 4154 5027 +5089 5084 5091 4780 +5090 5087 5088 5026 +5089 5091 5060 1023 +5094 5090 5088 130 +5192 882 77 5181 +5049 5183 5061 3337 +5096 4807 5091 4237 +5042 4906 4793 5197 +4906 5094 5082 5054 +5142 5003 5237 4951 +925 5102 77 3217 +3456 3443 5239 5311 +5247 3454 5245 3436 +4936 1016 4783 1047 +5038 5157 5098 3098 +5169 5104 4960 5006 +3261 2880 5103 639 +5178 2880 5189 2836 +5052 5175 5176 4720 +5133 5131 5068 4814 +5213 5180 5209 5128 +2842 5111 681 5301 +5120 4814 5051 4676 +5109 1083 5225 5319 +3153 2835 935 906 +1033 5149 4676 4672 +5073 5147 5074 5039 +101 4672 1033 4686 +4272 5146 5048 574 +4154 1112 1103 5060 +5119 5068 5120 953 +5118 3351 1030 4063 +4925 5118 5110 4080 +4926 91 5070 3211 +5243 5312 4742 5223 +2842 1481 3315 5128 +5220 4261 5064 4696 +1022 3329 5011 1019 +5174 5002 5155 4971 +5341 5244 4805 3219 +5123 5201 5108 3405 +5011 3449 474 5221 +3244 686 4938 5335 +4926 5107 5132 458 +5332 5012 4938 5131 +5036 4938 5107 4170 +4788 5332 458 5179 +5195 1700 5009 858 +5325 4777 5296 4244 +5324 5261 4948 104 +5334 5314 3119 5303 +5343 5345 5326 3230 +4851 5154 5226 14 +5291 3315 1481 4323 +5097 5238 5004 3347 +892 1002 5153 971 +5015 5042 5080 3321 +4784 5146 5153 4272 +5148 5145 5147 5116 +5149 5146 4702 5114 +5149 5151 5146 4799 +5150 5148 5147 5113 +5164 5152 5149 4676 +5153 5148 5152 4799 +5166 5151 5150 4788 +4950 5145 5151 5143 +5262 4838 5140 3937 +5126 788 916 5020 +5190 5052 5176 5158 +3221 5193 5102 3227 +5156 5159 5163 656 +5158 5160 5162 5069 +5164 5159 5161 4702 +5052 5165 5160 833 +5159 5166 5163 4950 +2895 5158 5162 927 +5165 5166 5160 5150 +5164 5161 5034 5051 +4770 5162 5164 5152 +474 4720 5011 5175 +5006 4957 4839 1020 +5103 5052 3261 833 +5173 5172 906 63 +5173 5184 5172 4919 +5171 5181 5170 849 +929 5171 5170 673 +5264 5126 4944 4570 +5106 4960 5191 5167 +5106 4313 5156 2895 +5080 5185 5221 3321 +5191 4960 5105 5049 +697 4770 901 5134 +5256 5108 4943 5251 +5182 5092 5172 1170 +5181 5183 882 5049 +5185 5182 5184 5093 +5186 5183 5171 5008 +5217 5183 5186 5177 +1118 5185 5184 4995 +4934 5003 1056 4968 +2770 5001 1056 4996 +1032 4964 5105 809 +3253 4997 5156 656 +5178 4998 5175 1015 +935 5092 5193 906 +77 5157 5192 3225 +5206 917 5035 2854 +5200 4999 5135 4988 +5251 5256 719 5204 +5009 5198 5199 5095 +5197 5019 4995 3321 +4995 5200 5197 5021 +4934 5195 5199 5022 +5002 5209 5128 5307 +5223 5261 720 3457 +1118 5205 2835 5218 +5196 5206 5205 5035 +5204 5203 719 5222 +5207 2833 5204 5194 +3236 5079 5206 3186 +5326 5299 5268 5076 +5108 5264 5263 5201 +4815 5030 1005 441 +3274 4693 4961 3451 +5255 5265 5238 3765 +3452 4943 5248 5108 +3274 4943 5235 909 +4846 3273 5010 675 +5217 4932 5219 882 +5221 5216 5218 5185 +5222 5217 5219 5203 +1069 5218 5216 935 +4971 5124 4179 4962 +3426 5129 5217 5177 +5218 930 4880 5205 +5304 5202 5122 5319 +5289 5290 5254 4838 +5111 5241 681 5304 +5297 5140 4838 4808 +4944 916 719 5000 +5289 5254 1165 4889 +5303 720 5261 5293 +5234 5071 5233 723 +5248 5252 5253 5010 +5234 5233 5286 4866 +5278 5232 5230 4879 +5230 5232 5253 3275 +5302 4826 3452 5214 +3230 3245 3315 909 +3236 5238 5266 5097 +5212 5237 4846 5142 +5242 5099 4302 5258 +5280 5260 664 4116 +543 1083 5295 5225 +5239 4882 5297 5290 +5313 4827 5122 5329 +5259 5321 5127 788 +5100 876 4693 479 +5285 5248 5253 5263 +5273 5100 5272 5030 +5246 5276 5231 5213 +5295 5320 3456 5324 +5071 1038 3330 876 +3315 5180 5196 909 +5071 5231 1038 4961 +5246 5231 5234 5255 +5224 5257 5228 5262 +4846 5253 5212 3275 +5266 5180 3236 5196 +5254 5258 265 5260 +5257 5290 4815 5239 +5244 5342 5301 1481 +5311 5257 5262 5240 +5229 5202 3218 5137 +5260 5254 5154 4911 +5209 5265 5246 5284 +5265 5209 5266 5174 +5263 5264 5212 4806 +5237 5264 5256 4944 +3274 5010 4943 3273 +5208 5269 5343 91 +5328 5315 5268 5012 +5293 5292 4948 4847 +5300 1083 4794 3405 +4882 5275 4826 5247 +441 3330 5275 5247 +5276 5275 1038 4826 +5274 5277 5273 5272 +5248 5277 5274 3452 +5288 5275 5276 5294 +3330 441 5233 4868 +5281 4266 5284 4910 +5240 5281 5282 4953 +5279 5283 5280 3331 +265 5280 5283 373 +5286 5282 5281 4866 +5279 5065 5285 5263 +5284 5288 5286 5246 +5283 5285 5287 5232 +5286 5288 4815 441 +4302 5287 5285 5277 +5224 5228 4883 4876 +5030 5258 5224 5242 +5326 3230 5141 4881 +5270 4958 4777 4767 +4958 5270 5229 4218 +4882 4302 4794 5277 +5297 5241 5249 104 +4805 5136 3332 4797 +5295 3456 5242 5226 +5308 5309 4894 4974 +5327 5208 5342 5341 +5271 3443 5320 5307 +5319 5259 5329 5109 +3245 543 4790 5235 +5138 5229 3218 4218 +3218 5223 5312 5225 +5317 4849 4850 4314 +4849 5337 4850 4973 +5065 672 5300 5201 +709 5298 4851 14 +5298 709 5325 4777 +672 5325 5323 5321 +664 5099 4851 5260 +4827 3119 5122 5304 +4742 4265 5243 5327 +4677 4742 5138 720 +5343 5269 4929 5332 +5317 5330 5322 4531 +5316 5305 5333 4939 +5336 5333 4850 4896 +3457 5301 5223 5111 +1083 5300 5249 5323 +4805 3457 5310 5244 +5331 4849 5316 3410 +5320 5310 5324 3457 +5249 5323 709 5137 +4179 5309 5310 5136 +5208 5139 5342 5291 +5328 5299 5313 5344 +5327 4265 5269 3244 +5345 5243 5342 5301 +5316 5335 5331 5036 +5322 5330 5338 1030 +5132 4938 5315 5134 +5334 5317 5318 4721 +5333 5336 5335 5138 +5334 5339 5330 5130 +5340 5334 5318 4677 +5340 5338 4757 5306 +4914 5337 5339 5331 +5338 5340 3244 5335 +5344 5339 5337 5336 +4322 5299 5344 5127 +5329 5299 5326 5259 +5315 5139 5268 697 +5341 5327 5340 4677 +4827 5329 5139 681 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/Visibility_2/examples/Visibility_2/simple_polygon_visibility_2.cpp b/Visibility_2/examples/Visibility_2/simple_polygon_visibility_2.cpp index be460a83626..dc23e31bfaf 100644 --- a/Visibility_2/examples/Visibility_2/simple_polygon_visibility_2.cpp +++ b/Visibility_2/examples/Visibility_2/simple_polygon_visibility_2.cpp @@ -38,7 +38,7 @@ int main() { CGAL::Arr_naive_point_location pl(env); CGAL::Arr_point_location_result::Type obj = pl.locate(q); // The query point locates in the interior of a face - face = boost::get (&obj); + face = std::get_if (&obj); // compute non regularized visibility area // Define visibility object type that computes non-regularized visibility area diff --git a/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h b/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h index f5cf4d1873d..384d99acb30 100644 --- a/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h +++ b/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h @@ -306,7 +306,7 @@ namespace CGAL { Location_result result = point_location.ray_shoot_up(q); if(const Halfedge_const_handle* e = - boost::get(&(result))) + std::get_if(&(result))) { CGAL_assertion((*e)->face() == face); Point_2 p(q.x(), @@ -321,7 +321,7 @@ namespace CGAL { return (*e)->next()->ccb(); } else if (const Vertex_const_handle* v = - boost::get(&(result))) + std::get_if(&(result))) { Halfedge_around_vertex_const_circulator cir = (*v)->incident_halfedges(); diff --git a/Voronoi_diagram_2/doc/Voronoi_diagram_2/CGAL/Voronoi_diagram_2.h b/Voronoi_diagram_2/doc/Voronoi_diagram_2/CGAL/Voronoi_diagram_2.h index e0dd1cdc461..344fed3378c 100644 --- a/Voronoi_diagram_2/doc/Voronoi_diagram_2/CGAL/Voronoi_diagram_2.h +++ b/Voronoi_diagram_2/doc/Voronoi_diagram_2/CGAL/Voronoi_diagram_2.h @@ -720,7 +720,7 @@ typedef unspecified_type Site_iterator; /*! The result type of the point location queries. */ -typedef boost::variant +typedef std::variant Locate_result; /// @} diff --git a/Voronoi_diagram_2/doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h b/Voronoi_diagram_2/doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h index bdd87560936..45693eaf6f9 100644 --- a/Voronoi_diagram_2/doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h +++ b/Voronoi_diagram_2/doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h @@ -113,7 +113,7 @@ It must provide the following operator:
      `result_type operator()(Delaunay_graph dg, Point_2 p)`
      where the result type `result_type` is -`boost::variant`. +`std::variant`. This type is required only if `Has_nearest_site_2` is equal to `CGAL::Tag_true`. diff --git a/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location.cpp b/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location.cpp index 8451c216bde..967660d2efb 100644 --- a/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location.cpp +++ b/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location.cpp @@ -60,17 +60,17 @@ int main() << ") lies on a Voronoi " << std::flush; Locate_result lr = vd.locate(p); - if ( Vertex_handle* v = boost::get(&lr) ) { + if ( Vertex_handle* v = std::get_if(&lr) ) { std::cout << "vertex." << std::endl; std::cout << "The Voronoi vertex is:" << std::endl; std::cout << "\t" << (*v)->point() << std::endl; - } else if ( Halfedge_handle* e = boost::get(&lr) ) { + } else if ( Halfedge_handle* e = std::get_if(&lr) ) { std::cout << "edge." << std::endl; std::cout << "The source and target vertices " << "of the Voronoi edge are:" << std::endl; print_endpoint(*e, true); print_endpoint(*e, false); - } else if ( Face_handle* f = boost::get(&lr) ) { + } else if ( Face_handle* f = std::get_if(&lr) ) { std::cout << "face." << std::endl; std::cout << "The vertices of the Voronoi face are" << " (in counterclockwise order):" << std::endl; diff --git a/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location_sdg_linf.cpp b/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location_sdg_linf.cpp index 3fa8850e2cc..59ec3453781 100644 --- a/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location_sdg_linf.cpp +++ b/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location_sdg_linf.cpp @@ -62,17 +62,17 @@ int main() << ") lies on a Voronoi " << std::flush; Locate_result lr = vd.locate(p); - if ( Vertex_handle* v = boost::get(&lr) ) { + if ( Vertex_handle* v = std::get_if(&lr) ) { std::cout << "vertex." << std::endl; std::cout << "The Voronoi vertex is:" << std::endl; std::cout << "\t" << (*v)->point() << std::endl; - } else if ( Halfedge_handle* e = boost::get(&lr) ) { + } else if ( Halfedge_handle* e = std::get_if(&lr) ) { std::cout << "edge." << std::endl; std::cout << "The source and target vertices " << "of the Voronoi edge are:" << std::endl; print_endpoint(*e, true); print_endpoint(*e, false); - } else if ( Face_handle* f = boost::get(&lr) ) { + } else if ( Face_handle* f = std::get_if(&lr) ) { std::cout << "face." << std::endl; std::cout << "The vertices of the Voronoi face are" << " (in counterclockwise order):" << std::endl; diff --git a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h index 82f0bdc6d67..9d4e3785215 100644 --- a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h @@ -41,7 +41,7 @@ #include -#include +#include #include namespace CGAL { @@ -268,7 +268,7 @@ protected: public: typedef typename Adaptation_traits::Point_2 Point_2; - typedef boost::variant + typedef std::variant Locate_result; private: @@ -634,15 +634,15 @@ public: Query_result ns_qr = nearest_site(dual_, p); if ( const Delaunay_vertex_handle* dv = - boost::get(&ns_qr) ) { + std::get_if(&ns_qr) ) { return Face_handle( Face(this, *dv) ); } else if ( const Delaunay_face_handle *df = - boost::get(&ns_qr) ) { + std::get_if(&ns_qr) ) { Find_valid_vertex vertex_finder; Delaunay_face_handle dfvalid = vertex_finder(this, *df); return Vertex_handle( Vertex(this, dfvalid) ); } else if ( const Delaunay_edge* de = - boost::get(&ns_qr) ) { + std::get_if(&ns_qr) ) { CGAL_assertion( !edge_rejector()(dual_, *de) ); if ( dual_.dimension() == 1 ) { Delaunay_vertex_handle v1 = diff --git a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h index d0f1fbf11a6..6bf63d83fde 100644 --- a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h +++ b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h @@ -20,7 +20,7 @@ #include #include -#include +#include namespace CGAL { @@ -48,7 +48,7 @@ class Apollonius_graph_nearest_site_2 typedef typename Delaunay_graph::Edge_circulator Edge_circulator; public: - typedef boost::variant result_type; + typedef std::variant result_type; result_type operator()(const Delaunay_graph& dg, const Point_2& p) const { CGAL_precondition( dg.dimension() >= 0 ); diff --git a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h index 6014724302f..f3739a2da68 100644 --- a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h +++ b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h @@ -19,7 +19,7 @@ #include #include -#include +#include namespace CGAL { @@ -48,7 +48,7 @@ class Delaunay_triangulation_nearest_site_2 typedef typename Delaunay_graph::Edge_circulator Edge_circulator; public: - typedef boost::variant result_type; + typedef std::variant result_type; result_type operator()(const Delaunay_graph& dg, const Point_2& p) const { CGAL_precondition( dg.dimension() >= 0 ); diff --git a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h index 9b9c88965d9..ebc19ed6e1f 100644 --- a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h +++ b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h @@ -19,7 +19,7 @@ #include #include -#include +#include namespace CGAL { @@ -50,7 +50,7 @@ class Regular_triangulation_nearest_site_2 typedef typename Geom_traits::Weighted_point_2 Weighted_point_2; public: - typedef boost::variant result_type; + typedef std::variant result_type; result_type operator()(const Delaunay_graph& dg, const Point_2& p) const { CGAL_precondition( dg.dimension() >= 0 ); diff --git a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h index 8031047d03b..5d89d1c737a 100644 --- a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h +++ b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h @@ -19,7 +19,7 @@ #include #include -#include +#include namespace CGAL { @@ -95,7 +95,7 @@ private: } public: - typedef boost::variant result_type; + typedef std::variant result_type; result_type operator()(const Delaunay_graph& dg, const Point_2& p) const { CGAL_precondition( dg.dimension() >= 0 ); diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_concept.h b/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_concept.h index 9628e9ab45f..b9761752204 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_concept.h +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_concept.h @@ -17,7 +17,7 @@ #include #include "helper_functions.h" #include -#include +#include template @@ -567,11 +567,11 @@ void test_ns_concept(const DG& dg, const AT& at, CGAL::Tag_true) result_type qr = ns(dg, p); - if ( Face_handle* f = boost::get(&qr) ) { + if ( Face_handle* f = std::get_if(&qr) ) { kill_warning(f); - } else if ( Edge* e = boost::get(&qr) ) { + } else if ( Edge* e = std::get_if(&qr) ) { kill_warning(e); - } else if ( Vertex_handle* v = boost::get(&qr) ) { + } else if ( Vertex_handle* v = std::get_if(&qr) ) { kill_warning(v); } else { // we should have reached this line diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_locate.h b/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_locate.h index 285e03cb62b..cfcff23df76 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_locate.h +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_locate.h @@ -15,7 +15,7 @@ #include #include -#include +#include #include "helper_functions.h" @@ -81,13 +81,13 @@ void test_locate_dg(const VDA& vda, const Projector& , for (unsigned int i = 0; i < vecp.size(); ++i) { os << vecp[i] << "\t --> \t" << std::flush; ns_qr = nearest_site(vda.dual(), vecp[i]); - if ( Vertex_handle* v = boost::get(&ns_qr) ) { + if ( Vertex_handle* v = std::get_if(&ns_qr) ) { os << "FACE"; kill_warning( v ); - } else if ( Edge* e = boost::get(&ns_qr) ) { + } else if ( Edge* e = std::get_if(&ns_qr) ) { os << "EDGE"; kill_warning( e ); - } else if ( Face_handle* f = boost::get(&ns_qr) ) { + } else if ( Face_handle* f = std::get_if(&ns_qr) ) { os << "VERTEX"; kill_warning( f ); } else { @@ -114,7 +114,7 @@ void test_locate_vd(const VDA& vda, const Point_vector& vecp, for (unsigned int i = 0; i < vecp.size(); ++i) { os << vecp[i] << "\t --> \t" << std::flush; lr = vda.locate(vecp[i]); - if ( Halfedge_handle* ee = boost::get(&lr) ) { + if ( Halfedge_handle* ee = std::get_if(&lr) ) { Halfedge_handle e = *ee; os << "VORONOI EDGE"; if ( print_sites ) { @@ -135,7 +135,7 @@ void test_locate_vd(const VDA& vda, const Point_vector& vecp, } } // if ( print_sites ) kill_warning( e ); - } else if ( Vertex_handle* vv = boost::get(&lr) ) { + } else if ( Vertex_handle* vv = std::get_if(&lr) ) { os << "VORONOI VERTEX"; Vertex_handle v = *vv; if ( print_sites ) { @@ -145,7 +145,7 @@ void test_locate_vd(const VDA& vda, const Point_vector& vecp, } } kill_warning( v ); - } else if ( Face_handle* ff = boost::get(&lr) ) { + } else if ( Face_handle* ff = std::get_if(&lr) ) { typename VDA::Face_handle f = *ff; kill_warning( f ); os << "VORONOI FACE"; diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_vda.h b/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_vda.h index 2b2974ae273..bb9ea6b426e 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_vda.h +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/include/vda_test_vda.h @@ -223,13 +223,13 @@ void test_vdqr_concept(const VDA& vda, const CGAL::Tag_true&) Point_2 p(0,0); Locate_result lr = vda.locate(p); - if ( Vertex_handle* vv = boost::get(&lr) ) { + if ( Vertex_handle* vv = std::get_if(&lr) ) { Vertex_handle v = *vv; kill_warning(v); - } else if ( Halfedge_handle* ee = boost::get(&lr) ) { + } else if ( Halfedge_handle* ee = std::get_if(&lr) ) { Halfedge_handle e = *ee; kill_warning(e); - } else if ( Face_handle* ff = boost::get(&lr) ) { + } else if ( Face_handle* ff = std::get_if(&lr) ) { Face_handle f = *ff; kill_warning(f); } 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 .