stack for at most 100 recursive calls and switch to a non-recursive function
that uses a local std::stack to emulate the call stack.
Benchmarks show the following results:
7 runs on 10,000,000 random in unit circle points
43.67074 : Old implementation
43.91474 : use stack for 100 first call then non-recursive with stack
44.07075 : use stack for 100 first call then non-recursive with vector
44.57079 : Local vector
45.0068 : Local stack
45.87886 : Local fixed size array
46.3829 : Local "home-made" small vector
53.41534 : Thread-local vector
-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).
The Constraint_hierarchy is now templated by T, an anonymous type (that is
a Vertex_handle when the constraint hierarchy is used in Ct_plus_2), and a
Compare operator, that have a comparison member function:
bool operator()(T, T);
In Ct_plus_2, the Compare operator passed to the Constraint_hierarchy
compares the vertices with a Less_xy_2, implemented by Less_x_2, and
Less_y_2.
The test test/Triangulation_2/include/CGAL/_test_cls_hierarchy_2.h has been
tweaked, to check that the type T passed in the hierarchy no longer needs
to have a point() member function, as it was before May 2010 (when GF has
determinized the Cdt_plus_2 using too simple patch).
The condition is now to be convertible to the point type, pair<point,info>,...
This was the behavior before the insert-by-range-with-info methods were
introduced.
There was a performance degradation between CGAL-3.7 and CGAL-3.8, when
Triangulation_2 is used with EPEC. This patch fixes the issue. Using a
functor that is specialized for EPEC, in inexact_orientation, to_double is
not called on p.x() but on p.approx().x().
I choose this solution since making the container global variable of
the class penalize classes that do not use remove functions.
The overhead introduced is small (less than 2-3% of the total remove time).
function (not with all compilers, but at least with g++-4.4).
I have a very nasty test case where list_edges.size is more than
700000. With a quadratic function, mmy cruncher computer was not even able
to insert *one* constraint in half a day.
- Remove also the unused variable vb, and the initialization of tempo
(which is re-initialized a second time later, without using its first
value).
| ------------------------------------------------------------------------
| r59165 | afabri | 2010-10-11 15:27:39 +0200 (Mon, 11 Oct 2010) | 1 line
| Changed paths:
| M /trunk/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xy_3.h
| M /trunk/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xz_3.h
| M /trunk/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_yz_3.h
|
| Use the renamed class which now is in the Kernel package
| ------------------------------------------------------------------------
| r59159 | afabri | 2010-10-11 15:14:31 +0200 (Mon, 11 Oct 2010) | 1 line
| Changed paths:
| D /trunk/Triangulation_2/include/CGAL/internal/Triangulation_euclidean_traits_projected_3.h
|
| Move implementation of Projection_traits from Triangulation_2 to Kernel
| ------------------------------------------------------------------------
Now the work is in a branch.
if degree of removed point is > 7
The fast removal is still effective since the
specialized functions for degrees 3,4,5,6, and 7 are used.
Differences in benchmarks for high degrees between old and new was not
big anyway.
-factorization of projection trait classes into an internal trait class
-add missing functors to Triangulation_euclidean_traits_XX_3 required by CDT with intersections.
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.
- Work from:
Pedro Machado Manhaes de Castro <Pedro.Machado@sophia.inria.fr>
Olivier Devillers <Olivier.Devillers@sophia.inria.fr>
- The work is:
- fast removal for Delaunay_2 (Olivier)
- displacement for 2D triangulation (Olivier and Pedro)
https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Move_T2T3
data are to be used when computing the conflict region of an object
(applies to segments and circles) instead of using an std::map for
faces. the code is inside an #ifdef/#endif block and is activated by
defining the macro: CGAL_TDS2_DATA
| ------------------------------------------------------------------------
| r54312 | afabri | 2010-02-25 16:29:19 +0100 (Thu, 25 Feb 2010) | 1 line
|
| Use a symbolic perturbation so that in the grid case all diagonals have the same orientation
| ------------------------------------------------------------------------
svn+ssh://lrineau@scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch
........
r53426 | lrineau | 2009-12-15 16:14:57 +0100 (Tue, 15 Dec 2009) | 1 line
Merge from trunk revisions 53423-53425 (teillaud)
........
r53428 | lrineau | 2009-12-15 17:41:27 +0100 (Tue, 15 Dec 2009) | 5 lines
- Fix a bug in Constraint_hierarchy_2 (see the big comment inserted in the
code).
- Add a test in the testsuite, to assure that this bug will never be
reintroduced.
........
svn merge
'^/branches/experimental-packages/Triangualtion_2-projection_traits/Triangulation_2@48316'
'^/branches/experimental-packages/Triangulation_2-projection_traits/Triangulation_2'
.
I have merged the Triangulation_2 part of the branch
experimental-packages/Triangulation_2-projection_traits into the trunk.
This adds two files (traits classes), and a small patch to
Contrained_triangulation_2 (pass geomtraits by const ref instead of a
copy).
T2 testsuite locally launched successfully.
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
and so on, instead of using the functors of the kernel.
- Add a new class Triangulation_2_filtered_projection_traits_3
- Rename all classes Coplanar_* to Projected_*