Commit Graph

113 Commits

Author SHA1 Message Date
Laurent Rineau 8c76840812 The rnd generator return type must be the difference type
Should fix that warning:
```
c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.24930\include\algorithm(1782): warning C4244: 'argument': conversion from '_Diff' to 'long', possible loss of data
c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.24930\include\algorithm(1796): note: see reference to function template instantiation 'void std::_Random_shuffle_unchecked<CGAL::Point_3<Kernel_>*,_RngFn>(_RanIt,_RanIt,_RngFn &)' being compiled
        with
        [
            Kernel_=CGAL::Simple_cartesian<float>,
            _RngFn=boost::random::random_number_generator<boost::random::rand48,long>,
            _RanIt=CGAL::Point_3<CGAL::Simple_cartesian<float>> *
        ]
c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.24930\include\algorithm(1815): note: see reference to function template instantiation 'void std::_Random_shuffle1<_RanIt,boost::random::random_number_generator<boost::random::rand48,long>>(_RanIt,_RanIt,_RngFn &)' being compiled
        with
        [
            _RanIt=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<CGAL::Point_3<CGAL::Simple_cartesian<float>>>>>,
            _RngFn=boost::random::random_number_generator<boost::random::rand48,long>
        ]
C:\CGAL\test\CGAL-4.10-Ic-125\include\CGAL/spatial_sort.h(83): note: see reference to function template instantiation 'void std::random_shuffle<RandomAccessIterator,boost::random::random_number_generator<boost::random::rand48,long>&>(_RanIt,_RanIt,_RngFn)' being compiled
        with
        [
            RandomAccessIterator=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<CGAL::Point_3<CGAL::Simple_cartesian<float>>>>>,
            _RanIt=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<CGAL::Point_3<CGAL::Simple_cartesian<float>>>>>,
            _RngFn=boost::random::random_number_generator<boost::random::rand48,long> &
        ]
C:\CGAL\test\CGAL-4.10-Ic-125\include\CGAL/spatial_sort.h(136): note: see reference to function template instantiation 'void CGAL::internal::spatial_sort<RandomAccessIterator,Policy,Kernel>(RandomAccessIterator,RandomAccessIterator,const Kernel &,Policy,CGAL::Point_3<Kernel_> *,ptrdiff_t,ptrdiff_t,double)' being compiled
        with
        [
            RandomAccessIterator=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<CGAL::Point_3<CGAL::Simple_cartesian<float>>>>>,
            Policy=CGAL::Hilbert_sort_median_policy,
            Kernel=Kernel,
            Kernel_=CGAL::Simple_cartesian<float>
        ]
C:\CGAL\test\CGAL-4.10-Ic-125\include\CGAL/spatial_sort.h(152): note: see reference to function template instantiation 'void CGAL::spatial_sort<RandomAccessIterator,CGAL::Hilbert_sort_median_policy,Kernel>(RandomAccessIterator,RandomAccessIterator,const Kernel &,Policy,ptrdiff_t,ptrdiff_t,double)' being compiled
        with
        [
            RandomAccessIterator=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<CGAL::Point_3<CGAL::Simple_cartesian<float>>>>>,
            Kernel=Kernel,
            Policy=CGAL::Hilbert_sort_median_policy
        ]
```
https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.10-Ic-125/AABB_tree/TestReport_afabri_x64_Cygwin-Windows10_MSVC2017-Debug-64bits.gz
2017-02-13 18:54:46 +01:00
Laurent Rineau 1aefb3b0f3 include <CGAL/config.h>, not <CGAL/basic.h> 2016-09-30 15:23:14 +02:00
Laurent Rineau 51f5697d3d Add missing #include 2016-09-30 15:23:14 +02:00
Laurent Rineau 4c97ab6c96 Minor fixes for -Wconversion warnings in a few packages 2016-04-22 12:36:26 +02:00
Andreas Fabri eb90e8e3e1 Include consistently <CGAL/property_map.h> 2016-02-24 12:09:36 +01:00
Sébastien Loriot a0fcac7d94 Merge branch 'Spatial_sorting-spatial_sorting_on_sphere-pmachado' of git://github.com/sloriot/cgal into sloriot-Spatial_sorting-spatial_sorting_on_sphere-pmachado 2015-04-22 17:41:53 +02:00
Sébastien Loriot e928b1e45c move spatial sorting on sphere into dedicated headers 2015-04-20 13:13:58 +02:00
Sébastien Loriot af8e2a2633 int -> size_t to avoid warning 2015-04-17 09:08:11 +02:00
Sébastien Loriot e185efc2dc update license to GPL 2015-04-16 10:55:53 +02:00
Sébastien Loriot 69a0937e9f fix initialization of static const variable of non-integral type 2015-04-16 09:17:56 +02:00
Sébastien Loriot 3c66842b77 fix compilation issues and warnings 2015-04-15 09:03:14 +02:00
Sébastien Loriot fee85470c1 Merge branch 'Triangulation_3-determinism-gf' into to-be-tested/Triangulation_3-determinism-gf
Conflicts:
	.gitattributes
	Matrix_search/include/CGAL/rectangular_3_center_2.h
	Spatial_sorting/include/CGAL/spatial_sort.h
2014-07-03 16:34:46 +02:00
Pedro Machado Manhães de Castro 47441076ec updating according to Monique's review; see Small Feature section 2014-03-20 10:36:03 +01:00
Pedro Machado Manhães de Castro be1de0cb54 fix bug when partial array size is 0 2014-03-07 18:49:24 +01:00
Pedro Machado Manhães de Castro 6a7cf62da8 update authors of some files 2014-03-06 18:08:00 +01:00
Pedro Machado Manhães de Castro 505532f212 fixing parameter order 2014-03-06 15:53:52 +01:00
Pedro Machado Manhães de Castro 15d098c55f Sphere_3 -> Point_3 + double, so that we don't need another traits. 2014-03-06 14:59:24 +01:00
Pedro Machado Manhães de Castro 5c95a11352 Allowing the hilbert sort on a give sphere. 2014-03-06 10:49:54 +01:00
Pedro Machado Manhães de Castro 9a68f401ae User manual update + spherical_* -> *_on_sphere 2014-03-04 17:53:41 +01:00
Pedro Machado Manhães de Castro c87a87ed83 fixing the Bbox_2 bug in Hilbert_policy_2 + adding hilbert sort and spatial sort on the sphere 2014-03-03 18:50:52 +01:00
Andreas Fabri 4cfe58ac02 remove typedef shadowing template parameter 2013-01-15 08:59:47 +01:00
Andreas Fabri 968aa6262d reorder Kernel and Policy of hilbert_sort 2013-01-14 16:00:55 +01:00
Philipp Möller 833a32660d Replace boost/random.hpp with more precise headers 2012-12-14 17:29:14 +01:00
Laurent Rineau b1c09b9446 spatial_sort is ~15% slower with the CGAL::nth_element than with the one
from GNU/g++ STL. The feature is used only if that macro is defined:

#define CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR 1

Pretty name, is not it?
2012-03-09 15:01:39 +00:00
Laurent Rineau cb38257cd2 Reimplementation of std::nth_element and std::random_shuffle
For the use of Spatial_sorting, we want an implementation of nth_element
and random_shuffle that produces the same result on all platforms, for a
given seeded random generator.
2012-03-09 11:37:14 +00:00
Sébastien Loriot 9f1ce0c2b7 temporary test using stable_sort to see whether the issue would be
fixed by fixing std::nth_element
2012-03-08 10:52:53 +00:00
Philipp Möller 47b19b1839 * added the macro CGAL_DONT_USE_INDEPENDENT_SHUFFLE to switch back to the old version 2012-03-07 14:41:36 +00:00
Philipp Möller b04508b9f4 * replaced std::random_shuffle with CGAL::random_shuffle 2012-03-07 14:23:36 +00:00
Philipp Möller eda2ce42a7 reverted broken revision r67957 2012-03-07 14:21:07 +00:00
Philipp Möller e0dd26123d * exchanged std::random_shuffle with CGAL::random_shuffle 2012-03-07 14:08:55 +00:00
Sébastien Loriot 91a5327fa8 change LGPLv2 -> LGPLv3 2011-10-10 13:48:25 +00:00
Sébastien Loriot eb6afdea2b min->mini max->maxi;
confusion between the initialization of the variables
and the min max functions
2011-07-08 12:00:13 +00:00
Sébastien Loriot bbc7a1b21b merge from Spatial_sorting-increase_dimension-odevil 2011-06-03 06:54:01 +00:00
Sébastien Loriot f15c8870be remove warning on windows x64 2011-06-03 06:49:51 +00:00
Sébastien Loriot 60daeac153 merge from Spatial_sorting-increase_dimension-odevil 2011-05-26 12:36:10 +00:00
Sébastien Loriot 36a988ac26 correct svn tags 2011-05-26 12:31:19 +00:00
Olivier Devillers 5c4013d808 edit on coyright years 2011-05-26 12:03:56 +00:00
Sébastien Loriot b35ab8afb6 conditionnal include path for property_map.hpp 2011-05-26 06:41:06 +00:00
Sébastien Loriot 1177c88b9c remove warnings 2011-05-25 09:26:38 +00:00
Sébastien Loriot ca1d3536d9 *use Point_dimension_d in adapter_d
*remove const in Kernel_d result_type functors
2011-05-25 09:23:01 +00:00
Sébastien Loriot b9e7afba64 merge from Spatial_sorting-increase_dimension-odevil 2011-05-25 09:00:55 +00:00
Olivier Devillers 4934cff531 add Point_dimension_d functor in kerneld and spatial_sorting_d traits class 2011-05-25 08:39:09 +00:00
Sébastien Loriot 397d3c079a *add Spatial_sort_traits_adapter_d and its documentation
*update reference manual(comments sort_indice which is outdated) and 
 reintroduced myPoint.cpp example
*remove unused variable warning
*remove const bool warning
2011-05-24 16:36:48 +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
Olivier Devillers d465be6a7e warning test-suite 2011-05-12 07:43:26 +00:00
Olivier Devillers c39e70305f warning test-suite 2011-05-10 07:36:24 +00:00
Olivier Devillers ba2d4c67ad bug for very high dim 2011-05-05 07:28:18 +00:00
Olivier Devillers 2afd39edc3 adding predicate Less_coordinate_d 2011-04-29 14:31:48 +00:00
Olivier Devillers f03e320476 solving some problems in default template parameters 2011-04-28 13:06:37 +00:00
Olivier Devillers e451196060 add default parameter in constructors of Hilbert_sort_23d 2011-04-28 10:14:34 +00:00
Olivier Devillers dc3c56335b almost ready 2011-04-28 09:50:28 +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
Andreas Fabri 660ddafafd Default constructor of boost::rand48 is good enough 2010-01-28 07:48:26 +00:00
Andreas Fabri 0874e2604e Add random_shuffle to the high level functions 2010-01-27 13:48:02 +00:00
Sylvain Pion 8573fe26ce Rename CGALi to internal. 2009-08-24 17:10:04 +00:00
Sylvain Pion e7eec7c62e What's wrong with spatial sorting billions of points?
Change int to std::ptrdiff_t or difference_type.
2008-11-28 09:07:23 +00:00
Sylvain Pion 493f5b362b Switch from QPL to LGPL 2007-03-07 11:37:05 +00:00
Sylvain Pion 45ca093053 add copyright/license headers 2007-02-14 15:11:52 +00:00
Sylvain Pion c5a77c65da Use the same default for the "limit" parameter within the hilbert_sort
functions, as in the Hilbert_sort_[23] classes.
(makes hilbert_sort() in sync with its documentation)
2007-02-14 15:10:08 +00:00
Christophe Delage 05c48bbd29 Slight function objects interface changes 2006-09-15 06:41:40 +00:00
Christophe Delage e7515c4f5e added #include <functional> 2006-05-16 09:12:24 +00:00
Christophe Delage 4e28b57a64 Big changes.
- brio_sort is now called spatial_sort.
- global functions now have the same names in 2D and 3D.
2006-03-06 15:24:33 +00:00
Christophe Delage 2ee4da70e2 Initial import of Spatial_sorting 2006-02-20 15:32:51 +00:00