Commit Graph

203 Commits

Author SHA1 Message Date
Philipp Möller caf3cce0d1 Silence unused parameter warnings. Leave the ones from the test-suite
that could signal incomplete tests.
2012-06-22 14:22:16 +00:00
Laurent Rineau 5acc79e554 Add comments to explain what happens with the use of Default Dt_3 2012-04-23 16:54:47 +00:00
Laurent Rineau 95bec3999c Use Unique_has_map instead of std::map (patch from Andreas Fabri)
The gain on copies of T2 or T3 is the following:


afabri@klimt /cygdrive/c/cgal/next/Triangulation_3/benchmark/Triangulation_3
$ ./copy 1000000 2
36.806 sec

afabri@klimt /cygdrive/c/cgal/next/Triangulation_3/benchmark/Triangulation_3
$ ./copy 1000000 2
4.865 sec

The benchmarck copy.cpp is the following (not commited):

#define  CGAL_T3_HASH
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Timer.h>
#include <CGAL/point_generators_3.h>


#include <iostream>
#include <fstream>
#include <string>
#include <vector>

typedef CGAL::Exact_predicates_inexact_constructions_kernel  K;
typedef CGAL::Delaunay_triangulation_3<K> Delaunay;
typedef K::Point_3                                     Point;
typedef CGAL::Creator_uniform_3<double,Point>  Creator;



int main(int argc, char **argv)
{
  int n=1000000;
  int rep=100;
  if (argc>=2)
    n=atoi(argv[1]);
  if (argc>=3)
    rep=atoi(argv[2]);
  std::vector<Point> points;
  points.reserve(n);  
  CGAL::Random_points_in_sphere_3<Point,Creator> g(1);
  CGAL::copy_n( g, n, std::back_inserter(points));
  Delaunay original;
  original.insert(points.begin(),points.end());
  
  double res = 0;
  for (int r=0;r<rep;++r){
    CGAL::Timer t;    t.start();
    Delaunay delaunay=original;
    t.stop();
    res+=t.time();
  }

  std::cout << res << std::endl;
            
  return 0;
}
2012-03-30 12:37:19 +00:00
Sébastien Loriot 498c0a6e1e Make the insert-by-range function more permissive
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.
2012-01-24 17:25:20 +00:00
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Laurent Rineau 7df0200a6b Reintegrate /branches/features/Power_test_3-VC_64bit-GF into next. 2011-11-17 17:11:42 +00:00
Laurent Rineau 3089c5d022 Revert that patch. Andreas agreed that he should not have commited that to
next before the branch ShewchuckKernel-GF is tested in candidates

Reverted commit:
  | ------------------------------------------------------------------------
  | r66076 | afabri | 2011-10-26 21:29:58 +0200 (Wed, 26 Oct 2011) | 1 line
  | Changed paths:
  |    M /branches/next/Triangulation_3/include/CGAL/internal/Static_filters/Power_test_3.h
  | 
  | Split the operator in two functions to avoid an ICE for VC++ 64bit release compilations
  | ------------------------------------------------------------------------
2011-10-27 13:57:12 +00:00
Andreas Fabri 1c055d6951 Split the operator in two functions to avoid an ICE for VC++ 64bit release compilations 2011-10-26 19:29:58 +00:00
Andreas Fabri 706e98cd3b Workaround for ICE on VC++ generating 64bit code 2011-10-14 13:04:06 +00:00
Laurent Rineau b7c33d7b2e Add a comment to mark the end of move_if_no_collision
The function body of Triangulation_3<Gt,Tds>::move_if_no_collision is so
long that comments should be added to mark blocks ends. For now, mark the
end of the function body.
2011-08-24 13:39:51 +00:00
Laurent Rineau 1fb7632ec3 Fix a bug in finite_adjacent_vertices when dimension()==1.
When tr.dimension()==1, tr.finite_adjacent_vertices(...) and
tr.finite_incident_edges(...) returned infinite things.
2011-07-28 16:53:11 +00:00
Andreas Fabri e8fb926dae Add missing return statements 2011-06-29 14:19:27 +00:00
Sébastien Loriot cc9929b7de qualify boost::bind to avoid ambiguity on windows. 2011-06-08 06:36:55 +00:00
Sébastien Loriot 98ddbf9c7e merge packages Spatial_sorting, Triangulation_2 and Triangulation_3 from branch spatial_sorting-add_info-sloriot 2011-05-24 15:48:31 +00:00
Sébastien Loriot 2c2ce21536 remove commented lines from example.
int -> size_type
2011-03-04 07:12:17 +00:00
Sébastien Loriot c1ff39de9a fix documentation from branch (code merged in r60697) 2011-02-28 17:22:38 +00:00
Andreas Fabri be782ec8e3 Use CGAL::abs instead of fabs 2011-02-16 15:53:26 +00:00
Laurent Rineau a2daef39ab Add a comment, that explain a tricky line of code.
(Actually, seeing the code, I first thought there was a bug. But then I
understood. That is why I think the comment may be is helpful for others).
2011-02-11 10:43:45 +00:00
Laurent Rineau 7e1f88e0cb Abort operator>> as soon as one of the error flags failbit or badbit is set
on the stream. That avoids a possible very long loop if the stream format
is not the excepted one (imagine that is >> n sets n to INTMAX...)
2011-02-08 16:13:38 +00:00
Sébastien Loriot 68c3dfbfa9 add missing default constructor 2011-02-07 11:11:10 +00:00
Sébastien Loriot af6f99ed1a protect code using insert points with info by range using macro
CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
2011-01-10 17:54:57 +00:00
Sébastien Loriot 3181ed9401 merge only the code to insert points with info by range from the branch
/branches/experimental-packages/Triangulation_insert_with_info/Triangulation_3
2011-01-10 16:00:51 +00:00
Laurent Rineau eea1755591 Merge the candidate branch of
https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Rt::vertices_inside_conflict_zone
in trunk.
2010-12-21 16:36:04 +00:00
Laurent Rineau 96162627aa Merge the following small features in trunk:
https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Remove_cluster
  https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Structural_filtering

Merge also a partial support of:
  https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Rt::vertices_inside_conflict_zone
    (vertices_inside_conflict_zone" is added in Regular_triangulation_3,  without documenting it)
2010-12-10 17:02:10 +00:00
Sébastien Loriot dfa20899ef derecursion of create_star_3:
I remade a benchmark and finally when using boost::thread_specific_ptr,
using a std::vector is faster than the dedicated vector-class I previously
use.
I also retry using a tuple instead of a dedicated class to store variables
useful for the emulated recursion but tuple is (on my machine) slower.

benchmark results are the following (points are randomly taken in a sphere,
time is in seconds and is the mean of 10 idendical runs)

nb points              |   1000        100000    100000    1000000   10000000
-----------------------------------------------------------------------------
trunk version          | 0.0088       0.0928     0.9865    10.216     102.99 
with vector            | 0.0096       0.0900     0.9817    10.075     102.24 
with vector and tuple  | 0.0100       0.0948     0.9981    10.219     104.58 
recursive version      | 0.0080       0.0936     0.9732    10.141     102.33
2010-11-24 07:27:04 +00:00
Laurent Rineau 77a2bead80 Add missing svn properties (keywords and eol-style). 2010-09-20 12:12:46 +00:00
Stéphane Tayeb ca4f9f11e8 Add an overload of insert_in_hole() in class Regular_triangulation_3 to ensure that hidden points are properly treated. 2010-08-04 15:36:38 +00:00
Sylvain Pion 8bd594a8be Simplification : the case dim==1 should work for dim==0 as well. 2010-07-27 12:55:09 +00:00
Sylvain Pion fdd4243639 nearest_vertex_in_cell() : handle dimension == 0. 2010-07-27 12:48:53 +00:00
Sébastien Loriot 599b23129e missing using 2010-07-08 09:04:57 +00:00
Stéphane Tayeb 771b6f1b79 Fix bug on g++-4.5 -std=c++0x: use int[3] instead of unsigned char[3] to store vertex indices. 2010-07-07 11:26:48 +00:00
Sébastien Loriot 9567810ef8 add macro CGAL_TDS_USE_OLD_CREATE_STAR_3 in TDS_3.h so that user can
still use the old recursive version of create_star_3.
2010-06-28 14:06:14 +00:00
Sébastien Loriot 238f5a8479 change a private into protecter to have access to hidden_tester in derived class
add a using find_conflicts so that can call T3 version from class inheriting from DT or RT
2010-06-25 21:13:06 +00:00
Sébastien Loriot bb39c7d194 bug in Facet_extractor: missing * and ++ 2010-06-25 12:58:37 +00:00
Laurent Rineau 0625b6c6bd int -> std::size_t|size_type 2010-06-24 13:27:44 +00:00
Andreas Fabri 1e12152c5f int size_t fixes 2010-06-24 12:50:37 +00:00
Andreas Fabri d185e4152f Finally use ptrdiff_t as return type for insert(beg, end) 2010-06-23 13:35:35 +00:00
Andreas Fabri b456cdb994 int -> size_type/std::size_t 2010-06-21 20:31:19 +00:00
Andreas Fabri 97c2754da5 As the insertion of points in a regular triangulation can reduce the number of vertices we have to replace size_t with ptrdiff_t 2010-06-21 16:06:01 +00:00
Andreas Fabri f555a82e17 int -> size_type/std::size_t 2010-06-21 14:16:24 +00:00
Andreas Fabri c79a1ebbf6 int -> size_type/std::size_t 2010-06-21 14:12:02 +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 4d0e30fd74 add comments 2010-06-16 15:04:30 +00:00
Sébastien Loriot cf43255df7 Remove recursive call of create_star_3:
--create an internally used vector that can reserve its size when constructed
  --create an internally used class to store information required to emulated the call stack
  --the stack used to emulate the call stack is a static thread-safe vector of the function (thus a memory overhead) 
These choices have been made so that the running time of the triangulation is still the same.
2010-06-16 12:27:22 +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
Olivier Devillers da7051d179 fixing missing this-> 2010-05-31 09:58:31 +00:00
Laurent Rineau 7e87099363 Merge the branch /branches/candidate-packages/Triangulation_3
- Work from:
    Pedro Machado Manhaes de Castro <Pedro.Machado@sophia.inria.fr>
    Olivier Devillers <Olivier.Devillers@sophia.inria.fr>
- The work is:
    - displacement for 3D triangulation (Olivier and Pedro)
         https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Move_T2T3
2010-05-31 08:48:09 +00:00
Sébastien Loriot e3c0dd54fb change private to protected (needed by 'using locate' in Alpha_shape_3 class) 2010-05-13 06:39:52 +00:00
Andreas Fabri beaff6d265 Add 'using' statement for ansi-compliance 2010-05-11 07:08:10 +00:00
Laurent Rineau 7aedbdf5eb Missing using Tr_base:: (for strict ansi compliance) 2010-05-10 08:43:22 +00:00