In these two algorithms, points farthest from a line must be found.
In case of multiple points at the same distance, an "extremity"
of this set of points must be returned.
This was properly documented in the Less_signed_distance_to_line_2
functor of the ConvexHullTraits_2 concept:
[ ... ]
The predicate must provide a total order compatible with convexity,
<I>i.e.</I>, for any line segment \f$ s\f$ one of the endpoints
of \f$ s\f$ is the smallest point among the points on \f$ s\f$,
with respect to the order given by `Less_signed_distance_to_line_2`.
[ ... ]
And specific models did respect this requirement. However, the kernel
is supposed to also be a model of ConvexHullTraits_2, but
Kernel_23::LessSignedDistanceToLine_2 does not require this, and
the models (EPICK, Simple_Cartesian, etc.) do not implement it.
Hence, if a kernel was used as geometric traits for 2D Convex Hull
algorithms, one might not get the expected extreme point when
there are multiple points at the same distance to a line at some
point in the algorithm.
The algorithm recovered, but this created extra points on the hull.
Fixing the functor in the kernel would create an inconsistency
with Kernel_23::Compare_signed_distance_to_line_2, so instead
this commit changes the concept and the code to require
providing Compare_signed_distance_to_line_2 and then uses Less_xy
in the code in case of EQUAL return (that is actually how it was
done in the Convex_hull_2-specific versions of the ConvexHullTraits_2
model).
right after the merge of 4.14 release branch
+ manual fix on one line in:
* Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h
* .travis/generate_travis.sh
-Wunused-local-typedefs is a new warning flag of gcc-4.7, and it will enabled
by -Wall since gcc-4.8 (not yet released).
The fix is a big set of removals of unused typedefs (or comments, or moves,
depending on the context).
associates each input point outside the diamond defined by the aforementioned extreme points
to one of the 4 regions defined. The old implementation did not take into account
the fact that the extreme points where also tested, which resulted in filter failures.
To avoid that, the range of input points is split (artificially) in 5 ranges and
the association part is done for each range. The implementation is faster when using
random access iterators as input.
Here is the result of a benchmark on random points in a disk.
In order to have significant running time, the same convex hull
is computed several times (nb runs) and the total time is reported.
Using a vector of points as input
nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
---------------------------------------------------------------
next | 2.34s | 2.95s | 9.88s | 8.02s | 7.80s | 9.06s |
branch | 0.11s | 0.49s | 6.79s | 7.49s | 7.43s | 8.74s |
---------------------------------------------------------------
Using a list of points as input
nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
---------------------------------------------------------------
next | 2.34s | 3.16s | 9.85s | 8.08s | 7.84s | 9.27s |
branch | 0.14s | 0.54s | 6.93s | 7.51s | 7.61s | 8.98s |
---------------------------------------------------------------
svn+ssh://lrineau@scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.6-branch
........
r56835 | lrineau | 2010-06-17 12:56:52 +0200 (Thu, 17 Jun 2010) | 6 lines
Remove the constructor Gmpfr(long double) on Microsoft Visual C++. A big
comment in the source code explains why.
The testsuite will check that the construction of Gmpfr from a long double
on MSVC still works and produces the right Gmpfr.
........
r56864 | afabri | 2010-06-18 11:04:47 +0200 (Fri, 18 Jun 2010) | 1 line
Use tie from boost::
........
r56865 | afabri | 2010-06-18 11:11:49 +0200 (Fri, 18 Jun 2010) | 1 line
Use bind from boost::
........
r56866 | afabri | 2010-06-18 11:38:50 +0200 (Fri, 18 Jun 2010) | 1 line
Use bind from boost:: (detected in Mesh_3 VC10 testsuite)
........
r56867 | lrineau | 2010-06-18 11:39:24 +0200 (Fri, 18 Jun 2010) | 3 lines
cmake-2.8.2rc2 is out.
/bigobj is necessary
........
r56868 | afabri | 2010-06-18 11:52:37 +0200 (Fri, 18 Jun 2010) | 1 line
Add #include <fstream>
........
r56869 | afabri | 2010-06-18 11:55:33 +0200 (Fri, 18 Jun 2010) | 1 line
Shorten filename as with path it exceeds easily 256 letters which poor Visual C++ can't handle
........
r56870 | afabri | 2010-06-18 12:24:30 +0200 (Fri, 18 Jun 2010) | 1 line
Use tie from boost::
........
r56876 | lrineau | 2010-06-18 16:40:36 +0200 (Fri, 18 Jun 2010) | 3 lines
New try to fix the issue of Gmpfr(long double) with MSVC and libmpfr-1.dll
compiled by Mingw.
........
r56895 | lrineau | 2010-06-20 23:16:40 +0200 (Sun, 20 Jun 2010) | 3 lines
Using boost::bind is not sufficient" "bind" without qualifier was
ambiguous, according to MSVC2010, with std::bind (from C++0x).
........
r56896 | lrineau | 2010-06-20 23:18:29 +0200 (Sun, 20 Jun 2010) | 3 lines
Qualify "bind" with "boost::", to avoid the ambiguity (according to
MSVC2010), with std::bind (C++0x).
........
r56897 | lrineau | 2010-06-20 23:19:17 +0200 (Sun, 20 Jun 2010) | 2 lines
Stupid typo!
........