Merge pull request #7217 from afabri/Largest_empty_rectangle-ignore_points_on_border-GF

Largest Empty Iso Rectangle: Ignore points on the border
This commit is contained in:
Laurent Rineau 2023-02-10 15:40:42 +01:00
commit 7fe663ce99
3 changed files with 6 additions and 5 deletions

View File

@ -142,9 +142,11 @@ Iso_rectangle_2 get_bounding_box();
/// @{
/*!
Inserts point `p` in the point set, if it is not already in the set.
Inserts point `p` in the point set, if it is not already in the set
and on the bounded side of the bounding rectangle.
\note Points on the boundary can be ignored as they lead to the same result.
*/
void
bool
insert(const Point_2& p);
/*!

View File

@ -1,8 +1,7 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Iso_rectangle_2.h>
#include <CGAL/Largest_empty_iso_rectangle_2.h>
#include <fstream>
#include <iostream>
typedef double Number_Type;
typedef CGAL::Simple_cartesian<Number_Type> K;

View File

@ -762,7 +762,7 @@ bool
Largest_empty_iso_rectangle_2<T>::insert(const Point_2& _p)
{
// check that the point is inside the bounding box
if(bbox_p.has_on_unbounded_side(_p)) {
if(! bbox_p.has_on_bounded_side(_p)) {
return(false);
}