Fixed a bug causing the tree to have linear depth in some degenerated
cases, e.g. when points are on a segment or on a hyperplane in general.
Added a check of the tight bounding box to avoid that.
Also set the default bucket_size from 3 to 10, which results in much
better runtime.
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.
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
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
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
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).
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.
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.
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).
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
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.