Commit Graph

68 Commits

Author SHA1 Message Date
Sébastien Loriot 98e471849b moving files from internal to PKG/internal 2021-08-26 11:33:39 +02:00
Laurent Rineau 21755b1123 Merge pull request #5245 from GilesBathgate/create-assertions-fix
Allow -DNDEBUG and CGAL_nnn_assertions at the same time
2021-03-24 15:05:41 +01:00
Sébastien Loriot 4bb0406240 do not include boost/bind.hpp (shouldn't be used anymore) + fix remaining bind
(nasty using namespace boost!)
2021-02-12 15:35:19 +01:00
Andreas Fabri 51086d5678 When using a reference for the functor we must generate a new functor in the for loop 2021-01-28 17:12:26 +00:00
Sébastien Loriot c4ad713b9e replace bind in Convex_hull_2 2021-01-06 12:59:11 +01:00
Giles Bathgate 5a36ff89b5 Drop NDEBUG it is already visible through CGAL_NO_ASSERTIONS 2020-12-04 19:42:21 +00:00
Laurent Rineau 319383c963 Revert "Merge pull request #4519 from lrineau/Kernel_23-Epeck_objects_in_Compact_container-lrineau_gdamiand"
This reverts commit bcab082f82, reversing
changes made to 2d3e126450.
2020-05-20 09:47:58 +02:00
Sébastien Loriot 97e46accad extra run of the script to remove tabs and trailing whitespaces 2020-03-26 19:26:37 +01:00
Sébastien Loriot 34ce87be56 Update branch from master after trailing whitespaces and tabs removal 2020-03-26 19:26:15 +01:00
Sébastien Loriot 0779373835 extra run of the script to remove tabs and trailing whitespaces
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
2020-03-26 14:16:06 +01:00
Guillaume Damiand f3bb8f1100 Bug fix 2020-03-18 08:36:07 +01:00
Sébastien Loriot 52164b1fba First pass on removing license notice in header for LGPL files 2019-10-19 15:40:30 +02:00
Sébastien Loriot 254d60f642 First pass on removing license notice in header for GPL files 2019-10-19 15:23:19 +02:00
Sébastien Loriot 7356421d80 introduce Commercial license SPDX tag 2019-10-19 12:15:19 +02:00
Sébastien Loriot 9bd9c68b83 update LGPL[23]+ and GPL[23]+ SPDX tags
ack -l --no-svg "SPDX-License-Identifier: GPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-3.0+/SPDX-License-Identifier: GPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-3.0+/SPDX-License-Identifier: LGPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: GPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-2.0+/SPDX-License-Identifier: GPL-2.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-2.0+/SPDX-License-Identifier: LGPL-2.0-or-later/"
2019-10-18 21:57:54 +02:00
Sebastien Loriot a24f22bd01
Merge pull request #3833 from afabri/Convex_hull_2-indices-GF
Convex_hull_2: Add an adapter
2019-04-18 15:53:59 +02:00
Sebastien Loriot 1406fb22d2 Apply suggestions from code review
Co-Authored-By: afabri <andreas.fabri@geometryfactory.com>
2019-04-12 12:37:45 +02:00
Andreas Fabri 58f53c3711 fix typo 2019-04-04 16:49:51 +02:00
Andreas Fabri 5e9b8e3bbf Add an adapter so that one can sort arbitary things and access the point via a property map 2019-04-03 16:23:58 +02:00
Sébastien Loriot f62624c4f9 replace cpp11::tuple by std::tuple 2019-03-29 13:28:33 +01:00
Sébastien Loriot ce126b87c6 remove cpp11::copy_n, cpp11::prev, and cpp11::next and use std instead 2019-03-29 13:28:32 +01:00
Sébastien Loriot 0685423ae8 update from cgal/master 2018-11-02 11:32:31 +01:00
Andreas Fabri 97b5c37b6e Fix includes 2018-05-04 09:00:11 +02:00
Mael Rouxel-Labbé ba3a59ed5a Merge branch 'Periodic_3_mesh_3-Feature-MBogdanov-old' into Periodic_3_mesh_3-Feature-MBogdanov 2017-11-30 15:54:00 +01:00
Sébastien Loriot ee57fc2d6c add SPDX identifier for files under the GPL-3+ license 2017-11-12 10:17:51 +01:00
Mael Rouxel-Labbé 538cad303f Purged Convex_hull_traits_2
It's pointless to write all these functions... (and it was incomplete anyway).
2017-10-22 23:32:54 +02:00
Mael Rouxel-Labbé 41f5c47394 Misc minor changes
Indentation, comments, whitespace, etc.
2017-10-22 23:28:37 +02:00
Sébastien Loriot 50510c05ea add include directive for license of all GPL header files
done using:
ack-grep "^GPL" */package_info/*/license.txt -l | awk -F "/" '{print $1}' > /tmp/gpl_packages
for i in `cat /tmp/gpl_packages | \
          grep -v Operations_on_polyhedra | \
          grep -v Algebraic_kernel_for_circles | \
          grep -v Algebraic_kernel_for_spheres | \
          grep -v Polyhedron_IO`;
do
  echo $i
  python Scripts/developer_scripts/add_license_in_pkg_header.py $i
done
python Scripts/developer_scripts/add_license_in_pkg_header.py Operations_on_polyhedra Polygon_mesh_processing
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_circles Circular_kernel_2
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_spheres Circular_kernel_3
python Scripts/developer_scripts/add_license_in_pkg_header.py Polyhedron_IO Polyhedron
2017-01-19 15:20:25 +01:00
Sébastien Loriot edbe8bb9e7 remove unused variable 2015-12-29 16:55:04 +01:00
Andreas Fabri 6c547e5663 Mainly added includes 2013-09-13 22:24:30 +02:00
Laurent Rineau d19578725b Fix warnings 2013-02-07 18:15:23 +01:00
Laurent Rineau e87dad0f95 Fix all warnings in demo/Polyhedron/
The compilation was fix g++-4.8, and the flags:
  --std=c++11 -frounding-math Wall -Wno-array-bounds -Wno-uninitialized
2013-02-06 17:03:20 +01:00
Sébastien Loriot 82b2ebc865 apply the cpp0x namespace renaming in all files 2012-12-19 11:33:17 +01:00
Laurent Rineau db194534c7 First big patch to fix -Wunused-local-typedefs
-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).
2012-08-01 13:29:16 +00:00
Sébastien Loriot 3de45905c0 use a dedicated version of the function assigning points to region in case
at least two extreme points are identical.

for the archive here is the result of the benchmark like done for r69398.
br_spl correspond to the same code but replacing the implementation of 
ch_akl_toussaint_assign_points_to_regions_deg by:
  for ( ; first != last; ++first )
  {
    //note that e!=w and s!=n except if the convex hull is a point (they are lexicographically sorted)
    if ( left_turn(*e, *w, *first ) )   
    {
        if (s!=w && left_turn( *s, *w, *first ) )       region1.push_back( *first );
        else if (e!=s && left_turn( *e, *s, *first ) )  region2.push_back( *first );
    }
    else
    {
        if (n!=e && left_turn( *n, *e, *first ) )       region3.push_back( *first );
        else if (w!=n && left_turn( *w, *n, *first ) )  region4.push_back( *first );
    }
  }  

The conclusion is that that version is always the fastest.

2 extreme points 
    using vector
    |nb pts   |     10 |   100  |   1000 | 10000 |  100000 | 1000000|
    |nb runs  | 100001 | 100001 | 100001 | 10001 |    1001 |     101|
    |---------------------------------------------------------------|
    |next     |  1.34  |  2.61  | 16.15  | 16.69 |  18.31 |  20.91  |
    |branch   |  0.10  |  0.74  |  9.24  | 11.0  |  12.74 |  15.24  |
    |br_spl   |  0.12  |  0.91  | 10.18  | 11.88 |  13.68 |  15.88  |
    |--------------------------------------------------------------- 

    using list
    |nb pts   |     10 |   100  |   1000 | 10000 |  100000 | 1000000|
    |nb runs  | 100001 | 100001 | 100001 | 10001 |    1001 |     101|
    |---------------------------------------------------------------|
    |next     |  1.27  |  2.66  |  16.09 | 16.66 |  18.19  | 21.21  |
    |branch   |  0.10  |  0.8   |   9.49 | 11.36 |  13.09  | 15.55  |
    |br_spl   |  0.13  |  0.9   |  10.32 | 12.00 |  13.93  | 16.14  |
    --------------------------------------------------------------- |

 
3 extreme points
    using vector
    |nb pts   |     10 |   100  |   1000 | 10000 |  100000 | 1000000|
    |nb runs  | 100001 | 100001 | 100001 | 10001 |    1001 |     101|
    |---------------------------------------------------------------|
    |next     |   1.34 |   2.46 |  14.26 | 14.81 |   16.40 | 18.48  |
    |branch   |   0.18 |   0.87 |  10.07 | 11.76 |   13.52 | 15.59  |
    |br_spl   |   0.12 |   0.98 |  10.41 | 12.07 |   13.94 | 15.93  |
    |---------------------------------------------------------------| 

    using list
    |nb pts   |     10 |   100  |   1000 | 10000 |  100000 | 1000000|
    |nb runs  | 100001 | 100001 | 100001 | 10001 |    1001 |     101|
    |---------------------------------------------------------------|
    |next     |   1.32 |   2.45 |  14.17 | 14.76 |   16.62 | 18.61  |
    |branch   |   0.19 |   0.86 |  10.21 | 12.03 |   13.66 | 15.96  |
    |br_spl   |   0.16 |   0.94 |  10.74 | 12.38 |   14.39 | 16.31  |
    |---------------------------------------------------------------| 

Convex hull is 2 points
    using vector
    |nb pts   |     10 |   100  |   1000 | 10000 |  100000 | 1000000|
    |nb runs  | 100001 | 100001 | 100001 | 10001 |    1001 |     101|
    |---------------------------------------------------------------|
    |next     |  0.19  |  1.39  |  13.54 | 13.46 |  14.16  | 14.05  |
    |branch   |  0.11  |  0.54  |   5.02 |  4.96 |   5.09  |  5.06  |
    |br_spl   |  0.12  |  0.94  |   9.02 |  9.0  |   8.98  |  9.13  |
    |---------------------------------------------------------------| 

    using list
    |nb pts   |     10 |   100  |   1000 | 10000 |  100000 | 1000000|
    |nb runs  | 100001 | 100001 | 100001 | 10001 |    1001 |     101|
    |---------------------------------------------------------------|
    |next     |   0.18 |   1.46 |  13.89 | 13.88 |   14.44 | 14.11  |
    |branch   |   0.14 |   0.58 |   5.12 |  5.07 |    5.07 |  5.29  |
    |br_spl   |   0.14 |   0.97 |   9.28 |  9.28 |    9.30 |  9.54  |
    |---------------------------------------------------------------| 

4 extreme points
    using vector
    |nb pts   |     10 |   100  |   1000 | 10000 |  100000 | 1000000|
    |nb runs  | 100001 | 100001 | 100001 | 10001 |    1001 |     101|
    |---------------------------------------------------------------| 
    |next     |   2.37 |   2.97 |   9.84 |  8.07 |    7.76 | 9.0    |
    |branch   |   0.10 |   0.50 |   6.76 |  7.36 |    7.42 | 8.66   |
    |br_spl   |   0.13 |   0.46 |   6.74 |  7.30 |    7.38 | 8.65   |
    |---------------------------------------------------------------|

    using list
    |nb pts   |     10 |   100  |   1000 | 10000 |  100000 | 1000000|
    |nb runs  | 100001 | 100001 | 100001 | 10001 |    1001 |     101|
    |---------------------------------------------------------------|
    |next     |   2.34 |   3.07 |   9.91 |  8.01 |    7.78 | 9.17   |
    |branch   |   0.11 |   0.54 |   6.78 |  7.44 |    7.58 | 8.93   |
    |br_spl   |   0.14 |   0.50 |   6.82 |  7.44 |    7.51 | 8.94   |
    |---------------------------------------------------------------|
2012-05-31 12:48:42 +00:00
Sébastien Loriot d6f0881f52 make sure ranges are not empty.
benchmark results are still valid
2012-05-30 15:52:46 +00:00
Sébastien Loriot a4b5ae22aa The akl_toussaint algo first determines extreme points along x and y axis, and then
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  |
---------------------------------------------------------------
2012-05-30 15:17:59 +00:00
Sébastien Loriot 19857458b6 deprecation warnings 2012-05-28 07:28:03 +00:00
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Philipp Möller 8eb30ef805 Replaced all uses of predecessor/successor with prev/next. 2011-06-07 16:21:58 +00:00
Laurent Rineau 167dd190c7 Fix compilation error about boost::bind
Fix an ambiguity between boost::bind and std::bind (C++0x): prefix
bind with boost:: explicitly.
2011-06-03 16:42:30 +00:00
Laurent Rineau 8679a3911e Merged revisions 56835,56864-56870,56876,56895-56897 via svnmerge from
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!
........
2010-06-20 21:48:20 +00:00
Sébastien Loriot 52317dd49f add python script (replace_CGAL_NAMESPACE.py) to replace CGAL_BEGIN_NAMESPACE and CGAL_END_NAMESPACE
by namespace CGAL { and } //namespace CGAL. in all .h and .cpp files
in a directory.
Apply it to all packages in the trunk
Remove macro definition from the config.h file.
2010-06-09 07:37:13 +00:00
Sylvain Pion 85dc12f2a7 Remove empty lines at beginning and end of files
(apply Scripts/developer_scripts/remove_empty_lines.pl).
2010-02-01 12:55:28 +00:00
Stéphane Tayeb 8dceee4164 Add include<CGAL/assertions.h> in *_assertion files. 2009-10-07 13:16:13 +00:00
Stéphane Tayeb 770492c1c7 Use new version of script create_assertions.sh to generate *_assertions.h files.
Diffs are:
 * #undef added
 * in old files, (void)0 is replaced by static_cast<void>(0)
 * in old files, lines as "#  define CGAL_xxx_assertion 1" are added
 * in point_set_processing_assertions.h, surface_mesh_parameterization_assertions.h, surface_reconstruction_points_assertions.h, "|| defined(CGAL_NDEBUG)" is replaced by "|| defined (NDEBUG)"
 * protective macros (if any) are removed
 * included files if any (<CGAL/assertions.h>, <CGAL/trace.h>) are removed
2009-10-07 07:49:44 +00:00
Sylvain Pion 8573fe26ce Rename CGALi to internal. 2009-08-24 17:10:04 +00:00
Sylvain Pion 76f9ad0aa5 Replace various std::copy calls by constructors of vector/list. 2008-08-20 09:52:00 +00:00
Michael Hoffmann 827fc44e29 Remove dependency on CGAL/functional. 2008-07-23 15:31:38 +00:00
Sylvain Pion 79864c0c8e Remove Arity_tag. 2008-07-22 12:29:01 +00:00