diff --git a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_d.h b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_d.h index aecf017cdbc..20f27bb125f 100644 --- a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_d.h +++ b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_d.h @@ -12,15 +12,14 @@ need to provide a unique `id`-number. The policy parameter `IdPolicy` offers several choices. The template parameters have to comply with the following requirements: - + \cgalModels `BoxIntersectionBox_d` diff --git a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_traits_d.h b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_traits_d.h index 54f79ee07fe..706b82ee620 100644 --- a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_traits_d.h +++ b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_traits_d.h @@ -16,11 +16,9 @@ the `Box_parameter` type required in the `Box_parameter` to be of type `const B&`, while for the other cases it just uses the pointer type. - +\tparam BoxHandle is either a class type `B`, a pointer `B*`, or a + const-pointer `const B*`, where `B` is a model of the + `BoxIntersectionBox_d` concept. \cgalModels `BoxIntersectionTraits_d` diff --git a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_with_handle_d.h b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_with_handle_d.h index 45a3a33e83d..5a851bbe395 100644 --- a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_with_handle_d.h +++ b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_with_handle_d.h @@ -19,9 +19,9 @@ of the `Assignable` and the `LessThanComparable` concept. \tparam D the dimension of the box. \tparam Handle Handle concept, e.g., a pointer, an iterator, or a circulator. \tparam IdPolicy specifies how the `id`-number will be -provided. Can be one of the following types, where +provided and can be one of the following types, where `ID_FROM_HANDLE` is the default for this parameter: - - `ID_NONE`: no `id`-number is provided. Can be useful + - `ID_NONE`: no `id`-number is provided. This can be useful to have this class as a base class for different implementations of `id`-numbers than the ones provided here. @@ -33,7 +33,7 @@ provided. Can be one of the following types, where `CGAL::box_self_intersection_d()` algorithm. This is therefore the safe default implementation. - `ID_FROM_BOX_ADDRESS`: casts the address of the box into a - `std::ptrdiff_t` to create the `id`-number. Works fine + `std::ptrdiff_t` to create the `id`-number. This works fine if the intersection algorithms work effectively with pointers to boxes, but not in the case where the algorithms work with box values, because the algorithms modify the order of 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 86441b44f23..89b6facc3cc 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 @@ -46,8 +46,26 @@ namespace CGAL { An important special application of this algorithm is the test for self-intersections where the second box sequence is an identical copy of the first sequence including the preserved `id`-number. We - offer a specialized implementation - `box_self_intersection_all_pairs` for this application. + offer a specialized implementation `box_self_intersection_all_pairs_d()` + for this application. + +\cgalHeading{Requirements} + + \sa \link PkgBoxIntersectionD_box_intersection_d `CGAL::box_intersection_d()` \endlink \sa \link PkgBoxIntersectionD_box_self_intersection_d `CGAL::box_self_intersection_d()` \endlink @@ -63,6 +81,40 @@ namespace CGAL { size of the second sequence. */ +/*! + \ingroup PkgBoxIntersectionD_box_intersection_all_pairs_d + + Invocation of box intersection with default box traits + `Box_intersection_d::Box_traits_d`, where + `Box_handle` corresponds to the iterator value type of + `ForwardIterator1`. + +*/ +template< class ForwardIterator1, + class ForwardIterator2, + class Callback > +void box_intersection_all_pairs_d( + ForwardIterator1 begin1, ForwardIterator1 end1, + ForwardIterator2 begin2, ForwardIterator2 end2, + Callback callback, + CGAL::Box_intersection_d::Topology topology = CGAL::Box_intersection_d::CLOSED); + +/*! + \ingroup PkgBoxIntersectionD_box_intersection_all_pairs_d + + Invocation with custom box traits. + +*/ +template< class ForwardIterator1, + class ForwardIterator2, + class Callback, class BoxTraits > +void box_intersection_all_pairs_d( + ForwardIterator1 begin1, ForwardIterator1 end1, + ForwardIterator2 begin2, ForwardIterator2 end2, + Callback callback, + BoxTraits box_traits, + CGAL::Box_intersection_d::Topology topology = CGAL::Box_intersection_d::CLOSED); + /*! \addtogroup PkgBoxIntersectionD_box_intersection_d @@ -112,7 +164,7 @@ namespace CGAL { concept and that the box handle, i.e., the iterators value type, is identical to the box type or a pointer to the box type. - An important special application of this algorithm is the test for + An important special application of this algorithm is the test for self-intersections where the second box sequence is an identical copy of the first sequence including the preserved `id`-number. Note that this implies that the address of the box is not sufficient for @@ -130,12 +182,16 @@ namespace CGAL { values `Box_intersection_d::COMPLETE` and `Box_intersection_d::BIPARTITE`. + \warning The two sequences of boxes passed to `box_intersection_d()` can be + ranges created from the same container, but these ranges must not contain + any common element. + \cgalHeading{Requirements}