-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement backports from CDT_3 branch (Follow-up to PR #8170) #8273
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h
Outdated
Show resolved
Hide resolved
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
...and `refactor Polyline_constraint_hierarchy_2` to use it. `CGAL::unordered_flat_map` will be Boost `unordered_flat_map` if availlable, or the standard `std::unordered_map` otherwise.
To debug non-determinism on Linux platforms.
Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h
Outdated
Show resolved
Hide resolved
That uses Boost.STLInterfaces from Boost >= 1.74.
That code was never used nor tested, and cannot compile anyway.
- remove all mentions of `Edge` and `Constraint` - `Subconstraint_iterator` is renamed `Subconstraint_and_contexts_iterator` (because of its value type) - a new `Subconstraint_iterator`, with value type `Subconstraint` - a few unused/untested and uncompilable functions are removed from the code - a lot of internal renamings == Breaking changes == For `Constrained_triangulation_plus_2`, there are a few breaking changes... - The value type of `subconstraints_begin()`, `subconstraints_end()`, of the range `subconstraints()` has changed to `Subconstraint` (a simple `std::pair` of vertex handles). That is actually a kind of bug-fix, because it was documented as such in the user manual. - The new member functions `subconstraints_and_contexts_begin()`, `subconstraints_and_contexts_end()`, `subconstraints_and_contexts()` are created get the old value type (`std::pair<const Subconstraint, std::list<Context>*>`). - A few range types have changed from `CGAL::Iterator_range<It>` to `unspecified_type`, for efficiency reasons. - Doc fixes. == Determinism == Even if it was not documented, the range `subconstraints()` is deterministic (used by Mesh_2), and `subconstraints_and_contexts()` is not.
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/8273/doc/Manual/index.html |
... and add a default constructor to create an empty range (with singular iterators).
- refactor the member function `enclosing_constraint` - refactor things around `sc_to_sc_map`, using new member functions to encapsulate the logic - remove unused/undocuments functions
…y used in the class
... add switch to `using` in the whole file.
Instead of storing the hierarchy as a data member, store it as a hidden (protected) base class. That allows to forward member functions easily with using-declarations. That also avoids mismatches between the names in the triangulation and the hierarchy.
.. to prepare a refactoring
- encapsulate the creation/erasure of constraints in the hierarchy class - add encapsulation in the hierarchy class, to detect direct uses of members - add a test of `CDt_plus_2::insert_vertex_in_constraint`, and fix it - rename `concatenate` and `concatenate2` to - `concatenate` - `prepend` and force a rvalue reference on the argument corresponding to the constraint that will be swallowed - rename `split` to `split_tail` and `split2` to `split_head` - rename `fix_contexts` to give it a longer self-explaning name
|
||
auto disp_vertex = [&vertex_num_map](Vertex_handle v) { | ||
return CGAL::IO::oformat( | ||
[v, &vertex_num_map](auto& os) -> decltype(os)& { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[v, &vertex_num_map](auto& os) -> decltype(os)& { | |
[v](auto& os) -> decltype(os)& { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must reject this suggestion, because vertex_num_map
is used, line 1310, in case the vertex type does not have timestamps. I will add a [[maybe_unused]]
.
VC++ 19.16 thought there was an ambiguous call to `operator==` between `skip_iterator` and `skip_iterator` in the internals of `boost::iterator_adaptor` (yet another matching bug) of VC++ 19.16). I solved it by using the more modern `boost::stl_interfaces::iterator_interface` from Boost.STLintface (Boost>=1.74).
Summary of Changes
In the PR #8170, merged for CGAL-6.0, there was several commits that I had to revert, because they broke the testsuite results:
save_binary_file
. That was no correct as regards to the C3t3 concept. It is now fixed by commit c10dcf7 from this PR.Polyline_constraint_hierarchy_2
using an unordered map, instead of astd::map
. The issue was that is broke the determinism of Mesh_2. See Improvement backports from CDT_3 branch (Follow-up to PR #8170) #8273 (comment).CGAL::Segment_3
, for some CGAL kernels.This pull-request reintroduces those features, for CGAL-6.1.
Release Management