Commit Graph

66 Commits

Author SHA1 Message Date
Mael Rouxel-Labbé c0cbdab3d8 Fix a bug in Spatial_searching's fuzzy_sphere
The contains() function (and its variations) returned false
for all points on the sphere.
2014-07-15 17:54:45 +02:00
Mael Rouxel-Labbé 5ed7255adb Fix a bug in Spatial_searching's fuzzy_iso_box
The contains() function (and its variations) returned false for
all points points P(x,y,z) such that x=box.xmax() or y=box.ymax()
or z=box.zmax(). This excluded some points from being found when
querying a kd tree.
2014-07-08 15:55:14 +02:00
Eric Berberich dee9fc8235 Merge branch 'Snap_rounding_2-kd_tree_replacement-wkhan-old' into Snap_rounding_2-kd_tree_replacement-wkhan
Conflicts:
	Installation/changes.html
2014-04-09 10:11:35 +02:00
Eric Berberich 9d8a02aa46 rephrased documentation for capacity in Kd_tree 2014-03-28 14:50:18 +01:00
Waqar Khan 98e6007dd3 * Added the capacity() function to the Kd_tree.h and also added its documentation
* Added a test that checks the reserve() and capacity() function for Kd_tree
2014-03-26 18:02:04 +01:00
Eric Berberich 85894658ef fixed copyright headers 2014-03-10 00:03:24 +01:00
Waqar Khan 1c355ef42a 1. "Snap_rounding_traits_2.h" "Snap_rounding_kd_2.h" "Kd_tree.h" "snap_rounding_data.cpp", Changed the File header signature to match the templated signatures.
2. Made the required changes in the concepts i.e. in "Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h"
 3. Added documentation for the reserve() method of Kd_tree
 4. Deleted the un maintained olk kd_tree package
2014-03-07 16:13:44 +01:00
Waqar Khan 0e14493632 1. "snap_rounding_data.cpp" Added Example usage in-code documentation. Removed the timer that recorded the amount of time taken by the snap_rounding. The timer was initally added to test the snap rounding running time difference using new Kd_trees
2. "Snap_rounding_kd_2.h" "Snap_rounding_traits_2.h" Added documentation and changed Copyright information and authors appropriately.
3. "kd_tree.h" Renamed the reserve_to_capacity() to reserve().
4. Snap_rounding_kd_new.h deleted
2014-03-01 18:58:40 +01:00
Sébastien Loriot f5e96a20ea add parenthesis 2014-02-24 07:09:13 +01:00
Sébastien Loriot 0b3c2ae383 fix a documentation bug and add static assertions
the class Search_traits_adapter must use only Lvalue_property_map since
  it uses the Cartesian_const_iterator from the base class which is usually
  simply the pointer on the double in the point. If the point returned by
  the property map is a temporaty, the iterator is invalid and its behavior
  is undefined
2014-02-21 15:36:40 +01:00
Waqar Khan b46b37e7b2 reserve_to_capacity() method for Kd_tree.h that pre-allocated memory for points added. New Snap_rounding example added where the input data is taken from a file. Snap_rounding_kd_2.h modified to use the reserve_to_capacity method before creating the kd_tree. This improves the running time. 2014-02-18 01:41:44 +01:00
Andreas Fabri 6c547e5663 Mainly added includes 2013-09-13 22:24:30 +02:00
Andreas Fabri 776a8d66e0 unsigned int -> int 2013-02-27 14:28:47 +01:00
Philipp Möller 542f5d9c51 Merged ^/branches/next here 2012-04-16 08:53:21 +00:00
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Sébastien Loriot 69b2f7079a BUGFIX:
incremental neighbor search classes were storing a nested ref_counted iterator
for begin() which implies that a call to operator++ on a copy of an iterator
increment the internal copy of the class (cannot make several pass).
There is still a problem in case of copy outside of the class but this is
a first step (a deep_copy method should be provided for iterators which would
need a small feature).
2012-01-05 09:45:15 +00:00
Philipp Möller 4d2480ffe0 Adjusted typedef to actually be a value instead of a reference 2011-12-06 16:37:04 +00:00
Andreas Fabri 28cac7eaaa Introduce size_type as return type for Kd_tree::size() 2011-11-21 12:47:57 +00:00
Sébastien Loriot bff8218bd0 merge from next 2011-09-30 06:51:51 +00:00
Sébastien Loriot 078e375437 small feature (testsuite OK):
https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/spatial_search_fuzzy_item_constructor
2011-09-30 06:37:08 +00:00
Sébastien Loriot 751f3ba08b the class Kd_tree is now read-only thread-safe using a mutex. 2011-09-08 16:12:51 +00:00
Sébastien Loriot 37b02012b6 fix const-correctness issue in the spatial searching package. In particular this
remove all mutable member variable and leave only one const_cast in the kd-kdtree private function
const_build. This function is called in const predicates when the tree is not already internally built.
The documentation has been update and a few typos fixed at the same time.
2011-09-07 09:04:52 +00:00
Laurent Rineau 369498d1e5 Cancel revision 64607. There had been a problem with the branch.
| ------------------------------------------------------------------------
  | r64607 | efif | 2011-07-05 17:27:04 +0200 (Tue, 05 Jul 2011) | 1 line
  | 
  | Merged feature-branch Aos_2-new_functors-tau into next
  | ------------------------------------------------------------------------
2011-07-06 11:11:58 +00:00
Sébastien Loriot fd7e66b512 in modifs of r62100 removed a needed ++i 2011-04-06 14:36:15 +00:00
Laurent Rineau 3d1fd31b75 Bug fix in <CGAL/Fuzzy_sphere.h>
Fuzzy_sphere_3<Search_traits> tried to use Point_d::dimension(), instead of
using Search_traits::Construct_cartesian_const_iterator_d. With a custom
Point_d, there was a compilation error.
2011-04-01 09:47:16 +00:00
Andreas Fabri 6ba8007815 Use CGAL::abs instead of fabs 2011-02-16 14:05:51 +00:00
Laurent Rineau b6d9716863 According to C++03 [namespace.udecl], a using declaration cannot be about a
type.
2010-12-06 11:43:05 +00:00
Sébastien Loriot 5ee07db31f operator= of iterator: do nothing when internal ptr are the same. 2010-10-22 13:17:52 +00:00
Sébastien Loriot d07f78578a add parenthesis to indicate how an expression should be evaluated.
This was done so that an assertion of Orthogonal_incremental_nearest_neighbor does
not fail in case new_off == old_off (when using floating point arithmetic).
2010-10-22 11:03:44 +00:00
Sébastien Loriot ece84b02fd iterator of Incremental_nn: add missing const to operator* + types required by std algo
itertator of Ortho_incremental_nn: the iterator tag was incorrect: forward -> input
2010-10-22 10:58:59 +00:00
Sébastien Loriot 97ddcd58ac add missing operator= which was responsible for a double delete
of a ref-counted value.
2010-10-21 14:28:31 +00:00
Andreas Fabri 0c7b263dee avoid log N reallocation steps when inserting N objects in a std::vector and add typedef Traits 2010-09-23 13:52:01 +00:00
Sébastien Loriot 9bb873a0cf remove unused variable in Base constructor 2010-08-19 12:24:38 +00:00
Sébastien Loriot 26e4e3ae68 correct bug in postfix++ of interator in incremental neighbor search methods 2010-08-18 12:53:25 +00:00
Sébastien Loriot 677fa29eb8 add operator-> in iterator of incremental neighbor search classes 2010-08-18 09:52:36 +00:00
Sébastien Loriot 975843b44e add clear function that was documented but not implemented 2010-08-18 08:41:40 +00:00
Andreas Fabri beafa441a9 1.0 -> FT(1.0) 2010-06-24 13:45:17 +00:00
Andreas Fabri 7ff07cae2c 0 -> FT(0) 2010-06-22 11:52:55 +00:00
Andreas Fabri 8f720d178f int -> size_t 2010-06-22 10:34:02 +00:00
Andreas Fabri 058ded3975 int -> size_type/std::size_t 2010-06-21 16:22:00 +00:00
Andreas Fabri 803a2dbc0e cleanup 2010-05-21 13:27:10 +00:00
Sébastien Loriot 961b9d8557 add empty() method to kdtree
handle case when kdtree is empty for all 4 nearest neighbor search method
correct sort method of bounded_priority_queue (was sorting the complete vector even if not full)
  ==> fix the crash when  k > nb input points
Modify test suite to handle these particular cases
2010-05-11 12:52:53 +00:00
Andreas Fabri 193066c8bf Add 'using' for strict ANSI compliance 2010-05-05 15:48:50 +00:00
Fernando Cacciola 13152be1ea Fixed call to base's 'branch' function 2010-03-25 14:36:39 +00:00
Sébastien Loriot 41ba81d1a4 add const to the reference taken for the query point 2010-03-15 13:33:51 +00:00
Sébastien Loriot 51eac5d5ab add comments 2010-02-25 13:49:04 +00:00
Sébastien Loriot 1382b9552d Add non-documented interface for APSS reconstruction.
Remove no longer needed Fast_orthogonal_k_neighbor_search (changes integrated in Orthogonal_k_neighbor_search)
2010-02-23 16:01:49 +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
Sébastien Loriot baee18c295 forget to save two files 2010-01-29 15:21:23 +00:00
Sébastien Loriot 93b2b7cbac Add bounded priority queue as an internal data-structure.
Use the bounded_priority_queue inside Orthogonal_k_neighbor search
and K_neighbor_search, a maximum of code is now shared by these two classes.
This reduces computation time and memory needed.
Extend the interface: to save time the sequence  k-nearest neighbors 
can be sorted (default) or not. 
Add a new test that ensures all methods find the same kth closest neighbor.
Update manual.
2010-01-29 15:19:39 +00:00